| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The only things not supported are the tokenizing operator and
the stringizing operator.
Saket Dumbre.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Enables GET_FUNCTION_NAME macro(s).
|
| |_|/ /
|/| | |
| | | |
| | | | |
No longer needed or desired.
|
|\ \ \ \
| | | | |
| | | | | |
Use ACPI_GET_FUNCTION_NAME
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Add support for AMD Secure Processor Table (ASPT) version 1
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
ASPT is the AMD Secure Processor table, found in Hyper-V VMs when SNP
isolation is exposed to the VM and in some high-end AMD servers. This
commit adds support for rev 1 of the ASPT spec in the disassembler.
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
Remove extern prototypes in achaiku.h file
|
| | |/ /
| |/| |
| | | |
| | | | |
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
|
|\ \ \ \ |
|
| |\ \ \ \
| | | | | |
| | | | | | |
add support for ClockInput resources introduced in ACPI v6.5
|
| |/ / / / |
|
| |\ \ \ \
| | | | | |
| | | | | | |
acpisrc Linux generation fix
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also renames ACPI_DATA_TABLE_MAPPING's struct to
acpi_data_table_mapping, just so conversion goes smoothly.
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, it was assumed prefixes would be directly before the keyword
itself. This is a wrong assumption that got broken by some code in
actbl2.h. Therefore, look for the prefix on the whole line.
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
|
| | | |/ /
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | | |
This indirectly fixes acpisrc -l failures for these typedef structs.
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
|
|/ / / /
| | | |
| | | |
| | | | |
Signed/unsigned mismatches, One data truncation warning.
|
| | | |
| | | |
| | | |
| | | | |
actbl2.h:1555:29: error: flexible array member in a struct with no named members
|
|\ \ \ \
| | | | |
| | | | | |
Revert "Replace fake flexible arrays with actual flexible array members"
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Revert "Headers: Replace zero-length array with flexible-array member"
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Revert "Fix dangling pointer warning for AcpiUtInitStackPtrTrace"
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Fix dangling pointer warning for AcpiUtInitStackPtrTrace
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
GCC12 complains about storing invalid pointers, store them as integers
instead.
obj/acpiexec ../../../source/components/utilities/utdebug.c
../../../source/components/utilities/utdebug.c: In function 'AcpiUtInitStackPtrTrace':
../../../source/components/utilities/utdebug.c:188:31: error: storing the address of local variable 'CurrentSp' in 'AcpiGbl_EntryStackPointer' [-Werror=dangling-pointer=]
188 | AcpiGbl_EntryStackPointer = &CurrentSp;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../../../source/components/utilities/utdebug.c:185:29: note: 'CurrentSp' declared here
185 | ACPI_SIZE CurrentSp;
| ^~~~~~~~~
Fixes #771
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Not all pointer are castable to integers directly and ACPI_UINTPTR_T is
not guaranteed to be "void *".
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Revert "Fix memory leak caused by _CID repair function"
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Revert commit 180cb53963aa ("Fix memory leak caused by _CID repair
function") which is reported to cause a boot issue on Acer Swift 3
(SF314-51).
Reported-by: Adrien Precigout <dev@asdrip.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
ACPICA: Fix operand resolution
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In our tests we get UBSAN warning coming from ACPI parser. This is
caused by trying to resolve operands when there is none.
[ 0.000000] Linux version 5.15.0-rc3chromeavsrel1.0.184+ (root@...) (gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP PREEMPT Sat Oct 16 00:08:27 UTC 2021
...
[ 14.719508] ================================================================================
[ 14.719551] UBSAN: array-index-out-of-bounds in /.../linux/drivers/acpi/acpica/dswexec.c:401:12
[ 14.719594] index -1 is out of range for type 'acpi_operand_object *[9]'
[ 14.719621] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-rc3chromeavsrel1.0.184+ #1
[ 14.719657] Hardware name: Intel Corp. Geminilake/GLK RVP2 LP4SD (07), BIOS GELKRVPA.X64.0214.B50.2009111159 09/11/2020
[ 14.719694] Call Trace:
[ 14.719712] dump_stack_lvl+0x38/0x49
[ 14.719749] dump_stack+0x10/0x12
[ 14.719775] ubsan_epilogue+0x9/0x45
[ 14.719801] __ubsan_handle_out_of_bounds.cold+0x44/0x49
[ 14.719835] acpi_ds_exec_end_op+0x1d7/0x6b5
[ 14.719870] acpi_ps_parse_loop+0x942/0xb34
...
Problem happens because WalkState->NumOperands is 0 and it is used when
trying to access into operands table. Actual code is:
WalkState->Operands [WalkState->NumOperands -1]
which causes out of bound access. Improve the check before above access
to check if ACPI opcode should have any arguments (operands) at all.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Constify AcpiGetHandle pathname argument
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
AcpiGetHandle doesn't write to the pathname argument, therefore make it
const.
This allows later on passing pathname to AcpiGetHandle which is const,
without creating a copy of it.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Make AddressSpaceHandler Install and _REG execution 2 separate steps
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
ACPI-2.0 says that the EC OpRegion handler must be available immediately
(like the standard default OpRegion handlers):
Quoting from the ACPI spec version 6.3: "6.5.4 _REG (Region) ...
2. OSPM must make Embedded Controller operation regions, accessed via
the Embedded Controllers described in ECDT, available before executing
any control method. These operation regions may become inaccessible
after OSPM runs _REG(EmbeddedControl, 0)."
So the OS must probe the ECDT described EC and install the OpRegion handler
before calling AcpiEnableSubsystem() and AcpiInitializeObjects().
This is a problem because calling AcpiInstallAddressSpaceHandler()
does not just install the OpRegion handler, it also runs the EC's _REG
method. This _REG method may rely on initialization done by the _INI
methods of one of the PCI / _SB root devices.
For the other early/default OpRegion handlers the OpRegion handler
install and the _REG execution is split into 2 separate steps:
1. AcpiEvInstallRegionHandlers(), called early from AcpiLoadTables()
2. AcpiEvInitializeOpRegions(), called from AcpiInitializeObjects()
To fix the EC OpRegion issue, add 2 bew functions:
1. AcpiInstallAddressSpaceHandlerNo_Reg()
2. AcpiExecuteRegMethods()
to allow doing things in 2 steps for other OpRegion handlers,
like the EC handler, too.
Note that the comment describing AcpiEvInstallRegionHandlers() even has
an alinea describing this problem. Using the new methods allows users
to avoid this problem.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214899
Reported-and-tested-by: Johannes Penßel <johannespenssel@posteo.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
ACPI 6.5: MADT: add support for trace buffer extension in GICC
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
ACPICA: hwvalid: Drop port I/O validation
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Microsoft introduced support in Windows XP for blocking port I/O
to various regions. For Windows compatibility ACPICA has adopted
the same protections and will disallow writes to those
(presumably) the same regions.
On some systems the AML included with the firmware will issue 4 byte
long writes to 0x80. These writes aren't making it over because of this
blockage. The first 4 byte write attempt is rejected, and then subsequently
1 byte at a time each offset is tried. The first at 0x80 works, but then
the next 3 bytes are rejected.
This manifests in bizarre failures for devices that expected the AML to
write all 4 bytes. Trying the same AML on Windows 10 or 11 doesn't hit
this failure and all 4 bytes are written.
Either some of these regions were wrong or some point after Windows XP
some of these regions blocks have been lifted.
In the last 15 years there doesn't seem to be any reports popping up of
this error in the Windows event viewer anymore. There is no documentation
at Microsoft's developer site indicating that Windows ACPI interpreter blocks
these regions. Between the lack of documentation and the fact that the writes
actually do work in Windows 10 and 11, it's quite likely Windows doesn't actually
enforce this anymore.
So to help the issue, only enforce Windows XP specific entries if the latest
_OSI supported is Windows XP. Continue to enforce the ALWAYS_ILLEGAL entries.
Fixes https://github.com/acpica/acpica/issues/816
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add missing macro ACPI_FUNCTION_TRACE() for AcpiNsRepair_HID()
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The following commit add function tracing macros for the namespace repiar
mechanism.
commit 87b8dba05b4cf8c111948327023c710e2b6b5a05
Add function trace macros to improve namespace debugging
But it missed the trace macro for the entry of NsRepair_HID(). Let's add
it.
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
dispatcher: Fix error code path in AcpiDsCallControlMethod()
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A use-after-free in AcpiPsParseAml() after a failing invocaion
of AcpiDsCallControlMethod() is reported by KASAN [1] and code
inspection reveals that next_walk_state pushed to the thread by
AcpiDsCallControlMethod() is freed on errors, but it is not popped
from the thread beforehand. Thus AcpiDsGetCurrentWalkState() called by
AcpiPsParseAml() subsequently returns it as the new walk state which is
incorrect.
To address this, make AcpiDsCallControlMethod() call
AcpiDsPopWalkState() to pop NextWalkState from the thread
before returning an error.
Link: https://lore.kernel.org/linux-acpi/20221019073443.248215-1-chenzhongjin@huawei.com/ # [1]
Reported-by: Chen Zhongjin <chenzhongjin@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
nsrepair: handle cases without a return value correctly
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously AcpiNsSimpleRepair() would crash if ExpectedBtypes
contained any combination of ACPI_RTYPE_NONE with a different type,
e.g | ACPI_RTYPE_INTEGER because of slightly incorrect logic in the
!ReturnObject branch, which wouldn't return AE_AML_NO_RETURN_VALUE
for such cases.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add support for Arm's MPAM ACPI table version 2
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Complies with ACPI for Memory System Resource Partitioning and
Monitoring 2.0 [1]. Document number: DEN0065, as of December 2022.
Support for all types of MPAM resources. No support yet for:
1) MPAM PCC Interface Type
2) The optional Resource-specific data per MSC node, introduced in v2 of the
MPAM ACPI spec.
[1] https://developer.arm.com/documentation/den0065/latest
Signed-off-by: Hesham Almatary <hesham.almatary@huawei.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Replace fake flexible arrays with actual flexible array members
|