Index: branches/zenith432/i386/libsaio/biosfn.c =================================================================== --- branches/zenith432/i386/libsaio/biosfn.c (revision 2594) +++ branches/zenith432/i386/libsaio/biosfn.c (revision 2595) @@ -1042,3 +1042,10 @@ bios(&bb); } +void enableA20(void) +{ + bzero(&bb, sizeof bb); // Note: may be called before BSS section is initialized + bb.intno = 0x15; + bb.eax.rr = 0x2401; + bios(&bb); +} Index: branches/zenith432/i386/libsaio/misc.c =================================================================== --- branches/zenith432/i386/libsaio/misc.c (revision 2594) +++ branches/zenith432/i386/libsaio/misc.c (revision 2595) @@ -46,6 +46,7 @@ #include "libsaio.h" +#if UNUSED /* * keyboard controller (8042) I/O port addresses */ @@ -107,6 +108,7 @@ /* wait until done */ flushKeyboardInputBuffer(); } +#endif /* UNUSED */ //========================================================================== // Return the platform name for this hardware. Index: branches/zenith432/i386/libsaio/saio_internal.h =================================================================== --- branches/zenith432/i386/libsaio/saio_internal.h (revision 2594) +++ branches/zenith432/i386/libsaio/saio_internal.h (revision 2595) @@ -72,6 +72,7 @@ extern unsigned long getExtendedMemorySize(); extern unsigned long getConventionalMemorySize(); extern void sleep(int n); +extern void enableA20(void); /* bootstruct.c */ extern void initKernBootStruct(void); @@ -137,7 +138,6 @@ long AllocateMemoryRange(char *rangeName, long start, long length, long type); /* misc.c */ -extern void enableA20(void); extern int checkForSupportedHardware(); extern int isLaptop(); extern void getPlatformName(char *nameBuf); Index: branches/zenith432/i386/boot2/boot.c =================================================================== --- branches/zenith432/i386/boot2/boot.c (revision 2594) +++ branches/zenith432/i386/boot2/boot.c (revision 2595) @@ -418,9 +418,9 @@ // own things, and then calls common_boot. void boot(int biosdev) { - initialize_runtime(); // Enable A20 gate before accessing memory above 1Mb. enableA20(); + initialize_runtime(); common_boot(biosdev); } Index: branches/zenith432/i386/libsa/zalloc.c =================================================================== --- branches/zenith432/i386/libsa/zalloc.c (revision 2594) +++ branches/zenith432/i386/libsa/zalloc.c (revision 2595) @@ -75,7 +75,7 @@ zalloc_base = start ? start : (char *)ZALLOC_ADDR; totalNodes = nodes ? nodes : ZALLOC_NODES; zalloced = (zmem *) zalloc_base; - zavailable = (zmem *) zalloc_base + sizeof(zmem) * totalNodes; + zavailable = (zmem *) (zalloc_base + sizeof(zmem) * totalNodes); zavailable[0].start = (char *)zavailable + sizeof(zmem) * totalNodes; if (size == 0)