diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-12-29 21:16:31 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-12-29 21:16:31 -0500 |
commit | 08815370c94d88b37bc651d6707b6f1d68dc519b (patch) | |
tree | 7ccfd69fe17ec47c91d1c5b833fa7d966cdf4084 /src/boot.c | |
parent | 92f95b0fecca029a0c4dd81203e6b42f60c4a382 (diff) | |
download | seabios-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } |