diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2012-10-31 14:29:59 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2012-10-31 14:29:59 +0000 |
commit | a598db0083212e273ae26daa59426c4ba169554a (patch) | |
tree | 97d7502ead59333573a0ec5a1969ce2626d62e7d /sys | |
parent | e772b4962af05067355f7a7df7deec2c66eb6763 (diff) |
Save and restore %ebx across the call to read. Otherwise we load the first
64KB segment at 0x7c00 and any additional 64KB segments over top of each
other at 0x10000.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/stand/cdbr/cdbr.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/cdbr/cdbr.S b/sys/arch/i386/stand/cdbr/cdbr.S index e9947c2cbe2..2089c8b49d8 100644 --- a/sys/arch/i386/stand/cdbr/cdbr.S +++ b/sys/arch/i386/stand/cdbr/cdbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cdbr.S,v 1.2 2004/08/24 15:24:05 tom Exp $ */ +/* $OpenBSD: cdbr.S,v 1.3 2012/10/31 14:29:58 jsing Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove <tom.cosgrove@arches-consulting.com> @@ -204,9 +204,11 @@ load_loop: load_notrunc: subb %dh, %cl /* Update count */ pushl %eax /* Save */ - movw %bx, %es /* %bx had the segment (para) number */ - xorw %bx, %bx /* %es:0000 for destination */ + pushl %ebx /* Save */ + movw %bx, %es /* %bx has the segment (para) number */ + xorw %bx, %bx /* %es:0000 for destination */ call read /* Read it in */ + popl %ebx /* Restore */ popl %eax /* Restore */ addl $MAX_READ_SEC, %eax /* Update LBA */ addw $MAX_READ_PARAS, %bx /* Update dest addr */ |