diff options
Diffstat (limited to 'source/components')
-rw-r--r-- | source/components/debugger/dbhistry.c | 1 | ||||
-rw-r--r-- | source/components/disassembler/dmbuffer.c | 19 | ||||
-rw-r--r-- | source/components/dispatcher/dsfield.c | 24 | ||||
-rw-r--r-- | source/components/executer/exfield.c | 2 |
4 files changed, 38 insertions, 8 deletions
diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c index 554115bfab3f..b9b2ed8727ea 100644 --- a/source/components/debugger/dbhistry.c +++ b/source/components/debugger/dbhistry.c @@ -175,7 +175,6 @@ static HISTORY_INFO AcpiGbl_HistoryBuffer[HISTORY_SIZE]; static UINT16 AcpiGbl_LoHistory = 0; static UINT16 AcpiGbl_NumHistory = 0; static UINT16 AcpiGbl_NextHistoryIndex = 0; -UINT32 AcpiGbl_NextCmdNum = 1; /******************************************************************************* diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index 1d734d4fcff0..47279a2c2a82 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -400,6 +400,10 @@ AcpiDmIsUuidBuffer ( /* Buffer size is the buffer argument */ SizeOp = Op->Common.Value.Arg; + if (!SizeOp) + { + return (FALSE); + } /* Next, the initializer byte list to examine */ @@ -520,6 +524,10 @@ AcpiDmIsUnicodeBuffer ( /* Buffer size is the buffer argument */ SizeOp = Op->Common.Value.Arg; + if (!SizeOp) + { + return (FALSE); + } /* Next, the initializer byte list to examine */ @@ -596,6 +604,10 @@ AcpiDmIsStringBuffer ( /* Buffer size is the buffer argument */ SizeOp = Op->Common.Value.Arg; + if (!SizeOp) + { + return (FALSE); + } /* Next, the initializer byte list to examine */ @@ -675,13 +687,18 @@ AcpiDmIsPldBuffer ( UINT64 InitializerSize; + if (!Op) + { + return (FALSE); + } + /* * Get the BufferSize argument - Buffer(BufferSize) * If the buffer was generated by the ToPld macro, it must * be a BYTE constant. */ SizeOp = Op->Common.Value.Arg; - if (SizeOp->Common.AmlOpcode != AML_BYTE_OP) + if (!SizeOp || SizeOp->Common.AmlOpcode != AML_BYTE_OP) { return (FALSE); } diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index e2576606e58d..f4199078006b 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -341,7 +341,12 @@ AcpiDsCreateBufferField ( Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String, ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node); - if (ACPI_FAILURE (Status)) + if ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) && + Status == AE_ALREADY_EXISTS) + { + Status = AE_OK; + } + else if (ACPI_FAILURE (Status)) { ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, Arg->Common.Value.String, Status); @@ -682,12 +687,21 @@ AcpiDsCreateField ( Info.RegionNode = RegionNode; Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); - if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM && - !(RegionNode->Object->Field.InternalPccBuffer - = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length))) + if (ACPI_FAILURE (Status)) { - return_ACPI_STATUS (AE_NO_MEMORY); + return_ACPI_STATUS (Status); } + + if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM) + { + RegionNode->Object->Field.InternalPccBuffer = + ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length); + if (!RegionNode->Object->Field.InternalPccBuffer) + { + return_ACPI_STATUS (AE_NO_MEMORY); + } + } + return_ACPI_STATUS (Status); } diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index 167d182c67d0..897c2d47d5d0 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -167,7 +167,7 @@ #define ACPI_INVALID_PROTOCOL_ID 0x80 #define ACPI_MAX_PROTOCOL_ID 0x0F -const UINT8 AcpiProtocolLengths[] = +static const UINT8 AcpiProtocolLengths[] = { ACPI_INVALID_PROTOCOL_ID, /* 0 - reserved */ ACPI_INVALID_PROTOCOL_ID, /* 1 - reserved */ |