Hi Jack,
Hello Genodians,
I have a program which needs access to some hardware registers.
The Region Manager (RM) is complaining, because he cannot find the address.
no RM attachment (faulter fb710c with IP 36b614 attempts to write to address
43c00004)
How can I add this region?
In the runscript as a config setting for RM?
Add these addresses to the platform_support.cc?
Or do I need a driver to gain access to these registers?
Please, do not mix up the virtual memory of a program administrated by
its RM session with a physical address. A portion of memory mapped I/O
(hardware registers), in form of an IOMEM dataspace within Genode, is a
resource and has to be requested with a session call like other
resources too. So your driver code first needs to open an IOMEM session
(given the physical address of the hardware registers as argument),
request the dataspace, and attach that dataspace to its RM session. The
concepts behind this are explained in more detail in the "Genode
Foundations" chapter 3.4 [].
A software tool which incorporates all of these steps is the
Attached_io_mem_dataspace in file
repos/os/include/os/attached_io_mem_dataspace.h.
So incorporating:
Attached_io_mem_dataspace iomem(HARDWARE_REG_ADDR, HARDWARE_REG_SIZE);
should be sufficient. Calling the 'local_addr' member of the object
delivers the address where you can access the hardware registers within
your component.
Regards
Stefan
Best regards,
Jack
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
_______________________________________________
genode-main mailing list
--
Stefan Kalkowski
Genode Labs
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
_______________________________________________
genode-main mailing list