patch-2.1.107 linux/arch/i386/boot/setup.S

Next file: linux/arch/i386/boot/tools/build.c
Previous file: linux/arch/i386/boot/compressed/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.106/linux/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
@@ -145,7 +145,7 @@
 	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 @@
 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 @@
 
 ! 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 @@
 	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 @@
 	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 @@
  	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 @@
 ! 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 @@
 
 #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 @@
 	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
@@ -532,21 +532,26 @@
 	call	empty_8042
 
 ! wait until a20 really *is* enabled; it can take a fair amount of
-! time on any
-	
+! 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
-	push	es
 	xor	ax,ax			! segment 0x0000
 	mov	ds,ax
 	dec	ax			! segment 0xffff (HMA)
-	mov	es,ax
+	mov	gs,ax
+	mov	bx,[TEST_ADDR]		! we want to restore the value later
 a20_wait:
 	inc	ax
-	mov	[0x7c00],ax		! any unused memory location < 64K
-	seg	es
-	cmp	ax,[0x7c10]		! corresponding HMA address
+	mov	[TEST_ADDR],ax
+	seg	gs
+	cmp	ax,[TEST_ADDR+0x10]
 	je	a20_wait		! loop until no longer aliased
-	pop	es
+	mov	[TEST_ADDR],bx		! restore original value
 	pop	ds
 		
 ! make sure any possible coprocessor is properly reset..
@@ -595,12 +600,12 @@
 
 ! 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.
 !
@@ -720,7 +725,7 @@
 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
@@ -742,7 +747,7 @@
 	ret
 
 !
-! Read the cmos clock. Return the seconds in al
+! Read the CMOS clock. Return the seconds in al
 !
 gettime:
 	push	cx

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov