Ignore:
Timestamp:
Jul 12, 2017, 4:03:13 PM (7 years ago)
Author:
max@…
Message:

count the number of IOAPICs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_acpi.c

    r163 r187  
    101101{
    102102        extern paddr_t ioapic_pa;
     103        uint32_t irqbase;
    103104        ioapic_pa = ioapic->Address;
     105        irqbase = ioapic->GlobalIrqBase;
     106
    104107        x86_printf("-> IOAPIC address: %Z\n", ioapic_pa);
     108        x86_printf("-> IOAPIC irqbase: %z\n", (uint64_t)irqbase);
    105109}
    106110
     
    110114        void *ptr, *end;
    111115        subheader_t *sub;
     116        size_t nioapic = 0;
    112117        size_t ncpu = 0;
    113118
     
    122127                if (sub->Type == ACPI_MADT_TYPE_IO_APIC) {
    123128                        hal_acpi_parse_ioapic((madt_ioapic_t *)sub);
     129                        nioapic++;
    124130                } else if (sub->Type == ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE) {
    125131                        override = (madt_lapic_override_t *)sub;
     
    135141        x86_printf("-> LAPIC address: %Z\n", lapic_pa);
    136142        x86_printf("-> number of CPUs: %z\n", ncpu);
     143        x86_printf("-> number of IOAPICs: %z\n", nioapic);
    137144}
    138145
Note: See TracChangeset for help on using the changeset viewer.