Skip to contentSkip to conversation

test/py: test_efi_fit: Update #size-cells to 1

PATCH New Bin Meng 2 participants 3 messages Jun 27, 2020 – Jun 28, 2020

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 test/py: test_efi_fit: Update #size-cells to 1

From: Bin Meng <[email protected]>

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.

---

 test/py/tests/test_efi_fit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_efi_fit.py +1 -1
index beaf4a3..3616e99 100644
@@ -106,7 +106,7 @@ FDT_DATA = '''
 
 / {
     #address-cells = <1>;
-    #size-cells = <0>;
+    #size-cells = <1>;
 
     model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
     compatible = "%(sys-arch)s";
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 test/py: test_efi_fit: Update #size-cells to 1

Quoted 19 lines · Bin Meng

From: Bin Meng <[email protected]>

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.

---

 test/py/tests/test_efi_fit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_efi_fit.py +0 -0
index beaf4a3..3616e99 100644

test/py/tests/test_efi_fit.py FDT_DATA = ''' · line 109

Quoted 5 lines
test/py/tests/test_efi_fit.py +1 -1
@@ -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.

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 at 0 node.

Best regards

Heinrich

Quoted 4 lines
test/py/tests/test_efi_fit.py +0 -0
     model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
     compatible = "%(sys-arch)s";
 
author
#2 lore raw

PATCH 1/1 test/py: test_efi_fit: Update #size-cells to 1

Hi Heinrich,

Quoted 30 lines · Heinrich Schuchardt
Quoted 19 lines · Bin Meng

From: Bin Meng <[email protected]>

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.

---

 test/py/tests/test_efi_fit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_efi_fit.py +0 -0
index beaf4a3..3616e99 100644

test/py/tests/test_efi_fit.py FDT_DATA = ''' · line 109

Quoted 5 lines
test/py/tests/test_efi_fit.py +1 -1
@@ -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.

Quoted 4 lines

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.

Quoted 5 lines

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 at 0 node.

I will fix this in v2.

Regards,
Bin