Symbol: ioapic
src/system/kernel/arch/x86/ioapic.cpp
108
ioapic* next;
src/system/kernel/arch/x86/ioapic.cpp
113
static ioapic* sIOAPICs = NULL;
src/system/kernel/arch/x86/ioapic.cpp
121
print_ioapic(struct ioapic& ioapic)
src/system/kernel/arch/x86/ioapic.cpp
124
", apic-id %u\n", ioapic.number, ioapic.global_interrupt_base,
src/system/kernel/arch/x86/ioapic.cpp
125
ioapic.global_interrupt_last, ioapic.max_redirection_entry + 1,
src/system/kernel/arch/x86/ioapic.cpp
126
ioapic.version, ioapic.apic_id);
src/system/kernel/arch/x86/ioapic.cpp
130
static inline struct ioapic*
src/system/kernel/arch/x86/ioapic.cpp
136
struct ioapic* current = sIOAPICs;
src/system/kernel/arch/x86/ioapic.cpp
151
ioapic_read_32(struct ioapic& ioapic, uint8 registerSelect)
src/system/kernel/arch/x86/ioapic.cpp
153
ioapic.registers->io_register_select = registerSelect;
src/system/kernel/arch/x86/ioapic.cpp
154
return ioapic.registers->io_window_register;
src/system/kernel/arch/x86/ioapic.cpp
159
ioapic_write_32(struct ioapic& ioapic, uint8 registerSelect, uint32 value)
src/system/kernel/arch/x86/ioapic.cpp
161
ioapic.registers->io_register_select = registerSelect;
src/system/kernel/arch/x86/ioapic.cpp
162
ioapic.registers->io_window_register = value;
src/system/kernel/arch/x86/ioapic.cpp
167
ioapic_read_64(struct ioapic& ioapic, uint8 registerSelect)
src/system/kernel/arch/x86/ioapic.cpp
169
ioapic.registers->io_register_select = registerSelect + 1;
src/system/kernel/arch/x86/ioapic.cpp
170
uint64 result = ioapic.registers->io_window_register;
src/system/kernel/arch/x86/ioapic.cpp
172
ioapic.registers->io_register_select = registerSelect;
src/system/kernel/arch/x86/ioapic.cpp
173
result |= ioapic.registers->io_window_register;
src/system/kernel/arch/x86/ioapic.cpp
179
ioapic_write_64(struct ioapic& ioapic, uint8 registerSelect, uint64 value,
src/system/kernel/arch/x86/ioapic.cpp
182
ioapic.registers->io_register_select
src/system/kernel/arch/x86/ioapic.cpp
184
ioapic.registers->io_window_register
src/system/kernel/arch/x86/ioapic.cpp
186
ioapic.registers->io_register_select
src/system/kernel/arch/x86/ioapic.cpp
188
ioapic.registers->io_window_register
src/system/kernel/arch/x86/ioapic.cpp
194
ioapic_configure_pin(struct ioapic& ioapic, uint8 pin, uint8 vector,
src/system/kernel/arch/x86/ioapic.cpp
197
uint64 entry = ioapic_read_64(ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
203
ioapic.level_triggered_mask |= ((uint64)1 << pin);
src/system/kernel/arch/x86/ioapic.cpp
206
ioapic.level_triggered_mask &= ~((uint64)1 << pin);
src/system/kernel/arch/x86/ioapic.cpp
216
ioapic_write_64(ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, true);
src/system/kernel/arch/x86/ioapic.cpp
231
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
232
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
235
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
236
return (ioapic->level_triggered_mask & ((uint64)1 << pin)) != 0;
src/system/kernel/arch/x86/ioapic.cpp
254
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
255
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
260
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
263
gsi, ioapic->number, pin, cpu, apicid);
src/system/kernel/arch/x86/ioapic.cpp
265
uint64 entry = ioapic_read_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
269
ioapic_write_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, false);
src/system/kernel/arch/x86/ioapic.cpp
282
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
283
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
288
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
290
" -> io-apic %u pin %u\n", gsi, ioapic->number, pin);
src/system/kernel/arch/x86/ioapic.cpp
292
uint64 entry = ioapic_read_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
294
ioapic_write_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, false);
src/system/kernel/arch/x86/ioapic.cpp
301
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
302
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
305
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
307
" -> io-apic %u pin %u\n", gsi, ioapic->number, pin);
src/system/kernel/arch/x86/ioapic.cpp
309
uint64 entry = ioapic_read_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
311
ioapic_write_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, true);
src/system/kernel/arch/x86/ioapic.cpp
318
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
319
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
322
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
325
ioapic->number, pin, config);
src/system/kernel/arch/x86/ioapic.cpp
327
ioapic_configure_pin(*ioapic, pin, gsi, config,
src/system/kernel/arch/x86/ioapic.cpp
333
ioapic_map_ioapic(struct ioapic& ioapic, phys_addr_t physicalAddress)
src/system/kernel/arch/x86/ioapic.cpp
335
ioapic.register_area = vm_map_physical_memory(B_SYSTEM_TEAM, "io-apic",
src/system/kernel/arch/x86/ioapic.cpp
336
(void**)&ioapic.registers, ioapic.registers != NULL ? B_EXACT_ADDRESS
src/system/kernel/arch/x86/ioapic.cpp
338
| B_KERNEL_WRITE_AREA, physicalAddress, ioapic.registers != NULL);
src/system/kernel/arch/x86/ioapic.cpp
339
if (ioapic.register_area < 0) {
src/system/kernel/arch/x86/ioapic.cpp
340
panic("mapping io-apic %u failed", ioapic.number);
src/system/kernel/arch/x86/ioapic.cpp
341
return ioapic.register_area;
src/system/kernel/arch/x86/ioapic.cpp
344
TRACE("mapped io-apic %u to %p\n", ioapic.number, ioapic.registers);
src/system/kernel/arch/x86/ioapic.cpp
346
ioapic.version = ioapic_read_32(ioapic, IO_APIC_VERSION);
src/system/kernel/arch/x86/ioapic.cpp
347
if (ioapic.version == 0xffffffff) {
src/system/kernel/arch/x86/ioapic.cpp
349
ioapic.number);
src/system/kernel/arch/x86/ioapic.cpp
350
vm_delete_area(B_SYSTEM_TEAM, ioapic.register_area, true);
src/system/kernel/arch/x86/ioapic.cpp
351
ioapic.register_area = -1;
src/system/kernel/arch/x86/ioapic.cpp
352
ioapic.registers = NULL;
src/system/kernel/arch/x86/ioapic.cpp
356
ioapic.max_redirection_entry
src/system/kernel/arch/x86/ioapic.cpp
357
= ((ioapic.version >> IO_APIC_MAX_REDIRECTION_ENTRY_SHIFT)
src/system/kernel/arch/x86/ioapic.cpp
359
if (ioapic.max_redirection_entry >= MAX_SUPPORTED_REDIRECTION_ENTRIES) {
src/system/kernel/arch/x86/ioapic.cpp
361
"first %u entries\n", ioapic.number, ioapic.max_redirection_entry,
src/system/kernel/arch/x86/ioapic.cpp
363
ioapic.max_redirection_entry = MAX_SUPPORTED_REDIRECTION_ENTRIES - 1;
src/system/kernel/arch/x86/ioapic.cpp
366
ioapic.global_interrupt_last
src/system/kernel/arch/x86/ioapic.cpp
367
= ioapic.global_interrupt_base + ioapic.max_redirection_entry;
src/system/kernel/arch/x86/ioapic.cpp
369
ioapic.nmi_mask = 0;
src/system/kernel/arch/x86/ioapic.cpp
376
ioapic_initialize_ioapic(struct ioapic& ioapic, uint8 targetAPIC)
src/system/kernel/arch/x86/ioapic.cpp
379
ioapic_write_32(ioapic, IO_APIC_ID, ioapic.apic_id << IO_APIC_ID_SHIFT);
src/system/kernel/arch/x86/ioapic.cpp
382
ioapic.level_triggered_mask = 0;
src/system/kernel/arch/x86/ioapic.cpp
383
uint8 gsi = ioapic.global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
384
for (uint8 i = 0; i <= ioapic.max_redirection_entry; i++, gsi++) {
src/system/kernel/arch/x86/ioapic.cpp
406
ioapic.level_triggered_mask |= ((uint64)1 << i);
src/system/kernel/arch/x86/ioapic.cpp
409
ioapic_write_64(ioapic, IO_APIC_REDIRECTION_TABLE + 2 * i, entry, true);
src/system/kernel/arch/x86/ioapic.cpp
428
struct ioapic* lastIOAPIC = sIOAPICs;
src/system/kernel/arch/x86/ioapic.cpp
443
struct ioapic* ioapic
src/system/kernel/arch/x86/ioapic.cpp
444
= (struct ioapic*)malloc(sizeof(struct ioapic));
src/system/kernel/arch/x86/ioapic.cpp
445
if (ioapic == NULL) {
src/system/kernel/arch/x86/ioapic.cpp
451
ioapic->number
src/system/kernel/arch/x86/ioapic.cpp
453
ioapic->apic_id = info->Id;
src/system/kernel/arch/x86/ioapic.cpp
454
ioapic->global_interrupt_base = info->GlobalIrqBase;
src/system/kernel/arch/x86/ioapic.cpp
455
ioapic->registers = NULL;
src/system/kernel/arch/x86/ioapic.cpp
456
ioapic->next = NULL;
src/system/kernel/arch/x86/ioapic.cpp
459
"\n", ioapic->number, (uint32)info->Address);
src/system/kernel/arch/x86/ioapic.cpp
460
status_t status = ioapic_map_ioapic(*ioapic, info->Address);
src/system/kernel/arch/x86/ioapic.cpp
462
free(ioapic);
src/system/kernel/arch/x86/ioapic.cpp
466
print_ioapic(*ioapic);
src/system/kernel/arch/x86/ioapic.cpp
469
sIOAPICs = ioapic;
src/system/kernel/arch/x86/ioapic.cpp
471
lastIOAPIC->next = ioapic;
src/system/kernel/arch/x86/ioapic.cpp
473
lastIOAPIC = ioapic;
src/system/kernel/arch/x86/ioapic.cpp
485
struct ioapic* ioapic = find_ioapic(info->GlobalIrq);
src/system/kernel/arch/x86/ioapic.cpp
486
if (ioapic == NULL) {
src/system/kernel/arch/x86/ioapic.cpp
492
uint8 pin = info->GlobalIrq - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
493
ioapic->nmi_mask |= (uint64)1 << pin;
src/system/kernel/arch/x86/ioapic.cpp
585
struct ioapic* ioapic = find_ioapic(info->GlobalIrq);
src/system/kernel/arch/x86/ioapic.cpp
586
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
589
uint8 pin = info->GlobalIrq - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
591
ioapic_configure_pin(*ioapic, pin, info->GlobalIrq, config,
src/system/kernel/arch/x86/ioapic.cpp
671
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
672
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
675
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
676
return (ioapic->nmi_mask & ((uint64)1 << pin)) == 0;
src/system/kernel/arch/x86/ioapic.cpp
746
struct ioapic* current = sIOAPICs;