AML table parsing and discovery now works. AcpiEnableSubsystem() is still hangin

g my machine hard, probably due to it mucking with the PCI controller way after
boot. I'm going to try inserting it earlier in the boot process. Also added bett
er debugging tracers, and removed the kernel_debugger() trace calls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11444 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Nathan Whitehorn 2005-02-22 02:06:13 +00:00
parent ddbd7b91b5
commit fe5117f99d
2 changed files with 12 additions and 5 deletions

View File

@ -34,6 +34,12 @@ status_t acpi_std_ops(int32 op,...) {
switch(op) { switch(op) {
case B_MODULE_INIT: case B_MODULE_INIT:
#ifdef ACPI_DEBUG_OUTPUT
AcpiDbgLevel = ACPI_DEBUG_ALL | ACPI_LV_VERBOSE;
AcpiDbgLayer = ACPI_ALL_COMPONENTS;
#endif
/* Bring up ACPI */ /* Bring up ACPI */
Status = AcpiInitializeSubsystem(); Status = AcpiInitializeSubsystem();
if (Status != AE_OK) { if (Status != AE_OK) {

View File

@ -501,15 +501,16 @@ AcpiOsMapMemory (
{ {
#ifdef _KERNEL_MODE #ifdef _KERNEL_MODE
unsigned page_offset = (unsigned int)ACPI_TO_POINTER(where) % B_PAGE_SIZE; int page_offset = ACPI_TO_INTEGER(where) % B_PAGE_SIZE;
void *map_base = ACPI_TO_POINTER(where) - page_offset; void *map_base = ACPI_PTR_ADD(void,where,0 - page_offset);
area_id area;
map_physical_memory("acpi_physical_mem_area", map_base, ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_BLOCK_ADDRESS,0,there); area = map_physical_memory("acpi_physical_mem_area", map_base, ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_BLOCK_ADDRESS,0,there);
there += page_offset; *there += page_offset;
#endif #endif
return AE_OK; return (area > 0 ? AE_OK : AE_BAD_ADDRESS);
} }