Print this page
acpica-unix2-20130823
PANKOVs restructure
*** 1,14 ****
-
/******************************************************************************
*
* Module Name: exutils - interpreter/scanner utilities
*
*****************************************************************************/
/*
! * 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: exutils - interpreter/scanner utilities
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2013, 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:
*** 119,129 ****
*
* RETURN: None
*
* DESCRIPTION: Reacquire the interpreter execution region from within the
* interpreter code. Failure to enter the interpreter region is a
! * fatal system error. Used in conjuction with
* RelinquishInterpreter
*
******************************************************************************/
void
--- 118,128 ----
*
* RETURN: None
*
* DESCRIPTION: Reacquire the interpreter execution region from within the
* interpreter code. Failure to enter the interpreter region is a
! * fatal system error. Used in conjunction with
* RelinquishInterpreter
*
******************************************************************************/
void
*** 228,271 ****
*
* FUNCTION: AcpiExTruncateFor32bitTable
*
* PARAMETERS: ObjDesc - Object to be truncated
*
! * RETURN: none
*
* DESCRIPTION: Truncate an ACPI Integer to 32 bits if the execution mode is
* 32-bit, as determined by the revision of the DSDT.
*
******************************************************************************/
! void
AcpiExTruncateFor32bitTable (
ACPI_OPERAND_OBJECT *ObjDesc)
{
ACPI_FUNCTION_ENTRY ();
/*
* Object must be a valid number and we must be executing
! * a control method. NS node could be there for AML_INT_NAMEPATH_OP.
*/
if ((!ObjDesc) ||
(ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) ||
(ObjDesc->Common.Type != ACPI_TYPE_INTEGER))
{
! return;
}
! if (AcpiGbl_IntegerByteWidth == 4)
{
/*
! * We are running a method that exists in a 32-bit ACPI table.
* Truncate the value to 32 bits by zeroing out the upper 32-bit field
*/
ObjDesc->Integer.Value &= (UINT64) ACPI_UINT32_MAX;
}
}
/*******************************************************************************
*
--- 227,274 ----
*
* FUNCTION: AcpiExTruncateFor32bitTable
*
* PARAMETERS: ObjDesc - Object to be truncated
*
! * RETURN: TRUE if a truncation was performed, FALSE otherwise.
*
* DESCRIPTION: Truncate an ACPI Integer to 32 bits if the execution mode is
* 32-bit, as determined by the revision of the DSDT.
*
******************************************************************************/
! BOOLEAN
AcpiExTruncateFor32bitTable (
ACPI_OPERAND_OBJECT *ObjDesc)
{
ACPI_FUNCTION_ENTRY ();
/*
* Object must be a valid number and we must be executing
! * a control method. Object could be NS node for AML_INT_NAMEPATH_OP.
*/
if ((!ObjDesc) ||
(ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) ||
(ObjDesc->Common.Type != ACPI_TYPE_INTEGER))
{
! return (FALSE);
}
! if ((AcpiGbl_IntegerByteWidth == 4) &&
! (ObjDesc->Integer.Value > (UINT64) ACPI_UINT32_MAX))
{
/*
! * We are executing in a 32-bit ACPI table.
* Truncate the value to 32 bits by zeroing out the upper 32-bit field
*/
ObjDesc->Integer.Value &= (UINT64) ACPI_UINT32_MAX;
+ return (TRUE);
}
+
+ return (FALSE);
}
/*******************************************************************************
*
*** 497,502 ****
--- 500,535 ----
(void) AcpiUtShortDivide (Value, 10, &Value, &Remainder);
OutString[Count-1] = (char) ('0' + Remainder);\
}
}
+
+ /*******************************************************************************
+ *
+ * FUNCTION: AcpiIsValidSpaceId
+ *
+ * PARAMETERS: SpaceId - ID to be validated
+ *
+ * RETURN: TRUE if valid/supported ID.
+ *
+ * DESCRIPTION: Validate an operation region SpaceID.
+ *
+ ******************************************************************************/
+
+ BOOLEAN
+ AcpiIsValidSpaceId (
+ UINT8 SpaceId)
+ {
+
+ if ((SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) &&
+ (SpaceId < ACPI_USER_REGION_BEGIN) &&
+ (SpaceId != ACPI_ADR_SPACE_DATA_TABLE) &&
+ (SpaceId != ACPI_ADR_SPACE_FIXED_HARDWARE))
+ {
+ return (FALSE);
+ }
+
+ return (TRUE);
+ }
+
+
#endif