limine/ioapic: Change spec to avoid masking IOAPIC RTEs unless Fixed or Lowest Priority
This commit is contained in:
parent
3e77a04d2f
commit
de7dff1d4f
@ -197,7 +197,8 @@ If 5-level paging is requested and available, then 5-level paging is enabled
|
|||||||
|
|
||||||
The A20 gate is opened.
|
The A20 gate is opened.
|
||||||
|
|
||||||
Legacy PIC and IO APIC IRQs are all masked.
|
Legacy PIC (if available) and IO APIC IRQs (only those with delivery mode fixed
|
||||||
|
(0b000) or lowest priority (0b001)) are all masked.
|
||||||
|
|
||||||
If booted by EFI/UEFI, boot services are exited.
|
If booted by EFI/UEFI, boot services are exited.
|
||||||
|
|
||||||
|
@ -156,6 +156,14 @@ void io_apic_mask_all(void) {
|
|||||||
uint32_t gsi_count = io_apic_gsi_count(i);
|
uint32_t gsi_count = io_apic_gsi_count(i);
|
||||||
for (uint32_t j = 0; j < gsi_count; j++) {
|
for (uint32_t j = 0; j < gsi_count; j++) {
|
||||||
uintptr_t ioredtbl = j * 2 + 16;
|
uintptr_t ioredtbl = j * 2 + 16;
|
||||||
|
switch ((io_apic_read(i, ioredtbl) >> 8) & 0b111) {
|
||||||
|
case 0b000: // Fixed
|
||||||
|
case 0b001: // Lowest Priority
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
io_apic_write(i, ioredtbl, (1 << 16)); // mask
|
io_apic_write(i, ioredtbl, (1 << 16)); // mask
|
||||||
io_apic_write(i, ioredtbl + 1, 0);
|
io_apic_write(i, ioredtbl + 1, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user