diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-06-28 21:15:47 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-06-28 21:15:47 +0100 |
commit | 03ca71c38da9cc6df01ecd9ef16e97a0edb6a4e9 (patch) | |
tree | e12cc4a3e4570e217240833eec82fca22d2d7dd3 /src | |
parent | dffdc285b36c288175ffcd4d1e131465c419b859 (diff) | |
download | ipxe-03ca71c38da9cc6df01ecd9ef16e97a0edb6a4e9.zip ipxe-03ca71c38da9cc6df01ecd9ef16e97a0edb6a4e9.tar.gz ipxe-03ca71c38da9cc6df01ecd9ef16e97a0edb6a4e9.tar.bz2 |
Move stack to below 0x7c00; leaving it at the default location
(0x7ef4) tends to really screw up anything that loads at 0x7c00...
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/i386/prefix/dskprefix.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/arch/i386/prefix/dskprefix.S b/src/arch/i386/prefix/dskprefix.S index 9b1ebaa..2df00ae 100644 --- a/src/arch/i386/prefix/dskprefix.S +++ b/src/arch/i386/prefix/dskprefix.S @@ -31,6 +31,10 @@ jmp $BOOTSEG, $go /* reload cs:ip to match relocation addr */ go: + xorw %ax,%ax /* put stack at 0000:7c00 */ + movw %ax,%ss + movw $0x7c00,%sp + movw $0x2000-12, %di /* 0x2000 is arbitrary value >= length */ /* of bootsect + room for stack + 12 for */ /* saved disk parm block */ @@ -38,8 +42,6 @@ go: movw $BOOTSEG, %ax movw %ax,%ds movw %ax,%es - movw %ax,%ss /* put stack at BOOTSEG:0x4000-12. */ - movw %di,%sp /* Many BIOS's default disk parameter tables will not recognize multi-sector * reads beyond the maximum sector number specified in the default diskette @@ -50,7 +52,7 @@ go: * will set the maximum sector count to 36 - the most we will encounter on an * ED 2.88. High doesn't hurt. Low does. * - * Segments are as follows: ds=es=ss=cs - BOOTSEG + * Segments are as follows: ds=es=cs - BOOTSEG */ xorw %cx,%cx |