kernkonzept / manifest

The main L4Re manifest to checkout the L4Re operating system.
GNU General Public License v2.0
19 stars 5 forks source link

Problem about IO memory map #9

Open Milon-yang opened 2 years ago

Milon-yang commented 2 years ago

Hi,

I am trying to create a memory region for "interrupt-controller" register in L4RE, using the below blocks: _reg = <0x0 0x06000000 0 0x10000>, // GIC Dist <0x0 0x06200000 0 0x200000>, // GICR (RD_base + SGIbase) <0x0 0x0c0c0000 0 0x2000>, // GICC <0x0 0x0c0d0000 0 0x1000>, // GICH <0x0 0x0c0e0000 0 0x20000>; // GICV

I also add memory map information in io.cfg as below: _gic = Hw.Device(function() compatible = "arm,gic-v3", "arm,gic-400", "arm,cortex-a15-gic", "arm,cortex-a9-gic"; Property.hid = "fsl,gic"; Resource.reg0 = Res.mmio(0x6000000, 0x6000000 + 0x10000 - 1); Resource.reg1 = Res.mmio(0x6200000, 0x6200000 + 0x200000 - 1); Resource.reg2 = Res.mmio(0xc0c0000, 0xc0c0000 + 0x2000 - 1); Resource.reg3 = Res.mmio(0xc0d0000, 0xc0d0000 + 0x1000 - 1); Resource.reg4 = Res.mmio(0x6020000, 0x6020000 + 0x20000 - 1); Resource.reg5 = Res.mmio(0xc0e0000, 0xc0e0000 + 0x20000 - 1); Resource.irq0 = Res.irq(32 + 9, Io.Resource.Irq_type_levelhigh); end)

But when L4RE boot, it will report the error: _VMM: FATAL: Unmergable mmio regions: [6200000:63fffff] (N12_GLOBAL__N_17Dist_v36RedistE) <-> [6200000:63fffff] (mmio ds: [200000 - ?] -> [16000:6200000 - ?]) vm1 | terminate called after throwing an instance of 'N2L413RuntimeerrorE' vm1 | what: Invalid argument: Unmergable mmio regions

Please help to check the error reason, Thanks a lot.

alacko commented 2 years ago

Hi. For a VM the interrupt controller is handled by the virtualization layer and uvmm, i.e. there is no need to configure something in io for this. It is not passed through. I believe the error is coming the configuration that the regions are also available via io. My guess would be it disappears when the regions are removed from the io configuration.

Milon-yang commented 2 years ago

Hi, I remove the regions from the io configuration, the error disappeared, thanks. But I need to use these regions for network, for example, my dts has "fsl-mc@80c000000" as below:

1639031569(1)

The “fsl-mc” node need a sub node " msi-parent = <&its>", while the "its"node is defind in "gic: interrupt-controller@6000000" as below:

1639031745(1)

The problem is when I use this dts to build and boot L4RE, it will report the error "gic-its@6020000: unable to locate ITS domain", you could refer to the log in attachment for more detail.

log.zip

alacko commented 2 years ago

Hi, thanks for describing your use-case. The network device needs MSI support which is not yet supported, however we're doing something about it. Stay tuned or talk to me directly. Thanks Adam

Milon-yang commented 2 years ago

OK, thanks Adam.