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>
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
.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"
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
;
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