:: commit f3d3b2465cd63fdc9cfff04a034a2dc1d6157243

Mintsuki <mintsuki@protonmail.com> — 2026-01-04 16:11

parents: 0602546ad2

mm/pmm: Fix align_entry() checking pointer instead of value

diff --git a/common/mm/pmm.s2.c b/common/mm/pmm.s2.c
index aced997f..b17b45d0 100644
--- a/common/mm/pmm.s2.c
+++ b/common/mm/pmm.s2.c
@@ -111,7 +111,7 @@ static bool align_entry(uint64_t *base, uint64_t *length) {
     *length -= (*base - orig_base);
     *length =  ALIGN_DOWN(*length, PAGE_SIZE);
 
-    if (!length)
+    if (*length == 0)
         return false;
 
     return true;
tab: 248 wrap: offon