Symbol: ioapic
src/system/kernel/arch/x86/ioapic.cpp
107
ioapic* next;
src/system/kernel/arch/x86/ioapic.cpp
112
static ioapic* sIOAPICs = NULL;
src/system/kernel/arch/x86/ioapic.cpp
120
print_ioapic(struct ioapic& ioapic)
src/system/kernel/arch/x86/ioapic.cpp
123
", apic-id %u\n", ioapic.number, ioapic.global_interrupt_base,
src/system/kernel/arch/x86/ioapic.cpp
124
ioapic.global_interrupt_last, ioapic.max_redirection_entry + 1,
src/system/kernel/arch/x86/ioapic.cpp
125
ioapic.version, ioapic.apic_id);
src/system/kernel/arch/x86/ioapic.cpp
129
static inline struct ioapic*
src/system/kernel/arch/x86/ioapic.cpp
135
struct ioapic* current = sIOAPICs;
src/system/kernel/arch/x86/ioapic.cpp
150
ioapic_read_32(struct ioapic& ioapic, uint8 registerSelect)
src/system/kernel/arch/x86/ioapic.cpp
152
ioapic.registers->io_register_select = registerSelect;
src/system/kernel/arch/x86/ioapic.cpp
153
return ioapic.registers->io_window_register;
src/system/kernel/arch/x86/ioapic.cpp
158
ioapic_write_32(struct ioapic& ioapic, uint8 registerSelect, uint32 value)
src/system/kernel/arch/x86/ioapic.cpp
160
ioapic.registers->io_register_select = registerSelect;
src/system/kernel/arch/x86/ioapic.cpp
161
ioapic.registers->io_window_register = value;
src/system/kernel/arch/x86/ioapic.cpp
166
ioapic_read_64(struct ioapic& ioapic, uint8 registerSelect)
src/system/kernel/arch/x86/ioapic.cpp
168
ioapic.registers->io_register_select = registerSelect + 1;
src/system/kernel/arch/x86/ioapic.cpp
169
uint64 result = ioapic.registers->io_window_register;
src/system/kernel/arch/x86/ioapic.cpp
171
ioapic.registers->io_register_select = registerSelect;
src/system/kernel/arch/x86/ioapic.cpp
172
result |= ioapic.registers->io_window_register;
src/system/kernel/arch/x86/ioapic.cpp
178
ioapic_write_64(struct ioapic& ioapic, uint8 registerSelect, uint64 value,
src/system/kernel/arch/x86/ioapic.cpp
181
ioapic.registers->io_register_select
src/system/kernel/arch/x86/ioapic.cpp
183
ioapic.registers->io_window_register
src/system/kernel/arch/x86/ioapic.cpp
185
ioapic.registers->io_register_select
src/system/kernel/arch/x86/ioapic.cpp
187
ioapic.registers->io_window_register
src/system/kernel/arch/x86/ioapic.cpp
193
ioapic_configure_pin(struct ioapic& ioapic, uint8 pin, uint8 vector,
src/system/kernel/arch/x86/ioapic.cpp
196
uint64 entry = ioapic_read_64(ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
202
ioapic.level_triggered_mask |= ((uint64)1 << pin);
src/system/kernel/arch/x86/ioapic.cpp
205
ioapic.level_triggered_mask &= ~((uint64)1 << pin);
src/system/kernel/arch/x86/ioapic.cpp
215
ioapic_write_64(ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, true);
src/system/kernel/arch/x86/ioapic.cpp
230
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
231
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
234
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
235
return (ioapic->level_triggered_mask & ((uint64)1 << pin)) != 0;
src/system/kernel/arch/x86/ioapic.cpp
253
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
254
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
259
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
262
gsi, ioapic->number, pin, cpu, apicid);
src/system/kernel/arch/x86/ioapic.cpp
264
uint64 entry = ioapic_read_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
268
ioapic_write_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, false);
src/system/kernel/arch/x86/ioapic.cpp
281
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
282
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
287
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
289
" -> io-apic %u pin %u\n", gsi, ioapic->number, pin);
src/system/kernel/arch/x86/ioapic.cpp
291
uint64 entry = ioapic_read_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
293
ioapic_write_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, false);
src/system/kernel/arch/x86/ioapic.cpp
300
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
301
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
304
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
306
" -> io-apic %u pin %u\n", gsi, ioapic->number, pin);
src/system/kernel/arch/x86/ioapic.cpp
308
uint64 entry = ioapic_read_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2);
src/system/kernel/arch/x86/ioapic.cpp
310
ioapic_write_64(*ioapic, IO_APIC_REDIRECTION_TABLE + pin * 2, entry, true);
src/system/kernel/arch/x86/ioapic.cpp
317
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
318
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
321
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
324
ioapic->number, pin, config);
src/system/kernel/arch/x86/ioapic.cpp
326
ioapic_configure_pin(*ioapic, pin, gsi, config,
src/system/kernel/arch/x86/ioapic.cpp
332
ioapic_map_ioapic(struct ioapic& ioapic, phys_addr_t physicalAddress)
src/system/kernel/arch/x86/ioapic.cpp
334
ioapic.register_area = vm_map_physical_memory(B_SYSTEM_TEAM, "io-apic",
src/system/kernel/arch/x86/ioapic.cpp
335
(void**)&ioapic.registers, ioapic.registers != NULL ? B_EXACT_ADDRESS
src/system/kernel/arch/x86/ioapic.cpp
337
| B_KERNEL_WRITE_AREA, physicalAddress, ioapic.registers != NULL);
src/system/kernel/arch/x86/ioapic.cpp
338
if (ioapic.register_area < 0) {
src/system/kernel/arch/x86/ioapic.cpp
339
panic("mapping io-apic %u failed", ioapic.number);
src/system/kernel/arch/x86/ioapic.cpp
340
return ioapic.register_area;
src/system/kernel/arch/x86/ioapic.cpp
343
TRACE("mapped io-apic %u to %p\n", ioapic.number, ioapic.registers);
src/system/kernel/arch/x86/ioapic.cpp
345
ioapic.version = ioapic_read_32(ioapic, IO_APIC_VERSION);
src/system/kernel/arch/x86/ioapic.cpp
346
if (ioapic.version == 0xffffffff) {
src/system/kernel/arch/x86/ioapic.cpp
348
ioapic.number);
src/system/kernel/arch/x86/ioapic.cpp
349
vm_delete_area(B_SYSTEM_TEAM, ioapic.register_area, true);
src/system/kernel/arch/x86/ioapic.cpp
350
ioapic.register_area = -1;
src/system/kernel/arch/x86/ioapic.cpp
351
ioapic.registers = NULL;
src/system/kernel/arch/x86/ioapic.cpp
355
ioapic.max_redirection_entry
src/system/kernel/arch/x86/ioapic.cpp
356
= ((ioapic.version >> IO_APIC_MAX_REDIRECTION_ENTRY_SHIFT)
src/system/kernel/arch/x86/ioapic.cpp
358
if (ioapic.max_redirection_entry >= MAX_SUPPORTED_REDIRECTION_ENTRIES) {
src/system/kernel/arch/x86/ioapic.cpp
360
"first %u entries\n", ioapic.number, ioapic.max_redirection_entry,
src/system/kernel/arch/x86/ioapic.cpp
362
ioapic.max_redirection_entry = MAX_SUPPORTED_REDIRECTION_ENTRIES - 1;
src/system/kernel/arch/x86/ioapic.cpp
365
ioapic.global_interrupt_last
src/system/kernel/arch/x86/ioapic.cpp
366
= ioapic.global_interrupt_base + ioapic.max_redirection_entry;
src/system/kernel/arch/x86/ioapic.cpp
368
ioapic.nmi_mask = 0;
src/system/kernel/arch/x86/ioapic.cpp
375
ioapic_initialize_ioapic(struct ioapic& ioapic, uint8 targetAPIC)
src/system/kernel/arch/x86/ioapic.cpp
378
ioapic_write_32(ioapic, IO_APIC_ID, ioapic.apic_id << IO_APIC_ID_SHIFT);
src/system/kernel/arch/x86/ioapic.cpp
381
ioapic.level_triggered_mask = 0;
src/system/kernel/arch/x86/ioapic.cpp
382
uint8 gsi = ioapic.global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
383
for (uint8 i = 0; i <= ioapic.max_redirection_entry; i++, gsi++) {
src/system/kernel/arch/x86/ioapic.cpp
405
ioapic.level_triggered_mask |= ((uint64)1 << i);
src/system/kernel/arch/x86/ioapic.cpp
408
ioapic_write_64(ioapic, IO_APIC_REDIRECTION_TABLE + 2 * i, entry, true);
src/system/kernel/arch/x86/ioapic.cpp
427
struct ioapic* lastIOAPIC = sIOAPICs;
src/system/kernel/arch/x86/ioapic.cpp
442
struct ioapic* ioapic
src/system/kernel/arch/x86/ioapic.cpp
443
= (struct ioapic*)malloc(sizeof(struct ioapic));
src/system/kernel/arch/x86/ioapic.cpp
444
if (ioapic == NULL) {
src/system/kernel/arch/x86/ioapic.cpp
450
ioapic->number
src/system/kernel/arch/x86/ioapic.cpp
452
ioapic->apic_id = info->Id;
src/system/kernel/arch/x86/ioapic.cpp
453
ioapic->global_interrupt_base = info->GlobalIrqBase;
src/system/kernel/arch/x86/ioapic.cpp
454
ioapic->registers = NULL;
src/system/kernel/arch/x86/ioapic.cpp
455
ioapic->next = NULL;
src/system/kernel/arch/x86/ioapic.cpp
458
"\n", ioapic->number, (uint32)info->Address);
src/system/kernel/arch/x86/ioapic.cpp
459
status_t status = ioapic_map_ioapic(*ioapic, info->Address);
src/system/kernel/arch/x86/ioapic.cpp
461
free(ioapic);
src/system/kernel/arch/x86/ioapic.cpp
465
print_ioapic(*ioapic);
src/system/kernel/arch/x86/ioapic.cpp
468
sIOAPICs = ioapic;
src/system/kernel/arch/x86/ioapic.cpp
470
lastIOAPIC->next = ioapic;
src/system/kernel/arch/x86/ioapic.cpp
472
lastIOAPIC = ioapic;
src/system/kernel/arch/x86/ioapic.cpp
484
struct ioapic* ioapic = find_ioapic(info->GlobalIrq);
src/system/kernel/arch/x86/ioapic.cpp
485
if (ioapic == NULL) {
src/system/kernel/arch/x86/ioapic.cpp
491
uint8 pin = info->GlobalIrq - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
492
ioapic->nmi_mask |= (uint64)1 << pin;
src/system/kernel/arch/x86/ioapic.cpp
584
struct ioapic* ioapic = find_ioapic(info->GlobalIrq);
src/system/kernel/arch/x86/ioapic.cpp
585
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
588
uint8 pin = info->GlobalIrq - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
590
ioapic_configure_pin(*ioapic, pin, info->GlobalIrq, config,
src/system/kernel/arch/x86/ioapic.cpp
670
struct ioapic* ioapic = find_ioapic(gsi);
src/system/kernel/arch/x86/ioapic.cpp
671
if (ioapic == NULL)
src/system/kernel/arch/x86/ioapic.cpp
674
uint8 pin = gsi - ioapic->global_interrupt_base;
src/system/kernel/arch/x86/ioapic.cpp
675
return (ioapic->nmi_mask & ((uint64)1 << pin)) == 0;
src/system/kernel/arch/x86/ioapic.cpp
745
struct ioapic* current = sIOAPICs;