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

On the P8 platform, the devicetree contains duplicate unit addresses #237

Closed
maxpoliak opened this issue Apr 16, 2019 · 3 comments
Closed

Comments

@maxpoliak
Copy link

maxpoliak commented Apr 16, 2019

dtc utility on the linux host:

<stdout>: Warning (unique_unit_address): /memory@0: duplicate unit-address
(also used in node /interrupt-controller@0)

Nodes:

interrupt-controller@0 {
        #address-cells = < 0x00 >;
        device_type = "PowerPC-Interrupt-Source-Controller";
        compatible = "IBM,ppc-xics\0IBM,opal-xics";
        #interrupt-cells = < 0x02 >;
        reg = < 0x00 0x00 0x00 0x00 >;
        phandle = < 0x10000454 >;
        interrupt-controller;
};

memory@0 {
        ibm,chip-id = < 0x00 >;
        device_type = "memory";
        reg = < 0x00 0x00 0x40 0x00 >;
        phandle = < 0x100000cd >;
        ibm,associativity = < 0x04 0x00 0x00 0x00 0x00 >;
}; 
@oohal
Copy link
Contributor

oohal commented Apr 17, 2019

It's been like this since before the inital open source release of skiboot. I'm not sure what we're supposed to be using as the unit address though. we could change it to 0xff...ff without problems though.

@maxpoliak
Copy link
Author

I'm not sure about the memory@0, but I didn`t find a code in the Linux source, where the "reg" property or unit addr is used for "interrupt-controller" node.

If I understand correctly, you are proposing to make the following changes:

interrupt-controller@0xff..ff {
        #address-cells = < 0x00 >;
        device_type = "PowerPC-Interrupt-Source-Controller";
        compatible = "IBM,ppc-xics\0IBM,opal-xics";
        #interrupt-cells = < 0x02 >;
        reg = < 0xffffffff 0xffffffff 0x0 0x0 >;
        phandle = < 0x10000454 >;
        interrupt-controller;
};

?
Maybe I will change the reg and addr values for this node and add a new patch to the upstream, if you don't mind?

ruscur pushed a commit to ruscur/skiboot that referenced this issue Apr 22, 2019
This patch changes the unit address of the interrupt controller node
from 0 to the last - 0xffffffffffffffff, because address 0 is
reserved for memory@0 node. In the device tree, it looks like this:

interrupt-controller@0xffffffffffffffff {
	#address-cells = < 0x00 >;
	device_type = "PowerPC-Interrupt-Source-Controller";
	compatible = "IBM,ppc-xics\0IBM,opal-xics";
	#interrupt-cells = < 0x02 >;
	reg = < 0xffffffff 0xffffffff 0x00 0x00 >;
	phandle = < 0x10000454 >;
	interrupt-controller;
};

This solves the duplicate unit-address problem:
open-power#237

Signed-off-by: Maxim Polyakov <m.polyakov@yadro.com>
@maxpoliak
Copy link
Author

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