L4Re GPIO

Matthias Lange matthias.lange at kernkonzept.com
Sun Dec 28 12:03:32 CET 2014


Hi,

> On 23.12.2014, at 15:29, Erry Pradana Darajati <pradana.erry at gmail.com> wrote:
> 
> >> 1. I want to QEMU to accept input from keyboard to emulate and study how to
> >> use an configure of IO. I study this as a part of my main goal to access
> >> GPIOs of Pandaboard. Well, in my last email i stated that i already include
> > x86-legacy.devs module in modules.list, and define
> >> REQUIRES_LIBS=libc_be_file_
> >stdin, and using "default-kernel fiasco
> >> -serial_esc" defined. But, it still not respond to any of my keyboard
> >> input. So, what did i miss?
> >
> >The x86-legacy.devs is for x86-based platforms. The pandaboard is ARM
> >based, so you do not need that file there. Also, the input here is also
> >based on the UART that is driven by the kernel, so there's no driver
> >necessary in user-land here. As already questioned in the other mail,
> >how are you trying to get the input in your program?
> 
> Yes, I am testing this scenario in QEMU using x86 Build. The purpose of this testing is to understand how to access and use the IO using L4Re. Because i'm still not fully understand about it. So i'm trying to make a L4RE Build x86, boot it in the QEMU and directly access using keyboard input (not via serial). But i still cannot do that.
> In Pandaboard ARM. i am already understand and be able to access keyboard via UART3
> 
> >> 2. I have modified omap3 driver that included in the package to be used
> >> with omap4460 registers, but i have a few difficulties. There are few
> >> missing registers (like Clr_irq_enable1 register that not present in
> >> OMAP4460) and i am still cannot comprehend the scm_offset table. Because
> >> when i crossreferencing the source with the OMAP3 TRM the i cannot
> >> understand the value. My question is. Is it be able to use only some of the
> >> defined register to do simple IO task, and enable or disable register ?
> >
> >I've not written the particular code, but the scm_offset seems to select
> >a specific gpio block.
> >For starting to work on a driver I recommend to start with a simple
> >program and directly work on the MMIO. This helps to understand how the
> >device is working. When basic things work, such as switching pins
> >on/off, settings directions, interrupts, etc things can be integrated.
> 
> I am studying to directly access the GPIO. So if i wrote simple program (let's say main.c program in testGPIO module that i created myself). I don't need to call the .devs and .io or call the driver module ?
> And also, i already make successful block code to access GPIO but not using L4Re API. But it cannot be implemented in L4Re Block code. It's something like this :
> 
> http://pastebin.com/TMc9ieBr <http://pastebin.com/TMc9ieBr>

This piece of code is missing the mapping of the GPIO4's MMIO region. For your client program to successfully access the GPIO chip you need to create a virtual device in IO's lua configuration file. Then you attach this device to a virtual bus. In the startup script you hand IO's capability to that virtual bus to the 'vbus' cap of your client. Then you client can query its vbus to discover connected devices and their resources (see documentation of libvbus for reference). Then your client can map the GPIO's chip MMIO region.

Best,
Matthias.


--
matthias.lange at kernkonzept.com <mailto:michael.hohmuth at kernkonzept.com> - Tel. 0351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20141228/ad763216/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20141228/ad763216/attachment-0001.asc>


More information about the l4-hackers mailing list