git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add FADT check for presence of i8042 controller.
[lunaix-os.git]
/
lunaix-os
/
hal
/
ioapic.c
diff --git
a/lunaix-os/hal/ioapic.c
b/lunaix-os/hal/ioapic.c
index 80ab13bf6d76af9f5d4b88dd9e521f794db20be3..de4be2a57a1caebede99b419c3457ff32fe3d2c1 100644
(file)
--- a/
lunaix-os/hal/ioapic.c
+++ b/
lunaix-os/hal/ioapic.c
@@
-22,8
+22,14
@@
ioapic_init() {
// The ioapic_get_irq is to make sure we capture those overriden IRQs
// The ioapic_get_irq is to make sure we capture those overriden IRQs
+ // grab ourselves these irq numbers
+ uint8_t irq_rtc = ioapic_get_irq(acpi_ctx, PC_AT_IRQ_RTC);
+ uint8_t irq_kbd = ioapic_get_irq(acpi_ctx, PC_AT_IRQ_KBD);
+
// PC_AT_IRQ_RTC -> RTC_TIMER_IV, fixed, edge trigged, polarity=high, physical, APIC ID 0
// PC_AT_IRQ_RTC -> RTC_TIMER_IV, fixed, edge trigged, polarity=high, physical, APIC ID 0
- ioapic_redirect(ioapic_get_irq(acpi_ctx, PC_AT_IRQ_RTC), RTC_TIMER_IV, 0, IOAPIC_DELMOD_FIXED);
+ ioapic_redirect(irq_rtc, RTC_TIMER_IV, 0, IOAPIC_DELMOD_FIXED);
+
+ ioapic_redirect(irq_kbd, PC_KBD_IV, 0, IOAPIC_DELMOD_FIXED);
}
uint8_t
}
uint8_t