diff options
Diffstat (limited to 'source/components')
| -rw-r--r-- | source/components/events/evregion.c | 2 | ||||
| -rw-r--r-- | source/components/executer/exoparg3.c | 46 | ||||
| -rw-r--r-- | source/components/namespace/nswalk.c | 11 | ||||
| -rw-r--r-- | source/components/namespace/nsxfname.c | 2 | ||||
| -rw-r--r-- | source/components/tables/tbprint.c | 5 | ||||
| -rw-r--r-- | source/components/utilities/utobject.c | 2 | ||||
| -rw-r--r-- | source/components/utilities/utosi.c | 6 |
7 files changed, 37 insertions, 37 deletions
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c index d3777b63568e..757983b35b76 100644 --- a/source/components/events/evregion.c +++ b/source/components/events/evregion.c @@ -320,7 +320,7 @@ AcpiEvAddressSpaceDispatch ( return_ACPI_STATUS (AE_NOT_EXIST); } - if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM) + if (FieldObj && RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM) { ACPI_PCC_INFO *Ctx = HandlerDesc->AddressSpace.Context; diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c index 872fbbdb44eb..722bbec46521 100644 --- a/source/components/executer/exoparg3.c +++ b/source/components/executer/exoparg3.c @@ -153,6 +153,7 @@ #include "acpi.h" #include "accommon.h" #include "acinterp.h" +#include "acoutput.h" #include "acparser.h" #include "amlcode.h" @@ -201,8 +202,7 @@ AcpiExOpcode_3A_0T_0R ( ACPI_WALK_STATE *WalkState) { ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; - ACPI_SIGNAL_FATAL_INFO *Fatal; - ACPI_STATUS Status = AE_OK; + ACPI_SIGNAL_FATAL_INFO Fatal; ACPI_FUNCTION_TRACE_STR (ExOpcode_3A_0T_0R, @@ -213,29 +213,23 @@ AcpiExOpcode_3A_0T_0R ( { case AML_FATAL_OP: /* Fatal (FatalType FatalCode FatalArg) */ - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, - "FatalOp: Type %X Code %X Arg %X " - "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", - (UINT32) Operand[0]->Integer.Value, - (UINT32) Operand[1]->Integer.Value, - (UINT32) Operand[2]->Integer.Value)); + Fatal.Type = (UINT32) Operand[0]->Integer.Value; + Fatal.Code = (UINT32) Operand[1]->Integer.Value; + Fatal.Argument = (UINT32) Operand[2]->Integer.Value; - Fatal = ACPI_ALLOCATE (sizeof (ACPI_SIGNAL_FATAL_INFO)); - if (Fatal) - { - Fatal->Type = (UINT32) Operand[0]->Integer.Value; - Fatal->Code = (UINT32) Operand[1]->Integer.Value; - Fatal->Argument = (UINT32) Operand[2]->Integer.Value; - } + ACPI_BIOS_ERROR ((AE_INFO, + "Fatal ACPI BIOS error (Type 0x%X Code 0x%X Arg 0x%X)\n", + Fatal.Type, Fatal.Code, Fatal.Argument)); /* Always signal the OS! */ - Status = AcpiOsSignal (ACPI_SIGNAL_FATAL, Fatal); - - /* Might return while OS is shutting down, just continue */ + AcpiOsSignal (ACPI_SIGNAL_FATAL, &Fatal); - ACPI_FREE (Fatal); - goto Cleanup; + /* + * Might return while OS is shutting down, so abort the AML execution + * by returning an error. + */ + return_ACPI_STATUS (AE_ERROR); case AML_EXTERNAL_OP: /* @@ -247,22 +241,16 @@ AcpiExOpcode_3A_0T_0R ( * wrong if an external opcode ever gets here. */ ACPI_ERROR ((AE_INFO, "Executed External Op")); - Status = AE_OK; - goto Cleanup; + + return_ACPI_STATUS (AE_OK); default: ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X", WalkState->Opcode)); - Status = AE_AML_BAD_OPCODE; - goto Cleanup; + return_ACPI_STATUS (AE_AML_BAD_OPCODE); } - - -Cleanup: - - return_ACPI_STATUS (Status); } diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c index 18cb6921c4fb..ca5f39475ef9 100644 --- a/source/components/namespace/nswalk.c +++ b/source/components/namespace/nswalk.c @@ -322,10 +322,13 @@ AcpiNsWalkNamespace ( if (StartNode == ACPI_ROOT_OBJECT) { StartNode = AcpiGbl_RootNode; - if (!StartNode) - { - return_ACPI_STATUS (AE_NO_NAMESPACE); - } + } + + /* Avoid walking the namespace if the StartNode is NULL */ + + if (!StartNode) + { + return_ACPI_STATUS (AE_NO_NAMESPACE); } /* Null child means "get first node" */ diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 7779ee3fc480..939ad04d514e 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -805,7 +805,7 @@ AcpiInstallMethod ( ErrorExit: ACPI_FREE (AmlBuffer); - ACPI_FREE (MethodObj); + AcpiUtDeleteObjectDesc (MethodObj); return (Status); } diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c index d82cfddb4758..72dab8dafab2 100644 --- a/source/components/tables/tbprint.c +++ b/source/components/tables/tbprint.c @@ -254,6 +254,10 @@ AcpiTbPrintTableHeader ( { ACPI_TABLE_HEADER LocalHeader; +#pragma GCC diagnostic push +#if defined(__GNUC__) && __GNUC__ >= 11 +#pragma GCC diagnostic ignored "-Wstringop-overread" +#endif if (ACPI_COMPARE_NAMESEG (Header->Signature, ACPI_SIG_FACS)) { @@ -301,4 +305,5 @@ AcpiTbPrintTableHeader ( LocalHeader.OemTableId, LocalHeader.OemRevision, LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision)); } +#pragma GCC diagnostic pop } diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 30b2fd99c92f..3278f0578c13 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -305,7 +305,7 @@ AcpiUtCreatePackageObject ( ((ACPI_SIZE) Count + 1) * sizeof (void *)); if (!PackageElements) { - ACPI_FREE (PackageDesc); + AcpiUtDeleteObjectDesc (PackageDesc); return_PTR (NULL); } diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index 8edd783ccf23..6e034eb35816 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -239,7 +239,11 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] = {"Processor Device", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, {"3.0 Thermal Model", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, {"3.0 _SCP Extensions", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, - {"Processor Aggregator Device", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0} + {"Processor Aggregator Device", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, + + /* See https://learn.microsoft.com/en-us/windows-hardware/drivers/display/automatic-display-switch */ + + {"DisplayMux", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0} }; |
