summaryrefslogtreecommitdiffstats
path: root/arch/i386/boot/setup.S
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
commitc7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch)
tree3682407a599b8f9f03fc096298134cafba1c9b2f /arch/i386/boot/setup.S
parent1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff)
o Merge with Linux 2.1.116.
o New Newport console code. o New G364 console code.
Diffstat (limited to 'arch/i386/boot/setup.S')
-rw-r--r--arch/i386/boot/setup.S55
1 files changed, 39 insertions, 16 deletions
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
index 60261b836..0959487c1 100644
--- a/arch/i386/boot/setup.S
+++ b/arch/i386/boot/setup.S
@@ -145,7 +145,7 @@ start_of_setup:
jne bad_sig
jmp good_sig1
-! Routine to print asciiz-string at DS:SI
+! Routine to print ASCII string at DS:SI
prtstr: lodsb
and al,al
@@ -159,7 +159,7 @@ fin: ret
prtsp2: call prtspc ! Print double space
prtspc: mov al,#0x20 ! Print single space (fall-thru!)
-! Part of above routine, this one just prints ascii al
+! Part of above routine, this one just prints ASCII al
prtchr: push ax
push cx
@@ -226,12 +226,12 @@ good_sig:
! check if an old loader tries to load a big-kernel
seg cs
- test byte ptr loadflags,#LOADED_HIGH ! have we a big kernel ?
+ test byte ptr loadflags,#LOADED_HIGH ! Have we a big kernel?
jz loader_ok ! NO, no danger even for old loaders
! YES, we have a big-kernel
seg cs
- cmp byte ptr type_of_loader,#0 ! have we one of the new loaders ?
- jnz loader_ok ! YES, ok
+ cmp byte ptr type_of_loader,#0 ! Have we one of the new loaders?
+ jnz loader_ok ! YES, OK
! NO, we have an old loader, must give up
push cs
pop ds
@@ -239,7 +239,7 @@ good_sig:
call prtstr
jmp no_sig_loop
loader_panic_mess:
- .ascii "Wrong loader, giving up..."
+ .ascii "Wrong loader: giving up."
db 0
loader_ok:
@@ -255,8 +255,8 @@ loader_ok:
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,
+! Memory size is in 1 k 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
@@ -270,7 +270,7 @@ loader_ok:
add [0x1e0],eax ! and add lower memory into total size.
! and fall into the old memory detection code to populate the
- ! compatability slot.
+ ! compatibility slot.
oldstylemem:
pop ebx
@@ -290,7 +290,7 @@ oldstylemem:
! Check for video adapter and its parameters and allow the
! user to browse video modes.
- call video ! NOTE: we need DS pointing to bootsector
+ call video ! NOTE: we need DS pointing to boot sector
! Get hd0 data
@@ -380,7 +380,7 @@ no_psmouse:
#ifdef CONFIG_APM
! check for APM BIOS
- ! NOTE: DS is pointing to the bootsector
+ ! NOTE: DS is pointing to the boot sector
!
mov [64],#0 ! version == 0 means no APM BIOS
@@ -479,7 +479,7 @@ end_move:
mov ds,ax
! If we have our code not at 0x90000, we need to move it there now.
-! We also then need to move the params behind it (commandline)
+! We also then need to move the parameters behind it (command line)
! Because we would overwrite the code on the current IP, we move
! it in two steps, jumping high after the first one.
mov ax,cs
@@ -531,6 +531,29 @@ end_move_self:
out #0x60,al
call empty_8042
+! wait until a20 really *is* enabled; it can take a fair amount of
+! time on certain systems; Toshiba Tecras are known to have this
+! problem. The memory location used here is the int 0x1f vector,
+! which should be safe to use; any *unused* memory location < 0xfff0
+! should work here.
+
+#define TEST_ADDR 0x7c
+
+ push ds
+ xor ax,ax ! segment 0x0000
+ mov ds,ax
+ dec ax ! segment 0xffff (HMA)
+ mov gs,ax
+ mov bx,[TEST_ADDR] ! we want to restore the value later
+a20_wait:
+ inc ax
+ mov [TEST_ADDR],ax
+ seg gs
+ cmp ax,[TEST_ADDR+0x10]
+ je a20_wait ! loop until no longer aliased
+ mov [TEST_ADDR],bx ! restore original value
+ pop ds
+
! make sure any possible coprocessor is properly reset..
xor ax,ax
@@ -577,12 +600,12 @@ end_move_self:
! Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
! need no steenking BIOS anyway (except for the initial loading :-).
-! The BIOS-routine wants lots of unnecessary data, and it's less
+! The BIOS routine wants lots of unnecessary data, and it's less
! "interesting" anyway. This is how REAL programmers do it.
!
! Well, now's the time to actually move into protected mode. To make
! things as simple as possible, we do no register set-up or anything,
-! we let the gnu-compiled 32-bit programs do that. We just jump to
+! we let the GNU-compiled 32-bit programs do that. We just jump to
! absolute address 0x1000 (or the loader supplied one),
! in 32-bit protected mode.
!
@@ -702,7 +725,7 @@ bootsect_panic:
bootsect_panic_loop:
jmp bootsect_panic_loop
bootsect_panic_mess:
- .ascii "INT15 refuses to access high mem, giving up..."
+ .ascii "INT15 refuses to access high memory. Giving up."
db 0
! This routine checks that the keyboard command queue is empty
@@ -724,7 +747,7 @@ no_output:
ret
!
-! Read the cmos clock. Return the seconds in al
+! Read the CMOS clock. Return the seconds in al
!
gettime:
push cx