bios: Call a20_enable() before doing anything else
diff --git a/stage23/entry.s2.c b/stage23/entry.s2.c
index a63a7c8b..dcaf9cae 100644
--- a/stage23/entry.s2.c
+++ b/stage23/entry.s2.c
@@ -70,6 +70,10 @@ enum {
__attribute__((noreturn))
void entry(uint8_t boot_drive, int boot_from) {
+ // XXX DO NOT MOVE A20 ENABLE CALL
+ if (!a20_enable())
+ panic("Could not enable A20 line");
+
init_e820();
init_memmap();
@@ -77,9 +81,6 @@ void entry(uint8_t boot_drive, int boot_from) {
copyright_notice();
- if (!a20_enable())
- panic("Could not enable A20 line");
-
init_idt();
disk_create_index();
