diff --git a/arch/x86/core/crt0.S b/arch/x86/core/crt0.S index 3ec74d02d393..069cf76c42fe 100644 --- a/arch/x86/core/crt0.S +++ b/arch/x86/core/crt0.S @@ -107,74 +107,6 @@ __start: cli - -/* - * Platforms that need to enable the A20 line to boot properly wil enable this - * option. - */ -#ifdef CONFIG_BOOT_A20_ENABLE - - /* - * Set the stack pointer to just before the start of the .text - * section. This needs to be performed before any BIOS invocations. - * - * Note that attempting to set the stack pointer to beyond the end of - * the static ELF image (indicated via the _end symbol) may result - * in pointer wrap-around for images with large BSS sections - * (since the processor is still in "real" mode and thus the stack - * pointer is only a 16 bits). - */ - - movl $__start, %esp - - /* - * Before switching to 32-bit protected mode, Gate-A20 must be - * enabled (legacy PC hardware issue). - * - * The classical method of enabling address line A20 via the 8042 - * keyboard controller will not be performed. Instead, it will be - * assumed that the board has a relatively modern BIOS which supports - * the following int 15h function: - * - * - int 15h: ax=2400 -> disable A20 - * - int 15h: ax=2401 -> enable A20 - * If successful: CF clear, AH = 00h - * On error: CF set, AH = status - * Status: 01h keyboard controller is in secure mode - * 86h function not supported - * - int 15h: ax=2402 -> query status A20 - * status (0: disabled, 1: enabled) is returned in AL - * - int 15h: ax=2403 -> query A20 support (kbd or port 92) - * status (bit 0: kbd, bit 1: port 92) is returned in BX - * - * Return values: - * If successful: carry flag (CF) clear, AH = 00h - * On error: carry flag (CF) set, AH = status - * Status: 01h keyboard controller is in secure mode - * 86h function not supported - * - * If the int15h method fails, then the system control port A - * (I/O port 0x92) method will be used. - */ - - movw $0x2401, %ax /* ax=2401 -> enable A20 */ - int $0x15 - jnc A20Enabled /* CF = 1 -> try I/O port 0x92 method */ - - /* try enabling Gate-A20 via system control port A (I/O port 0x92) */ - - movb $0x02, %al - outb %al, $0x92 - - xorl %ecx, %ecx -A20EnableWait: - inb $0x92, %al - andb $0x02, %al - loopz A20EnableWait - -A20Enabled: -#endif /* CONFIG_BOOT_A20_ENABLE */ - /* load Interrupt Descriptor and Global Descriptor tables (IDT & GDT) */ lgdt %cs:_GdtRom /* load 32-bit operand size GDT */ diff --git a/misc/Kconfig b/misc/Kconfig index da8cc22e4e52..7b65d1397d1c 100644 --- a/misc/Kconfig +++ b/misc/Kconfig @@ -234,15 +234,6 @@ config PROT_MODE_SWITCH This option causes the kernel to transition from real mode (16-bit) to protected mode (32-bit) during its initial booting sequence. -config BOOT_A20_ENABLE - bool "Boot A20 enable" - depends on PROT_MODE_SWITCH - default n - help - This option causes the A20 line to be enabled during the transition - from real mode (16-bit) to protected mode (32-bit) during its initial - booting sequence. - endmenu menu "System Monitoring Options"