Add option CONFIG_DISABLE_A20 to control disabling A20 on boot.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 13 Apr 2009 23:44:55 +0000 (19:44 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 13 Apr 2009 23:44:55 +0000 (19:44 -0400)
Almost nothing really wants A20 off today - so add a config option
    (and default it off) to control turning A20 off during 16bit
    bootup.

src/config.h
src/romlayout.S

index 70a90519874fec58d3f794e27cb1eed627b1754b..ccbfe08194268565029a0fce0153bf4030350ed2 100644 (file)
@@ -49,6 +49,8 @@
 #define CONFIG_KEYBOARD 1
 // Support calling int155f on each keyboard event
 #define CONFIG_KBD_CALL_INT15_4F 1
+// Disable A20 on 16bit boot
+#define CONFIG_DISABLE_A20 0
 // Support for int15c2 mouse calls
 #define CONFIG_PS2_MOUSE 1
 // If the target machine has multiple independent root buses, the
index 73b77744994e8dcfa95bb059a5453b1d4d7bccaa..80b7a4b29a965b2b7cc6a8b41c0d404a6ad4eacc 100644 (file)
@@ -188,10 +188,12 @@ __call16_from32:
         movw %ax, %fs
         movw %ax, %gs
 
+#if CONFIG_DISABLE_A20
         // disable a20
         inb $PORT_A20, %al
         andb $~A20_ENABLE_BIT, %al
         outb %al, $PORT_A20
+#endif
 
         // Jump to 16bit mode
         ljmpw $SEG32_MODE16_CS, $1f