Sorry,
it seems that the patch was not included in my last email.
Here is the patch:
Index: gateA20.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/stand/libsa/gateA20.c,v
retrieving revision 1.10
diff -u -r1.10 gateA20.c
--- gateA20.c 19 Mar 2004 13:48:18 -0000 1.10
+++ gateA20.c 1 Mar 2010 14:27:58 -0000
@@ -41,6 +41,31 @@
enable data line
enable clock line */
+/*
+ * Author: Giuseppe Magnotta <[email protected]>
+ *
+ * Enable the gate A20 by using the INT 15/AX=2401h if the
+ * BIOS supports it.
+ *
+ * Returns 0 if ok or the error code fetched from AH register.
+ */
+static __inline int
+enableA20Gate(void)
+{
+ char status;
+ short r;
+
+ __asm __volatile(DOINT(0x15) "\n\t"
+ "setc %1\n\t"
+ : "=a" (r), "=r" (status)
+ : "0" (0x2401)
+ : "cc");
+
+ if (status)
+ return (r >> 8);
+ else
+ return 0;
+}
/*
* "Probe"-style routine (no parameters) to turn A20 on
@@ -58,7 +83,9 @@
void
gateA20(int on)
{
- if (ps2model == 0xf82 ||
+ if (enableA20Gate() == 0) {
+ /* gate A20 enabled! */
+ } else if (ps2model == 0xf82 ||
(inb(IO_KBD + KBSTATP) == 0xff && inb(IO_KBD + KBDATAP) == 0xff))
{
int data;