ACPI updates for 5.1-rc1
- Update the ACPICA code in the kernel to upstream revision 20190215 including ACPI 6.3 support and more: * New predefined methods: _NBS, _NCH, _NIC, _NIH, and _NIG (Erik Schmauss). * Update of the PCC Identifier structure in PDTT (Erik Schmauss). * Support for new Generic Affinity Structure subtable in SRAT (Erik Schmauss). * New PCC operation region support (Erik Schmauss). * Support for GICC statistical profiling for MADT (Erik Schmauss). * New Error Disconnect Recover notification support (Erik Schmauss). * New PPTT Processor Structure Flags fields support (Erik Schmauss). * ACPI 6.3 HMAT updates (Erik Schmauss). * GTDT Revision 3 support (Erik Schmauss). * Legacy module-level code (MLC) support removal (Erik Schmauss). * Update/clarification of messages for control method failures (Bob Moore). * Warning on creation of a zero-length opregion (Bob Moore). * acpiexec option to dump extra info for memory leaks (Bob Moore). * More ACPI error to firmware error conversions (Bob Moore). * Debugger fix (Bob Moore). * Copyrights update (Bob Moore). - Clean up sleep states support code in ACPICA (Christoph Hellwig). - Rework in_nmi() handling in the APEI code and add suppor for the ARM Software Delegated Exception Interface (SDEI) to it (James Morse). - Fix possible out-of-bounds accesses in BERT-related core (Ross Lagerwall). - Fix the APEI code parsing HEST that includes a Deferred Machine Check subtable (Yazen Ghannam). - Use DEFINE_DEBUGFS_ATTRIBUTE for APEI-related debugfs files (YueHaibing). - Switch the APEI ERST code to the new generic UUID API (Andy Shevchenko). - Update the MAINTAINERS entry for APEI (Borislav Petkov). - Fix and clean up the ACPI EC driver (Rafael Wysocki, Zhang Rui). - Fix DMI checks handling in the ACPI backlight driver and add the "Lunch Box" chassis-type check to it (Hans de Goede). - Add support for using ACPI table overrides included in built-in initrd images (Shunyong Yang). - Update ACPI device enumeration to treat the PWM2 device as "always present" on Lenovo Yoga Book (Yauhen Kharuzhy). - Fix up the enumeration of device objects with the PRP0001 device ID (Andy Shevchenko). - Clean up PPTT parsing error messages (John Garry). - Clean up debugfs files creation handling (Greg Kroah-Hartman, Rafael Wysocki). - Clean up the ACPI DPTF Makefile (Masahiro Yamada). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJcfSIaAAoJEILEb/54YlRxvL8P/2oiG+u3tm3JahQ2tk9iiX3S 4yjYMB5Gmhua3w/t6tnRHHhy3pjjgI6xH5S7WB0VPTMp57E91EQihcbLJNFiJ1Jf zjeZtWSmoxvcVwHAXq0DZHFMRK9Xgc/1ckzWNH/pwVlBSgaYazuLr6bwtZhtorci eNWi82abWfAp6kAXjzJkcFbEp9+H6JzseewKcT8VAKn63KZizCEzxT0PuE9c54km QnILVB9we0aGD2i0w2BRpbz99Wse0vnoUkBcrDw0LFHCaEQjfyAa94YFVQVrkE1Q ynH26+yQanyzH00q/HWuH7N7YdcYMYT1CgZoIKR5XtJ+CbTc63VQez4csLOgOFMM VEwmuv5SdRQ+tLCNFn71dxRheAttKI/nGBAZWMRTLQkp412IrQP4BtWw4wFM8SHZ 3G7eReR/bBeS4u1T5KR8CVVxchinDdwnTvqQII1uEniX80AmsHsQZxtU+JdPDp+w N6gUE+lPF8e4iT+YsrWFMoNsJ9/MoXbSPQK1oYIcL0f5+PjFMxjTbA53wDiMHAhS 9AqVW1fdSPX0ImV3DuDqHph3ekAt26QHKxIA2xj5WTRWKf+29ijO2+5zU8isT7kI RfGzpvsSYdvPyIRLUqc/Q3d5u/ElacAaaKJNT+6gUT4AkINAZJKQRiw2dWO1g82O HVuSc5hRfnAJ5ALfCdIG =r6fU -----END PGP SIGNATURE----- Merge tag 'acpi-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These are ACPICA updates including ACPI 6.3 support among other things, APEI updates including the ARM Software Delegated Exception Interface (SDEI) support, ACPI EC driver fixes and cleanups and other assorted improvements. Specifics: - Update the ACPICA code in the kernel to upstream revision 20190215 including ACPI 6.3 support and more: * New predefined methods: _NBS, _NCH, _NIC, _NIH, and _NIG (Erik Schmauss). * Update of the PCC Identifier structure in PDTT (Erik Schmauss). * Support for new Generic Affinity Structure subtable in SRAT (Erik Schmauss). * New PCC operation region support (Erik Schmauss). * Support for GICC statistical profiling for MADT (Erik Schmauss). * New Error Disconnect Recover notification support (Erik Schmauss). * New PPTT Processor Structure Flags fields support (Erik Schmauss). * ACPI 6.3 HMAT updates (Erik Schmauss). * GTDT Revision 3 support (Erik Schmauss). * Legacy module-level code (MLC) support removal (Erik Schmauss). * Update/clarification of messages for control method failures (Bob Moore). * Warning on creation of a zero-length opregion (Bob Moore). * acpiexec option to dump extra info for memory leaks (Bob Moore). * More ACPI error to firmware error conversions (Bob Moore). * Debugger fix (Bob Moore). * Copyrights update (Bob Moore) - Clean up sleep states support code in ACPICA (Christoph Hellwig) - Rework in_nmi() handling in the APEI code and add suppor for the ARM Software Delegated Exception Interface (SDEI) to it (James Morse) - Fix possible out-of-bounds accesses in BERT-related core (Ross Lagerwall) - Fix the APEI code parsing HEST that includes a Deferred Machine Check subtable (Yazen Ghannam) - Use DEFINE_DEBUGFS_ATTRIBUTE for APEI-related debugfs files (YueHaibing) - Switch the APEI ERST code to the new generic UUID API (Andy Shevchenko) - Update the MAINTAINERS entry for APEI (Borislav Petkov) - Fix and clean up the ACPI EC driver (Rafael Wysocki, Zhang Rui) - Fix DMI checks handling in the ACPI backlight driver and add the "Lunch Box" chassis-type check to it (Hans de Goede) - Add support for using ACPI table overrides included in built-in initrd images (Shunyong Yang) - Update ACPI device enumeration to treat the PWM2 device as "always present" on Lenovo Yoga Book (Yauhen Kharuzhy) - Fix up the enumeration of device objects with the PRP0001 device ID (Andy Shevchenko) - Clean up PPTT parsing error messages (John Garry) - Clean up debugfs files creation handling (Greg Kroah-Hartman, Rafael Wysocki) - Clean up the ACPI DPTF Makefile (Masahiro Yamada)" * tag 'acpi-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (65 commits) ACPI / bus: Respect PRP0001 when retrieving device match data ACPICA: Update version to 20190215 ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting ACPICA: ACPI 6.3: add GTDT Revision 3 support ACPICA: ACPI 6.3: HMAT updates ACPICA: ACPI 6.3: PPTT add additional fields in Processor Structure Flags ACPICA: ACPI 6.3: add Error Disconnect Recover Notification value ACPICA: ACPI 6.3: MADT: add support for statistical profiling in GICC ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter efi: cper: Fix possible out-of-bounds access ACPI: APEI: Fix possible out-of-bounds access to BERT region ACPICA: ACPI 6.3: SRAT: add Generic Affinity Structure subtable ACPICA: ACPI 6.3: Add Trigger order to PCC Identifier structure in PDTT ACPICA: ACPI 6.3: Adding predefined methods _NBS, _NCH, _NIC, _NIH, and _NIG ACPICA: Update/clarify messages for control method failures ACPICA: Debugger: Fix possible fault with the "test objects" command ACPICA: Interpreter: Emit warning for creation of a zero-length op region ACPICA: Remove legacy module-level code support ACPI / x86: Make PWM2 device always present at Lenovo Yoga Book ACPI / video: Extend chassis-type detection with a "Lunch Box" check ..
This commit is contained in:
commit
d276709ce6
|
@ -14,6 +14,10 @@ upgrade the ACPI execution environment that is defined by the ACPI tables
|
|||
via upgrading the ACPI tables provided by the BIOS with an instrumented,
|
||||
modified, more recent version one, or installing brand new ACPI tables.
|
||||
|
||||
When building initrd with kernel in a single image, option
|
||||
ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD should also be true for this
|
||||
feature to work.
|
||||
|
||||
For a full list of ACPI tables that can be upgraded/installed, take a look
|
||||
at the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in
|
||||
drivers/acpi/tables.c.
|
||||
|
|
|
@ -331,6 +331,7 @@ ACPI APEI
|
|||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||
M: Len Brown <lenb@kernel.org>
|
||||
L: linux-acpi@vger.kernel.org
|
||||
R: James Morse <james.morse@arm.com>
|
||||
R: Tony Luck <tony.luck@intel.com>
|
||||
R: Borislav Petkov <bp@alien8.de>
|
||||
F: drivers/acpi/apei/
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2018 - Arm Ltd */
|
||||
|
||||
#ifndef __ARM_KVM_RAS_H__
|
||||
#define __ARM_KVM_RAS_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
static inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* __ARM_KVM_RAS_H__ */
|
|
@ -38,11 +38,6 @@ static inline void harden_branch_predictor(void)
|
|||
|
||||
extern unsigned int user_debug;
|
||||
|
||||
static inline int handle_guest_sea(phys_addr_t addr, unsigned int esr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_ARM_SYSTEM_MISC_H */
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
|
@ -110,9 +111,10 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
|
|||
|
||||
static inline void arch_fix_phys_package_id(int num, u32 slot) { }
|
||||
void __init acpi_init_cpus(void);
|
||||
|
||||
int apei_claim_sea(struct pt_regs *regs);
|
||||
#else
|
||||
static inline void acpi_init_cpus(void) { }
|
||||
static inline int apei_claim_sea(struct pt_regs *regs) { return -ENOENT; }
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#define DAIF_PROCCTX 0
|
||||
#define DAIF_PROCCTX_NOIRQ PSR_I_BIT
|
||||
#define DAIF_ERRCTX (PSR_I_BIT | PSR_A_BIT)
|
||||
|
||||
/* mask/save/unmask/restore all exceptions, including interrupts. */
|
||||
static inline void local_daif_mask(void)
|
||||
|
|
|
@ -55,7 +55,11 @@ enum fixed_addresses {
|
|||
#ifdef CONFIG_ACPI_APEI_GHES
|
||||
/* Used for GHES mapping from assorted contexts */
|
||||
FIX_APEI_GHES_IRQ,
|
||||
FIX_APEI_GHES_NMI,
|
||||
FIX_APEI_GHES_SEA,
|
||||
#ifdef CONFIG_ARM_SDE_INTERFACE
|
||||
FIX_APEI_GHES_SDEI_NORMAL,
|
||||
FIX_APEI_GHES_SDEI_CRITICAL,
|
||||
#endif
|
||||
#endif /* CONFIG_ACPI_APEI_GHES */
|
||||
|
||||
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2018 - Arm Ltd */
|
||||
|
||||
#ifndef __ARM64_KVM_RAS_H__
|
||||
#define __ARM64_KVM_RAS_H__
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/acpi.h>
|
||||
|
||||
/*
|
||||
* Was this synchronous external abort a RAS notification?
|
||||
* Returns '0' for errors handled by some RAS subsystem, or -ENOENT.
|
||||
*/
|
||||
static inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr)
|
||||
{
|
||||
/* apei_claim_sea(NULL) expects to mask interrupts itself */
|
||||
lockdep_assert_irqs_enabled();
|
||||
|
||||
return apei_claim_sea(NULL);
|
||||
}
|
||||
|
||||
#endif /* __ARM64_KVM_RAS_H__ */
|
|
@ -46,8 +46,6 @@ extern void __show_regs(struct pt_regs *);
|
|||
|
||||
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
|
||||
|
||||
int handle_guest_sea(phys_addr_t addr, unsigned int esr);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_SYSTEM_MISC_H */
|
||||
|
|
|
@ -27,8 +27,10 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/serial_core.h>
|
||||
|
||||
#include <acpi/ghes.h>
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/cpu_ops.h>
|
||||
#include <asm/daifflags.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/smp_plat.h>
|
||||
|
||||
|
@ -256,3 +258,32 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr)
|
|||
return __pgprot(PROT_NORMAL_NC);
|
||||
return __pgprot(PROT_DEVICE_nGnRnE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Claim Synchronous External Aborts as a firmware first notification.
|
||||
*
|
||||
* Used by KVM and the arch do_sea handler.
|
||||
* @regs may be NULL when called from process context.
|
||||
*/
|
||||
int apei_claim_sea(struct pt_regs *regs)
|
||||
{
|
||||
int err = -ENOENT;
|
||||
unsigned long current_flags;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES))
|
||||
return err;
|
||||
|
||||
current_flags = arch_local_save_flags();
|
||||
|
||||
/*
|
||||
* SEA can interrupt SError, mask it and describe this as an NMI so
|
||||
* that APEI defers the handling.
|
||||
*/
|
||||
local_daif_restore(DAIF_ERRCTX);
|
||||
nmi_enter();
|
||||
err = ghes_notify_sea();
|
||||
nmi_exit();
|
||||
local_daif_restore(current_flags);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/extable.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/mm.h>
|
||||
|
@ -33,6 +34,7 @@
|
|||
#include <linux/preempt.h>
|
||||
#include <linux/hugetlb.h>
|
||||
|
||||
#include <asm/acpi.h>
|
||||
#include <asm/bug.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/cpufeature.h>
|
||||
|
@ -47,8 +49,6 @@
|
|||
#include <asm/tlbflush.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
#include <acpi/ghes.h>
|
||||
|
||||
struct fault_info {
|
||||
int (*fn)(unsigned long addr, unsigned int esr,
|
||||
struct pt_regs *regs);
|
||||
|
@ -643,19 +643,10 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs)
|
|||
inf = esr_to_fault_info(esr);
|
||||
|
||||
/*
|
||||
* Synchronous aborts may interrupt code which had interrupts masked.
|
||||
* Before calling out into the wider kernel tell the interested
|
||||
* subsystems.
|
||||
* Return value ignored as we rely on signal merging.
|
||||
* Future patches will make this more robust.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_ACPI_APEI_SEA)) {
|
||||
if (interrupts_enabled(regs))
|
||||
nmi_enter();
|
||||
|
||||
ghes_notify_sea();
|
||||
|
||||
if (interrupts_enabled(regs))
|
||||
nmi_exit();
|
||||
}
|
||||
apei_claim_sea(regs);
|
||||
|
||||
if (esr & ESR_ELx_FnV)
|
||||
siaddr = NULL;
|
||||
|
@ -733,11 +724,6 @@ static const struct fault_info fault_info[] = {
|
|||
{ do_bad, SIGKILL, SI_KERNEL, "unknown 63" },
|
||||
};
|
||||
|
||||
int handle_guest_sea(phys_addr_t addr, unsigned int esr)
|
||||
{
|
||||
return ghes_notify_sea();
|
||||
}
|
||||
|
||||
asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
|
|
|
@ -357,6 +357,16 @@ config ACPI_TABLE_UPGRADE
|
|||
initrd, therefore it's safe to say Y.
|
||||
See Documentation/acpi/initrd_table_override.txt for details
|
||||
|
||||
config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
|
||||
bool "Override ACPI tables from built-in initrd"
|
||||
depends on ACPI_TABLE_UPGRADE
|
||||
depends on INITRAMFS_SOURCE!="" && INITRAMFS_COMPRESSION=""
|
||||
help
|
||||
This option provides functionality to override arbitrary ACPI tables
|
||||
from built-in uncompressed initrd.
|
||||
|
||||
See Documentation/acpi/initrd_table_override.txt for details
|
||||
|
||||
config ACPI_DEBUG
|
||||
bool "Debug Statements"
|
||||
help
|
||||
|
|
|
@ -750,48 +750,36 @@ static const struct acpi_debugger_ops acpi_aml_debugger = {
|
|||
|
||||
int __init acpi_aml_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!acpi_debugfs_dir) {
|
||||
ret = -ENOENT;
|
||||
goto err_exit;
|
||||
}
|
||||
int ret;
|
||||
|
||||
/* Initialize AML IO interface */
|
||||
mutex_init(&acpi_aml_io.lock);
|
||||
init_waitqueue_head(&acpi_aml_io.wait);
|
||||
acpi_aml_io.out_crc.buf = acpi_aml_io.out_buf;
|
||||
acpi_aml_io.in_crc.buf = acpi_aml_io.in_buf;
|
||||
|
||||
acpi_aml_dentry = debugfs_create_file("acpidbg",
|
||||
S_IFREG | S_IRUGO | S_IWUSR,
|
||||
acpi_debugfs_dir, NULL,
|
||||
&acpi_aml_operations);
|
||||
if (acpi_aml_dentry == NULL) {
|
||||
ret = -ENODEV;
|
||||
goto err_exit;
|
||||
}
|
||||
ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
|
||||
if (ret)
|
||||
goto err_fs;
|
||||
acpi_aml_initialized = true;
|
||||
|
||||
err_fs:
|
||||
ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
|
||||
if (ret) {
|
||||
debugfs_remove(acpi_aml_dentry);
|
||||
acpi_aml_dentry = NULL;
|
||||
}
|
||||
err_exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
acpi_aml_initialized = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __exit acpi_aml_exit(void)
|
||||
{
|
||||
if (acpi_aml_initialized) {
|
||||
acpi_unregister_debugger(&acpi_aml_debugger);
|
||||
if (acpi_aml_dentry) {
|
||||
debugfs_remove(acpi_aml_dentry);
|
||||
acpi_aml_dentry = NULL;
|
||||
}
|
||||
acpi_aml_initialized = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2124,21 +2124,29 @@ static int __init intel_opregion_present(void)
|
|||
return opregion;
|
||||
}
|
||||
|
||||
/* Check if the chassis-type indicates there is no builtin LCD panel */
|
||||
static bool dmi_is_desktop(void)
|
||||
{
|
||||
const char *chassis_type;
|
||||
unsigned long type;
|
||||
|
||||
chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
|
||||
if (!chassis_type)
|
||||
return false;
|
||||
|
||||
if (!strcmp(chassis_type, "3") || /* 3: Desktop */
|
||||
!strcmp(chassis_type, "4") || /* 4: Low Profile Desktop */
|
||||
!strcmp(chassis_type, "5") || /* 5: Pizza Box */
|
||||
!strcmp(chassis_type, "6") || /* 6: Mini Tower */
|
||||
!strcmp(chassis_type, "7") || /* 7: Tower */
|
||||
!strcmp(chassis_type, "11")) /* 11: Main Server Chassis */
|
||||
if (kstrtoul(chassis_type, 10, &type) != 0)
|
||||
return false;
|
||||
|
||||
switch (type) {
|
||||
case 0x03: /* Desktop */
|
||||
case 0x04: /* Low Profile Desktop */
|
||||
case 0x05: /* Pizza Box */
|
||||
case 0x06: /* Mini Tower */
|
||||
case 0x07: /* Tower */
|
||||
case 0x10: /* Lunch Box */
|
||||
case 0x11: /* Main Server Chassis */
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: acapps - common include for ACPI applications/tools
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
/* Common info for tool signons */
|
||||
|
||||
#define ACPICA_NAME "Intel ACPI Component Architecture"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2018 Intel Corporation"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2019 Intel Corporation"
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_WIDTH " (64-bit version)"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: accommon.h - Common include files for generation of ACPICA source
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: acapps - common include for ACPI applications/tools
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acdebug.h - ACPI/AML debugger
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
|||
#endif
|
||||
|
||||
#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */
|
||||
#define ACPI_DEBUG_LENGTH_FORMAT " (%.4X bits, %.3X bytes)"
|
||||
|
||||
struct acpi_db_command_info {
|
||||
const char *name; /* Command Name */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acdispat.h - dispatcher (parser to interpreter interface)
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acevents.h - Event subcomponent prototypes and defines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acglobal.h - Declarations for global variables
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -164,6 +164,7 @@ ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list);
|
|||
ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_verbose_leak_dump);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: achware.h -- hardware specific interfaces
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: aclocal.h - Internal data types used across the ACPI subsystem
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -802,7 +802,7 @@ struct acpi_comment_addr_node {
|
|||
|
||||
/*
|
||||
* File node - used for "Include" operator file stack and
|
||||
* depdendency tree for the -ca option
|
||||
* dependency tree for the -ca option
|
||||
*/
|
||||
struct acpi_file_node {
|
||||
void *file;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -462,7 +462,7 @@
|
|||
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
|
||||
|
||||
/*
|
||||
* Macors used for the ASL-/ASL+ converter utility
|
||||
* Macros used for the ASL-/ASL+ converter utility
|
||||
*/
|
||||
#ifdef ACPI_ASL_COMPILER
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -239,6 +239,7 @@ struct acpi_object_region_field {
|
|||
union acpi_operand_object *region_obj; /* Containing op_region object */
|
||||
u8 *resource_buffer; /* resource_template for serial regions/fields */
|
||||
u16 pin_number_index; /* Index relative to previous Connection/Template */
|
||||
u8 *internal_pcc_buffer; /* Internal buffer for fields associated with PCC */
|
||||
};
|
||||
|
||||
struct acpi_object_bank_field {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acopcode.h - AML opcode information for the AML parser and interpreter
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acpredef - Information table for ACPI predefined methods and objects
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -631,6 +631,21 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
|
|||
{{"_MTL", METHOD_0ARGS, /* ACPI 6.0 */
|
||||
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
|
||||
|
||||
{{"_NBS", METHOD_0ARGS, /* ACPI 6.3 */
|
||||
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
|
||||
|
||||
{{"_NCH", METHOD_0ARGS, /* ACPI 6.3 */
|
||||
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
|
||||
|
||||
{{"_NIC", METHOD_0ARGS, /* ACPI 6.3 */
|
||||
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
|
||||
|
||||
{{"_NIG", METHOD_1ARGS(ACPI_TYPE_BUFFER), /* ACPI 6.3 */
|
||||
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
|
||||
|
||||
{{"_NIH", METHOD_0ARGS, /* ACPI 6.3 */
|
||||
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
|
||||
|
||||
{{"_NTT", METHOD_0ARGS,
|
||||
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acresrc.h - Resource Manager function prototypes
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acstruct.h - Internal structs
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: actables.h - ACPI table management
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Declarations and definitions contained herein are derived
|
||||
* directly from the ACPI specification.
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: amlresrc.h - AML resource descriptors
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ void acpi_db_decode_and_display_object(char *target, char *output_type)
|
|||
|
||||
default:
|
||||
|
||||
/* Is not a recognizeable object */
|
||||
/* Is not a recognizable object */
|
||||
|
||||
acpi_os_printf
|
||||
("Not a known ACPI internal object, descriptor type %2.2X\n",
|
||||
|
@ -647,7 +647,7 @@ void acpi_db_display_object_type(char *object_arg)
|
|||
*
|
||||
* DESCRIPTION: Display the result of an AML opcode
|
||||
*
|
||||
* Note: Curently only displays the result object if we are single stepping.
|
||||
* Note: Currently only displays the result object if we are single stepping.
|
||||
* However, this output may be useful in other contexts and could be enabled
|
||||
* to do so if needed.
|
||||
*
|
||||
|
|
|
@ -160,12 +160,12 @@ acpi_db_execute_method(struct acpi_db_method_info *info,
|
|||
}
|
||||
|
||||
ACPI_EXCEPTION((AE_INFO, status,
|
||||
"while executing %s from debugger",
|
||||
"while executing %s from AML Debugger",
|
||||
info->pathname));
|
||||
|
||||
if (status == AE_BUFFER_OVERFLOW) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"Possible overflow of internal debugger "
|
||||
"Possible buffer overflow within AML Debugger "
|
||||
"buffer (size 0x%X needed 0x%X)",
|
||||
ACPI_DEBUG_BUFFER_SIZE,
|
||||
(u32)return_obj->length));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dbhistry - debugger HISTORY command
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -904,7 +904,7 @@ acpi_db_bus_walk(acpi_handle obj_handle,
|
|||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Display info about system busses.
|
||||
* DESCRIPTION: Display info about system buses.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ acpi_db_display_internal_object(union acpi_operand_object *obj_desc,
|
|||
acpi_os_printf("[%s] ",
|
||||
acpi_ut_get_reference_name(obj_desc));
|
||||
|
||||
/* Decode the refererence */
|
||||
/* Decode the reference */
|
||||
|
||||
switch (obj_desc->reference.class) {
|
||||
case ACPI_REFCLASS_LOCAL:
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "acdebug.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acpredef.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
#define _COMPONENT ACPI_CA_DEBUGGER
|
||||
ACPI_MODULE_NAME("dbtest")
|
||||
|
@ -32,6 +33,9 @@ acpi_db_test_string_type(struct acpi_namespace_node *node, u32 byte_length);
|
|||
|
||||
static acpi_status acpi_db_test_package_type(struct acpi_namespace_node *node);
|
||||
|
||||
static acpi_status
|
||||
acpi_db_test_field_unit_type(union acpi_operand_object *obj_desc);
|
||||
|
||||
static acpi_status
|
||||
acpi_db_read_from_object(struct acpi_namespace_node *node,
|
||||
acpi_object_type expected_type,
|
||||
|
@ -74,7 +78,7 @@ static struct acpi_db_argument_info acpi_db_test_types[] = {
|
|||
static acpi_handle read_handle = NULL;
|
||||
static acpi_handle write_handle = NULL;
|
||||
|
||||
/* ASL Definitions of the debugger read/write control methods */
|
||||
/* ASL Definitions of the debugger read/write control methods. AML below. */
|
||||
|
||||
#if 0
|
||||
definition_block("ssdt.aml", "SSDT", 2, "Intel", "DEBUG", 0x00000001)
|
||||
|
@ -227,10 +231,8 @@ static void acpi_db_test_all_objects(void)
|
|||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Test one namespace object. Supported types are Integer,
|
||||
* String, Buffer, buffer_field, and field_unit. All other object
|
||||
* types are simply ignored.
|
||||
*
|
||||
* Note: Support for Packages is not implemented.
|
||||
* String, Buffer, Package, buffer_field, and field_unit.
|
||||
* All other object types are simply ignored.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -240,7 +242,6 @@ acpi_db_test_one_object(acpi_handle obj_handle,
|
|||
{
|
||||
struct acpi_namespace_node *node;
|
||||
union acpi_operand_object *obj_desc;
|
||||
union acpi_operand_object *region_obj;
|
||||
acpi_object_type local_type;
|
||||
u32 bit_length = 0;
|
||||
u32 byte_length = 0;
|
||||
|
@ -281,18 +282,21 @@ acpi_db_test_one_object(acpi_handle obj_handle,
|
|||
break;
|
||||
|
||||
case ACPI_TYPE_FIELD_UNIT:
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
|
||||
local_type = ACPI_TYPE_INTEGER;
|
||||
if (obj_desc) {
|
||||
local_type = ACPI_TYPE_FIELD_UNIT;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
/*
|
||||
* Returned object will be a Buffer if the field length
|
||||
* The returned object will be a Buffer if the field length
|
||||
* is larger than the size of an Integer (32 or 64 bits
|
||||
* depending on the DSDT version).
|
||||
*/
|
||||
local_type = ACPI_TYPE_INTEGER;
|
||||
if (obj_desc) {
|
||||
bit_length = obj_desc->common_field.bit_length;
|
||||
byte_length = ACPI_ROUND_BITS_UP_TO_BYTES(bit_length);
|
||||
if (bit_length > acpi_gbl_integer_bit_width) {
|
||||
|
@ -303,7 +307,7 @@ acpi_db_test_one_object(acpi_handle obj_handle,
|
|||
|
||||
default:
|
||||
|
||||
/* Ignore all other types */
|
||||
/* Ignore all non-data types - Methods, Devices, Scopes, etc. */
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
@ -314,40 +318,10 @@ acpi_db_test_one_object(acpi_handle obj_handle,
|
|||
acpi_ut_get_type_name(node->type), node->name.ascii);
|
||||
|
||||
if (!obj_desc) {
|
||||
acpi_os_printf(" Ignoring, no attached object\n");
|
||||
acpi_os_printf(" No attached sub-object, ignoring\n");
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for unsupported region types. Note: acpi_exec simulates
|
||||
* access to system_memory, system_IO, PCI_Config, and EC.
|
||||
*/
|
||||
switch (node->type) {
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
|
||||
region_obj = obj_desc->field.region_obj;
|
||||
switch (region_obj->region.space_id) {
|
||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||
case ACPI_ADR_SPACE_SYSTEM_IO:
|
||||
case ACPI_ADR_SPACE_PCI_CONFIG:
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
acpi_os_printf
|
||||
(" %s space is not supported in this command [%4.4s]\n",
|
||||
acpi_ut_get_region_name(region_obj->region.
|
||||
space_id),
|
||||
region_obj->region.node->name.ascii);
|
||||
return (AE_OK);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* At this point, we have resolved the object to one of the major types */
|
||||
|
||||
switch (local_type) {
|
||||
|
@ -371,6 +345,11 @@ acpi_db_test_one_object(acpi_handle obj_handle,
|
|||
status = acpi_db_test_package_type(node);
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_FIELD_UNIT:
|
||||
|
||||
status = acpi_db_test_field_unit_type(obj_desc);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
acpi_os_printf(" Ignoring, type not implemented (%2.2X)",
|
||||
|
@ -382,24 +361,8 @@ acpi_db_test_one_object(acpi_handle obj_handle,
|
|||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
status = AE_OK;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
switch (node->type) {
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
|
||||
region_obj = obj_desc->field.region_obj;
|
||||
acpi_os_printf(" (%s)",
|
||||
acpi_ut_get_region_name(region_obj->region.
|
||||
space_id));
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
exit:
|
||||
acpi_os_printf("\n");
|
||||
return (status);
|
||||
}
|
||||
|
@ -444,7 +407,7 @@ acpi_db_test_integer_type(struct acpi_namespace_node *node, u32 bit_length)
|
|||
return (status);
|
||||
}
|
||||
|
||||
acpi_os_printf(" (%4.4X/%3.3X) %8.8X%8.8X",
|
||||
acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT " %8.8X%8.8X",
|
||||
bit_length, ACPI_ROUND_BITS_UP_TO_BYTES(bit_length),
|
||||
ACPI_FORMAT_UINT64(temp1->integer.value));
|
||||
|
||||
|
@ -558,8 +521,9 @@ acpi_db_test_buffer_type(struct acpi_namespace_node *node, u32 bit_length)
|
|||
|
||||
/* Emit a few bytes of the buffer */
|
||||
|
||||
acpi_os_printf(" (%4.4X/%3.3X)", bit_length, temp1->buffer.length);
|
||||
for (i = 0; ((i < 4) && (i < byte_length)); i++) {
|
||||
acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT, bit_length,
|
||||
temp1->buffer.length);
|
||||
for (i = 0; ((i < 8) && (i < byte_length)); i++) {
|
||||
acpi_os_printf(" %2.2X", temp1->buffer.pointer[i]);
|
||||
}
|
||||
acpi_os_printf("... ");
|
||||
|
@ -665,8 +629,9 @@ acpi_db_test_string_type(struct acpi_namespace_node *node, u32 byte_length)
|
|||
return (status);
|
||||
}
|
||||
|
||||
acpi_os_printf(" (%4.4X/%3.3X) \"%s\"", (temp1->string.length * 8),
|
||||
temp1->string.length, temp1->string.pointer);
|
||||
acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT " \"%s\"",
|
||||
(temp1->string.length * 8), temp1->string.length,
|
||||
temp1->string.pointer);
|
||||
|
||||
/* Write a new value */
|
||||
|
||||
|
@ -750,11 +715,78 @@ static acpi_status acpi_db_test_package_type(struct acpi_namespace_node *node)
|
|||
return (status);
|
||||
}
|
||||
|
||||
acpi_os_printf(" %8.8X Elements", temp1->package.count);
|
||||
acpi_os_printf(" %.2X Elements", temp1->package.count);
|
||||
acpi_os_free(temp1);
|
||||
return (status);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_db_test_field_unit_type
|
||||
*
|
||||
* PARAMETERS: obj_desc - A field unit object
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Test read/write on a named field unit.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static acpi_status
|
||||
acpi_db_test_field_unit_type(union acpi_operand_object *obj_desc)
|
||||
{
|
||||
union acpi_operand_object *region_obj;
|
||||
u32 bit_length = 0;
|
||||
u32 byte_length = 0;
|
||||
acpi_status status = AE_OK;
|
||||
union acpi_operand_object *ret_buffer_desc;
|
||||
|
||||
/* Supported spaces are memory/io/pci_config */
|
||||
|
||||
region_obj = obj_desc->field.region_obj;
|
||||
switch (region_obj->region.space_id) {
|
||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||
case ACPI_ADR_SPACE_SYSTEM_IO:
|
||||
case ACPI_ADR_SPACE_PCI_CONFIG:
|
||||
|
||||
/* Need the interpreter to execute */
|
||||
|
||||
acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER);
|
||||
acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
|
||||
|
||||
/* Exercise read-then-write */
|
||||
|
||||
status =
|
||||
acpi_ex_read_data_from_field(NULL, obj_desc,
|
||||
&ret_buffer_desc);
|
||||
if (status == AE_OK) {
|
||||
acpi_ex_write_data_to_field(ret_buffer_desc, obj_desc,
|
||||
NULL);
|
||||
acpi_ut_remove_reference(ret_buffer_desc);
|
||||
}
|
||||
|
||||
acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
|
||||
acpi_ut_release_mutex(ACPI_MTX_INTERPRETER);
|
||||
|
||||
bit_length = obj_desc->common_field.bit_length;
|
||||
byte_length = ACPI_ROUND_BITS_UP_TO_BYTES(bit_length);
|
||||
|
||||
acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT " [%s]", bit_length,
|
||||
byte_length,
|
||||
acpi_ut_get_region_name(region_obj->region.
|
||||
space_id));
|
||||
return (status);
|
||||
|
||||
default:
|
||||
|
||||
acpi_os_printf
|
||||
(" %s address space is not supported in this command [%4.4s]",
|
||||
acpi_ut_get_region_name(region_obj->region.space_id),
|
||||
region_obj->region.node->name.ascii);
|
||||
return (AE_OK);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_db_read_from_object
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Module Name: dsargs - Support for execution of dynamic arguments for static
|
||||
* objects (regions, fields, buffer fields, etc.)
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Module Name: dscontrol - Support for execution control opcodes -
|
||||
* if/else/while/return
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dsdebug - Parser/Interpreter interface - debugging
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dsfield - Dispatcher field routines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -518,6 +518,13 @@ acpi_ds_create_field(union acpi_parse_object *op,
|
|||
info.region_node = region_node;
|
||||
|
||||
status = acpi_ds_get_field_names(&info, walk_state, arg->common.next);
|
||||
if (info.region_node->object->region.space_id ==
|
||||
ACPI_ADR_SPACE_PLATFORM_COMM
|
||||
&& !(region_node->object->field.internal_pcc_buffer =
|
||||
ACPI_ALLOCATE_ZEROED(info.region_node->object->region.
|
||||
length))) {
|
||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||
}
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dsinit - Object initialization namespace walk
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dsobject - Dispatcher object management routines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dsopcode - Dispatcher support for regions and fields
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -130,7 +130,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
|
|||
/* Must have a valid (>0) bit count */
|
||||
|
||||
if (bit_count == 0) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
ACPI_BIOS_ERROR((AE_INFO,
|
||||
"Attempt to CreateField of length zero"));
|
||||
status = AE_AML_OPERAND_VALUE;
|
||||
goto cleanup;
|
||||
|
@ -194,12 +194,13 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
|
|||
/* Entire field must fit within the current length of the buffer */
|
||||
|
||||
if ((bit_offset + bit_count) > (8 * (u32)buffer_desc->buffer.length)) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
status = AE_AML_BUFFER_LIMIT;
|
||||
ACPI_BIOS_EXCEPTION((AE_INFO, status,
|
||||
"Field [%4.4s] at bit offset/length %u/%u "
|
||||
"exceeds size of target Buffer (%u bits)",
|
||||
acpi_ut_get_node_name(result_desc), bit_offset,
|
||||
bit_count, 8 * (u32)buffer_desc->buffer.length));
|
||||
status = AE_AML_BUFFER_LIMIT;
|
||||
acpi_ut_get_node_name(result_desc),
|
||||
bit_offset, bit_count,
|
||||
8 * (u32)buffer_desc->buffer.length));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -355,6 +356,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
|
|||
union acpi_operand_object *operand_desc;
|
||||
struct acpi_namespace_node *node;
|
||||
union acpi_parse_object *next_op;
|
||||
acpi_adr_space_type space_id;
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR(ds_eval_region_operands, op);
|
||||
|
||||
|
@ -367,6 +369,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
|
|||
/* next_op points to the op that holds the space_ID */
|
||||
|
||||
next_op = op->common.value.arg;
|
||||
space_id = (acpi_adr_space_type)next_op->common.value.integer;
|
||||
|
||||
/* next_op points to address op */
|
||||
|
||||
|
@ -402,6 +405,15 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
|
|||
obj_desc->region.length = (u32) operand_desc->integer.value;
|
||||
acpi_ut_remove_reference(operand_desc);
|
||||
|
||||
/* A zero-length operation region is unusable. Just warn */
|
||||
|
||||
if (!obj_desc->region.length
|
||||
&& (space_id < ACPI_NUM_PREDEFINED_REGIONS)) {
|
||||
ACPI_WARNING((AE_INFO,
|
||||
"Operation Region [%4.4s] has zero length (SpaceId %X)",
|
||||
node->name.ascii, space_id));
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the address and save it
|
||||
* (at top of stack - 1)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dspkginit - Completion of deferred package initialization
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Module Name: dswexec - Dispatcher method execution callbacks;
|
||||
* dispatch to interpreter.
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dswload - Dispatcher first pass namespace load callbacks
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dswload2 - Dispatcher second pass namespace load callbacks
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -24,7 +24,7 @@ ACPI_MODULE_NAME("dswload2")
|
|||
* FUNCTION: acpi_ds_load2_begin_op
|
||||
*
|
||||
* PARAMETERS: walk_state - Current state of the parse tree walk
|
||||
* out_op - Wher to return op if a new one is created
|
||||
* out_op - Where to return op if a new one is created
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dswscope - Scope stack manipulation
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: dswstate - Dispatcher parse tree walk management routines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evevent - Fixed Event handling and dispatch
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evglock - Global Lock support
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evgpe - General Purpose Event handling and dispatch
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -801,7 +801,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
|
|||
dispatch.handler->
|
||||
context);
|
||||
|
||||
/* If requested, clear (if level-triggered) and reenable the GPE */
|
||||
/* If requested, clear (if level-triggered) and re-enable the GPE */
|
||||
|
||||
if (return_value & ACPI_REENABLE_GPE) {
|
||||
(void)acpi_ev_finish_gpe(gpe_event_info);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evgpeblk - GPE block creation and initialization.
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evgpeinit - System GPE initialization and update
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evgpeutil - GPE utilities
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evhandler - Support for Address Space handlers
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evmisc - Miscellaneous event manager support functions
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evregion - Operation Region support
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -250,7 +250,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
/*
|
||||
* For handlers other than the default (supplied) handlers, we must
|
||||
* exit the interpreter because the handler *might* block -- we don't
|
||||
* know what it will do, so we can't hold the lock on the intepreter.
|
||||
* know what it will do, so we can't hold the lock on the interpreter.
|
||||
*/
|
||||
acpi_ex_exit_interpreter();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evrgnini- ACPI address_space (op_region) init
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -516,25 +516,6 @@ acpi_status acpi_ev_initialize_region(union acpi_operand_object *region_obj)
|
|||
handler_obj = obj_desc->common_notify.handler;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
/*
|
||||
* If we are executing module level code, the original
|
||||
* Node's object was replaced by this Method object and we
|
||||
* saved the handler in the method object.
|
||||
*
|
||||
* Note: Only used for the legacy MLC support. Will
|
||||
* be removed in the future.
|
||||
*
|
||||
* See acpi_ns_exec_module_code
|
||||
*/
|
||||
if (!acpi_gbl_execute_tables_as_methods &&
|
||||
obj_desc->method.
|
||||
info_flags & ACPI_METHOD_MODULE_LEVEL) {
|
||||
handler_obj =
|
||||
obj_desc->method.dispatch.handler;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* Ignore other objects */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evxface - External interfaces for ACPI events
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs)
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -669,9 +669,9 @@ ACPI_EXPORT_SYMBOL(acpi_dispatch_gpe)
|
|||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Clear and conditionally reenable a GPE. This completes the GPE
|
||||
* DESCRIPTION: Clear and conditionally re-enable a GPE. This completes the GPE
|
||||
* processing. Intended for use by asynchronous host-installed
|
||||
* GPE handlers. The GPE is only reenabled if the enable_for_run bit
|
||||
* GPE handlers. The GPE is only re-enabled if the enable_for_run bit
|
||||
* is set in the GPE info.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
|
||||
* Address Spaces.
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exconcat - Concatenate-type AML operators
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exconvrt - Object conversion routines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -520,7 +520,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
|
|||
for (i = 0; i < obj_desc->buffer.length; i++) {
|
||||
if (base == 16) {
|
||||
|
||||
/* Emit 0x prefix for explict/implicit hex conversion */
|
||||
/* Emit 0x prefix for explicit/implicit hex conversion */
|
||||
|
||||
*new_buf++ = '0';
|
||||
*new_buf++ = 'x';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: excreate - Named object creation
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exdebug - Support for stores to the AML Debug Object
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exdump - Interpreter debug output routines
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exfield - AML execution - field_unit read/write
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -41,6 +41,17 @@ const u8 acpi_protocol_lengths[] = {
|
|||
0xFF /* F - ATTRIB_RAW_PROCESS_BYTES */
|
||||
};
|
||||
|
||||
#define PCC_MASTER_SUBSPACE 3
|
||||
|
||||
/*
|
||||
* The following macros determine a given offset is a COMD field.
|
||||
* According to the specification, generic subspaces (types 0-2) contains a
|
||||
* 2-byte COMD field at offset 4 and master subspaces (type 3) contains a 4-byte
|
||||
* COMD field starting at offset 12.
|
||||
*/
|
||||
#define GENERIC_SUBSPACE_COMMAND(a) (4 == a || a == 5)
|
||||
#define MASTER_SUBSPACE_COMMAND(a) (12 <= a && a <= 15)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ex_get_protocol_buffer_length
|
||||
|
@ -177,6 +188,25 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
|
|||
|
||||
status = acpi_ex_read_gpio(obj_desc, buffer);
|
||||
goto exit;
|
||||
} else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
|
||||
(obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_PLATFORM_COMM)) {
|
||||
/*
|
||||
* Reading from a PCC field unit does not require the handler because
|
||||
* it only requires reading from the internal_pcc_buffer.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
|
||||
"PCC FieldRead bits %u\n",
|
||||
obj_desc->field.bit_length));
|
||||
|
||||
memcpy(buffer,
|
||||
obj_desc->field.region_obj->field.internal_pcc_buffer +
|
||||
obj_desc->field.base_byte_offset,
|
||||
(acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.
|
||||
bit_length));
|
||||
|
||||
*ret_buffer_desc = buffer_desc;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
|
||||
|
@ -229,6 +259,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
|
|||
{
|
||||
acpi_status status;
|
||||
u32 buffer_length;
|
||||
u32 data_length;
|
||||
void *buffer;
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR(ex_write_data_to_field, obj_desc);
|
||||
|
@ -272,6 +303,44 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
|
|||
acpi_ex_write_serial_bus(source_desc, obj_desc,
|
||||
result_desc);
|
||||
return_ACPI_STATUS(status);
|
||||
} else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
|
||||
(obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_PLATFORM_COMM)) {
|
||||
/*
|
||||
* According to the spec a write to the COMD field will invoke the
|
||||
* region handler. Otherwise, write to the pcc_internal buffer. This
|
||||
* implementation will use the offsets specified rather than the name
|
||||
* of the field. This is considered safer because some firmware tools
|
||||
* are known to obfiscate named objects.
|
||||
*/
|
||||
data_length =
|
||||
(acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.
|
||||
bit_length);
|
||||
memcpy(obj_desc->field.region_obj->field.internal_pcc_buffer +
|
||||
obj_desc->field.base_byte_offset,
|
||||
source_desc->buffer.pointer, data_length);
|
||||
|
||||
if ((obj_desc->field.region_obj->region.address ==
|
||||
PCC_MASTER_SUBSPACE
|
||||
&& MASTER_SUBSPACE_COMMAND(obj_desc->field.
|
||||
base_byte_offset))
|
||||
|| GENERIC_SUBSPACE_COMMAND(obj_desc->field.
|
||||
base_byte_offset)) {
|
||||
|
||||
/* Perform the write */
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
|
||||
"PCC COMD field has been written. Invoking PCC handler now.\n"));
|
||||
|
||||
status =
|
||||
acpi_ex_access_region(obj_desc, 0,
|
||||
(u64 *)obj_desc->field.
|
||||
region_obj->field.
|
||||
internal_pcc_buffer,
|
||||
ACPI_WRITE);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Get a pointer to the data to be written */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exfldio - Aml Field I/O
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exmutex - ASL Mutex Acquire/Release functions
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exnames - interpreter/scanner name load/execute
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -390,7 +390,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
|
|||
/* Failure means that the Index was beyond the end of the object */
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_EXCEPTION((AE_INFO, status,
|
||||
ACPI_BIOS_EXCEPTION((AE_INFO, status,
|
||||
"Index (0x%X%8.8X) is beyond end of object (length 0x%X)",
|
||||
ACPI_FORMAT_UINT64(index),
|
||||
(u32)length));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exoparg6 - AML execution - opcodes with 6 arguments
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exprep - ACPI AML field prep utilities
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exregion - ACPI default op_region (address space) handlers
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exresnte - AML Interpreter object resolution
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exresolv - AML Interpreter object resolution
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exresop - AML Interpreter operand/object resolution
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exserial - field_unit support for serial address spaces
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -21,7 +21,7 @@ ACPI_MODULE_NAME("exserial")
|
|||
* FUNCTION: acpi_ex_read_gpio
|
||||
*
|
||||
* PARAMETERS: obj_desc - The named field to read
|
||||
* buffer - Where the return data is returnd
|
||||
* buffer - Where the return data is returned
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exstore - AML Interpreter object store support
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Module Name: exstoren - AML Interpreter object store support,
|
||||
* Store to Node (namespace object)
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exstorob - AML object store support, store to object
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exsystem - Interface to OS services
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: extrace - Support for interpreter execution tracing
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: exutils - interpreter/scanner utilities
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -160,7 +160,7 @@ u8 acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc)
|
|||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Obtain the ACPI hardware Global Lock, only if the field
|
||||
* flags specifiy that it is to be obtained before field access.
|
||||
* flags specify that it is to be obtained before field access.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Name: hwesleep.c - ACPI Hardware Sleep/Wake Support functions for the
|
||||
* extended FADT-V5 sleep registers.
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
|
||||
*
|
||||
* Copyright (C) 2000 - 2018, Intel Corp.
|
||||
* Copyright (C) 2000 - 2019, Intel Corp.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue