a20: remove DO_WBINVD configurable
authorH. Peter Anvin <hpa@linux.intel.com>
Tue, 21 Apr 2009 23:16:32 +0000 (16:16 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 21 Apr 2009 23:16:32 +0000 (16:16 -0700)
We haven't enabled DO_WBINVD for a very long time.  A20 is implemented
on the inside of the L1 cache for 486+ (and 386 didn't have WBINVD),
so an I/O delay is the only thing we can rely on anyway.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core/bcopy32.inc
core/config.inc
core/cpuinit.inc

index 71eb449..97b9263 100644 (file)
@@ -213,12 +213,6 @@ enable_a20:
                mov byte [cs:A20Tries],255 ; Times to try to make this work
 
 try_enable_a20:
-;
-; Flush the caches
-;
-%if DO_WBINVD
-               call try_wbinvd
-%endif
 
 ;
 ; First, see if we are on a system with no A20 gate, or the A20 gate
@@ -375,15 +369,6 @@ empty_8042:
 .done:         ret
 
 ;
-; Execute a WBINVD instruction if possible on this CPU
-;
-%if DO_WBINVD
-try_wbinvd:
-               wbinvd
-               ret
-%endif
-
-;
 ; The 32-bit copy and shuffle code is "special", so it is in its own file
 ;
 %include "bcopyxx.inc"
index 782cc79..5a3d1c5 100644 (file)
@@ -26,8 +26,6 @@ DEFAULT_BAUD  equ 9600                ; Default baud rate for serial port
 BAUD_DIVISOR   equ 115200              ; Serial port parameter
 MAX_FKEYS      equ 12                  ; Number of F-key help files
 
-%assign        DO_WBINVD 0                     ; Should we use WBINVD or not?
-
 ;
 ; Local boot supported
 ;
index 400df40..4d8cc2e 100644 (file)
@@ -39,32 +39,6 @@ dosram_k     equ (real_mode_seg+0x1000) >> 6 ; Minimum DOS memory (K)
 enough_ram:
 skip_checks:
 
-;
-; Check if we're 386 (as opposed to 486+); if so we need to blank out
-; the WBINVD instruction
-;
-; We check for 486 by setting EFLAGS.AC
-;
-%if DO_WBINVD
-               pushfd                          ; Save the good flags
-               pushfd
-               pop eax
-               mov ebx,eax
-               xor eax,(1 << 18)               ; AC bit
-               push eax
-               popfd
-               pushfd
-               pop eax
-               popfd                           ; Restore the original flags
-               xor eax,ebx
-               jnz is_486
-;
-; 386 - Looks like we better blot out the WBINVD instruction
-;
-               mov byte [try_wbinvd],0c3h              ; Near RET
-is_486:
-%endif ; DO_WBINVD
-
                section .data
 err_noram      db 'It appears your computer has less than '
                asciidec dosram_k