:: commit b43094de960e5939aee4d09f12bf1947b68d34a2

Mintsuki <mintsuki@protonmail.com> — 2026-02-08 16:35

parents: 890c1aa18f

sys/smp: Reject address_cells == 0 in AArch64 DTB SMP enumeration

diff --git a/common/sys/smp.c b/common/sys/smp.c
index 9435fb47..8d8816d2 100644
--- a/common/sys/smp.c
+++ b/common/sys/smp.c
@@ -605,7 +605,7 @@ static struct limine_mp_info *try_dtb_smp( void *dtb,
     }
 
     int address_cells = fdt_address_cells(dtb, cpus);
-    if (address_cells < 0) {
+    if (address_cells < 1) {
         printv("smp: fdt_address_cells failed: %s\n", fdt_strerror(address_cells));
         return NULL;
     }
tab: 248 wrap: offon