Install default address space handlers too during startup.
Without them, embedded controler may have issue accessing some addresses before installing his own handlers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33273 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -127,25 +127,50 @@ acpi_std_ops(int32 op,...)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
status = AcpiInitializeSubsystem();
|
status = AcpiInitializeSubsystem();
|
||||||
if (status != AE_OK) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ERROR("AcpiInitializeSubsystem failed (%s)\n",
|
ERROR("AcpiInitializeSubsystem failed (%s)\n",
|
||||||
AcpiFormatException(status));
|
AcpiFormatException(status));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = AcpiInitializeTables(NULL, 0, TRUE);
|
status = AcpiInitializeTables(NULL, 0, TRUE);
|
||||||
if (status != AE_OK) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ERROR("AcpiInitializeTables failed (%s)\n",
|
ERROR("AcpiInitializeTables failed (%s)\n",
|
||||||
AcpiFormatException(status));
|
AcpiFormatException(status));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = AcpiLoadTables();
|
status = AcpiLoadTables();
|
||||||
if (status != AE_OK) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ERROR("AcpiLoadTables failed (%s)\n",
|
ERROR("AcpiLoadTables failed (%s)\n",
|
||||||
AcpiFormatException(status));
|
AcpiFormatException(status));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Install the default address space handlers. */
|
||||||
|
status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
|
||||||
|
ACPI_ADR_SPACE_SYSTEM_MEMORY, ACPI_DEFAULT_HANDLER, NULL, NULL);
|
||||||
|
if (ACPI_FAILURE(status)) {
|
||||||
|
ERROR("Could not initialise SystemMemory handler: %s\n",
|
||||||
|
AcpiFormatException(status));
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
|
||||||
|
ACPI_ADR_SPACE_SYSTEM_IO, ACPI_DEFAULT_HANDLER, NULL, NULL);
|
||||||
|
if (ACPI_FAILURE(status)) {
|
||||||
|
ERROR("Could not initialise SystemIO handler: %s\n",
|
||||||
|
AcpiFormatException(status));
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
|
||||||
|
ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL);
|
||||||
|
if (ACPI_FAILURE(status)) {
|
||||||
|
ERROR("Could not initialise PciConfig handler: %s\n",
|
||||||
|
AcpiFormatException(status));
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
flags = acpiAvoidFullInit ?
|
flags = acpiAvoidFullInit ?
|
||||||
ACPI_NO_DEVICE_INIT | ACPI_NO_OBJECT_INIT :
|
ACPI_NO_DEVICE_INIT | ACPI_NO_OBJECT_INIT :
|
||||||
@@ -155,14 +180,14 @@ acpi_std_ops(int32 op,...)
|
|||||||
// well but specs don't define ACPI_NO_DEVICE_INIT
|
// well but specs don't define ACPI_NO_DEVICE_INIT
|
||||||
// and ACPI_NO_OBJECT_INIT here.
|
// and ACPI_NO_OBJECT_INIT here.
|
||||||
status = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION);
|
status = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION);
|
||||||
if (status != AE_OK) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ERROR("AcpiEnableSubsystem failed (%s)\n",
|
ERROR("AcpiEnableSubsystem failed (%s)\n",
|
||||||
AcpiFormatException(status));
|
AcpiFormatException(status));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = AcpiInitializeObjects(flags);
|
status = AcpiInitializeObjects(flags);
|
||||||
if (status != AE_OK) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ERROR("AcpiInitializeObjects failed (%s)\n",
|
ERROR("AcpiInitializeObjects failed (%s)\n",
|
||||||
AcpiFormatException(status));
|
AcpiFormatException(status));
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
Reference in New Issue
Block a user