Added kernel setting to dump MADT to syslog. It's very useful for understanding interrupt configuration.
It needs a bit polish in code but wanted to commit before leaving BG. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39124 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6fd2f4a0d1
commit
39fa144962
@ -31,6 +31,12 @@ local hardware_src =
|
||||
hwxface.c
|
||||
;
|
||||
|
||||
local common_src =
|
||||
dmtable.c
|
||||
dmtbdump.c
|
||||
dmtbinfo.c
|
||||
;
|
||||
|
||||
local debugger_src =
|
||||
dbdisply.c
|
||||
dbxface.c
|
||||
@ -171,6 +177,7 @@ StaticLibrary libacpi_ca.a :
|
||||
$(resources_src)
|
||||
$(tables_src)
|
||||
$(utilities_src)
|
||||
$(common_src)
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles $(events_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi events ] ;
|
||||
@ -182,6 +189,7 @@ SEARCH on [ FGristFiles $(utilities_src) ] = [ FDirName $(HAIKU_TOP) src add-on
|
||||
SEARCH on [ FGristFiles $(dispatcher_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi dispatcher ] ;
|
||||
SEARCH on [ FGristFiles $(executer_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi executer ] ;
|
||||
SEARCH on [ FGristFiles $(parser_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi parser ] ;
|
||||
SEARCH on [ FGristFiles $(common_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi common ] ;
|
||||
|
||||
KernelAddon acpi :
|
||||
oshaiku.cpp
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "accommon.h"
|
||||
#include "acdisasm.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acpi_priv.h"
|
||||
|
||||
@ -73,6 +74,33 @@ get_device_by_hid_callback(ACPI_HANDLE object, UINT32 depth, void* context,
|
||||
}
|
||||
|
||||
|
||||
static void dump_madt() {
|
||||
ACPI_STATUS status;
|
||||
ACPI_TABLE_HEADER *madt = NULL;
|
||||
ACPI_SUBTABLE_HEADER *entry;
|
||||
void *end;
|
||||
int madtCount = -1;
|
||||
|
||||
while (true) {
|
||||
status = AcpiGetTable (ACPI_SIG_MADT, ++madtCount, &madt);
|
||||
if (status != AE_OK) break;
|
||||
|
||||
dprintf("acpi: MADT TABLE:\n");
|
||||
AcpiDmDumpDataTable( madt );
|
||||
/* entry = madt + 44;
|
||||
end = madt + madt->Header.Length;
|
||||
while (entry < end) {
|
||||
dprintf("\t\tType: %d\n", entry->Type);
|
||||
entry += entry->Length;
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
dprintf("acpi: You have %d MADT tables.\n", madtCount);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - ACPI bus manager API
|
||||
|
||||
|
||||
@ -89,6 +117,7 @@ acpi_std_ops(int32 op,...)
|
||||
void *settings;
|
||||
bool acpiDisabled = false;
|
||||
bool acpiAvoidFullInit = false;
|
||||
bool acpiDumpMADT = false;
|
||||
|
||||
settings = load_driver_settings("kernel");
|
||||
if (settings != NULL) {
|
||||
@ -96,6 +125,8 @@ acpi_std_ops(int32 op,...)
|
||||
false, false);
|
||||
acpiAvoidFullInit = get_driver_boolean_parameter(settings,
|
||||
"acpi_avoid_full_init", false, false);
|
||||
acpiDumpMADT = get_driver_boolean_parameter(settings,
|
||||
"acpi_dump_MADT", false, false);
|
||||
unload_driver_settings(settings);
|
||||
}
|
||||
|
||||
@ -149,6 +180,8 @@ acpi_std_ops(int32 op,...)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (acpiDumpMADT) dump_madt();
|
||||
|
||||
/* Install the default address space handlers. */
|
||||
status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
|
||||
ACPI_ADR_SPACE_SYSTEM_MEMORY, ACPI_DEFAULT_HANDLER, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user