stivale2: Only test stack validity if in top 2GiB
diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c
index b237b310..02487035 100644
--- a/stage23/protos/stivale2.c
+++ b/stage23/protos/stivale2.c
@@ -273,7 +273,7 @@ failed_to_load_header_section:
print("stivale2: WARNING: Requested stack is not 16-byte aligned\n");
}
- if (stivale2_hdr.stack != 0 && ranges != NULL) {
+ if (stivale2_hdr.stack >= 0xffffffff80000000 && ranges != NULL) {
bool stack_valid = false;
for (size_t i = 0; i < ranges_count; i++) {
