Print this page
acpica-unix2-20130823
PANKOVs restructure
*** 3,13 ****
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
*
*****************************************************************************/
/*
! * 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:
--- 3,13 ----
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
*
*****************************************************************************/
/*
! * 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:
*** 48,57 ****
--- 48,58 ----
#include "acinterp.h"
#include "acnamesp.h"
#include "actables.h"
#include "acdispat.h"
#include "acevents.h"
+ #include "amlcode.h"
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exconfig")
*** 177,198 ****
ACPI_FUNCTION_TRACE (ExLoadTableOp);
! /* Validate lengths for the SignatureString, OEMIDString, OEMTableID */
if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
(Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
(Operand[2]->String.Length > ACPI_OEM_TABLE_ID_SIZE))
{
! return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Find the ACPI table in the RSDT/XSDT */
! Status = AcpiTbFindTable (Operand[0]->String.Pointer,
Operand[1]->String.Pointer,
Operand[2]->String.Pointer, &TableIndex);
if (ACPI_FAILURE (Status))
{
if (Status != AE_NOT_FOUND)
--- 178,200 ----
ACPI_FUNCTION_TRACE (ExLoadTableOp);
! /* Validate lengths for the Signature, OemId, and OemTableId strings */
if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
(Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
(Operand[2]->String.Length > ACPI_OEM_TABLE_ID_SIZE))
{
! return_ACPI_STATUS (AE_AML_STRING_LIMIT);
}
/* Find the ACPI table in the RSDT/XSDT */
! Status = AcpiTbFindTable (
! Operand[0]->String.Pointer,
Operand[1]->String.Pointer,
Operand[2]->String.Pointer, &TableIndex);
if (ACPI_FAILURE (Status))
{
if (Status != AE_NOT_FOUND)
*** 235,246 ****
/* ParameterPath (optional parameter) */
if (Operand[4]->String.Length > 0)
{
! if ((Operand[4]->String.Pointer[0] != '\\') &&
! (Operand[4]->String.Pointer[0] != '^'))
{
/*
* Path is not absolute, so it will be relative to the node
* referenced by the RootPathString (or the NS root if omitted)
*/
--- 237,248 ----
/* ParameterPath (optional parameter) */
if (Operand[4]->String.Length > 0)
{
! if ((Operand[4]->String.Pointer[0] != AML_ROOT_PREFIX) &&
! (Operand[4]->String.Pointer[0] != AML_PARENT_PREFIX))
{
/*
* Path is not absolute, so it will be relative to the node
* referenced by the RootPathString (or the NS root if omitted)
*/
*** 332,342 ****
/* Bytewise reads */
for (i = 0; i < Length; i++)
{
! Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
RegionOffset, 8, &Value);
if (ACPI_FAILURE (Status))
{
return (Status);
}
--- 334,344 ----
/* Bytewise reads */
for (i = 0; i < Length; i++)
{
! Status = AcpiEvAddressSpaceDispatch (ObjDesc, NULL, ACPI_READ,
RegionOffset, 8, &Value);
if (ACPI_FAILURE (Status))
{
return (Status);
}
*** 479,489 ****
}
TableDesc.Address = ObjDesc->Region.Address;
break;
-
case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Load table from Buffer or Field %p\n", ObjDesc));
--- 481,490 ----
*** 522,533 ****
ACPI_MEMCPY (TableDesc.Pointer, Table, Length);
TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer);
break;
-
default:
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/* Validate table checksum (will not get validated in TbAddTable) */
--- 523,534 ----
ACPI_MEMCPY (TableDesc.Pointer, Table, Length);
TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer);
break;
default:
+
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/* Validate table checksum (will not get validated in TbAddTable) */
*** 639,649 ****
if ((!DdbHandle) ||
(ACPI_GET_DESCRIPTOR_TYPE (DdbHandle) != ACPI_DESC_TYPE_OPERAND) ||
(DdbHandle->Common.Type != ACPI_TYPE_LOCAL_REFERENCE) ||
(!(DdbHandle->Common.Flags & AOPOBJ_DATA_VALID)))
{
! return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Get the table index from the DdbHandle */
TableIndex = TableDesc->Reference.Value;
--- 640,650 ----
if ((!DdbHandle) ||
(ACPI_GET_DESCRIPTOR_TYPE (DdbHandle) != ACPI_DESC_TYPE_OPERAND) ||
(DdbHandle->Common.Type != ACPI_TYPE_LOCAL_REFERENCE) ||
(!(DdbHandle->Common.Flags & AOPOBJ_DATA_VALID)))
{
! return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/* Get the table index from the DdbHandle */
TableIndex = TableDesc->Reference.Value;
*** 683,688 ****
* in a named object and may not be actually deleted until much later.
*/
DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID;
return_ACPI_STATUS (AE_OK);
}
-
--- 684,688 ----