diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-31 21:29:59 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-31 21:29:59 -0700 |
commit | 2f92affcce5ffef4da90fe44bcac5a4db45df25f (patch) | |
tree | 31635c4adab542edf81fdd0648a95298efaff592 /mbr | |
parent | 63916a56b59d4f9a873c1a548d0bda5473f456b7 (diff) | |
download | syslinux-2f92affcce5ffef4da90fe44bcac5a4db45df25f.tar.gz |
isohdpfx: actually generate the stack frame isolinux expectssyslinux-3.82-pre2
Actually generate the stack frame isolinux expects. This is not the
optimal order, but it appears to be what both earlier and later
versions of isolinux expects...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'mbr')
-rw-r--r-- | mbr/isohdpfx.S | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 375c846d..801115c3 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -48,9 +48,9 @@ isolinux_start_hybrid = 0x7c00+64+4 stack = 0x7c00 partoffset = (stack-8) driveno = (stack-14) -ebios_flag = (stack-16) +heads = (stack-16) sectors = (stack-18) -heads = (stack-20) +ebios_flag = (stack-20) secpercyl = (stack-24) BIOS_kbdflags = 0x417 @@ -138,18 +138,21 @@ next: jmp 1f 1: popw %dx - pushw %cx /* -16: Save EBIOS flag */ + pushw %cx /* EBIOS flag */ /* Get (C)HS geometry */ movb $0x08, %ah int $0x13 andw $0x3f, %cx /* Sector count */ - pushw %cx /* -18: Save sectors on the stack */ + popw %bx /* EBIOS flag */ + pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ - pushw %ax /* -20: Save heads on the stack */ + pushw %ax /* -18: Save heads on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ + pushw %bx /* -20: EBIOS flag */ + /* Save sectors/cylinder on the stack */ pushw %dx /* -22: High word */ pushw %ax /* -24: Low word */ @@ -177,7 +180,7 @@ next: jne bad_signature cli - movw $heads, %sp + movw $ebios_flag, %sp /* * Use a ljmpw here to work around a bug in some unknown version |