diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-01-01 21:00:59 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-01-01 21:00:59 -0500 |
commit | a83ff550b4cbf0b1bc35f493c8715a69a9e28b7e (patch) | |
tree | 3b434ad53bc40b2960bcd0d7abe05e2596f23372 /src/clock.c | |
parent | 7f343097712ebdd1f11953c867e208da899b4ba3 (diff) | |
download | seabios-hppa-a83ff550b4cbf0b1bc35f493c8715a69a9e28b7e.zip seabios-hppa-a83ff550b4cbf0b1bc35f493c8715a69a9e28b7e.tar.gz seabios-hppa-a83ff550b4cbf0b1bc35f493c8715a69a9e28b7e.tar.bz2 |
Reduce stack usage of hw irq handlers.
Avoid using call16_int() -- it consumes too much stack space.
Instead, use a new function (call16_simpint). This assumes that
the handler wont corrupt regs - which should be a safe assumption,
because if they did corrupt regs they wouldn't work on any bios.
Avoid enabling irqs in the hw irq handlers - there are no loops in the
handlers that could cause any notable latency.
Diffstat (limited to 'src/clock.c')
-rw-r--r-- | src/clock.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/clock.c b/src/clock.c index c76ea75..caa94ba 100644 --- a/src/clock.c +++ b/src/clock.c @@ -411,7 +411,6 @@ void VISIBLE16 handle_08() { debug_isr(DEBUG_ISR_08); - irq_enable(); floppy_tick(); @@ -427,11 +426,8 @@ handle_08() SET_BDA(timer_counter, counter); // chain to user timer tick INT #0x1c - struct bregs br; - memset(&br, 0, sizeof(br)); - call16_int(0x1c, &br); - - irq_disable(); + u32 eax=0, flags; + call16_simpint(0x1c, &eax, &flags); eoi_pic1(); } @@ -541,10 +537,8 @@ handle_70() goto done; if (registerC & 0x20) { // Handle Alarm Interrupt. - struct bregs br; - memset(&br, 0, sizeof(br)); - call16_int(0x4a, &br); - irq_disable(); + u32 eax=0, flags; + call16_simpint(0x4a, &eax, &flags); } if (!(registerC & 0x40)) goto done; |