*** linux/arch/i386/boot/setup.S~ Tue Aug 5 06:48:39 1997 --- linux/arch/i386/boot/setup.S Tue Aug 5 06:49:05 1997 *************** *** 26,31 **** --- 26,35 ---- ! ! Video handling moved to video.S by Martin Mares, March 1996 ! + ! + ! Extended memory detection scheme retwiddled by orc@pell.chi.il.us (jessica l. + ! parsons) to avoid loadlin confusion, July 1997 + ! ! NOTE! These had better be the same as in bootsect.s! #define __ASSEMBLY__ *************** *** 232,240 **** --- 236,279 ---- loader_ok: ! Get memory size (extended mem, kB) + #ifndef STANDARD_MEMORY_BIOS_CALL + push ax + push cx + push dx + xor eax,eax + mov [0x1e0], eax + + mov ax,#0xe801 + int 0x15 + jc oldstylemem + + ! memory size is in 1k chunksizes, to avoid confusing loadlin. + ! we store the 0xe801 memory size in a completely different place, + ! because it will most likely be longer than 16 bits. + ! (use 1e0 because that's what Larry Augustine uses in his + ! alternative new memory detection scheme, and it's sensible + ! to write everything into the same place.) + + and ebx, #0xffff ! clear sign extend + shl ebx, 6 ! and go from 64k to 1k chunks + mov [0x1e0],ebx ! store extended memory size + + and eax, #0xffff ! clear sign extend + add [0x1e0],eax ! and add lower memory into total size. + + ! and fall into the old memory detection code to populate the + ! compatability slot. + oldstylemem: + #endif mov ah,#0x88 int 0x15 mov [2],ax + + #ifndef STANDARD_MEMORY_BIOS_CALL + pop dx + pop cx + pop ax + #endif ! Set the keyboard repeat rate to the max *** linux/arch/i386/kernel/setup.c~ Tue Aug 5 06:48:46 1997 --- linux/arch/i386/kernel/setup.c Tue Aug 5 06:49:05 1997 *************** *** 82,87 **** --- 82,90 ---- */ #define PARAM empty_zero_page #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) + #ifndef STANDARD_MEMORY_BIOS_CALL + #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) + #endif #ifdef CONFIG_APM #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+64)) #endif *************** *** 109,114 **** --- 112,118 ---- unsigned long * memory_start_p, unsigned long * memory_end_p) { unsigned long memory_start, memory_end; + unsigned long memory_alt_end; char c = ' ', *to = command_line, *from = COMMAND_LINE; int len = 0; static unsigned char smptrap=0; *************** *** 127,132 **** --- 131,145 ---- #endif aux_device_present = AUX_DEVICE_INFO; memory_end = (1<<20) + (EXT_MEM_K<<10); + #ifndef STANDARD_MEMORY_BIOS_CALL + memory_alt_end = (1<<20) + (ALT_MEM_K<<10); + if (memory_alt_end > memory_end) { + printk("Memory: sized by int13 0e801h\n"); + memory_end = memory_alt_end; + } + else + printk("Memory: sized by int13 088h\n"); + #endif memory_end &= PAGE_MASK; #ifdef CONFIG_BLK_DEV_RAM rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;