Patch
Base- Type:
plist string - Failsafe: Empty (Ignored)
- Description: Selects ACPI path base for patch lookup (or immediate replacement) by obtaining the offset to the provided path.
Only fully-qualified absolute paths are supported (e.g.
\_SB.PCI0.LPCB.HPET).Currently supported object types are:Device,Field,Method.Note: Use with care, not all OEM tables can be parsed. Use
ACPIeutility to debug.ACPIecompiled withDEBUG=1 makecommand produces helpful ACPI lookup tracing.- Type:
BaseSkip- Type: plist integer
- Failsafe: 0 (Do not skip any occurrences)
- Description: Number of found
Baseoccurrences to skip before finds and replacements are applied.
Comment- Type:
plist string - Failsafe: Empty
- Description: Arbitrary ASCII string used to provide human readable reference for the entry. Whether this value is used is implementation defined.
- Type:
Count- Type:
plist integer - Failsafe:
0(Apply patch to all occurrences found) - Description: Number of occurrences to patch.
- Type:
Enabled- Type:
plist boolean - Failsafe:
false - Description: Set to
trueto apply this ACPI patch.
- Type:
Find- Type: plist data
- Failsafe: Empty
- Description: Data to find. Must be equal to
Replacein size if set.
Note: Can be empty, when
Baseis specified, immediate replacement afterBaselookup happens in this case.Limit- Type:
plist integer - Failsafe:
0(Search entire ACPI table) - Description: Maximum number of bytes to search for.
- Type:
Mask- Type:
plist data - Failsafe: Empty (Ignored)
- Description: Data bitwise mask used during find comparison. Allows fuzzy search by ignoring not masked (set to zero) bits. Must be equal to
Replacein size if set.
- Type:
OemTableId- Type:
plist data, 8 bytes - Failsafe: All zero (Match any table OEM ID)
- Description: Match table OEM ID equal to this value.
- Type:
Replace- Type:
plist data - Failsafe: Empty
- Description: Replacement data of one or more bytes.
- Type:
ReplaceMask- Type:
plist data - Failsafe: Empty (Ignored)
- Description: Data bitwise mask used during replacement. Allows fuzzy replacement by updating masked (set to non-zero) bits. Must be equal to
Replacein size if set.
- Type:
Skip- Type:
plist integer - Failsafe:
0(Do not skip any occurrences) - Description: Number of found occurrences to skip before replacements are applied.
- Type:
TableLength- Type:
plist integer - Failsafe:
0(Match any table size) - Description: Match table size equal to this value.
- Type:
TableSignature- Type:
plist data, 4 bytes - Failsafe: All zero (Match any table signature)
- Description: Match table signature equal to this value.
- Type:
In most cases, ACPI patches are not useful and are harmful:
- Avoid renaming devices with ACPI patches. This may fail or perform improper renaming of unrelated devices (e.g.
ECandEC0), be unnecessary, or even fail to rename devices in certain tables. For ACPI consistency it is much safer to rename devices at the I/O Registry level, as done by WhateverGreen. - Avoid patching
_OSIto support a higher feature set level whenever possible. While this enables a number of workarounds on APTIO firmware, it typically results in a need for additional patches. These are not usually needed on modern firmware and smaller patches work well on firmware that does. However, laptop vendors often rely on this method to determine the availability of functions such as modern I2C input support, thermal adjustment and custom feature additions. - Avoid patching embedded controller event
_Qxxjust to enable brightness keys. The conventional process to find these keys typically involves significant modifications to DSDT and SSDT files and in addition, the debug kext is not stable on newer systems. Please use the built-in brightness key discovery in BrightnessKeys instead. - Avoid making ad hoc changes such as renaming
_PRWor_DSMwhenever possible.
Some cases where patching is actually useful include:
- Refreshing
HPET(or another device) method header to avoid compatibility checks by_OSIon legacy hardware._STAmethod withif ((OSFL () == Zero)) { If (HPTE) ... Return (Zero)content may be forced to always return0xFby replacingA0 10 93 4F 53 46 4C 00withA4 0A 0F A3 A3 A3 A3 A3. - To provide a custom method implementation within an SSDT, to inject shutdown fixes on certain computers for instance, the original method can be replaced with a dummy name by patching
_PTSwithZPTSand adding a callback to the original method.
The Tianocore AcpiAml.h source file may help with better understanding ACPI opcodes.
Note: Patches of different Find and Replace lengths are unsupported as they may corrupt ACPI tables and make the system unstable due to area relocation. If such changes are needed, the utilisation of “proxy” patching or the padding of NOP to the remaining area could be considered.