Subject: Re: is it boot or is it me?
To: Marc Recht <marc@informatik.uni-bremen.de>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 02/05/2003 13:24:26
> No, I don't see that "Memory: " line.
I bit of hunting shows a couple of routines where I failed to
correct the buffer addresses passed to the bios.
(I wonder how my system gets the correct memory size...)
The patch below might fix it.
David
Index: lib/biosmemps2.S
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/stand/lib/biosmemps2.S,v
retrieving revision 1.1
diff -u -r1.1 biosmemps2.S
--- lib/biosmemps2.S 2003/01/23 21:22:25 1.1
+++ lib/biosmemps2.S 2003/02/05 13:16:11
@@ -81,6 +81,11 @@
# move the parameter to right register
data32
movl %edx, %esi
+ andl $0xf, %esi
+ shrl $4, %edx
+ mov %ds, %ax
+ add %dx, %ax
+ mov %ax, %ds
# actually call int15, function 0xc7 now
movb $0xc7, %ah
Index: lib/biosmemx.S
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/stand/lib/biosmemx.S,v
retrieving revision 1.3
diff -u -r1.3 biosmemx.S
--- lib/biosmemx.S 2003/02/01 14:48:18 1.3
+++ lib/biosmemx.S 2003/02/05 13:16:12
@@ -108,6 +108,14 @@
call _C_LABEL(prot_to_real)
.code16
+ push %di
+ shrl $4, %edi
+ mov %ds, %ax
+ add %di, %ax
+ mov %ax, %ds
+ pop %di
+ and $0xf, %di
+
movw $0xe820, %ax
int $0x15
--
David Laight: david@l8s.co.uk