summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Add full support for ASL macros (preprocessor).Robert Moore2023-03-226-22/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only things not supported are the tokenizing operator and the stringizing operator. Saket Dumbre.
* | | | | Add ACPI_FUNCTION_NAME macros where appropriate.Robert Moore2023-03-213-0/+4
| | | | | | | | | | | | | | | | | | | | Enables GET_FUNCTION_NAME macro(s).
* | | | | Remove INTEGRITYCHECK flag from binary file generationsRobert Moore2023-03-219-8/+5
| |_|/ / |/| | | | | | | | | | | No longer needed or desired.
* | | | Merge pull request #832 from ElyesH/__func__Robert Moore2023-02-174-5/+5
|\ \ \ \ | | | | | | | | | | Use ACPI_GET_FUNCTION_NAME
| * | | | Use ACPI_GET_FUNCTION_NAMEElyes Haouas2023-02-104-5/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
* | | | | Merge pull request #829 from jepio/aspt-supportRobert Moore2023-02-1711-0/+370
|\ \ \ \ \ | |_|_|/ / |/| | | | Add support for AMD Secure Processor Table (ASPT) version 1
| * | | | Add template and compiler support for ASPTJeremi Piotrowski2023-01-244-1/+112
| | | | |
| * | | | Add support for ASPT table in disassemblerJeremi Piotrowski2023-01-248-0/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #834 from ElyesH/prototypesRobert Moore2023-02-141-2/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | Remove extern prototypes in achaiku.h file
| * | | | Remove extern prototypes in achaiku.h fileElyes Haouas2023-02-071-2/+2
| | |/ / | |/| | | | | | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
* | | | Merge branch 'master' of ssh://ssh.github.com/acpica/acpicaRobert Moore2023-02-1029-16/+436
|\ \ \ \
| * \ \ \ Merge pull request #838 from nsait-linaro/acpi-clock-inputRobert Moore2023-02-0825-3/+357
| |\ \ \ \ | | | | | | | | | | | | add support for ClockInput resources introduced in ACPI v6.5
| | * | | | add support for ClockInput resource (v6.5)Niyas Sait2023-02-0825-3/+357
| |/ / / /
| * | | | Merge pull request #822 from heatd/acpisrc-linux-fixRobert Moore2023-02-074-13/+79
| |\ \ \ \ | | | | | | | | | | | | acpisrc Linux generation fix
| | * | | | acpisrc: Add missing tables to astablePedro Falcato2022-12-212-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | asconvert: Fix prefix detection in AsInsertPrefixPedro Falcato2022-12-211-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | actbl2: Fix inconsistent indentation on some typedefsPedro Falcato2022-12-211-11/+11
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | This indirectly fixes acpisrc -l failures for these typedef structs. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
* | | | | Fix a few type mismatch warnings.Robert Moore2023-02-102-5/+5
|/ / / / | | | | | | | | | | | | Signed/unsigned mismatches, One data truncation warning.
* | | | Backout use of flexible array with no other structure elements:Robert Moore2023-02-071-2/+2
| | | | | | | | | | | | | | | | actbl2.h:1555:29: error: flexible array member in a struct with no named members
* | | | Merge pull request #837 from acpica/revert-813-flex-arrayRobert Moore2023-02-073-17/+4
|\ \ \ \ | | | | | | | | | | Revert "Replace fake flexible arrays with actual flexible array members"
| * | | | Revert "Replace fake flexible arrays with actual flexible array members"Robert Moore2023-02-073-17/+4
|/ / / /
* | | | Merge pull request #836 from acpica/revert-751-headersRobert Moore2023-02-071-1/+1
|\ \ \ \ | | | | | | | | | | Revert "Headers: Replace zero-length array with flexible-array member"
| * | | | Revert "Headers: Replace zero-length array with flexible-array member"Robert Moore2023-02-071-1/+1
|/ / / /
* | | | Merge pull request #835 from acpica/revert-776-dangling-pointerRobert Moore2023-02-076-12/+11
|\ \ \ \ | | | | | | | | | | Revert "Fix dangling pointer warning for AcpiUtInitStackPtrTrace"
| * | | | Revert "Fix dangling pointer warning for AcpiUtInitStackPtrTrace"revert-776-dangling-pointerRobert Moore2023-02-076-12/+11
|/ / / /
* | | | Merge pull request #776 from t-8ch/dangling-pointerRobert Moore2023-02-076-11/+12
|\ \ \ \ | | | | | | | | | | Fix dangling pointer warning for AcpiUtInitStackPtrTrace
| * | | | debug: use UINT_PTR_T to store stack boundariesThomas Weißschuh2022-05-214-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Linux non-kernel: Use use uintptr_t for ACPI_UINTPTR_TThomas Weißschuh2022-05-211-2/+3
| | | | |
| * | | | ACPI_CAST_PTR: cast through "void *"Thomas Weißschuh2022-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Not all pointer are castable to integers directly and ACPI_UINTPTR_T is not guaranteed to be "void *".
* | | | | Merge pull request #718 from rafaeljw/namespaceRobert Moore2023-02-071-7/+0
|\ \ \ \ \ | | | | | | | | | | | | Revert "Fix memory leak caused by _CID repair function"
| * | | | | Revert "Fix memory leak caused by _CID repair function"Rafael J. Wysocki2021-09-301-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #745 from amadeuszslawinski-intel/masterRobert Moore2023-02-071-2/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | ACPICA: Fix operand resolution
| * | | | | | ACPICA: Fix operand resolutionAmadeusz Sławiński2022-12-081-2/+4
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #773 from s-ailus/masterRobert Moore2023-02-072-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Constify AcpiGetHandle pathname argument
| * | | | | | Constify AcpiGetHandle pathname argumentSakari Ailus2022-05-062-2/+2
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #786 from jwrdegoede/split-acpi_install_address_space_handlerRobert Moore2023-02-072-6/+110
|\ \ \ \ \ \ | | | | | | | | | | | | | | Make AddressSpaceHandler Install and _REG execution 2 separate steps
| * | | | | | Allow AddressSpaceHandler Install and _REG execution as 2 separate stepsHans de Goede2022-10-032-6/+110
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #805 from fenghust/masterRobert Moore2023-02-072-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | ACPI 6.5: MADT: add support for trace buffer extension in GICC
| * | | | | | ACPI 6.5: MADT: add support for trace buffer extension in GICCXiongfeng Wang2022-10-112-1/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
* | | | | | Merge pull request #817 from superm1/mlimonci/protected-rangesRobert Moore2023-02-071-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | ACPICA: hwvalid: Drop port I/O validation
| * | | | | | ACPICA: hwvalid: Drop Port I/O validationMario Limonciello2022-12-081-4/+4
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #807 from fenghust/acpica_fixRobert Moore2023-02-071-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add missing macro ACPI_FUNCTION_TRACE() for AcpiNsRepair_HID()
| * | | | | | Add missing macro ACPI_FUNCTION_TRACE() for AcpiNsRepair_HID()Xiongfeng Wang2022-10-281-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #809 from rafaeljw/dispatcherRobert Moore2023-02-071-2/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | dispatcher: Fix error code path in AcpiDsCallControlMethod()
| * | | | | | dispatcher: Fix error code path in AcpiDsCallControlMethod()Rafael J. Wysocki2022-11-091-2/+8
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #811 from 8infy/nsrepair-fixRobert Moore2023-02-071-6/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | nsrepair: handle cases without a return value correctly
| * | | | | | nsrepair: handle cases without a return value correctlyDaniil Tatianin2022-11-111-6/+8
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #819 from heshamelmatary/mpamRobert Moore2023-02-0712-0/+629
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add support for Arm's MPAM ACPI table version 2
| * | | | | | Add support for Arm's MPAM ACPI table version 2Hesham Almatary2023-01-3112-0/+629
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge pull request #813 from kees/flex-arrayRobert Moore2023-02-073-4/+17
|\ \ \ \ \ \ | | | | | | | | | | | | | | Replace fake flexible arrays with actual flexible array members