Resolve conflicts from import of Intel ACPI-CA 20070320.
This commit is contained in:
parent
676ba8b815
commit
566829f919
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167812
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbcmds - debug commands and output routines
|
||||
* $Revision: 115 $
|
||||
* $Revision: 1.150 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -201,6 +201,12 @@ static ARGUMENT_INFO AcpiDbObjectTypes [] =
|
||||
{"THERMALZONES"},
|
||||
{"BUFFERFIELDS"},
|
||||
{"DDBHANDLES"},
|
||||
{"DEBUG"},
|
||||
{"REGIONFIELDS"},
|
||||
{"BANKFIELDS"},
|
||||
{"INDEXFIELDS"},
|
||||
{"REFERENCES"},
|
||||
{"ALIAS"},
|
||||
{NULL} /* Must be null terminated */
|
||||
};
|
||||
|
||||
@ -279,9 +285,6 @@ ACPI_STATUS
|
||||
AcpiDbSleep (
|
||||
char *ObjectArg)
|
||||
{
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
return (AE_OK);
|
||||
#else
|
||||
ACPI_STATUS Status;
|
||||
UINT8 SleepState;
|
||||
|
||||
@ -306,7 +309,6 @@ AcpiDbSleep (
|
||||
Status = AcpiLeaveSleepState (SleepState);
|
||||
|
||||
return (Status);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -405,11 +407,11 @@ AcpiDbDisplayLocks (
|
||||
UINT32 i;
|
||||
|
||||
|
||||
for (i = 0; i < MAX_MUTEX; i++)
|
||||
for (i = 0; i < ACPI_MAX_MUTEX; i++)
|
||||
{
|
||||
AcpiOsPrintf ("%26s : %s\n", AcpiUtGetMutexName (i),
|
||||
AcpiGbl_MutexInfo[i].ThreadId == ACPI_MUTEX_NOT_ACQUIRED
|
||||
? "Locked" : "Unlocked");
|
||||
AcpiGbl_MutexInfo[i].ThreadId == ACPI_MUTEX_NOT_ACQUIRED
|
||||
? "Locked" : "Unlocked");
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,30 +433,28 @@ void
|
||||
AcpiDbDisplayTableInfo (
|
||||
char *TableArg)
|
||||
{
|
||||
UINT32 i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
ACPI_TABLE_DESC *TableDesc;
|
||||
|
||||
|
||||
for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++)
|
||||
/*
|
||||
* Walk the root table list
|
||||
*/
|
||||
for (i = 0; i < AcpiGbl_RootTableList.Count; i++)
|
||||
{
|
||||
TableDesc = AcpiGbl_TableLists[i].Next;
|
||||
while (TableDesc)
|
||||
TableDesc = &AcpiGbl_RootTableList.Tables[i];
|
||||
AcpiOsPrintf ( "%4.4s at %p length %.5X",
|
||||
TableDesc->Signature.Ascii, TableDesc->Pointer,
|
||||
(UINT32) TableDesc->Length);
|
||||
|
||||
if (TableDesc->Pointer && (i != ACPI_TABLE_INDEX_FACS))
|
||||
{
|
||||
AcpiOsPrintf ( "%s at %p length %.5X",
|
||||
AcpiGbl_TableData[i].Name, TableDesc->Pointer,
|
||||
(UINT32) TableDesc->Length);
|
||||
|
||||
if (i != ACPI_TABLE_FACS)
|
||||
{
|
||||
AcpiOsPrintf (" OemID=%6s TableId=%8s OemRevision=%8.8X",
|
||||
TableDesc->Pointer->OemId,
|
||||
TableDesc->Pointer->OemTableId,
|
||||
TableDesc->Pointer->OemRevision);
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
TableDesc = TableDesc->Next;
|
||||
AcpiOsPrintf (" OemId=\"%6s\" OemTableId=\"%8s\" OemRevision=%8.8X",
|
||||
TableDesc->Pointer->OemId,
|
||||
TableDesc->Pointer->OemTableId,
|
||||
TableDesc->Pointer->OemRevision);
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -479,13 +479,16 @@ AcpiDbUnloadAcpiTable (
|
||||
char *TableArg,
|
||||
char *InstanceArg)
|
||||
{
|
||||
/* TBD: Need to reimplement for new data structures */
|
||||
|
||||
#if 0
|
||||
UINT32 i;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
/* Search all tables for the target type */
|
||||
|
||||
for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++)
|
||||
for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
|
||||
{
|
||||
if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature,
|
||||
AcpiGbl_TableData[i].SigLength))
|
||||
@ -508,6 +511,7 @@ AcpiDbUnloadAcpiTable (
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -673,7 +677,7 @@ AcpiDbDisassembleMethod (
|
||||
|
||||
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
|
||||
ObjDesc->Method.AmlStart,
|
||||
ObjDesc->Method.AmlLength, NULL, 1);
|
||||
ObjDesc->Method.AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
@ -935,14 +939,14 @@ AcpiDbSetMethodData (
|
||||
if (Index > ACPI_METHOD_MAX_ARG)
|
||||
{
|
||||
AcpiOsPrintf ("Arg%d - Invalid argument name\n", Index);
|
||||
return;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiDsStoreObjectToLocal (AML_ARG_OP, Index, ObjDesc,
|
||||
WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
ObjDesc = WalkState->Arguments[Index].Object;
|
||||
@ -958,14 +962,14 @@ AcpiDbSetMethodData (
|
||||
if (Index > ACPI_METHOD_MAX_LOCAL)
|
||||
{
|
||||
AcpiOsPrintf ("Local%d - Invalid local variable name\n", Index);
|
||||
return;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiDsStoreObjectToLocal (AML_LOCAL_OP, Index, ObjDesc,
|
||||
WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
ObjDesc = WalkState->LocalVariables[Index].Object;
|
||||
@ -977,6 +981,9 @@ AcpiDbSetMethodData (
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
}
|
||||
|
||||
|
||||
@ -1017,7 +1024,7 @@ AcpiDbWalkForSpecificObjects (
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("%32s", (char *) Buffer.Pointer);
|
||||
ACPI_MEM_FREE (Buffer.Pointer);
|
||||
ACPI_FREE (Buffer.Pointer);
|
||||
|
||||
/* Dump short info about the object */
|
||||
|
||||
@ -1141,7 +1148,7 @@ AcpiDbWalkAndMatchName (
|
||||
|
||||
AcpiOsPrintf ("%32s", (char *) Buffer.Pointer);
|
||||
(void) AcpiNsDumpOneObject (ObjHandle, NestingLevel, &Info, NULL);
|
||||
ACPI_MEM_FREE (Buffer.Pointer);
|
||||
ACPI_FREE (Buffer.Pointer);
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
@ -1216,8 +1223,8 @@ AcpiDbSetScope (
|
||||
{
|
||||
/* Validate new scope from the root */
|
||||
|
||||
Status = AcpiNsGetNodeByPath (Name, AcpiGbl_RootNode,
|
||||
ACPI_NS_NO_UPSEARCH, &Node);
|
||||
Status = AcpiNsGetNode (AcpiGbl_RootNode, Name, ACPI_NS_NO_UPSEARCH,
|
||||
&Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto ErrorExit;
|
||||
@ -1230,8 +1237,8 @@ AcpiDbSetScope (
|
||||
{
|
||||
/* Validate new scope relative to old scope */
|
||||
|
||||
Status = AcpiNsGetNodeByPath (Name, AcpiGbl_DbScopeNode,
|
||||
ACPI_NS_NO_UPSEARCH, &Node);
|
||||
Status = AcpiNsGetNode (AcpiGbl_DbScopeNode, Name, ACPI_NS_NO_UPSEARCH,
|
||||
&Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto ErrorExit;
|
||||
@ -1313,12 +1320,11 @@ AcpiDmCompareAmlResources (
|
||||
AcpiOsPrintf (
|
||||
"**** Length mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X L1 %X L2 %X ****\n",
|
||||
Count, ResourceType, Offset, Aml1Length, Aml2Length);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check for descriptor byte match */
|
||||
|
||||
if (ACPI_MEMCMP (Aml1, Aml2, Aml1Length))
|
||||
else if (ACPI_MEMCMP (Aml1, Aml2, Aml1Length))
|
||||
{
|
||||
AcpiOsPrintf (
|
||||
"**** Data mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X ****\n",
|
||||
@ -1337,7 +1343,7 @@ AcpiDmCompareAmlResources (
|
||||
Count++;
|
||||
Offset += Aml1Length;
|
||||
Aml1 += Aml1Length;
|
||||
Aml2 += Aml1Length;
|
||||
Aml2 += Aml2Length;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1414,11 +1420,11 @@ AcpiDmTestResourceConversion (
|
||||
|
||||
/* Cleanup and exit */
|
||||
|
||||
ACPI_MEM_FREE (NewAml.Pointer);
|
||||
ACPI_FREE (NewAml.Pointer);
|
||||
Exit2:
|
||||
ACPI_MEM_FREE (ResourceObj.Pointer);
|
||||
ACPI_FREE (ResourceObj.Pointer);
|
||||
Exit1:
|
||||
ACPI_MEM_FREE (ReturnObj.Pointer);
|
||||
ACPI_FREE (ReturnObj.Pointer);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
@ -1439,8 +1445,6 @@ void
|
||||
AcpiDbDisplayResources (
|
||||
char *ObjectArg)
|
||||
{
|
||||
#if ACPI_MACHINE_WIDTH != 16
|
||||
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_BUFFER ReturnObj;
|
||||
@ -1487,7 +1491,7 @@ AcpiDbDisplayResources (
|
||||
goto GetCrs;
|
||||
}
|
||||
|
||||
AcpiRsDumpIrqList ((UINT8 *) AcpiGbl_DbBuffer);
|
||||
AcpiRsDumpIrqList (ACPI_CAST_PTR (UINT8, AcpiGbl_DbBuffer));
|
||||
|
||||
|
||||
/* _CRS */
|
||||
@ -1578,7 +1582,6 @@ AcpiDbDisplayResources (
|
||||
|
||||
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1738,7 +1741,8 @@ AcpiDbBusWalk (
|
||||
|
||||
/* Exit if there is no _PRT under this device */
|
||||
|
||||
Status = AcpiGetHandle (Node, METHOD_NAME__PRT, (ACPI_HANDLE *) (uintptr_t) &TempNode);
|
||||
Status = AcpiGetHandle (Node, METHOD_NAME__PRT,
|
||||
ACPI_CAST_PTR (ACPI_HANDLE, &TempNode));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (AE_OK);
|
||||
@ -1757,7 +1761,7 @@ AcpiDbBusWalk (
|
||||
/* Display the full path */
|
||||
|
||||
AcpiOsPrintf ("%-32s", (char *) Buffer.Pointer);
|
||||
ACPI_MEM_FREE (Buffer.Pointer);
|
||||
ACPI_FREE (Buffer.Pointer);
|
||||
|
||||
/* _PRT info */
|
||||
|
||||
@ -1801,7 +1805,7 @@ AcpiDbBusWalk (
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
AcpiOsPrintf (" _CID=%s", Cid->Id[0].Value);
|
||||
ACPI_MEM_FREE (Cid);
|
||||
ACPI_FREE (Cid);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbxface - AML Debugger external interfaces
|
||||
* $Revision: 71 $
|
||||
* $Revision: 1.78 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -532,7 +532,7 @@ AcpiDbInitialize (
|
||||
|
||||
/* Create the debug execution thread to execute commands */
|
||||
|
||||
Status = AcpiOsQueueForExecution (0, AcpiDbExecuteThread, NULL);
|
||||
Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbExecuteThread, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could not start debugger thread\n");
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
|
||||
* $Revision: 70 $
|
||||
* $Revision: 1.87 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -116,6 +116,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include <contrib/dev/acpica/acpi.h>
|
||||
#include <contrib/dev/acpica/actables.h>
|
||||
|
||||
#define _COMPONENT ACPI_HARDWARE
|
||||
ACPI_MODULE_NAME ("hwsleep")
|
||||
@ -136,28 +137,45 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiSetFirmwareWakingVector (
|
||||
ACPI_PHYSICAL_ADDRESS PhysicalAddress)
|
||||
ACPI_PHYSICAL_ADDRESS PhysicalAddress)
|
||||
{
|
||||
ACPI_TABLE_FACS *Facs;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiSetFirmwareWakingVector");
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
|
||||
|
||||
/* Get the FACS */
|
||||
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, (ACPI_TABLE_HEADER **) &Facs);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Set the vector */
|
||||
|
||||
if (AcpiGbl_CommonFACS.VectorWidth == 32)
|
||||
if ((Facs->Length < 32) ||
|
||||
(!(Facs->XFirmwareWakingVector)))
|
||||
{
|
||||
*(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector))
|
||||
= (UINT32) PhysicalAddress;
|
||||
/*
|
||||
* ACPI 1.0 FACS or short table or optional X_ field is zero
|
||||
*/
|
||||
Facs->FirmwareWakingVector = (UINT32) PhysicalAddress;
|
||||
}
|
||||
else
|
||||
{
|
||||
*AcpiGbl_CommonFACS.FirmwareWakingVector
|
||||
= PhysicalAddress;
|
||||
/*
|
||||
* ACPI 2.0 FACS with valid X_ field
|
||||
*/
|
||||
Facs->XFirmwareWakingVector = PhysicalAddress;
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -175,10 +193,13 @@ AcpiSetFirmwareWakingVector (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetFirmwareWakingVector (
|
||||
ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
|
||||
ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
|
||||
{
|
||||
ACPI_TABLE_FACS *Facs;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiGetFirmwareWakingVector");
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiGetFirmwareWakingVector);
|
||||
|
||||
|
||||
if (!PhysicalAddress)
|
||||
@ -186,22 +207,38 @@ AcpiGetFirmwareWakingVector (
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Get the FACS */
|
||||
|
||||
Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, (ACPI_TABLE_HEADER **) &Facs);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Get the vector */
|
||||
|
||||
if (AcpiGbl_CommonFACS.VectorWidth == 32)
|
||||
if ((Facs->Length < 32) ||
|
||||
(!(Facs->XFirmwareWakingVector)))
|
||||
{
|
||||
*PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
|
||||
*(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector));
|
||||
/*
|
||||
* ACPI 1.0 FACS or short table or optional X_ field is zero
|
||||
*/
|
||||
*PhysicalAddress =
|
||||
(ACPI_PHYSICAL_ADDRESS) Facs->FirmwareWakingVector;
|
||||
}
|
||||
else
|
||||
{
|
||||
*PhysicalAddress =
|
||||
*AcpiGbl_CommonFACS.FirmwareWakingVector;
|
||||
/*
|
||||
* ACPI 2.0 FACS with valid X_ field
|
||||
*/
|
||||
*PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) Facs->XFirmwareWakingVector;
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiGetFirmwareWakingVector)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -227,7 +264,7 @@ AcpiEnterSleepStatePrep (
|
||||
ACPI_OBJECT Arg;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiEnterSleepStatePrep");
|
||||
ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep);
|
||||
|
||||
|
||||
/*
|
||||
@ -290,13 +327,14 @@ AcpiEnterSleepStatePrep (
|
||||
Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
|
||||
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Method _SST failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "While executing method _SST"));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -324,13 +362,13 @@ AcpiEnterSleepState (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiEnterSleepState");
|
||||
ACPI_FUNCTION_TRACE (AcpiEnterSleepState);
|
||||
|
||||
|
||||
if ((AcpiGbl_SleepTypeA > ACPI_SLEEP_TYPE_MAX) ||
|
||||
(AcpiGbl_SleepTypeB > ACPI_SLEEP_TYPE_MAX))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Sleep values out of range: A=%X B=%X\n",
|
||||
ACPI_ERROR ((AE_INFO, "Sleep values out of range: A=%X B=%X",
|
||||
AcpiGbl_SleepTypeA, AcpiGbl_SleepTypeB));
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
|
||||
}
|
||||
@ -340,7 +378,7 @@ AcpiEnterSleepState (
|
||||
|
||||
/* Clear wake status */
|
||||
|
||||
Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -348,7 +386,7 @@ AcpiEnterSleepState (
|
||||
|
||||
/* Clear all fixed and general purpose status bits */
|
||||
|
||||
Status = AcpiHwClearAcpiStatus (ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiHwClearAcpiStatus ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -358,8 +396,7 @@ AcpiEnterSleepState (
|
||||
{
|
||||
/* Disable BM arbitration */
|
||||
|
||||
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE,
|
||||
1, ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -478,8 +515,7 @@ AcpiEnterSleepState (
|
||||
Retry = 1000;
|
||||
do
|
||||
{
|
||||
Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue,
|
||||
ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -501,6 +537,8 @@ AcpiEnterSleepState (
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiEnterSleepState)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -523,16 +561,16 @@ AcpiEnterSleepStateS4bios (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiEnterSleepStateS4bios");
|
||||
ACPI_FUNCTION_TRACE (AcpiEnterSleepStateS4bios);
|
||||
|
||||
|
||||
Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiHwClearAcpiStatus (ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiHwClearAcpiStatus ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -557,13 +595,12 @@ AcpiEnterSleepStateS4bios (
|
||||
|
||||
ACPI_FLUSH_CPU_CACHE ();
|
||||
|
||||
Status = AcpiOsWritePort (AcpiGbl_FADT->SmiCmd,
|
||||
(UINT32) AcpiGbl_FADT->S4BiosReq, 8);
|
||||
Status = AcpiOsWritePort (AcpiGbl_FADT.SmiCommand,
|
||||
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
|
||||
|
||||
do {
|
||||
AcpiOsStall(1000);
|
||||
Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue,
|
||||
ACPI_MTX_DO_NOT_LOCK);
|
||||
Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -573,6 +610,8 @@ AcpiEnterSleepStateS4bios (
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiEnterSleepStateS4bios)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -600,7 +639,7 @@ AcpiLeaveSleepState (
|
||||
UINT32 PM1BControl;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiLeaveSleepState");
|
||||
ACPI_FUNCTION_TRACE (AcpiLeaveSleepState);
|
||||
|
||||
|
||||
/*
|
||||
@ -657,23 +696,20 @@ AcpiLeaveSleepState (
|
||||
Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
|
||||
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Method _SST failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "During Method _SST"));
|
||||
}
|
||||
|
||||
Arg.Integer.Value = SleepState;
|
||||
Status = AcpiEvaluateObject (NULL, METHOD_NAME__BFS, &ArgList, NULL);
|
||||
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Method _BFS failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "During Method _BFS"));
|
||||
}
|
||||
|
||||
Status = AcpiEvaluateObject (NULL, METHOD_NAME__WAK, &ArgList, NULL);
|
||||
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Method _WAK failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "During Method _WAK"));
|
||||
}
|
||||
/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
|
||||
|
||||
@ -698,16 +734,14 @@ AcpiLeaveSleepState (
|
||||
/* Enable power button */
|
||||
|
||||
(void) AcpiSetRegister(
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].EnableRegisterId,
|
||||
1, ACPI_MTX_DO_NOT_LOCK);
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].EnableRegisterId, 1);
|
||||
|
||||
(void) AcpiSetRegister(
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
|
||||
1, ACPI_MTX_DO_NOT_LOCK);
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId, 1);
|
||||
|
||||
/* Enable BM arbitration */
|
||||
|
||||
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK);
|
||||
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -717,9 +751,11 @@ AcpiLeaveSleepState (
|
||||
Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
|
||||
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Method _SST failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "During Method _SST"));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiLeaveSleepState)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user