:: commit a6a88109d7314f32c5183d67b9092bd5ea5f9e36

mintsuki <mintsuki@protonmail.com> — 2021-05-22 20:20

parents: 5176a2303e

stivale2: Unbreak listing tags due to higher half pointers and verbose mode

diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c
index 1d372820..daf9d466 100644
--- a/stage23/protos/stivale2.c
+++ b/stage23/protos/stivale2.c
@@ -503,13 +503,15 @@ skip_modeset:;
     //////////////////////////////////////////////
     if (verbose) {
         print("stivale2: Generated tags:\n");
-        struct stivale2_tag *taglist = (void*)(size_t)stivale2_struct.tags;
+        struct stivale2_tag *taglist =
+                    (void*)(uintptr_t)(stivale2_struct.tags & (uint64_t)0xffffffff);
         for (size_t i = 0; ; i++) {
             print("          Tag #%u  ID: %X\n", i, taglist->identifier);
-            if (taglist->next)
-                taglist = (void*)(size_t)taglist->next;
-            else
+            if (taglist->next) {
+                taglist = (void*)(uintptr_t)(taglist->next & (uint64_t)0xffffffff);
+            } else {
                 break;
+            }
         }
     }
 
tab: 248 wrap: offon