[okl4-developer] Starting 2 OKLinux instances with LCD
Nelson Tam
nelson at ok-labs.com
Mon Feb 25 18:03:41 EST 2008
Hi Damien,
On 22/02/2008, at 11:21 PM, Damien Schulz wrote:
> after having written a little procfs module to communicate with L4
> services (thanks to Jorge), I'm now trying start 2 OKLinux instances
> on a Neo-1973 GTA01bv04 platform - both with access to the LCD
> driver. It would suffice if the fastest of both linux instances
> writes to the LCD (first come, first serve), but it's not possible
> to start 2 OKLinux instances with LCD enabled.
On 23/02/2008, at 1:43 AM, Damien Schulz wrote:
> I saw that the driver framework has some rudimentary switching
> capabilities, but it's mostly commented out. I identified two
> interesting functions event_notify(EV_WOMBAT_SWITCH) and
> switch_active() in the driver code itself.
> So I guess that using devices from more than one linux instance
> should already work?! Why are those functions commented out?
One possibility that the OKL4 driver framework opens up, is for VMs
running on top of OKL4 to share a physical device.
The OKL4 driver framework has 2 components, the device server and the
device driver. The driver contains platform-specific code (writing to
memory-mapped registers, clearing IRQs, etc), it is linked into the
device server. The device server runs on its own OKL4 PD, receives
device requests from OKL4 VMs via the IPC mechanism, and has full
control of the actual physical device. The device server is also free
to queue device requests from the VMs and implement any sort of
control and/or sharing policy.
While Jorge's proposal would be one way to solve your problem, it is
probably easier for you to handle the server aspect within the LCD
device server.
Now, the LCD device server needs to handle some screen sharing policy,
the details of which is up to you, the programmer. You may use the
event EV_WOMBAT_SWITCH to help you - iirc what you provide to the 2nd
argument in register_event() is the async flag that will be set when
such an event occurs.
I hope this helps.
--
(nt)
Nelson Tam
nelson at ok-labs.com
More information about the Developer
mailing list