Resolve conflicts from the vendor update.

This commit is contained in:
Mike Smith 2000-12-01 09:49:35 +00:00
parent 2c5569d6ff
commit 8b7f715dd3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69454
7 changed files with 80 additions and 294 deletions

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwxface.c - Hardware access external interfaces
* $Revision: 32 $
* $Revision: 36 $
*
*****************************************************************************/
@ -222,7 +222,7 @@ AcpiGetProcessorThrottlingInfo (
NATIVE_UINT NumThrottleStates;
NATIVE_UINT BufferSpaceNeeded;
NATIVE_UINT i;
UINT8 DutyWidth = 0;
UINT8 DutyWidth;
ACPI_NAMESPACE_NODE *CpuNode;
ACPI_OPERAND_OBJECT *CpuObj;
ACPI_CPU_THROTTLING_STATE *StatePtr;
@ -259,12 +259,10 @@ AcpiGetProcessorThrottlingInfo (
return_ACPI_STATUS (AE_NOT_FOUND);
}
#ifndef _IA64
/*
* No Duty fields in IA64 tables
* (Duty Width on IA-64 is zero)
*/
DutyWidth = AcpiGbl_FACP->DutyWidth;
#endif
DutyWidth = AcpiGbl_FADT->DutyWidth;
/*
* P0 must always have a P_BLK all others may be null
@ -339,8 +337,8 @@ AcpiGetProcessorThrottlingState (
ACPI_OPERAND_OBJECT *CpuObj;
UINT32 NumThrottleStates;
UINT32 DutyCycle;
UINT8 DutyOffset = 0;
UINT8 DutyWidth = 0;
UINT8 DutyOffset;
UINT8 DutyWidth;
FUNCTION_TRACE ("AcpiGetProcessorThrottlingState");
@ -362,13 +360,11 @@ AcpiGetProcessorThrottlingState (
return_ACPI_STATUS (AE_NOT_FOUND);
}
#ifndef _IA64
/*
* No Duty fields in IA64 tables
*/
DutyOffset = AcpiGbl_FACP->DutyOffset;
DutyWidth = AcpiGbl_FACP->DutyWidth;
#endif
DutyOffset = AcpiGbl_FADT->DutyOffset;
DutyWidth = AcpiGbl_FADT->DutyWidth;
/*
* Must have a valid P_BLK P0 must have a P_BLK all others may be null
@ -432,8 +428,8 @@ AcpiSetProcessorThrottlingState (
ACPI_NAMESPACE_NODE *CpuNode;
ACPI_OPERAND_OBJECT *CpuObj;
UINT32 NumThrottleStates = 0;
UINT8 DutyOffset = 0;
UINT8 DutyWidth = 0;
UINT8 DutyOffset;
UINT8 DutyWidth;
UINT32 DutyCycle = 0;
@ -456,13 +452,11 @@ AcpiSetProcessorThrottlingState (
return_ACPI_STATUS (AE_NOT_FOUND);
}
#ifndef _IA64
/*
* No Duty fields in IA64 tables
*/
DutyOffset = AcpiGbl_FACP->DutyOffset;
DutyWidth = AcpiGbl_FACP->DutyWidth;
#endif
DutyOffset = AcpiGbl_FADT->DutyOffset;
DutyWidth = AcpiGbl_FADT->DutyWidth;
/*
* Must have a valid P_BLK P0 must have a P_BLK all others may be null
@ -489,7 +483,7 @@ AcpiSetProcessorThrottlingState (
return_ACPI_STATUS (AE_SUPPORT);
}
NumThrottleStates = (int) AcpiHwLocalPow (2,DutyWidth);
NumThrottleStates = (UINT32) AcpiHwLocalPow (2,DutyWidth);
/*
* Convert throttling state to duty cycle (invert).
@ -726,8 +720,9 @@ AcpiGetTimer (
ACPI_STATUS
AcpiSetFirmwareWakingVector (
void *PhysicalAddress)
ACPI_PHYSICAL_ADDRESS PhysicalAddress)
{
FUNCTION_TRACE ("AcpiSetFirmwareWakingVector");
@ -740,7 +735,14 @@ AcpiSetFirmwareWakingVector (
/* Set the vector */
* ((void **) AcpiGbl_FACS->FirmwareWakingVector) = PhysicalAddress;
if (AcpiGbl_FACS->VectorWidth == 32)
{
* (UINT32 *) AcpiGbl_FACS->FirmwareWakingVector = (UINT32) PhysicalAddress;
}
else
{
*AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
}
return_ACPI_STATUS (AE_OK);
}
@ -751,7 +753,7 @@ AcpiSetFirmwareWakingVector (
* FUNCTION: AcpiGetFirmwareWakingVector
*
* PARAMETERS: *PhysicalAddress - Output buffer where contents of
* the dFirmwareWakingVector field of
* the FirmwareWakingVector field of
* the FACS will be stored.
*
* RETURN: Status
@ -762,8 +764,9 @@ AcpiSetFirmwareWakingVector (
ACPI_STATUS
AcpiGetFirmwareWakingVector (
void **PhysicalAddress)
ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
{
FUNCTION_TRACE ("AcpiGetFirmwareWakingVector");
@ -780,9 +783,14 @@ AcpiGetFirmwareWakingVector (
}
/* Get the vector */
*PhysicalAddress = * ((void **) AcpiGbl_FACS->FirmwareWakingVector);
if (AcpiGbl_FACS->VectorWidth == 32)
{
*PhysicalAddress = * (UINT32 *) AcpiGbl_FACS->FirmwareWakingVector;
}
else
{
*PhysicalAddress = *AcpiGbl_FACS->FirmwareWakingVector;
}
return_ACPI_STATUS (AE_OK);
}

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
* $Revision: 44 $
* $Revision: 48 $
*
*****************************************************************************/
@ -147,21 +147,6 @@
#define ACPI_CA_VERSION __DATE__
/*
* How and when control methods will be parsed
* The default action is to parse all methods at table load time to verify them, but delete the parse trees
* to conserve memory. Methods are parsed just in time before execution and the parse tree is deleted
* when execution completes.
*/
#define METHOD_PARSE_AT_INIT 0x0 /* Parse at table init, never delete the method parse tree */
#define METHOD_PARSE_JUST_IN_TIME 0x1 /* Parse only when a method is invoked */
#define METHOD_DELETE_AT_COMPLETION 0x2 /* Delete parse tree on method completion */
/* Default parsing configuration */
#define METHOD_PARSE_CONFIGURATION (METHOD_PARSE_JUST_IN_TIME | METHOD_DELETE_AT_COMPLETION)
/* Maximum objects in the various object caches */
#define MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */
@ -170,13 +155,6 @@
#define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */
#define MAX_WALK_CACHE_DEPTH 2 /* Objects for parse tree walks (method execution) */
/*
* NameSpace Table size
*
* All tables are the same size to simplify the implementation.
* Tables may be extended by allocating additional tables that
* are in turn linked together to form a chain of tables.
*/
#define NS_TABLE_SIZE 4
@ -248,14 +226,14 @@
/* Names within the namespace are 4 bytes long */
#define ACPI_NAME_SIZE 4
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
#define PATH_SEPARATOR '.'
/* Constants used in searching for the RSDP in low memory */
#define LO_RSDP_WINDOW_BASE (void *) 0
#define HI_RSDP_WINDOW_BASE (void *) 0xE0000
#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */
#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */
#define LO_RSDP_WINDOW_SIZE 0x400
#define HI_RSDP_WINDOW_SIZE 0x20000
#define RSDP_SCAN_STEP 16

View File

@ -161,11 +161,11 @@ AcpiFormatException (
ACPI_STATUS
AcpiFindRootPointer (
void **RsdpPhysicalAddress);
ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress);
ACPI_STATUS
AcpiLoadTables (
void *RsdpPhysicalAddress);
ACPI_PHYSICAL_ADDRESS RsdpPhysicalAddress);
ACPI_STATUS
AcpiLoadTable (
@ -201,7 +201,6 @@ AcpiWalkNamespace (
void *Context,
void * *ReturnValue);
ACPI_STATUS
AcpiGetDevices (
NATIVE_CHAR *HID,
@ -370,11 +369,11 @@ AcpiGetIrqRoutingTable (
ACPI_STATUS
AcpiSetFirmwareWakingVector (
void *PhysicalAddress);
ACPI_PHYSICAL_ADDRESS PhysicalAddress);
ACPI_STATUS
AcpiGetFirmwareWakingVector (
void **PhysicalAddress);
ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
ACPI_STATUS
AcpiGetProcessorId (

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
* $Revision: 60 $
* $Revision: 65 $
*
*****************************************************************************/
@ -121,7 +121,7 @@
* generated parser to tightly constrain stack and dynamic memory
* usage. At the same time, parsing is kept flexible and the code
* fairly compact by parsing based on a list of AML opcode
* templates in AcpiGbl_AmlOpInfo[]
* templates in AmlOpInfo[]
*/
#include "acpi.h"
@ -139,101 +139,6 @@ UINT32 AcpiGbl_Depth = 0;
extern UINT32 AcpiGbl_ScopeDepth;
/*******************************************************************************
*
* FUNCTION: AcpiPsDeleteCompletedOp
*
* PARAMETERS: State - Walk state
* Op - Completed op
*
* RETURN: AE_OK
*
* DESCRIPTION: Callback function for AcpiPsGetNextWalkOp(). Used during
* AcpiPsDeleteParse tree to delete Op objects when all sub-objects
* have been visited (and deleted.)
*
******************************************************************************/
ACPI_STATUS
AcpiPsDeleteCompletedOp (
ACPI_WALK_STATE *State,
ACPI_PARSE_OBJECT *Op)
{
AcpiPsFreeOp (Op);
return (AE_OK);
}
#ifndef PARSER_ONLY
/*******************************************************************************
*
* FUNCTION: AcpiPsDeleteParseTree
*
* PARAMETERS: SubtreeRoot - Root of tree (or subtree) to delete
*
* RETURN: None
*
* DESCRIPTION: Delete a portion of or an entire parse tree.
*
******************************************************************************/
void
AcpiPsDeleteParseTree (
ACPI_PARSE_OBJECT *SubtreeRoot)
{
ACPI_WALK_STATE *WalkState;
ACPI_WALK_LIST WalkList;
FUNCTION_TRACE_PTR ("PsDeleteParseTree", SubtreeRoot);
if (!SubtreeRoot)
{
return_VOID;
}
/* Create and initialize a new walk list */
WalkList.WalkState = NULL;
WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, NULL, NULL, &WalkList);
if (!WalkState)
{
return_VOID;
}
WalkState->ParserState = NULL;
WalkState->ParseFlags = 0;
WalkState->DescendingCallback = NULL;
WalkState->AscendingCallback = NULL;
WalkState->Origin = SubtreeRoot;
WalkState->NextOp = SubtreeRoot;
/* Head downward in the tree */
WalkState->NextOpInfo = NEXT_OP_DOWNWARD;
/* Visit all nodes in the subtree */
while (WalkState->NextOp)
{
AcpiPsGetNextWalkOp (WalkState, WalkState->NextOp,
AcpiPsDeleteCompletedOp);
}
/* We are done with this walk */
AcpiDsDeleteWalkState (WalkState);
return_VOID;
}
#endif
/*******************************************************************************
*
* FUNCTION: AcpiPsPeekOpcode
@ -246,7 +151,7 @@ AcpiPsDeleteParseTree (
*
******************************************************************************/
UINT32
static UINT32
AcpiPsGetOpcodeSize (
UINT32 Opcode)
{
@ -428,7 +333,7 @@ AcpiPsFindObject (
*
******************************************************************************/
BOOLEAN
static BOOLEAN
AcpiPsCompleteThisOp (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op)
@ -560,8 +465,7 @@ AcpiPsCompleteThisOp (
*
******************************************************************************/
ACPI_STATUS
static ACPI_STATUS
AcpiPsNextParseState (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
@ -700,12 +604,12 @@ AcpiPsParseLoop (
ACPI_PARSE_STATE *ParserState;
FUNCTION_TRACE_PTR ("PsParseLoop", WalkState);
ParserState = WalkState->ParserState;
#ifndef PARSER_ONLY
if (WalkState->WalkType & WALK_METHOD_RESTART)
{
/* We are restarting a preempted control method */
@ -725,11 +629,18 @@ AcpiPsParseLoop (
{
/*
* A predicate was just completed, get the value of the
* A predicate was just completed, get the value of the
* predicate and branch based on that value
*/
Status = AcpiDsGetPredicateValue (WalkState, NULL, TRUE);
if (Status == AE_AML_NO_OPERAND)
{
DEBUG_PRINT (ACPI_ERROR,
("PsParseLoop: Invoked method did not return a value, %s\n",
AcpiCmFormatException (Status)));
}
Status = AcpiPsNextParseState (WalkState, Op, Status);
}
@ -745,6 +656,7 @@ AcpiPsParseLoop (
ArgTypes = WalkState->PrevArgTypes;
}
}
#endif
/*
* Iterative parsing loop, while there is more aml to process:

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
* $Revision: 44 $
* $Revision: 48 $
*
*****************************************************************************/
@ -147,21 +147,6 @@
#define ACPI_CA_VERSION __DATE__
/*
* How and when control methods will be parsed
* The default action is to parse all methods at table load time to verify them, but delete the parse trees
* to conserve memory. Methods are parsed just in time before execution and the parse tree is deleted
* when execution completes.
*/
#define METHOD_PARSE_AT_INIT 0x0 /* Parse at table init, never delete the method parse tree */
#define METHOD_PARSE_JUST_IN_TIME 0x1 /* Parse only when a method is invoked */
#define METHOD_DELETE_AT_COMPLETION 0x2 /* Delete parse tree on method completion */
/* Default parsing configuration */
#define METHOD_PARSE_CONFIGURATION (METHOD_PARSE_JUST_IN_TIME | METHOD_DELETE_AT_COMPLETION)
/* Maximum objects in the various object caches */
#define MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */
@ -170,13 +155,6 @@
#define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */
#define MAX_WALK_CACHE_DEPTH 2 /* Objects for parse tree walks (method execution) */
/*
* NameSpace Table size
*
* All tables are the same size to simplify the implementation.
* Tables may be extended by allocating additional tables that
* are in turn linked together to form a chain of tables.
*/
#define NS_TABLE_SIZE 4
@ -248,14 +226,14 @@
/* Names within the namespace are 4 bytes long */
#define ACPI_NAME_SIZE 4
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
#define PATH_SEPARATOR '.'
/* Constants used in searching for the RSDP in low memory */
#define LO_RSDP_WINDOW_BASE (void *) 0
#define HI_RSDP_WINDOW_BASE (void *) 0xE0000
#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */
#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */
#define LO_RSDP_WINDOW_SIZE 0x400
#define HI_RSDP_WINDOW_SIZE 0x20000
#define RSDP_SCAN_STEP 16

View File

@ -161,11 +161,11 @@ AcpiFormatException (
ACPI_STATUS
AcpiFindRootPointer (
void **RsdpPhysicalAddress);
ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress);
ACPI_STATUS
AcpiLoadTables (
void *RsdpPhysicalAddress);
ACPI_PHYSICAL_ADDRESS RsdpPhysicalAddress);
ACPI_STATUS
AcpiLoadTable (
@ -201,7 +201,6 @@ AcpiWalkNamespace (
void *Context,
void * *ReturnValue);
ACPI_STATUS
AcpiGetDevices (
NATIVE_CHAR *HID,
@ -370,11 +369,11 @@ AcpiGetIrqRoutingTable (
ACPI_STATUS
AcpiSetFirmwareWakingVector (
void *PhysicalAddress);
ACPI_PHYSICAL_ADDRESS PhysicalAddress);
ACPI_STATUS
AcpiGetFirmwareWakingVector (
void **PhysicalAddress);
ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
ACPI_STATUS
AcpiGetProcessorId (

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
* $Revision: 60 $
* $Revision: 65 $
*
*****************************************************************************/
@ -121,7 +121,7 @@
* generated parser to tightly constrain stack and dynamic memory
* usage. At the same time, parsing is kept flexible and the code
* fairly compact by parsing based on a list of AML opcode
* templates in AcpiGbl_AmlOpInfo[]
* templates in AmlOpInfo[]
*/
#include "acpi.h"
@ -139,101 +139,6 @@ UINT32 AcpiGbl_Depth = 0;
extern UINT32 AcpiGbl_ScopeDepth;
/*******************************************************************************
*
* FUNCTION: AcpiPsDeleteCompletedOp
*
* PARAMETERS: State - Walk state
* Op - Completed op
*
* RETURN: AE_OK
*
* DESCRIPTION: Callback function for AcpiPsGetNextWalkOp(). Used during
* AcpiPsDeleteParse tree to delete Op objects when all sub-objects
* have been visited (and deleted.)
*
******************************************************************************/
ACPI_STATUS
AcpiPsDeleteCompletedOp (
ACPI_WALK_STATE *State,
ACPI_PARSE_OBJECT *Op)
{
AcpiPsFreeOp (Op);
return (AE_OK);
}
#ifndef PARSER_ONLY
/*******************************************************************************
*
* FUNCTION: AcpiPsDeleteParseTree
*
* PARAMETERS: SubtreeRoot - Root of tree (or subtree) to delete
*
* RETURN: None
*
* DESCRIPTION: Delete a portion of or an entire parse tree.
*
******************************************************************************/
void
AcpiPsDeleteParseTree (
ACPI_PARSE_OBJECT *SubtreeRoot)
{
ACPI_WALK_STATE *WalkState;
ACPI_WALK_LIST WalkList;
FUNCTION_TRACE_PTR ("PsDeleteParseTree", SubtreeRoot);
if (!SubtreeRoot)
{
return_VOID;
}
/* Create and initialize a new walk list */
WalkList.WalkState = NULL;
WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, NULL, NULL, &WalkList);
if (!WalkState)
{
return_VOID;
}
WalkState->ParserState = NULL;
WalkState->ParseFlags = 0;
WalkState->DescendingCallback = NULL;
WalkState->AscendingCallback = NULL;
WalkState->Origin = SubtreeRoot;
WalkState->NextOp = SubtreeRoot;
/* Head downward in the tree */
WalkState->NextOpInfo = NEXT_OP_DOWNWARD;
/* Visit all nodes in the subtree */
while (WalkState->NextOp)
{
AcpiPsGetNextWalkOp (WalkState, WalkState->NextOp,
AcpiPsDeleteCompletedOp);
}
/* We are done with this walk */
AcpiDsDeleteWalkState (WalkState);
return_VOID;
}
#endif
/*******************************************************************************
*
* FUNCTION: AcpiPsPeekOpcode
@ -246,7 +151,7 @@ AcpiPsDeleteParseTree (
*
******************************************************************************/
UINT32
static UINT32
AcpiPsGetOpcodeSize (
UINT32 Opcode)
{
@ -428,7 +333,7 @@ AcpiPsFindObject (
*
******************************************************************************/
BOOLEAN
static BOOLEAN
AcpiPsCompleteThisOp (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op)
@ -560,8 +465,7 @@ AcpiPsCompleteThisOp (
*
******************************************************************************/
ACPI_STATUS
static ACPI_STATUS
AcpiPsNextParseState (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
@ -700,12 +604,12 @@ AcpiPsParseLoop (
ACPI_PARSE_STATE *ParserState;
FUNCTION_TRACE_PTR ("PsParseLoop", WalkState);
ParserState = WalkState->ParserState;
#ifndef PARSER_ONLY
if (WalkState->WalkType & WALK_METHOD_RESTART)
{
/* We are restarting a preempted control method */
@ -725,11 +629,18 @@ AcpiPsParseLoop (
{
/*
* A predicate was just completed, get the value of the
* A predicate was just completed, get the value of the
* predicate and branch based on that value
*/
Status = AcpiDsGetPredicateValue (WalkState, NULL, TRUE);
if (Status == AE_AML_NO_OPERAND)
{
DEBUG_PRINT (ACPI_ERROR,
("PsParseLoop: Invoked method did not return a value, %s\n",
AcpiCmFormatException (Status)));
}
Status = AcpiPsNextParseState (WalkState, Op, Status);
}
@ -745,6 +656,7 @@ AcpiPsParseLoop (
ArgTypes = WalkState->PrevArgTypes;
}
}
#endif
/*
* Iterative parsing loop, while there is more aml to process: