Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure
*** 1,14 ****
-
/******************************************************************************
*
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2011, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
--- 1,13 ----
/******************************************************************************
*
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*** 50,59 ****
--- 49,59 ----
#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME ("hwacpi")
+ #if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/******************************************************************************
*
* FUNCTION: AcpiHwSetMode
*
* PARAMETERS: Mode - SYS_MODE_ACPI or SYS_MODE_LEGACY
*** 73,82 ****
--- 73,90 ----
UINT32 Retry;
ACPI_FUNCTION_TRACE (HwSetMode);
+
+ /* If the Hardware Reduced flag is set, machine is always in acpi mode */
+
+ if (AcpiGbl_ReducedHardware)
+ {
+ return_ACPI_STATUS (AE_OK);
+ }
+
/*
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
* system does not support mode transition.
*/
if (!AcpiGbl_FADT.SmiCommand)
*** 110,120 ****
(UINT32) AcpiGbl_FADT.AcpiEnable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Attempting to enable ACPI mode\n"));
break;
case ACPI_SYS_MODE_LEGACY:
-
/*
* BIOS should clear all fixed status bits and restore fixed event
* enable bits to default
*/
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
--- 118,127 ----
*** 122,131 ****
--- 129,139 ----
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Attempting to enable Legacy (non-ACPI) mode\n"));
break;
default:
+
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
if (ACPI_FAILURE (Status))
{
*** 139,155 ****
* do so, but allow faster systems to proceed more quickly.
*/
Retry = 3000;
while (Retry)
{
! if (AcpiHwGetMode() == Mode)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n",
Mode));
return_ACPI_STATUS (AE_OK);
}
! AcpiOsStall(1000);
Retry--;
}
ACPI_ERROR ((AE_INFO, "Hardware did not change modes"));
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
--- 147,163 ----
* do so, but allow faster systems to proceed more quickly.
*/
Retry = 3000;
while (Retry)
{
! if (AcpiHwGetMode () == Mode)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n",
Mode));
return_ACPI_STATUS (AE_OK);
}
! AcpiOsStall (ACPI_USEC_PER_MSEC);
Retry--;
}
ACPI_ERROR ((AE_INFO, "Hardware did not change modes"));
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
*** 178,187 ****
--- 186,202 ----
ACPI_FUNCTION_TRACE (HwGetMode);
+ /* If the Hardware Reduced flag is set, machine is always in acpi mode */
+
+ if (AcpiGbl_ReducedHardware)
+ {
+ return_UINT32 (ACPI_SYS_MODE_ACPI);
+ }
+
/*
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
* system does not support mode transition.
*/
if (!AcpiGbl_FADT.SmiCommand)
*** 202,206 ****
--- 217,223 ----
else
{
return_UINT32 (ACPI_SYS_MODE_LEGACY);
}
}
+
+ #endif /* !ACPI_REDUCED_HARDWARE */