Author: tkreuzer Date: Tue Jun 14 08:10:59 2011 New Revision: 52225
URL: http://svn.reactos.org/svn/reactos?rev=52225&view=rev Log: [FREELDR] Move EnableA20 to realmode code, remove DisableA20
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S [iso-8859-1] Tue Jun 14 08:10:59 2011 @@ -211,69 +211,11 @@ ret
- /* - * Needed for enabling the a20 address line - */ -.code16 -empty_8042: - .word 0x00eb,0x00eb // jmp $+2, jmp $+2 - in al, HEX(64) - cmp al, HEX(ff) // legacy-free machine without keyboard - jz empty_8042_ret // controllers on Intel Macs read back 0xFF - test al, 2 - jnz empty_8042 -empty_8042_ret: - ret - - /* - * Enable the A20 address line (to allow access to over 1mb) - */ -EXTERN(_EnableA20) .code32 - - pusha - - call switch_to_real -.code16 - - call empty_8042 - mov al, HEX(D1) // command write - out HEX(64), al - call empty_8042 - mov al, HEX(DF) // A20 on - out HEX(60), al - call empty_8042 - call switch_to_prot - .code32 - - popa - - ret - - /* - * Disable the A20 address line - */ -EXTERN(_DisableA20) -.code32 - - pusha - - call switch_to_real - .code16 - - call empty_8042 - mov al, HEX(D1) // command write - out HEX(64), al - call empty_8042 - mov al, HEX(DD) // A20 off - out HEX(60), al - call empty_8042 - call switch_to_prot - .code32 - - popa - - ret +PUBLIC _EnableA20 +_EnableA20: + ret +
/* Multiboot support *
Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/r... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc [iso-8859-1] Tue Jun 14 08:10:59 2011 @@ -3,21 +3,21 @@ .word 0x00eb,0x00eb // jmp $+2, jmp $+2 in al, 0x64 cmp al, 0xff // legacy-free machine without keyboard - jz empty_8042_ret // controllers on Intel Macs read back 0xFF + jz Empty8042_ret // controllers on Intel Macs read back 0xFF test al, 0x02 - jnz x86_16_Empty8042 -empty_8042_ret: + jnz Empty8042 +Empty8042_ret: ret
EnableA20: pusha - call x86_16_Empty8042 + call Empty8042 mov al, 0xD1 // command write out 0x64, al - call x86_16_Empty8042 + call Empty8042 mov al, 0xDF // A20 on out 0x60, al - call x86_16_Empty8042 + call Empty8042 popa ret
Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/r... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S [iso-8859-1] Tue Jun 14 08:10:59 2011 @@ -26,6 +26,9 @@
/* Setup the stack */ mov sp, word ptr ds:stack16 + + /* Enable A20 address line */ + call EnableA20
/* Get address of optional header */ mov eax, dword ptr ds:[FREELDR_PE_BASE + IMAGE_DOS_HEADER_e_lfanew]