aboutsummaryrefslogtreecommitdiff
path: root/src/boot.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-12-29 21:16:31 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-12-29 21:16:31 -0500
commit08815370c94d88b37bc651d6707b6f1d68dc519b (patch)
tree7ccfd69fe17ec47c91d1c5b833fa7d966cdf4084 /src/boot.c
parent92f95b0fecca029a0c4dd81203e6b42f60c4a382 (diff)
downloadseabios-hppa-08815370c94d88b37bc651d6707b6f1d68dc519b.zip
seabios-hppa-08815370c94d88b37bc651d6707b6f1d68dc519b.tar.gz
seabios-hppa-08815370c94d88b37bc651d6707b6f1d68dc519b.tar.bz2
Introduce GET/SET_EBDA2() macros - they take a cached ebda seg.
For those places that repeatedly read/write to the ebda, caching the ebda segment improves code generation.
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/boot.c b/src/boot.c
index b8104a5..7b64e86 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -83,8 +83,6 @@ try_boot(u16 seq_nr)
if (! CONFIG_BOOT)
BX_PANIC("Boot support not compiled in.\n");
- SET_EBDA(boot_sequence, seq_nr);
-
u32 bootdev = IPL.bootorder;
bootdev >>= 4 * seq_nr;
bootdev &= 0xf;
@@ -202,7 +200,9 @@ handle_18()
{
debug_serial_setup();
debug_enter(NULL, DEBUG_HDL_18);
- u16 seq = GET_EBDA(boot_sequence) + 1;
+ u16 ebda_seg = get_ebda_seg();
+ u16 seq = GET_EBDA2(ebda_seg, boot_sequence) + 1;
+ SET_EBDA2(ebda_seg, boot_sequence, seq);
do_boot(seq);
}
@@ -212,6 +212,7 @@ handle_19()
{
debug_serial_setup();
debug_enter(NULL, DEBUG_HDL_19);
+ SET_EBDA(boot_sequence, 0);
do_boot(0);
}