From ac2061abfe89c3b16e2a1b365ba59c849f0ba3d8 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 24 Nov 2016 15:12:05 +0100 Subject: [PATCH] ps2: handle platform session memory requests Issue #1039 --- repos/os/src/drivers/input/spec/ps2/x86/main.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/repos/os/src/drivers/input/spec/ps2/x86/main.cc b/repos/os/src/drivers/input/spec/ps2/x86/main.cc index a093e1dd0..8e970dfe7 100644 --- a/repos/os/src/drivers/input/spec/ps2/x86/main.cc +++ b/repos/os/src/drivers/input/spec/ps2/x86/main.cc @@ -13,8 +13,7 @@ /* base includes */ #include -#include -#include +#include /* os includes */ #include @@ -40,6 +39,14 @@ struct Main Input::Root_component root; Platform::Connection platform; + + Platform::Device_capability cap_ps2() + { + return Genode::retry( + [&] () { return platform.device("PS2"); }, + [&] () { platform.upgrade_ram(4096); }); + } + Platform::Device_client device_ps2; I8042 i8042; @@ -59,7 +66,7 @@ struct Main Main(Server::Entrypoint &ep) : ep(ep), root(ep.rpc_ep(), session), - device_ps2(platform.device("PS2")), + device_ps2(cap_ps2()), i8042(device_ps2.io_port(REG_IOPORT_DATA), device_ps2.io_port(REG_IOPORT_STATUS)), ps2_keybd(*i8042.kbd_interface(), session.event_queue(),