Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem about IO memory map #9

Open
Milon-yang opened this issue Dec 8, 2021 · 4 comments
Open

Problem about IO memory map #9

Milon-yang opened this issue Dec 8, 2021 · 4 comments

Comments

@Milon-yang
Copy link

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 + SGI_base)
<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_level_high);
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 'N2L413Runtime_errorE'
vm1 | what: Invalid argument: Unmergable mmio regions

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

@alacko
Copy link

alacko commented Dec 8, 2021

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
Copy link
Author

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
Copy link

alacko commented Dec 9, 2021

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
Copy link
Author

OK, thanks Adam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants