[Skiboot] [ppc/pnv9] clarification on the dtb
Amol
suratiamol at gmail.com
Thu Mar 17 03:20:35 AEDT 2022
Hello,
Below is a part of the dtb file as passed on by the skiboot firmware to a
ppc64 pnv9 VM.
The skiboot version is the one shipped with qemu's version
"QEMU emulator version 6.2.50 (v6.2.0-1976-g6629bf78aa)"
/ {
....
compatible = "qemu,powernv9\0ibm,powernv";
model = "IBM PowerNV (emulated by qemu)";
pciex at 600c3c0000000 {
compatible = "ibm,power9-pciex\0ibm,ioda3-phb";
device_type = "pciex";
....
#address-cells = <0x03>;
#size-cells = <0x02>;
#interrupt-cells = <0x01>;
interrupt-parent = <0x804e>;
ranges = <0x2000000 0x00 0x80000000 0x600c0 0x00 0x00
0x7fff0000>;
.... /* <-------- no interrupt-map HERE */
pci at 0 {
interrupts = <0x01>; /* <------------------ HERE */
#address-cells = <0x03>;
#size-cells = <0x02>;
#interrupt-cells = <0x01>;
interrupt-map-mask = <0x00 0x00 0x00 0x07>;
interrupt-map =
<0x00 0x00 0x00 0x01 0x804e 0xfeff8 0x01
0x00 0x00 0x00 0x02 0x804e 0xfeff9 0x01
0x00 0x00 0x00 0x03 0x804e 0xfeffa 0x01
0x00 0x00 0x00 0x04 0x804e 0xfeffb 0x01>;
ranges = <0x2000000 0x00 0x00 0x2000000 0x00 0x00
0xf0000000 0x00>;
};
};
Of interest is the "interrupts = <0x01>;" property of the pci at 0 node. It has
"interrupts = <0x01>" property, which refers to the PCI #INTA. But its parent,
the ioda3 node, does not have the corresponding interrupt-map facility to
map the #INTA over to a descriptor understood/required by the interrupt
controller.
I checked a dtb, linked at [2], seemingly captured from a hardware machine,
and found no such violation at least among the pci nodes. In it, there is
a pci at 0 node with "interrupts = <0x01>", but it does have a parent, another
pci at 0 node, which possesses the interrupt-map mapping required for translation.
I checked the qemu's raw DTB output and found that it does not contain those
pci-related nodes - they are being added by skiboot.
Is such a setup allowed under the dtb spec? The skiboot function which seems to
add the nodes is pci_add_one_device_node or its peers.
Thanks,
Amol
[1] https://elinux.org/Device_Tree_Usage#Advanced_Interrupt_Mapping
[2] https://people.freebsd.org/~jhibbits/p9_vga_out_devtree.txt
More information about the Skiboot
mailing list