Hello
I'm trying to implement a iomux for the hw_rpi platform.
Looking at the iomux.h file in the imx53 platform I created the following class for the RPI
class Iomux : public Genode::Attached_io_mem_dataspace, Genode::Mmio { public: Iomux() : Genode::Attached_io_mem_dataspace(Genode::Board_base::IOMUXC_BASE, Genode::Board_base::IOMUXC_SIZE), Genode::Mmio((Genode::addr_t)local_addr<void>()) { } } };
/* I/O mux registers */ IOMUXC_BASE = 0x7e200000, IOMUXC_SIZE = 0x00610000,
when I start the new image I get the following output on the serial console of the kernel:
kernel initialized Genode 15.05-14-gf182c88 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 247 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open ROM session for module "ld.lib.so" Quota exceeded! amount=12288, size=12288, consumed=12288 [init -> fb_drv] --- fb_drv started --- [init -> platform_drv] --- Raspberry Pi platform driver --- I/O memory [7e200000,7e810000) not available Local MMIO mapping failed! [init -> platform_drv] void* abort(): abort called ...
Do I need to set a policy to access the MMIO range?
The code can be found here: https://github.com/trimpim/genode/tree/issue1549
Best regards Pirmin
Hello,
On Tue, Jun 23, 2015 at 08:29:37AM +0000, Duss Pirmin wrote:
/* I/O mux registers */ IOMUXC_BASE = 0x7e200000, IOMUXC_SIZE = 0x00610000,
reading your MMIO-range definitions I was reminded of a section in the BCM2835 manual:
Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus addresses for peripherals are set up to map onto the peripheral bus address range starting at 0x7E000000. Thus a peripheral advertised here at bus address 0x7Ennnnnn is available at physical address 0x20nnnnnn.
Maybe you have to transpose the MMIO range first?
Regards
Hi,
On 06/23/2015 10:29 AM, Duss Pirmin wrote: [...]
/* I/O mux registers */ IOMUXC_BASE = 0x7e200000, IOMUXC_SIZE = 0x00610000,
I believe you need to add a corresponding entry to the list of available platform MMIO regions, see [1].
Regards, Adrian
[1] - https://github.com/trimpim/genode/blob/issue1549/repos/base-hw/src/core/spec...
Hey Adrian,
On Tue, Jun 23, 2015 at 12:15:16PM +0200, Adrian-Ken Rueegsegger wrote:
On 06/23/2015 10:29 AM, Duss Pirmin wrote: [...]
/* I/O mux registers */ IOMUXC_BASE = 0x7e200000, IOMUXC_SIZE = 0x00610000,
I believe you need to add a corresponding entry to the list of available platform MMIO regions, see [1].
[1] - https://github.com/trimpim/genode/blob/issue1549/repos/base-hw/src/core/spec...
This is not needed if he uses addresses in the MMIO region from line 35. Now, I'm sure this is the proper way to go.
Regards
Hi Adrian and Cristian
My error was to use the bus addresses directly without translating them. No changes other than using the addresses starting from 0x20000000 was needed.
Best Regards Pirmin