aboutsummaryrefslogtreecommitdiffstats
path: root/src/clock.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-08-13 11:43:27 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-08-17 12:22:05 -0400
commitbc46ebe2edeb624c1d1ae6f5c914dd0ae12fb0fa (patch)
treebe0073416279f423aadec7d44e70e215d17eefba /src/clock.c
parent4c904957cdadd8232fdf87fc370ffa97b22f1e17 (diff)
downloadseabios-bc46ebe2edeb624c1d1ae6f5c914dd0ae12fb0fa.tar.gz
rtc: Support disabling the RTC timer irq support
Add a build time config option to remove support for RTC timer interrupts along with the associated bios calls requiring that support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/clock.c b/src/clock.c
index ee2b53ff..2bb5209a 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -56,7 +56,8 @@ clock_setup(void)
}
enable_hwirq(0, FUNC16(entry_08));
- enable_hwirq(8, FUNC16(entry_70));
+ if (CONFIG_RTC_TIMER)
+ enable_hwirq(8, FUNC16(entry_70));
}
@@ -374,6 +375,10 @@ clear_usertimer(void)
void
handle_1586(struct bregs *regs)
{
+ if (!CONFIG_RTC_TIMER) {
+ set_code_unimplemented(regs, RET_EUNSUPPORTED);
+ return;
+ }
// Use the rtc to wait for the specified time.
u8 statusflag = 0;
u32 count = (regs->cx << 16) | regs->dx;
@@ -417,6 +422,10 @@ handle_1583XX(struct bregs *regs)
void
handle_1583(struct bregs *regs)
{
+ if (!CONFIG_RTC_TIMER) {
+ handle_1583XX(regs);
+ return;
+ }
switch (regs->al) {
case 0x00: handle_158300(regs); break;
case 0x01: handle_158301(regs); break;
@@ -430,6 +439,8 @@ handle_1583(struct bregs *regs)
void VISIBLE16
handle_70(void)
{
+ if (!CONFIG_RTC_TIMER)
+ return;
debug_isr(DEBUG_ISR_70);
// Check which modes are enabled and have occurred.