:: commit 6e8755845e2a62396408c9b8023332c2ff6c0cd0

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

parents: cc2542f06e

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