[Zion] Print less about acpi on boot.
This commit is contained in:
parent
9e76c81e97
commit
e642f3900f
|
@ -139,13 +139,18 @@ void ParseMcfg(SdtHeader* rsdt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParseMadt(SdtHeader* rsdt) {
|
void ParseMadt(SdtHeader* rsdt) {
|
||||||
|
#if K_ACPI_DEBUG
|
||||||
dbgsz(rsdt->signature, 4);
|
dbgsz(rsdt->signature, 4);
|
||||||
|
#endif
|
||||||
uint64_t max_addr = reinterpret_cast<uint64_t>(rsdt) + rsdt->length;
|
uint64_t max_addr = reinterpret_cast<uint64_t>(rsdt) + rsdt->length;
|
||||||
MadtHeader* header = reinterpret_cast<MadtHeader*>(rsdt);
|
MadtHeader* header = reinterpret_cast<MadtHeader*>(rsdt);
|
||||||
|
|
||||||
|
#if K_ACPI_DEBUG
|
||||||
dbgln("Local APIC {x}", header->local_apic_address);
|
dbgln("Local APIC {x}", header->local_apic_address);
|
||||||
gLApicBase = header->local_apic_address;
|
|
||||||
dbgln("Flags: {x}", header->flags);
|
dbgln("Flags: {x}", header->flags);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
gLApicBase = header->local_apic_address;
|
||||||
|
|
||||||
MadtEntry* entry = &header->first_entry;
|
MadtEntry* entry = &header->first_entry;
|
||||||
|
|
||||||
|
@ -153,14 +158,18 @@ void ParseMadt(SdtHeader* rsdt) {
|
||||||
switch (entry->type) {
|
switch (entry->type) {
|
||||||
case 0: {
|
case 0: {
|
||||||
MadtLocalApic* local = reinterpret_cast<MadtLocalApic*>(entry);
|
MadtLocalApic* local = reinterpret_cast<MadtLocalApic*>(entry);
|
||||||
|
#if K_ACPI_DEBUG
|
||||||
dbgln("Local APIC (Proc id, id, flags): {x}, {x}, {x}",
|
dbgln("Local APIC (Proc id, id, flags): {x}, {x}, {x}",
|
||||||
local->processor_id, local->apic_id, local->flags);
|
local->processor_id, local->apic_id, local->flags);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
MadtIoApic* io = reinterpret_cast<MadtIoApic*>(entry);
|
MadtIoApic* io = reinterpret_cast<MadtIoApic*>(entry);
|
||||||
|
#if K_ACPI_DEBUG
|
||||||
dbgln("IO Apic (id, addr, gsi base): {x}, {x}, {x}", io->io_apic_id,
|
dbgln("IO Apic (id, addr, gsi base): {x}, {x}, {x}", io->io_apic_id,
|
||||||
io->io_apic_address, io->global_system_interrupt_base);
|
io->io_apic_address, io->global_system_interrupt_base);
|
||||||
|
#endif
|
||||||
if (gIOApicBase != 0) {
|
if (gIOApicBase != 0) {
|
||||||
dbgln("More than one IOApic, unhandled");
|
dbgln("More than one IOApic, unhandled");
|
||||||
}
|
}
|
||||||
|
@ -170,16 +179,20 @@ void ParseMadt(SdtHeader* rsdt) {
|
||||||
case 2: {
|
case 2: {
|
||||||
MadtIoApicInterruptSource* src =
|
MadtIoApicInterruptSource* src =
|
||||||
reinterpret_cast<MadtIoApicInterruptSource*>(entry);
|
reinterpret_cast<MadtIoApicInterruptSource*>(entry);
|
||||||
|
#if K_ACPI_DEBUG
|
||||||
dbgln("IO Source (Bus, IRQ, GSI, flags): {x}, {x}, {x}, {x}",
|
dbgln("IO Source (Bus, IRQ, GSI, flags): {x}, {x}, {x}, {x}",
|
||||||
src->bus_source, src->irq_source, src->global_system_interrupt,
|
src->bus_source, src->irq_source, src->global_system_interrupt,
|
||||||
src->flags);
|
src->flags);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4: {
|
case 4: {
|
||||||
MadtLocalApicNonMaskable* lnmi =
|
MadtLocalApicNonMaskable* lnmi =
|
||||||
reinterpret_cast<MadtLocalApicNonMaskable*>(entry);
|
reinterpret_cast<MadtLocalApicNonMaskable*>(entry);
|
||||||
|
#if K_ACPI_DEBUG
|
||||||
dbgln("Local NMI (proc id, flags, lint#): {x}, {x}, {x}",
|
dbgln("Local NMI (proc id, flags, lint#): {x}, {x}, {x}",
|
||||||
lnmi->apic_processor_id, lnmi->flags, lnmi->lint_num);
|
lnmi->apic_processor_id, lnmi->flags, lnmi->lint_num);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue