Hi Heinrich, On Sat, Jun 27, 2020 at 9:43 PM Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > On 6/27/20 2:12 PM, Bin Meng wrote: > > From: Bin Meng <bin.m...@windriver.com> > > > > test_efi_fit tests fail on RISC-V currently. This is due to the > > RISC-V arch_fixup_fdt() checks the #size-cells of the root node > > in order to correctly fix up the reserved memory node. > > > > Update #size-cells to 1 so tests can pass. > > > > Signed-off-by: Bin Meng <bin.m...@windriver.com> > > --- > > > > test/py/tests/test_efi_fit.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py > > index beaf4a3..3616e99 100644 > > --- a/test/py/tests/test_efi_fit.py > > +++ b/test/py/tests/test_efi_fit.py > > @@ -106,7 +106,7 @@ FDT_DATA = ''' > > > > / { > > #address-cells = <1>; > > - #size-cells = <0>; > > + #size-cells = <1>; > > As you describe above the test failed for RISC-V because the #size-cells > property is incorrect for the /reserved-memory node. > > Changing the #size-cells property here does not solve the underlying > problem that the code inserting a /reserved-memory node has a bug. That > code should insert properties #address-cells and #size-cells as needed > into the /reserved-memory node itself.
Per the DT binding, the /reserved-memory node requires #address-cells, #size-cells and they should use the same values as the root node. So the fix is to modify the root node to add a size-cell. Besides, I don't think a root node without a size-cell is useful. > > Have you been able to figure out where the /reserved-memory node is created? > > In the resulting device tree check that #size-cells remains <0> for the > /reset@0 node. I will fix this in v2. Regards, Bin