Handle IRQs inside the kernel
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m42s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m42s
This commit is contained in:
@@ -195,6 +195,16 @@ uint32_t lapic_id (void) { return lapic_read (LAPIC_ID) >> 24; }
|
||||
/* Send End of interrupt command to Local APIC */
|
||||
void lapic_eoi (void) { lapic_write (LAPIC_EOI, 0); }
|
||||
|
||||
void lapic_timer_mask (void) {
|
||||
uint32_t v = lapic_read (LAPIC_LVTTR);
|
||||
lapic_write (LAPIC_LVTTR, v | (1 << 16));
|
||||
}
|
||||
|
||||
void lapic_timer_unmask (void) {
|
||||
uint32_t v = lapic_read (LAPIC_LVTTR);
|
||||
lapic_write (LAPIC_LVTTR, v & ~(1 << 16));
|
||||
}
|
||||
|
||||
/*
|
||||
* Calibrate Local APIC to send interrupts in a set interval.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user