aboutsummaryrefslogtreecommitdiff
path: root/src/boot.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-12-31 00:09:28 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-12-31 00:09:28 -0500
commit4a16ef64acb83df452576560ba327a8b09213280 (patch)
treebb99fd99141126f770932bcdad97c59a3bd8c318 /src/boot.c
parent08815370c94d88b37bc651d6707b6f1d68dc519b (diff)
downloadseabios-hppa-4a16ef64acb83df452576560ba327a8b09213280.zip
seabios-hppa-4a16ef64acb83df452576560ba327a8b09213280.tar.gz
seabios-hppa-4a16ef64acb83df452576560ba327a8b09213280.tar.bz2
Return CDEMU parameters to ebda segment (instead of using globals).
The cdemu is setup in the boot stage after globals are made read-only. So, globals can't be used. Also, move hdcount from a global to BDA (it should be in BDA). Don't attempt to set blksize/sector count in atapi_is_ready() - it's not useful.
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/boot.c b/src/boot.c
index 7b64e86..df3647d 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -152,8 +152,9 @@ try_boot(u16 seq_nr)
return;
}
- bootdrv = GET_GLOBAL(CDEMU.emulated_drive);
- bootseg = GET_GLOBAL(CDEMU.load_segment);
+ u16 ebda_seg = get_ebda_seg();
+ bootdrv = GET_EBDA2(ebda_seg, cdemu.emulated_drive);
+ bootseg = GET_EBDA2(ebda_seg, cdemu.load_segment);
/* Canonicalize bootseg:bootip */
bootip = (bootseg & 0x0fff) << 4;
bootseg &= 0xf000;