ACPI updates for 4.21-rc1
- Update the ACPICA code in the kernel to the 20181213 upstream revision including: * New Windows _OSI strings (Bob Moore, Jung-uk Kim). * Buffers-to-string conversions update (Bob Moore). * Removal of support for expressions in package elements (Bob Moore). * New option to display method/object evaluation in debug output (Bob Moore). * Compiler improvements (Bob Moore, Erik Schmauss). * Minor debugger fix (Erik Schmauss). * Disassembler improvement (Erik Schmauss). * Assorted cleanups (Bob Moore, Colin Ian King, Erik Schmauss). - Add support for a new OEM _OSI string to indicate special handling of secondary graphics adapters on some systems (Alex Hung). - Make it possible to build the ACPI subystem without PCI support (Sinan Kaya). - Make the SPCR table handling regard baud rate 0 in accordance with the specification of it and make the DSDT override code support DSDT code names generated by recent ACPICA (Andy Shevchenko, Wang Dongsheng, Nathan Chancellor). - Add clock frequency for Hisilicon Hip08 SPI controller to the ACPI driver for AMD SoCs (APD) (Jay Fang). - Fix the PM handling during device init in the ACPI driver for Intel SoCs (LPSS) (Hans de Goede). - Avoid double panic()s by clearing the APEI GHES block_status before panic() (Lenny Szubowicz). - Clean up a function invocation in the ACPI core and get rid of some code duplication by using the DEFINE_SHOW_ATTRIBUTE macro in the APEI support code (Alexey Dobriyan, Yangtao Li). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJcHMSBAAoJEILEb/54YlRxZmEQAIbRXKOwvvt3my9HLBC/6V1u +Wed0yNBQ9HkVWQzFuppDq97/kk5DRODnPNu9RaeS7QXxVOBfwElinm8NhzVI7Fm FP5iPwnNq8EAkDTBOoG139Fs82EkaVSa2x9FHy84Jge3BXmauQM13bWP/kF5TjCn Frjuh0TfhQ+ub853GisAr/SW7ixCWp81FZaW/xFcDuJU2E6AvjNQusdiAocgAqQ8 rnl8D0gjSW6m6HcauaTizRMXOIyePkfT86xQKwU7259ByRW20iQtsl/6+Rnyy3wG cCrlsaHd0bP6qwVAQyh6cURq8hdLAUYI9tzBW0EL+UEpJ289j51s+RSh2nZNyIKO wfbr2DdK3aaWcUygSxoP4FFHqINch/IRwaP2huT9szO1yLCikAN8Xmrb1BPZvOIK m6Lywb1B+SOfGgJl4Z1GjzIc6dimrXVbgxjN1+Bpe1NeKqe/M6vMdbcvPIsMs7b8 iE/1gJPeJ5pvAgsQiWncZvyaOKaSmrLWbaw/ITQnNXVLDlTI3hIQExiPPl5hJ00v Z4egVMdCCxYqZxxkZKEYnEe/lb9BRAMIvbkkocPBdmtNAWPuVnCqdR26BppaEt7i r2tnEd84aISCDcBc2sIpo/pVUwncw5GtK20z8Ke+3rlg8lDZ0hAdHQWgBtj4xnnw grImzXnKvSdajfZnvjRg =yxXc -----END PGP SIGNATURE----- Merge tag 'acpi-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to the 20181213 upstream revision, make it possible to build the ACPI subsystem without PCI support, and a new OEM _OSI string, add a new device support to the ACPI driver for AMD SoCs and fix PM handling in the ACPI driver for Intel SoCs, fix the SPCR table handling and do some assorted fixes and cleanups. Specifics: - Update the ACPICA code in the kernel to the 20181213 upstream revision including: * New Windows _OSI strings (Bob Moore, Jung-uk Kim). * Buffers-to-string conversions update (Bob Moore). * Removal of support for expressions in package elements (Bob Moore). * New option to display method/object evaluation in debug output (Bob Moore). * Compiler improvements (Bob Moore, Erik Schmauss). * Minor debugger fix (Erik Schmauss). * Disassembler improvement (Erik Schmauss). * Assorted cleanups (Bob Moore, Colin Ian King, Erik Schmauss). - Add support for a new OEM _OSI string to indicate special handling of secondary graphics adapters on some systems (Alex Hung). - Make it possible to build the ACPI subystem without PCI support (Sinan Kaya). - Make the SPCR table handling regard baud rate 0 in accordance with the specification of it and make the DSDT override code support DSDT code names generated by recent ACPICA (Andy Shevchenko, Wang Dongsheng, Nathan Chancellor). - Add clock frequency for Hisilicon Hip08 SPI controller to the ACPI driver for AMD SoCs (APD) (Jay Fang). - Fix the PM handling during device init in the ACPI driver for Intel SoCs (LPSS) (Hans de Goede). - Avoid double panic()s by clearing the APEI GHES block_status before panic() (Lenny Szubowicz). - Clean up a function invocation in the ACPI core and get rid of some code duplication by using the DEFINE_SHOW_ATTRIBUTE macro in the APEI support code (Alexey Dobriyan, Yangtao Li)" * tag 'acpi-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (31 commits) ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode ACPI/APEI: Clear GHES block_status before panic() ACPI: Make PCI slot detection driver depend on PCI ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set arm64: select ACPI PCI code only when both features are enabled PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset ACPI: Allow CONFIG_PCI to be unset for reboot ACPI: Move PCI reset to a separate function ACPI / OSI: Add OEM _OSI string to enable dGPU direct output ACPI / tables: add DSDT AmlCode new declaration name support ACPICA: Update version to 20181213 ACPICA: change coding style to match ACPICA, no functional change ACPICA: Debug output: Add option to display method/object evaluation ACPICA: disassembler: disassemble OEMx tables as AML ACPICA: Add "Windows 2018.2" string in the _OSI support ACPICA: Expressions in package elements are not supported ACPICA: Update buffer-to-string conversions ACPICA: add comments, no functional change ACPICA: Remove defines that use deprecated flag ...
This commit is contained in:
Коммит
e6d1315006
|
@ -5,7 +5,7 @@ config ARM64
|
||||||
select ACPI_GTDT if ACPI
|
select ACPI_GTDT if ACPI
|
||||||
select ACPI_IORT if ACPI
|
select ACPI_IORT if ACPI
|
||||||
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
|
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
|
||||||
select ACPI_MCFG if ACPI
|
select ACPI_MCFG if (ACPI && PCI)
|
||||||
select ACPI_SPCR_TABLE if ACPI
|
select ACPI_SPCR_TABLE if ACPI
|
||||||
select ACPI_PPTT if ACPI
|
select ACPI_PPTT if ACPI
|
||||||
select ARCH_CLOCKSOURCE_DATA
|
select ARCH_CLOCKSOURCE_DATA
|
||||||
|
@ -163,7 +163,7 @@ config ARM64
|
||||||
select OF
|
select OF
|
||||||
select OF_EARLY_FLATTREE
|
select OF_EARLY_FLATTREE
|
||||||
select OF_RESERVED_MEM
|
select OF_RESERVED_MEM
|
||||||
select PCI_ECAM if ACPI
|
select PCI_ECAM if (ACPI && PCI)
|
||||||
select POWER_RESET
|
select POWER_RESET
|
||||||
select POWER_SUPPLY
|
select POWER_SUPPLY
|
||||||
select REFCOUNT_FULL
|
select REFCOUNT_FULL
|
||||||
|
|
|
@ -121,7 +121,14 @@ extern void __init dmi_check_pciprobe(void);
|
||||||
extern void __init dmi_check_skip_isa_align(void);
|
extern void __init dmi_check_skip_isa_align(void);
|
||||||
|
|
||||||
/* some common used subsys_initcalls */
|
/* some common used subsys_initcalls */
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
extern int __init pci_acpi_init(void);
|
extern int __init pci_acpi_init(void);
|
||||||
|
#else
|
||||||
|
static inline int __init pci_acpi_init(void)
|
||||||
|
{
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
extern void __init pcibios_irq_init(void);
|
extern void __init pcibios_irq_init(void);
|
||||||
extern int __init pcibios_init(void);
|
extern int __init pcibios_init(void);
|
||||||
extern int pci_legacy_init(void);
|
extern int pci_legacy_init(void);
|
||||||
|
|
|
@ -9,7 +9,6 @@ config ARCH_SUPPORTS_ACPI
|
||||||
menuconfig ACPI
|
menuconfig ACPI
|
||||||
bool "ACPI (Advanced Configuration and Power Interface) Support"
|
bool "ACPI (Advanced Configuration and Power Interface) Support"
|
||||||
depends on ARCH_SUPPORTS_ACPI
|
depends on ARCH_SUPPORTS_ACPI
|
||||||
depends on PCI
|
|
||||||
select PNP
|
select PNP
|
||||||
default y if X86
|
default y if X86
|
||||||
help
|
help
|
||||||
|
@ -336,7 +335,7 @@ config ACPI_CUSTOM_DSDT_FILE
|
||||||
See Documentation/acpi/dsdt-override.txt
|
See Documentation/acpi/dsdt-override.txt
|
||||||
|
|
||||||
Enter the full path name to the file which includes the AmlCode
|
Enter the full path name to the file which includes the AmlCode
|
||||||
declaration.
|
or dsdt_aml_code declaration.
|
||||||
|
|
||||||
If unsure, don't enter a file name.
|
If unsure, don't enter a file name.
|
||||||
|
|
||||||
|
@ -370,7 +369,7 @@ config ACPI_DEBUG
|
||||||
|
|
||||||
config ACPI_PCI_SLOT
|
config ACPI_PCI_SLOT
|
||||||
bool "PCI slot detection driver"
|
bool "PCI slot detection driver"
|
||||||
depends on SYSFS
|
depends on SYSFS && PCI
|
||||||
help
|
help
|
||||||
This driver creates entries in /sys/bus/pci/slots/ for all PCI
|
This driver creates entries in /sys/bus/pci/slots/ for all PCI
|
||||||
slots in the system. This can help correlate PCI bus addresses,
|
slots in the system. This can help correlate PCI bus addresses,
|
||||||
|
|
|
@ -39,7 +39,7 @@ acpi-y += processor_core.o
|
||||||
acpi-$(CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC) += processor_pdc.o
|
acpi-$(CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC) += processor_pdc.o
|
||||||
acpi-y += ec.o
|
acpi-y += ec.o
|
||||||
acpi-$(CONFIG_ACPI_DOCK) += dock.o
|
acpi-$(CONFIG_ACPI_DOCK) += dock.o
|
||||||
acpi-y += pci_root.o pci_link.o pci_irq.o
|
acpi-$(CONFIG_PCI) += pci_root.o pci_link.o pci_irq.o
|
||||||
obj-$(CONFIG_ACPI_MCFG) += pci_mcfg.o
|
obj-$(CONFIG_ACPI_MCFG) += pci_mcfg.o
|
||||||
acpi-y += acpi_lpss.o acpi_apd.o
|
acpi-y += acpi_lpss.o acpi_apd.o
|
||||||
acpi-y += acpi_platform.o
|
acpi-y += acpi_platform.o
|
||||||
|
|
|
@ -166,6 +166,11 @@ static const struct apd_device_desc thunderx2_i2c_desc = {
|
||||||
.setup = acpi_apd_setup,
|
.setup = acpi_apd_setup,
|
||||||
.fixed_clk_rate = 125000000,
|
.fixed_clk_rate = 125000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct apd_device_desc hip08_spi_desc = {
|
||||||
|
.setup = acpi_apd_setup,
|
||||||
|
.fixed_clk_rate = 250000000,
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -234,6 +239,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
|
||||||
{ "CAV9007", APD_ADDR(thunderx2_i2c_desc) },
|
{ "CAV9007", APD_ADDR(thunderx2_i2c_desc) },
|
||||||
{ "HISI02A1", APD_ADDR(hip07_i2c_desc) },
|
{ "HISI02A1", APD_ADDR(hip07_i2c_desc) },
|
||||||
{ "HISI02A2", APD_ADDR(hip08_i2c_desc) },
|
{ "HISI02A2", APD_ADDR(hip08_i2c_desc) },
|
||||||
|
{ "HISI0173", APD_ADDR(hip08_spi_desc) },
|
||||||
#endif
|
#endif
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
|
@ -673,12 +673,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
|
||||||
* have _PS0 and _PS3 without _PSC (and no power resources), so
|
* have _PS0 and _PS3 without _PSC (and no power resources), so
|
||||||
* acpi_bus_init_power() will assume that the BIOS has put them into D0.
|
* acpi_bus_init_power() will assume that the BIOS has put them into D0.
|
||||||
*/
|
*/
|
||||||
ret = acpi_device_fix_up_power(adev);
|
acpi_device_fix_up_power(adev);
|
||||||
if (ret) {
|
|
||||||
/* Skip the device, but continue the namespace scan. */
|
|
||||||
ret = 0;
|
|
||||||
goto err_out;
|
|
||||||
}
|
|
||||||
|
|
||||||
adev->driver_data = pdata;
|
adev->driver_data = pdata;
|
||||||
pdev = acpi_create_platform_device(adev, dev_desc->properties);
|
pdev = acpi_create_platform_device(adev, dev_desc->properties);
|
||||||
|
|
|
@ -77,13 +77,13 @@ acpi-y += \
|
||||||
hwacpi.o \
|
hwacpi.o \
|
||||||
hwesleep.o \
|
hwesleep.o \
|
||||||
hwgpe.o \
|
hwgpe.o \
|
||||||
hwpci.o \
|
|
||||||
hwregs.o \
|
hwregs.o \
|
||||||
hwsleep.o \
|
hwsleep.o \
|
||||||
hwvalid.o \
|
hwvalid.o \
|
||||||
hwxface.o \
|
hwxface.o \
|
||||||
hwxfsleep.o
|
hwxfsleep.o
|
||||||
|
|
||||||
|
acpi-$(CONFIG_PCI) += hwpci.o
|
||||||
acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
|
acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
|
||||||
|
|
||||||
acpi-y += \
|
acpi-y += \
|
||||||
|
|
|
@ -172,11 +172,7 @@ ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking);
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
|
||||||
#define NUM_PREDEFINED_NAMES 10
|
#define NUM_PREDEFINED_NAMES 10
|
||||||
#else
|
|
||||||
#define NUM_PREDEFINED_NAMES 9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct);
|
ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct);
|
||||||
ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node);
|
ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node);
|
||||||
|
|
|
@ -106,11 +106,20 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||||
struct acpi_gpe_block_info *gpe_block,
|
struct acpi_gpe_block_info *gpe_block,
|
||||||
void *context);
|
void *context);
|
||||||
|
|
||||||
|
#ifdef ACPI_PCI_CONFIGURED
|
||||||
/*
|
/*
|
||||||
* hwpci - PCI configuration support
|
* hwpci - PCI configuration support
|
||||||
*/
|
*/
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id,
|
acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id,
|
||||||
acpi_handle root_pci_device, acpi_handle pci_region);
|
acpi_handle root_pci_device, acpi_handle pci_region);
|
||||||
|
#else
|
||||||
|
static inline acpi_status
|
||||||
|
acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id, acpi_handle root_pci_device,
|
||||||
|
acpi_handle pci_region)
|
||||||
|
{
|
||||||
|
return AE_SUPPORT;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ACHWARE_H__ */
|
#endif /* __ACHWARE_H__ */
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#define ACPI_NS_TEMPORARY 0x0040
|
#define ACPI_NS_TEMPORARY 0x0040
|
||||||
#define ACPI_NS_OVERRIDE_IF_FOUND 0x0080
|
#define ACPI_NS_OVERRIDE_IF_FOUND 0x0080
|
||||||
#define ACPI_NS_EARLY_INIT 0x0100
|
#define ACPI_NS_EARLY_INIT 0x0100
|
||||||
|
#define ACPI_NS_PREFIX_MUST_EXIST 0x0200
|
||||||
|
|
||||||
/* Flags for acpi_ns_walk_namespace */
|
/* Flags for acpi_ns_walk_namespace */
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,8 @@ struct acpi_walk_state {
|
||||||
struct acpi_parse_state parser_state; /* Current state of parser */
|
struct acpi_parse_state parser_state; /* Current state of parser */
|
||||||
u32 prev_arg_types;
|
u32 prev_arg_types;
|
||||||
u32 arg_count; /* push for fixed or var args */
|
u32 arg_count; /* push for fixed or var args */
|
||||||
|
u16 method_nesting_depth;
|
||||||
|
u8 method_is_nested;
|
||||||
|
|
||||||
struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
|
struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
|
||||||
struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
|
struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
|
||||||
|
@ -74,7 +76,8 @@ struct acpi_walk_state {
|
||||||
struct acpi_namespace_node *method_call_node; /* Called method Node */
|
struct acpi_namespace_node *method_call_node; /* Called method Node */
|
||||||
union acpi_parse_object *method_call_op; /* method_call Op if running a method */
|
union acpi_parse_object *method_call_op; /* method_call Op if running a method */
|
||||||
union acpi_operand_object *method_desc; /* Method descriptor if running a method */
|
union acpi_operand_object *method_desc; /* Method descriptor if running a method */
|
||||||
struct acpi_namespace_node *method_node; /* Method node if running a method. */
|
struct acpi_namespace_node *method_node; /* Method node if running a method */
|
||||||
|
char *method_pathname; /* Full pathname of running method */
|
||||||
union acpi_parse_object *op; /* Current parser op */
|
union acpi_parse_object *op; /* Current parser op */
|
||||||
const struct acpi_opcode_info *op_info; /* Info on current opcode */
|
const struct acpi_opcode_info *op_info; /* Info on current opcode */
|
||||||
union acpi_parse_object *origin; /* Start of walk [Obsolete] */
|
union acpi_parse_object *origin; /* Start of walk [Obsolete] */
|
||||||
|
|
|
@ -24,6 +24,13 @@ acpi_db_start_command(struct acpi_walk_state *walk_state,
|
||||||
void acpi_db_method_end(struct acpi_walk_state *walk_state);
|
void acpi_db_method_end(struct acpi_walk_state *walk_state);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ACPI_DISASSEMBLER
|
||||||
|
static union acpi_parse_object *acpi_db_get_display_op(struct acpi_walk_state
|
||||||
|
*walk_state,
|
||||||
|
union acpi_parse_object
|
||||||
|
*op);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_db_start_command
|
* FUNCTION: acpi_db_start_command
|
||||||
|
@ -113,6 +120,70 @@ void acpi_db_signal_break_point(struct acpi_walk_state *walk_state)
|
||||||
acpi_os_printf("**break** Executed AML BreakPoint opcode\n");
|
acpi_os_printf("**break** Executed AML BreakPoint opcode\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ACPI_DISASSEMBLER
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: acpi_db_get_display_op
|
||||||
|
*
|
||||||
|
* PARAMETERS: walk_state - Current walk
|
||||||
|
* op - Current executing op (from aml interpreter)
|
||||||
|
*
|
||||||
|
* RETURN: Opcode to display
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Find the opcode to display during single stepping
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static union acpi_parse_object *acpi_db_get_display_op(struct acpi_walk_state
|
||||||
|
*walk_state,
|
||||||
|
union acpi_parse_object
|
||||||
|
*op)
|
||||||
|
{
|
||||||
|
union acpi_parse_object *display_op;
|
||||||
|
union acpi_parse_object *parent_op;
|
||||||
|
|
||||||
|
display_op = op;
|
||||||
|
parent_op = op->common.parent;
|
||||||
|
if (parent_op) {
|
||||||
|
if ((walk_state->control_state) &&
|
||||||
|
(walk_state->control_state->common.state ==
|
||||||
|
ACPI_CONTROL_PREDICATE_EXECUTING)) {
|
||||||
|
/*
|
||||||
|
* We are executing the predicate of an IF or WHILE statement
|
||||||
|
* Search upwards for the containing IF or WHILE so that the
|
||||||
|
* entire predicate can be displayed.
|
||||||
|
*/
|
||||||
|
while (parent_op) {
|
||||||
|
if ((parent_op->common.aml_opcode == AML_IF_OP)
|
||||||
|
|| (parent_op->common.aml_opcode ==
|
||||||
|
AML_WHILE_OP)) {
|
||||||
|
display_op = parent_op;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
parent_op = parent_op->common.parent;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
while (parent_op) {
|
||||||
|
if ((parent_op->common.aml_opcode == AML_IF_OP)
|
||||||
|
|| (parent_op->common.aml_opcode ==
|
||||||
|
AML_ELSE_OP)
|
||||||
|
|| (parent_op->common.aml_opcode ==
|
||||||
|
AML_SCOPE_OP)
|
||||||
|
|| (parent_op->common.aml_opcode ==
|
||||||
|
AML_METHOD_OP)
|
||||||
|
|| (parent_op->common.aml_opcode ==
|
||||||
|
AML_WHILE_OP)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
display_op = parent_op;
|
||||||
|
parent_op = parent_op->common.parent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return display_op;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_db_single_step
|
* FUNCTION: acpi_db_single_step
|
||||||
|
@ -134,8 +205,6 @@ acpi_db_single_step(struct acpi_walk_state *walk_state,
|
||||||
union acpi_parse_object *next;
|
union acpi_parse_object *next;
|
||||||
acpi_status status = AE_OK;
|
acpi_status status = AE_OK;
|
||||||
u32 original_debug_level;
|
u32 original_debug_level;
|
||||||
union acpi_parse_object *display_op;
|
|
||||||
union acpi_parse_object *parent_op;
|
|
||||||
u32 aml_offset;
|
u32 aml_offset;
|
||||||
|
|
||||||
ACPI_FUNCTION_ENTRY();
|
ACPI_FUNCTION_ENTRY();
|
||||||
|
@ -222,51 +291,12 @@ acpi_db_single_step(struct acpi_walk_state *walk_state,
|
||||||
next = op->common.next;
|
next = op->common.next;
|
||||||
op->common.next = NULL;
|
op->common.next = NULL;
|
||||||
|
|
||||||
display_op = op;
|
|
||||||
parent_op = op->common.parent;
|
|
||||||
if (parent_op) {
|
|
||||||
if ((walk_state->control_state) &&
|
|
||||||
(walk_state->control_state->common.state ==
|
|
||||||
ACPI_CONTROL_PREDICATE_EXECUTING)) {
|
|
||||||
/*
|
|
||||||
* We are executing the predicate of an IF or WHILE statement
|
|
||||||
* Search upwards for the containing IF or WHILE so that the
|
|
||||||
* entire predicate can be displayed.
|
|
||||||
*/
|
|
||||||
while (parent_op) {
|
|
||||||
if ((parent_op->common.aml_opcode ==
|
|
||||||
AML_IF_OP)
|
|
||||||
|| (parent_op->common.aml_opcode ==
|
|
||||||
AML_WHILE_OP)) {
|
|
||||||
display_op = parent_op;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
parent_op = parent_op->common.parent;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
while (parent_op) {
|
|
||||||
if ((parent_op->common.aml_opcode ==
|
|
||||||
AML_IF_OP)
|
|
||||||
|| (parent_op->common.aml_opcode ==
|
|
||||||
AML_ELSE_OP)
|
|
||||||
|| (parent_op->common.aml_opcode ==
|
|
||||||
AML_SCOPE_OP)
|
|
||||||
|| (parent_op->common.aml_opcode ==
|
|
||||||
AML_METHOD_OP)
|
|
||||||
|| (parent_op->common.aml_opcode ==
|
|
||||||
AML_WHILE_OP)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
display_op = parent_op;
|
|
||||||
parent_op = parent_op->common.parent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now we can disassemble and display it */
|
/* Now we can disassemble and display it */
|
||||||
|
|
||||||
#ifdef ACPI_DISASSEMBLER
|
#ifdef ACPI_DISASSEMBLER
|
||||||
acpi_dm_disassemble(walk_state, display_op, ACPI_UINT32_MAX);
|
acpi_dm_disassemble(walk_state,
|
||||||
|
acpi_db_get_display_op(walk_state, op),
|
||||||
|
ACPI_UINT32_MAX);
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* The AML Disassembler is not configured - at least we can
|
* The AML Disassembler is not configured - at least we can
|
||||||
|
|
|
@ -532,6 +532,9 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next_walk_state->method_nesting_depth =
|
||||||
|
this_walk_state->method_nesting_depth + 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Delete the operands on the previous walkstate operand stack
|
* Delete the operands on the previous walkstate operand stack
|
||||||
* (they were copied to new objects)
|
* (they were copied to new objects)
|
||||||
|
@ -549,6 +552,17 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
|
||||||
"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
|
"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
|
||||||
method_node->name.ascii, next_walk_state));
|
method_node->name.ascii, next_walk_state));
|
||||||
|
|
||||||
|
this_walk_state->method_pathname =
|
||||||
|
acpi_ns_get_normalized_pathname(method_node, TRUE);
|
||||||
|
this_walk_state->method_is_nested = TRUE;
|
||||||
|
|
||||||
|
/* Optional object evaluation log */
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,
|
||||||
|
"%-26s: %*s%s\n", " Nested method call",
|
||||||
|
next_walk_state->method_nesting_depth * 3, " ",
|
||||||
|
&this_walk_state->method_pathname[1]));
|
||||||
|
|
||||||
/* Invoke an internal method if necessary */
|
/* Invoke an internal method if necessary */
|
||||||
|
|
||||||
if (obj_desc->method.info_flags & ACPI_METHOD_INTERNAL_ONLY) {
|
if (obj_desc->method.info_flags & ACPI_METHOD_INTERNAL_ONLY) {
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#define _COMPONENT ACPI_DISPATCHER
|
#define _COMPONENT ACPI_DISPATCHER
|
||||||
ACPI_MODULE_NAME("dsobject")
|
ACPI_MODULE_NAME("dsobject")
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ds_build_internal_object
|
* FUNCTION: acpi_ds_build_internal_object
|
||||||
|
@ -299,8 +298,6 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ACPI_NO_METHOD_EXECUTION */
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ds_init_object_from_op
|
* FUNCTION: acpi_ds_init_object_from_op
|
||||||
|
@ -404,9 +401,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
|
|
||||||
/* Truncate value if we are executing from a 32-bit ACPI table */
|
/* Truncate value if we are executing from a 32-bit ACPI table */
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
(void)acpi_ex_truncate_for32bit_table(obj_desc);
|
(void)acpi_ex_truncate_for32bit_table(obj_desc);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_REVISION_OP:
|
case AML_REVISION_OP:
|
||||||
|
@ -428,7 +423,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
|
|
||||||
obj_desc->integer.value = op->common.value.integer;
|
obj_desc->integer.value = op->common.value.integer;
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
if (acpi_ex_truncate_for32bit_table(obj_desc)) {
|
if (acpi_ex_truncate_for32bit_table(obj_desc)) {
|
||||||
|
|
||||||
/* Warn if we found a 64-bit constant in a 32-bit table */
|
/* Warn if we found a 64-bit constant in a 32-bit table */
|
||||||
|
@ -439,7 +433,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
value.integer),
|
value.integer),
|
||||||
(u32)obj_desc->integer.value));
|
(u32)obj_desc->integer.value));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -477,7 +470,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
((u32)opcode) - AML_FIRST_LOCAL_OP;
|
((u32)opcode) - AML_FIRST_LOCAL_OP;
|
||||||
obj_desc->reference.class = ACPI_REFCLASS_LOCAL;
|
obj_desc->reference.class = ACPI_REFCLASS_LOCAL;
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
status =
|
status =
|
||||||
acpi_ds_method_data_get_node(ACPI_REFCLASS_LOCAL,
|
acpi_ds_method_data_get_node(ACPI_REFCLASS_LOCAL,
|
||||||
obj_desc->reference.
|
obj_desc->reference.
|
||||||
|
@ -487,7 +479,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
acpi_namespace_node,
|
acpi_namespace_node,
|
||||||
&obj_desc->reference.
|
&obj_desc->reference.
|
||||||
object));
|
object));
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_TYPE_METHOD_ARGUMENT:
|
case AML_TYPE_METHOD_ARGUMENT:
|
||||||
|
@ -498,7 +489,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
((u32)opcode) - AML_FIRST_ARG_OP;
|
((u32)opcode) - AML_FIRST_ARG_OP;
|
||||||
obj_desc->reference.class = ACPI_REFCLASS_ARG;
|
obj_desc->reference.class = ACPI_REFCLASS_ARG;
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
status = acpi_ds_method_data_get_node(ACPI_REFCLASS_ARG,
|
status = acpi_ds_method_data_get_node(ACPI_REFCLASS_ARG,
|
||||||
obj_desc->
|
obj_desc->
|
||||||
reference.value,
|
reference.value,
|
||||||
|
@ -509,7 +499,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
|
||||||
&obj_desc->
|
&obj_desc->
|
||||||
reference.
|
reference.
|
||||||
object));
|
object));
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Object name or Debug object */
|
default: /* Object name or Debug object */
|
||||||
|
|
|
@ -152,6 +152,32 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
|
||||||
*/
|
*/
|
||||||
for (i = 0; arg && (i < element_count); i++) {
|
for (i = 0; arg && (i < element_count); i++) {
|
||||||
if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {
|
if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {
|
||||||
|
if (!arg->common.node) {
|
||||||
|
/*
|
||||||
|
* This is the case where an expression has returned a value.
|
||||||
|
* The use of expressions (term_args) within individual
|
||||||
|
* package elements is not supported by the AML interpreter,
|
||||||
|
* even though the ASL grammar supports it. Example:
|
||||||
|
*
|
||||||
|
* Name (INT1, 0x1234)
|
||||||
|
*
|
||||||
|
* Name (PKG3, Package () {
|
||||||
|
* Add (INT1, 0xAAAA0000)
|
||||||
|
* })
|
||||||
|
*
|
||||||
|
* 1) No known AML interpreter supports this type of construct
|
||||||
|
* 2) This fixes a fault if the construct is encountered
|
||||||
|
*/
|
||||||
|
ACPI_EXCEPTION((AE_INFO, AE_SUPPORT,
|
||||||
|
"Expressions within package elements are not supported"));
|
||||||
|
|
||||||
|
/* Cleanup the return object, it is not needed */
|
||||||
|
|
||||||
|
acpi_ut_remove_reference(walk_state->results->
|
||||||
|
results.obj_desc[0]);
|
||||||
|
return_ACPI_STATUS(AE_SUPPORT);
|
||||||
|
}
|
||||||
|
|
||||||
if (arg->common.node->type == ACPI_TYPE_METHOD) {
|
if (arg->common.node->type == ACPI_TYPE_METHOD) {
|
||||||
/*
|
/*
|
||||||
* A method reference "looks" to the parser to be a method
|
* A method reference "looks" to the parser to be a method
|
||||||
|
|
|
@ -57,7 +57,6 @@ void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ds_do_implicit_return
|
* FUNCTION: acpi_ds_do_implicit_return
|
||||||
|
@ -401,7 +400,6 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state)
|
||||||
walk_state->num_operands = 0;
|
walk_state->num_operands = 0;
|
||||||
return_VOID;
|
return_VOID;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
@ -73,12 +73,10 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
|
||||||
|
|
||||||
/* Execution pass */
|
/* Execution pass */
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
walk_state->parse_flags |= ACPI_PARSE_EXECUTE |
|
walk_state->parse_flags |= ACPI_PARSE_EXECUTE |
|
||||||
ACPI_PARSE_DELETE_TREE;
|
ACPI_PARSE_DELETE_TREE;
|
||||||
walk_state->descending_callback = acpi_ds_exec_begin_op;
|
walk_state->descending_callback = acpi_ds_exec_begin_op;
|
||||||
walk_state->ascending_callback = acpi_ds_exec_end_op;
|
walk_state->ascending_callback = acpi_ds_exec_end_op;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -364,7 +362,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
|
||||||
|
|
||||||
/* Initialize the op */
|
/* Initialize the op */
|
||||||
|
|
||||||
#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY))
|
#ifdef ACPI_CONSTANT_EVAL_ONLY
|
||||||
op->named.path = path;
|
op->named.path = path;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -422,7 +420,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
|
||||||
|
|
||||||
object_type = walk_state->op_info->object_type;
|
object_type = walk_state->op_info->object_type;
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
if (walk_state->op_info->flags & AML_FIELD) {
|
if (walk_state->op_info->flags & AML_FIELD) {
|
||||||
/*
|
/*
|
||||||
* If we are executing a method, do not create any namespace objects
|
* If we are executing a method, do not create any namespace objects
|
||||||
|
@ -466,7 +463,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (op->common.aml_opcode == AML_NAME_OP) {
|
if (op->common.aml_opcode == AML_NAME_OP) {
|
||||||
|
|
||||||
|
|
|
@ -296,6 +296,14 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For name creation opcodes, the full namepath prefix must
|
||||||
|
* exist, except for the final (new) nameseg.
|
||||||
|
*/
|
||||||
|
if (walk_state->op_info->flags & AML_NAMED) {
|
||||||
|
flags |= ACPI_NS_PREFIX_MUST_EXIST;
|
||||||
|
}
|
||||||
|
|
||||||
/* Add new entry or lookup existing entry */
|
/* Add new entry or lookup existing entry */
|
||||||
|
|
||||||
status =
|
status =
|
||||||
|
@ -363,10 +371,8 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
|
||||||
struct acpi_namespace_node *node;
|
struct acpi_namespace_node *node;
|
||||||
union acpi_parse_object *arg;
|
union acpi_parse_object *arg;
|
||||||
struct acpi_namespace_node *new_node;
|
struct acpi_namespace_node *new_node;
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
u32 i;
|
u32 i;
|
||||||
u8 region_space;
|
u8 region_space;
|
||||||
#endif
|
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(ds_load2_end_op);
|
ACPI_FUNCTION_TRACE(ds_load2_end_op);
|
||||||
|
|
||||||
|
@ -453,7 +459,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
|
||||||
arg = op->common.value.arg;
|
arg = op->common.value.arg;
|
||||||
|
|
||||||
switch (walk_state->op_info->type) {
|
switch (walk_state->op_info->type) {
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
|
|
||||||
case AML_TYPE_CREATE_FIELD:
|
case AML_TYPE_CREATE_FIELD:
|
||||||
/*
|
/*
|
||||||
|
@ -550,12 +555,10 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif /* ACPI_NO_METHOD_EXECUTION */
|
|
||||||
|
|
||||||
case AML_TYPE_NAMED_COMPLEX:
|
case AML_TYPE_NAMED_COMPLEX:
|
||||||
|
|
||||||
switch (op->common.aml_opcode) {
|
switch (op->common.aml_opcode) {
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
case AML_REGION_OP:
|
case AML_REGION_OP:
|
||||||
case AML_DATA_REGION_OP:
|
case AML_DATA_REGION_OP:
|
||||||
|
|
||||||
|
@ -643,8 +646,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endif /* ACPI_NO_METHOD_EXECUTION */
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All NAMED_COMPLEX opcodes must be handled above */
|
/* All NAMED_COMPLEX opcodes must be handled above */
|
||||||
|
|
|
@ -530,7 +530,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
|
||||||
|
|
||||||
/* Init the method args/local */
|
/* Init the method args/local */
|
||||||
|
|
||||||
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
|
#ifndef ACPI_CONSTANT_EVAL_ONLY
|
||||||
acpi_ds_method_data_init(walk_state);
|
acpi_ds_method_data_init(walk_state);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -364,25 +364,25 @@ acpi_ev_install_space_handler(struct acpi_namespace_node *node,
|
||||||
handler = acpi_ex_system_io_space_handler;
|
handler = acpi_ex_system_io_space_handler;
|
||||||
setup = acpi_ev_io_space_region_setup;
|
setup = acpi_ev_io_space_region_setup;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ACPI_PCI_CONFIGURED
|
||||||
case ACPI_ADR_SPACE_PCI_CONFIG:
|
case ACPI_ADR_SPACE_PCI_CONFIG:
|
||||||
|
|
||||||
handler = acpi_ex_pci_config_space_handler;
|
handler = acpi_ex_pci_config_space_handler;
|
||||||
setup = acpi_ev_pci_config_region_setup;
|
setup = acpi_ev_pci_config_region_setup;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case ACPI_ADR_SPACE_CMOS:
|
case ACPI_ADR_SPACE_CMOS:
|
||||||
|
|
||||||
handler = acpi_ex_cmos_space_handler;
|
handler = acpi_ex_cmos_space_handler;
|
||||||
setup = acpi_ev_cmos_region_setup;
|
setup = acpi_ev_cmos_region_setup;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ACPI_PCI_CONFIGURED
|
||||||
case ACPI_ADR_SPACE_PCI_BAR_TARGET:
|
case ACPI_ADR_SPACE_PCI_BAR_TARGET:
|
||||||
|
|
||||||
handler = acpi_ex_pci_bar_space_handler;
|
handler = acpi_ex_pci_bar_space_handler;
|
||||||
setup = acpi_ev_pci_bar_region_setup;
|
setup = acpi_ev_pci_bar_region_setup;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case ACPI_ADR_SPACE_DATA_TABLE:
|
case ACPI_ADR_SPACE_DATA_TABLE:
|
||||||
|
|
||||||
handler = acpi_ex_data_table_space_handler;
|
handler = acpi_ex_data_table_space_handler;
|
||||||
|
|
|
@ -323,7 +323,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)
|
||||||
|
|
||||||
/* hex_length: 2 ascii hex chars per data byte */
|
/* hex_length: 2 ascii hex chars per data byte */
|
||||||
|
|
||||||
hex_length = ACPI_MUL_2(data_width);
|
hex_length = (data_width * 2);
|
||||||
for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) {
|
for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) {
|
||||||
|
|
||||||
/* Get one hex digit, most significant digits first */
|
/* Get one hex digit, most significant digits first */
|
||||||
|
@ -364,7 +364,8 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)
|
||||||
*
|
*
|
||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Convert an ACPI Object to a string
|
* DESCRIPTION: Convert an ACPI Object to a string. Supports both implicit
|
||||||
|
* and explicit conversions and related rules.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
@ -393,9 +394,11 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ACPI_EXPLICIT_CONVERT_DECIMAL:
|
case ACPI_EXPLICIT_CONVERT_DECIMAL:
|
||||||
|
/*
|
||||||
/* Make room for maximum decimal number */
|
* From to_decimal_string, integer source.
|
||||||
|
*
|
||||||
|
* Make room for the maximum decimal number size
|
||||||
|
*/
|
||||||
string_length = ACPI_MAX_DECIMAL_DIGITS;
|
string_length = ACPI_MAX_DECIMAL_DIGITS;
|
||||||
base = 10;
|
base = 10;
|
||||||
break;
|
break;
|
||||||
|
@ -440,8 +443,10 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by to_decimal_string */
|
case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by to_decimal_string */
|
||||||
/*
|
/*
|
||||||
* From ACPI: "If Data is a buffer, it is converted to a string of
|
* Explicit conversion from the to_decimal_string ASL operator.
|
||||||
* decimal values separated by commas."
|
*
|
||||||
|
* From ACPI: "If the input is a buffer, it is converted to a
|
||||||
|
* a string of decimal values separated by commas."
|
||||||
*/
|
*/
|
||||||
base = 10;
|
base = 10;
|
||||||
|
|
||||||
|
@ -462,20 +467,29 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
|
||||||
|
|
||||||
case ACPI_IMPLICIT_CONVERT_HEX:
|
case ACPI_IMPLICIT_CONVERT_HEX:
|
||||||
/*
|
/*
|
||||||
|
* Implicit buffer-to-string conversion
|
||||||
|
*
|
||||||
* From the ACPI spec:
|
* From the ACPI spec:
|
||||||
*"The entire contents of the buffer are converted to a string of
|
* "The entire contents of the buffer are converted to a string of
|
||||||
* two-character hexadecimal numbers, each separated by a space."
|
* two-character hexadecimal numbers, each separated by a space."
|
||||||
|
*
|
||||||
|
* Each hex number is prefixed with 0x (11/2018)
|
||||||
*/
|
*/
|
||||||
separator = ' ';
|
separator = ' ';
|
||||||
string_length = (obj_desc->buffer.length * 3);
|
string_length = (obj_desc->buffer.length * 5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_EXPLICIT_CONVERT_HEX: /* Used by to_hex_string */
|
case ACPI_EXPLICIT_CONVERT_HEX:
|
||||||
/*
|
/*
|
||||||
|
* Explicit conversion from the to_hex_string ASL operator.
|
||||||
|
*
|
||||||
* From ACPI: "If Data is a buffer, it is converted to a string of
|
* From ACPI: "If Data is a buffer, it is converted to a string of
|
||||||
* hexadecimal values separated by commas."
|
* hexadecimal values separated by commas."
|
||||||
|
*
|
||||||
|
* Each hex number is prefixed with 0x (11/2018)
|
||||||
*/
|
*/
|
||||||
string_length = (obj_desc->buffer.length * 3);
|
separator = ',';
|
||||||
|
string_length = (obj_desc->buffer.length * 5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -504,10 +518,21 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
|
||||||
* (separated by commas or spaces)
|
* (separated by commas or spaces)
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < obj_desc->buffer.length; i++) {
|
for (i = 0; i < obj_desc->buffer.length; i++) {
|
||||||
|
if (base == 16) {
|
||||||
|
|
||||||
|
/* Emit 0x prefix for explict/implicit hex conversion */
|
||||||
|
|
||||||
|
*new_buf++ = '0';
|
||||||
|
*new_buf++ = 'x';
|
||||||
|
}
|
||||||
|
|
||||||
new_buf += acpi_ex_convert_to_ascii((u64) obj_desc->
|
new_buf += acpi_ex_convert_to_ascii((u64) obj_desc->
|
||||||
buffer.pointer[i],
|
buffer.pointer[i],
|
||||||
base, new_buf, 1);
|
base, new_buf, 1);
|
||||||
*new_buf++ = separator; /* each separated by a comma or space */
|
|
||||||
|
/* Each digit is separated by either a comma or space */
|
||||||
|
|
||||||
|
*new_buf++ = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#define _COMPONENT ACPI_EXECUTER
|
#define _COMPONENT ACPI_EXECUTER
|
||||||
ACPI_MODULE_NAME("excreate")
|
ACPI_MODULE_NAME("excreate")
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ex_create_alias
|
* FUNCTION: acpi_ex_create_alias
|
||||||
|
@ -390,7 +389,6 @@ acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state)
|
||||||
acpi_ut_remove_reference(obj_desc);
|
acpi_ut_remove_reference(obj_desc);
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
@ -287,9 +287,9 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
|
||||||
* NOTE: A length of zero is ok, and will create a zero-length, null
|
* NOTE: A length of zero is ok, and will create a zero-length, null
|
||||||
* terminated string.
|
* terminated string.
|
||||||
*/
|
*/
|
||||||
while ((length < operand[0]->buffer.length) &&
|
while ((length < operand[0]->buffer.length) && /* Length of input buffer */
|
||||||
(length < operand[1]->integer.value) &&
|
(length < operand[1]->integer.value) && /* Length operand */
|
||||||
(operand[0]->buffer.pointer[length])) {
|
(operand[0]->buffer.pointer[length])) { /* Null terminator */
|
||||||
length++;
|
length++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -311,6 +311,7 @@ acpi_ex_system_io_space_handler(u32 function,
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ACPI_PCI_CONFIGURED
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ex_pci_config_space_handler
|
* FUNCTION: acpi_ex_pci_config_space_handler
|
||||||
|
@ -387,6 +388,7 @@ acpi_ex_pci_config_space_handler(u32 function,
|
||||||
|
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
@ -420,6 +422,7 @@ acpi_ex_cmos_space_handler(u32 function,
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ACPI_PCI_CONFIGURED
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ex_pci_bar_space_handler
|
* FUNCTION: acpi_ex_pci_bar_space_handler
|
||||||
|
@ -451,6 +454,7 @@ acpi_ex_pci_bar_space_handler(u32 function,
|
||||||
|
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
@ -244,6 +244,7 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
u32 buffer_length;
|
u32 buffer_length;
|
||||||
|
u32 data_length;
|
||||||
void *buffer;
|
void *buffer;
|
||||||
union acpi_operand_object *buffer_desc;
|
union acpi_operand_object *buffer_desc;
|
||||||
u32 function;
|
u32 function;
|
||||||
|
@ -324,8 +325,9 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
|
||||||
/* Copy the input buffer data to the transfer buffer */
|
/* Copy the input buffer data to the transfer buffer */
|
||||||
|
|
||||||
buffer = buffer_desc->buffer.pointer;
|
buffer = buffer_desc->buffer.pointer;
|
||||||
memcpy(buffer, source_desc->buffer.pointer,
|
data_length = (buffer_length < source_desc->buffer.length ?
|
||||||
min(buffer_length, source_desc->buffer.length));
|
buffer_length : source_desc->buffer.length);
|
||||||
|
memcpy(buffer, source_desc->buffer.pointer, data_length);
|
||||||
|
|
||||||
/* Lock entire transaction if requested */
|
/* Lock entire transaction if requested */
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ ACPI_MODULE_NAME("exutils")
|
||||||
/* Local prototypes */
|
/* Local prototypes */
|
||||||
static u32 acpi_ex_digits_needed(u64 value, u32 base);
|
static u32 acpi_ex_digits_needed(u64 value, u32 base);
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ex_enter_interpreter
|
* FUNCTION: acpi_ex_enter_interpreter
|
||||||
|
@ -409,5 +408,3 @@ u8 acpi_is_valid_space_id(u8 space_id)
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -267,6 +267,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
|
||||||
acpi_object_type this_search_type;
|
acpi_object_type this_search_type;
|
||||||
u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
|
u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
|
||||||
u32 local_flags;
|
u32 local_flags;
|
||||||
|
acpi_interpreter_mode local_interpreter_mode;
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(ns_lookup);
|
ACPI_FUNCTION_TRACE(ns_lookup);
|
||||||
|
|
||||||
|
@ -506,6 +507,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
|
||||||
*/
|
*/
|
||||||
this_search_type = ACPI_TYPE_ANY;
|
this_search_type = ACPI_TYPE_ANY;
|
||||||
current_node = this_node;
|
current_node = this_node;
|
||||||
|
|
||||||
while (num_segments && current_node) {
|
while (num_segments && current_node) {
|
||||||
num_segments--;
|
num_segments--;
|
||||||
if (!num_segments) {
|
if (!num_segments) {
|
||||||
|
@ -536,6 +538,16 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle opcodes that create a new name_seg via a full name_path */
|
||||||
|
|
||||||
|
local_interpreter_mode = interpreter_mode;
|
||||||
|
if ((flags & ACPI_NS_PREFIX_MUST_EXIST) && (num_segments > 0)) {
|
||||||
|
|
||||||
|
/* Every element of the path must exist (except for the final name_seg) */
|
||||||
|
|
||||||
|
local_interpreter_mode = ACPI_IMODE_EXECUTE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Extract one ACPI name from the front of the pathname */
|
/* Extract one ACPI name from the front of the pathname */
|
||||||
|
|
||||||
ACPI_MOVE_32_TO_32(&simple_name, path);
|
ACPI_MOVE_32_TO_32(&simple_name, path);
|
||||||
|
@ -544,12 +556,19 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
|
||||||
|
|
||||||
status =
|
status =
|
||||||
acpi_ns_search_and_enter(simple_name, walk_state,
|
acpi_ns_search_and_enter(simple_name, walk_state,
|
||||||
current_node, interpreter_mode,
|
current_node,
|
||||||
|
local_interpreter_mode,
|
||||||
this_search_type, local_flags,
|
this_search_type, local_flags,
|
||||||
&this_node);
|
&this_node);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
if (status == AE_NOT_FOUND) {
|
if (status == AE_NOT_FOUND) {
|
||||||
|
#if !defined ACPI_ASL_COMPILER /* Note: iASL reports this error by itself, not needed here */
|
||||||
|
if (flags & ACPI_NS_PREFIX_MUST_EXIST) {
|
||||||
|
acpi_os_printf(ACPI_MSG_BIOS_ERROR
|
||||||
|
"Object does not exist: %4.4s\n",
|
||||||
|
&simple_name);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* Name not found in ACPI namespace */
|
/* Name not found in ACPI namespace */
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
|
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
|
||||||
|
|
|
@ -104,6 +104,13 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)
|
||||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Optional object evaluation log */
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,
|
||||||
|
"%-26s: %s (%s)\n", " Enter evaluation",
|
||||||
|
&info->full_pathname[1],
|
||||||
|
acpi_ut_get_type_name(info->node->type)));
|
||||||
|
|
||||||
/* Count the number of arguments being passed in */
|
/* Count the number of arguments being passed in */
|
||||||
|
|
||||||
info->param_count = 0;
|
info->param_count = 0;
|
||||||
|
@ -289,6 +296,12 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)
|
||||||
info->relative_pathname));
|
info->relative_pathname));
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
/* Optional object evaluation log */
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,
|
||||||
|
"%-26s: %s\n", " Exit evaluation",
|
||||||
|
&info->full_pathname[1]));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Namespace was unlocked by the handling acpi_ns* function, so we
|
* Namespace was unlocked by the handling acpi_ns* function, so we
|
||||||
* just free the pathname and return
|
* just free the pathname and return
|
||||||
|
|
|
@ -24,7 +24,6 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle);
|
||||||
static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle);
|
static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ns_load_table
|
* FUNCTION: acpi_ns_load_table
|
||||||
|
@ -297,4 +296,3 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle)
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
|
@ -107,8 +107,20 @@ acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Optional object evaluation log */
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,
|
||||||
|
"%-26s: (Definition Block level)\n",
|
||||||
|
"Module-level evaluation"));
|
||||||
|
|
||||||
status = acpi_ps_execute_table(info);
|
status = acpi_ps_execute_table(info);
|
||||||
|
|
||||||
|
/* Optional object evaluation log */
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,
|
||||||
|
"%-26s: (Definition Block level)\n",
|
||||||
|
"Module-level complete"));
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (info) {
|
if (info) {
|
||||||
ACPI_FREE(info->full_pathname);
|
ACPI_FREE(info->full_pathname);
|
||||||
|
|
|
@ -428,7 +428,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
|
||||||
parser_state = &walk_state->parser_state;
|
parser_state = &walk_state->parser_state;
|
||||||
walk_state->arg_types = 0;
|
walk_state->arg_types = 0;
|
||||||
|
|
||||||
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
|
#ifndef ACPI_CONSTANT_EVAL_ONLY
|
||||||
|
|
||||||
if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) {
|
if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) {
|
||||||
|
|
||||||
|
@ -508,7 +508,8 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
|
||||||
*/
|
*/
|
||||||
if ((walk_state->
|
if ((walk_state->
|
||||||
parse_flags & ACPI_PARSE_MODULE_LEVEL)
|
parse_flags & ACPI_PARSE_MODULE_LEVEL)
|
||||||
&& status == AE_ALREADY_EXISTS) {
|
&& ((status == AE_ALREADY_EXISTS)
|
||||||
|
|| (status == AE_NOT_FOUND))) {
|
||||||
status = AE_OK;
|
status = AE_OK;
|
||||||
}
|
}
|
||||||
if (status == AE_CTRL_PARSE_CONTINUE) {
|
if (status == AE_CTRL_PARSE_CONTINUE) {
|
||||||
|
@ -537,10 +538,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
|
||||||
* the scope op because the parse failure indicates that
|
* the scope op because the parse failure indicates that
|
||||||
* the device may not exist.
|
* the device may not exist.
|
||||||
*/
|
*/
|
||||||
ACPI_ERROR((AE_INFO,
|
ACPI_INFO(("Skipping parse of AML opcode: %s (0x%4.4X)", acpi_ps_get_opcode_name(walk_state->opcode), walk_state->opcode));
|
||||||
"Skip parsing opcode %s",
|
|
||||||
acpi_ps_get_opcode_name
|
|
||||||
(walk_state->opcode)));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine the opcode length before skipping the opcode.
|
* Determine the opcode length before skipping the opcode.
|
||||||
|
|
|
@ -600,8 +600,7 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
|
||||||
* because there could be correct AML beyond the parts that caused
|
* because there could be correct AML beyond the parts that caused
|
||||||
* the runtime error.
|
* the runtime error.
|
||||||
*/
|
*/
|
||||||
ACPI_ERROR((AE_INFO,
|
ACPI_INFO(("Ignoring error and continuing table load"));
|
||||||
"Ignore error and continue table load"));
|
|
||||||
return_ACPI_STATUS(AE_OK);
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
|
|
|
@ -479,6 +479,21 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
|
||||||
"Completed one call to walk loop, %s State=%p\n",
|
"Completed one call to walk loop, %s State=%p\n",
|
||||||
acpi_format_exception(status), walk_state));
|
acpi_format_exception(status), walk_state));
|
||||||
|
|
||||||
|
if (walk_state->method_pathname && walk_state->method_is_nested) {
|
||||||
|
|
||||||
|
/* Optional object evaluation log */
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,
|
||||||
|
"%-26s: %*s%s\n",
|
||||||
|
" Exit nested method",
|
||||||
|
(walk_state->
|
||||||
|
method_nesting_depth + 1) * 3,
|
||||||
|
" ",
|
||||||
|
&walk_state->method_pathname[1]));
|
||||||
|
|
||||||
|
ACPI_FREE(walk_state->method_pathname);
|
||||||
|
walk_state->method_is_nested = FALSE;
|
||||||
|
}
|
||||||
if (status == AE_CTRL_TRANSFER) {
|
if (status == AE_CTRL_TRANSFER) {
|
||||||
/*
|
/*
|
||||||
* A method call was detected.
|
* A method call was detected.
|
||||||
|
|
|
@ -147,6 +147,9 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
walk_state->method_pathname = info->full_pathname;
|
||||||
|
walk_state->method_is_nested = FALSE;
|
||||||
|
|
||||||
if (info->obj_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL) {
|
if (info->obj_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL) {
|
||||||
walk_state->parse_flags |= ACPI_PARSE_MODULE_LEVEL;
|
walk_state->parse_flags |= ACPI_PARSE_MODULE_LEVEL;
|
||||||
}
|
}
|
||||||
|
@ -267,6 +270,9 @@ acpi_status acpi_ps_execute_table(struct acpi_evaluate_info *info)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
walk_state->method_pathname = info->full_pathname;
|
||||||
|
walk_state->method_is_nested = FALSE;
|
||||||
|
|
||||||
if (info->obj_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL) {
|
if (info->obj_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL) {
|
||||||
walk_state->parse_flags |= ACPI_PARSE_MODULE_LEVEL;
|
walk_state->parse_flags |= ACPI_PARSE_MODULE_LEVEL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,10 +83,7 @@ const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = {
|
||||||
{"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR(char, 2)},
|
{"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR(char, 2)},
|
||||||
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
||||||
{"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR(char, 1)},
|
{"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR(char, 1)},
|
||||||
|
|
||||||
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
|
||||||
{"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR(char, 1)},
|
{"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR(char, 1)},
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Table terminator */
|
/* Table terminator */
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,8 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
|
||||||
if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) ||
|
if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) ||
|
||||||
ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) ||
|
ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) ||
|
||||||
ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT) ||
|
ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT) ||
|
||||||
ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT)) {
|
ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT) ||
|
||||||
|
ACPI_IS_OEM_SIG(table->signature)) {
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,8 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = {
|
||||||
{"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */
|
{"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */
|
||||||
{"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */
|
{"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */
|
||||||
{"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */
|
{"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */
|
||||||
|
{"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */
|
||||||
|
{"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */
|
||||||
|
|
||||||
/* Feature Group Strings */
|
/* Feature Group Strings */
|
||||||
|
|
||||||
|
|
|
@ -607,17 +607,7 @@ static int available_error_type_show(struct seq_file *m, void *v)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int available_error_type_open(struct inode *inode, struct file *file)
|
DEFINE_SHOW_ATTRIBUTE(available_error_type);
|
||||||
{
|
|
||||||
return single_open(file, available_error_type_show, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct file_operations available_error_type_fops = {
|
|
||||||
.open = available_error_type_open,
|
|
||||||
.read = seq_read,
|
|
||||||
.llseek = seq_lseek,
|
|
||||||
.release = single_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int error_type_get(void *data, u64 *val)
|
static int error_type_get(void *data, u64 *val)
|
||||||
{
|
{
|
||||||
|
|
|
@ -691,6 +691,8 @@ static void __ghes_panic(struct ghes *ghes)
|
||||||
{
|
{
|
||||||
__ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus);
|
__ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus);
|
||||||
|
|
||||||
|
ghes_clear_estatus(ghes);
|
||||||
|
|
||||||
/* reboot to log the error! */
|
/* reboot to log the error! */
|
||||||
if (!panic_timeout)
|
if (!panic_timeout)
|
||||||
panic_timeout = ghes_panic_timeout;
|
panic_timeout = ghes_panic_timeout;
|
||||||
|
|
|
@ -1435,8 +1435,14 @@ dev_put:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool __init iort_enable_acs(struct acpi_iort_node *iort_node)
|
#ifdef CONFIG_PCI
|
||||||
|
static void __init iort_enable_acs(struct acpi_iort_node *iort_node)
|
||||||
{
|
{
|
||||||
|
static bool acs_enabled __initdata;
|
||||||
|
|
||||||
|
if (acs_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
if (iort_node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
|
if (iort_node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
|
||||||
struct acpi_iort_node *parent;
|
struct acpi_iort_node *parent;
|
||||||
struct acpi_iort_id_mapping *map;
|
struct acpi_iort_id_mapping *map;
|
||||||
|
@ -1458,13 +1464,15 @@ static bool __init iort_enable_acs(struct acpi_iort_node *iort_node)
|
||||||
if ((parent->type == ACPI_IORT_NODE_SMMU) ||
|
if ((parent->type == ACPI_IORT_NODE_SMMU) ||
|
||||||
(parent->type == ACPI_IORT_NODE_SMMU_V3)) {
|
(parent->type == ACPI_IORT_NODE_SMMU_V3)) {
|
||||||
pci_request_acs();
|
pci_request_acs();
|
||||||
return true;
|
acs_enabled = true;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void iort_enable_acs(struct acpi_iort_node *iort_node) { }
|
||||||
|
#endif
|
||||||
|
|
||||||
static void __init iort_init_platform_devices(void)
|
static void __init iort_init_platform_devices(void)
|
||||||
{
|
{
|
||||||
|
@ -1472,7 +1480,6 @@ static void __init iort_init_platform_devices(void)
|
||||||
struct acpi_table_iort *iort;
|
struct acpi_table_iort *iort;
|
||||||
struct fwnode_handle *fwnode;
|
struct fwnode_handle *fwnode;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
bool acs_enabled = false;
|
|
||||||
const struct iort_dev_config *ops;
|
const struct iort_dev_config *ops;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1493,8 +1500,7 @@ static void __init iort_init_platform_devices(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!acs_enabled)
|
iort_enable_acs(iort_node);
|
||||||
acs_enabled = iort_enable_acs(iort_node);
|
|
||||||
|
|
||||||
ops = iort_get_dev_cfg(iort_node);
|
ops = iort_get_dev_cfg(iort_node);
|
||||||
if (ops) {
|
if (ops) {
|
||||||
|
|
|
@ -25,8 +25,13 @@ int acpi_osi_init(void);
|
||||||
acpi_status acpi_os_initialize1(void);
|
acpi_status acpi_os_initialize1(void);
|
||||||
void init_acpi_device_notify(void);
|
void init_acpi_device_notify(void);
|
||||||
int acpi_scan_init(void);
|
int acpi_scan_init(void);
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
void acpi_pci_root_init(void);
|
void acpi_pci_root_init(void);
|
||||||
void acpi_pci_link_init(void);
|
void acpi_pci_link_init(void);
|
||||||
|
#else
|
||||||
|
static inline void acpi_pci_root_init(void) {}
|
||||||
|
static inline void acpi_pci_link_init(void) {}
|
||||||
|
#endif
|
||||||
void acpi_processor_init(void);
|
void acpi_processor_init(void);
|
||||||
void acpi_platform_init(void);
|
void acpi_platform_init(void);
|
||||||
void acpi_pnp_init(void);
|
void acpi_pnp_init(void);
|
||||||
|
|
|
@ -74,6 +74,13 @@ osi_setup_entries[OSI_STRING_ENTRIES_MAX] __initdata = {
|
||||||
* a BIOS workaround.
|
* a BIOS workaround.
|
||||||
*/
|
*/
|
||||||
{"Linux-Lenovo-NV-HDMI-Audio", true},
|
{"Linux-Lenovo-NV-HDMI-Audio", true},
|
||||||
|
/*
|
||||||
|
* Linux-HPI-Hybrid-Graphics is used by BIOS to enable dGPU to
|
||||||
|
* output video directly to external monitors on HP Inc. mobile
|
||||||
|
* workstations as Nvidia and AMD VGA drivers provide limited
|
||||||
|
* hybrid graphics supports.
|
||||||
|
*/
|
||||||
|
{"Linux-HPI-Hybrid-Graphics", true},
|
||||||
};
|
};
|
||||||
|
|
||||||
static u32 acpi_osi_handler(acpi_string interface, u32 supported)
|
static u32 acpi_osi_handler(acpi_string interface, u32 supported)
|
||||||
|
|
|
@ -769,6 +769,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u64 value, u32 width)
|
||||||
return AE_OK;
|
return AE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
|
acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
|
||||||
u64 *value, u32 width)
|
u64 *value, u32 width)
|
||||||
|
@ -827,6 +828,7 @@ acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
|
||||||
|
|
||||||
return (result ? AE_ERROR : AE_OK);
|
return (result ? AE_ERROR : AE_OK);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void acpi_os_execute_deferred(struct work_struct *work)
|
static void acpi_os_execute_deferred(struct work_struct *work)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,35 @@
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <acpi/reboot.h>
|
#include <acpi/reboot.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
|
static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
|
||||||
|
{
|
||||||
|
unsigned int devfn;
|
||||||
|
struct pci_bus *bus0;
|
||||||
|
|
||||||
|
/* The reset register can only live on bus 0. */
|
||||||
|
bus0 = pci_find_bus(0, 0);
|
||||||
|
if (!bus0)
|
||||||
|
return;
|
||||||
|
/* Form PCI device/function pair. */
|
||||||
|
devfn = PCI_DEVFN((rr->address >> 32) & 0xffff,
|
||||||
|
(rr->address >> 16) & 0xffff);
|
||||||
|
pr_debug("Resetting with ACPI PCI RESET_REG.\n");
|
||||||
|
/* Write the value that resets us. */
|
||||||
|
pci_bus_write_config_byte(bus0, devfn,
|
||||||
|
(rr->address & 0xffff), reset_value);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void acpi_pci_reboot(struct acpi_generic_address *rr,
|
||||||
|
u8 reset_value)
|
||||||
|
{
|
||||||
|
pr_warn_once("PCI configuration space access is not supported\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void acpi_reboot(void)
|
void acpi_reboot(void)
|
||||||
{
|
{
|
||||||
struct acpi_generic_address *rr;
|
struct acpi_generic_address *rr;
|
||||||
struct pci_bus *bus0;
|
|
||||||
unsigned int devfn;
|
|
||||||
u8 reset_value;
|
u8 reset_value;
|
||||||
|
|
||||||
if (acpi_disabled)
|
if (acpi_disabled)
|
||||||
|
@ -33,17 +57,7 @@ void acpi_reboot(void)
|
||||||
* on a device on bus 0. */
|
* on a device on bus 0. */
|
||||||
switch (rr->space_id) {
|
switch (rr->space_id) {
|
||||||
case ACPI_ADR_SPACE_PCI_CONFIG:
|
case ACPI_ADR_SPACE_PCI_CONFIG:
|
||||||
/* The reset register can only live on bus 0. */
|
acpi_pci_reboot(rr, reset_value);
|
||||||
bus0 = pci_find_bus(0, 0);
|
|
||||||
if (!bus0)
|
|
||||||
return;
|
|
||||||
/* Form PCI device/function pair. */
|
|
||||||
devfn = PCI_DEVFN((rr->address >> 32) & 0xffff,
|
|
||||||
(rr->address >> 16) & 0xffff);
|
|
||||||
printk(KERN_DEBUG "Resetting with ACPI PCI RESET_REG.\n");
|
|
||||||
/* Write the value that resets us. */
|
|
||||||
pci_bus_write_config_byte(bus0, devfn,
|
|
||||||
(rr->address & 0xffff), reset_value);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||||
|
|
|
@ -148,6 +148,13 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (table->baud_rate) {
|
switch (table->baud_rate) {
|
||||||
|
case 0:
|
||||||
|
/*
|
||||||
|
* SPCR 1.04 defines 0 as a preconfigured state of UART.
|
||||||
|
* Assume firmware or bootloader configures console correctly.
|
||||||
|
*/
|
||||||
|
baud_rate = 0;
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
baud_rate = 9600;
|
baud_rate = 9600;
|
||||||
break;
|
break;
|
||||||
|
@ -196,6 +203,10 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
|
||||||
* UART so don't attempt to change to the baud rate state
|
* UART so don't attempt to change to the baud rate state
|
||||||
* in the table because driver cannot calculate the dividers
|
* in the table because driver cannot calculate the dividers
|
||||||
*/
|
*/
|
||||||
|
baud_rate = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!baud_rate) {
|
||||||
snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype,
|
snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype,
|
||||||
table->serial_port.address);
|
table->serial_port.address);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -712,6 +712,11 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table,
|
||||||
table_length);
|
table_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ACPI_CUSTOM_DSDT
|
||||||
|
static void *amlcode __attribute__ ((weakref("AmlCode")));
|
||||||
|
static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code")));
|
||||||
|
#endif
|
||||||
|
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_os_table_override(struct acpi_table_header *existing_table,
|
acpi_os_table_override(struct acpi_table_header *existing_table,
|
||||||
struct acpi_table_header **new_table)
|
struct acpi_table_header **new_table)
|
||||||
|
@ -722,8 +727,11 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
|
||||||
*new_table = NULL;
|
*new_table = NULL;
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_CUSTOM_DSDT
|
#ifdef CONFIG_ACPI_CUSTOM_DSDT
|
||||||
if (strncmp(existing_table->signature, "DSDT", 4) == 0)
|
if (!strncmp(existing_table->signature, "DSDT", 4)) {
|
||||||
*new_table = (struct acpi_table_header *)AmlCode;
|
*new_table = (struct acpi_table_header *)&amlcode;
|
||||||
|
if (!(*new_table))
|
||||||
|
*new_table = (struct acpi_table_header *)&dsdt_amlcode;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (*new_table != NULL)
|
if (*new_table != NULL)
|
||||||
acpi_table_taint(existing_table);
|
acpi_table_taint(existing_table);
|
||||||
|
|
|
@ -11,6 +11,7 @@ ifdef CONFIG_PCI
|
||||||
obj-$(CONFIG_PROC_FS) += proc.o
|
obj-$(CONFIG_PROC_FS) += proc.o
|
||||||
obj-$(CONFIG_SYSFS) += slot.o
|
obj-$(CONFIG_SYSFS) += slot.o
|
||||||
obj-$(CONFIG_OF) += of.o
|
obj-$(CONFIG_OF) += of.o
|
||||||
|
obj-$(CONFIG_ACPI) += pci-acpi.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_PCI_QUIRKS) += quirks.o
|
obj-$(CONFIG_PCI_QUIRKS) += quirks.o
|
||||||
|
@ -20,7 +21,6 @@ obj-$(CONFIG_PCI_MSI) += msi.o
|
||||||
obj-$(CONFIG_PCI_ATS) += ats.o
|
obj-$(CONFIG_PCI_ATS) += ats.o
|
||||||
obj-$(CONFIG_PCI_IOV) += iov.o
|
obj-$(CONFIG_PCI_IOV) += iov.o
|
||||||
obj-$(CONFIG_PCI_BRIDGE_EMUL) += pci-bridge-emul.o
|
obj-$(CONFIG_PCI_BRIDGE_EMUL) += pci-bridge-emul.o
|
||||||
obj-$(CONFIG_ACPI) += pci-acpi.o
|
|
||||||
obj-$(CONFIG_PCI_LABEL) += pci-label.o
|
obj-$(CONFIG_PCI_LABEL) += pci-label.o
|
||||||
obj-$(CONFIG_X86_INTEL_MID) += pci-mid.o
|
obj-$(CONFIG_X86_INTEL_MID) += pci-mid.o
|
||||||
obj-$(CONFIG_PCI_SYSCALL) += syscall.o
|
obj-$(CONFIG_PCI_SYSCALL) += syscall.o
|
||||||
|
|
|
@ -73,7 +73,8 @@
|
||||||
#define ACPI_LV_RESOURCES 0x00010000
|
#define ACPI_LV_RESOURCES 0x00010000
|
||||||
#define ACPI_LV_USER_REQUESTS 0x00020000
|
#define ACPI_LV_USER_REQUESTS 0x00020000
|
||||||
#define ACPI_LV_PACKAGE 0x00040000
|
#define ACPI_LV_PACKAGE 0x00040000
|
||||||
#define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS
|
#define ACPI_LV_EVALUATION 0x00080000
|
||||||
|
#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS
|
||||||
|
|
||||||
/* Trace verbosity level 2 [Function tracing and memory allocation] */
|
/* Trace verbosity level 2 [Function tracing and memory allocation] */
|
||||||
|
|
||||||
|
@ -141,6 +142,7 @@
|
||||||
#define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS)
|
#define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS)
|
||||||
#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
|
#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
|
||||||
#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
|
#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
|
||||||
|
#define ACPI_DB_EVALUATION ACPI_DEBUG_LEVEL (ACPI_LV_EVALUATION)
|
||||||
#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
|
#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
|
||||||
#define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
|
#define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
|
||||||
|
|
||||||
|
@ -148,7 +150,7 @@
|
||||||
|
|
||||||
/* Defaults for debug_level, debug and normal */
|
/* Defaults for debug_level, debug and normal */
|
||||||
|
|
||||||
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR)
|
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_EVALUATION | ACPI_LV_REPAIR)
|
||||||
#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR)
|
#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR)
|
||||||
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
|
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,14 @@ int acpi_pci_link_free_irq(acpi_handle handle);
|
||||||
|
|
||||||
struct pci_bus;
|
struct pci_bus;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
struct pci_dev *acpi_get_pci_dev(acpi_handle);
|
struct pci_dev *acpi_get_pci_dev(acpi_handle);
|
||||||
|
#else
|
||||||
|
static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Arch-defined function to add a bus to the system */
|
/* Arch-defined function to add a bus to the system */
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||||
|
|
||||||
#define ACPI_CA_VERSION 0x20181003
|
#define ACPI_CA_VERSION 0x20181213
|
||||||
|
|
||||||
#include <acpi/acconfig.h>
|
#include <acpi/acconfig.h>
|
||||||
#include <acpi/actypes.h>
|
#include <acpi/actypes.h>
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */
|
#define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */
|
||||||
#define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */
|
#define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */
|
||||||
#define ACPI_RSDP_NAME "RSDP" /* Short name for RSDP, not signature */
|
#define ACPI_RSDP_NAME "RSDP" /* Short name for RSDP, not signature */
|
||||||
|
#define ACPI_OEM_NAME "OEM" /* Short name for OEM, not signature */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All tables and structures must be byte-packed to match the ACPI
|
* All tables and structures must be byte-packed to match the ACPI
|
||||||
|
|
|
@ -365,6 +365,29 @@ struct acpi_table_tcpa_server {
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* Revision 3 */
|
||||||
|
|
||||||
|
struct acpi_table_tpm23 {
|
||||||
|
struct acpi_table_header header; /* Common ACPI table header */
|
||||||
|
u32 reserved;
|
||||||
|
u64 control_address;
|
||||||
|
u32 start_method;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Value for start_method above */
|
||||||
|
|
||||||
|
#define ACPI_TPM23_ACPI_START_METHOD 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Optional trailer for revision 3. If start method is 2, there is a 4 byte
|
||||||
|
* reserved area of all zeros.
|
||||||
|
*/
|
||||||
|
struct acpi_tmp23_trailer {
|
||||||
|
u32 reserved;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Revision 4 */
|
||||||
|
|
||||||
struct acpi_table_tpm2 {
|
struct acpi_table_tpm2 {
|
||||||
struct acpi_table_header header; /* Common ACPI table header */
|
struct acpi_table_header header; /* Common ACPI table header */
|
||||||
u16 platform_class;
|
u16 platform_class;
|
||||||
|
|
|
@ -527,6 +527,10 @@ typedef u64 acpi_integer;
|
||||||
#define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8))
|
#define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8))
|
||||||
#define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8))
|
#define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8))
|
||||||
|
|
||||||
|
/* Support for OEMx signature (x can be any character) */
|
||||||
|
#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\
|
||||||
|
strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Algorithm to obtain access bit width.
|
* Algorithm to obtain access bit width.
|
||||||
* Can be used with access_width of struct acpi_generic_address and access_size of
|
* Can be used with access_width of struct acpi_generic_address and access_size of
|
||||||
|
@ -1273,6 +1277,8 @@ typedef enum {
|
||||||
#define ACPI_OSI_WIN_10_RS1 0x0E
|
#define ACPI_OSI_WIN_10_RS1 0x0E
|
||||||
#define ACPI_OSI_WIN_10_RS2 0x0F
|
#define ACPI_OSI_WIN_10_RS2 0x0F
|
||||||
#define ACPI_OSI_WIN_10_RS3 0x10
|
#define ACPI_OSI_WIN_10_RS3 0x10
|
||||||
|
#define ACPI_OSI_WIN_10_RS4 0x11
|
||||||
|
#define ACPI_OSI_WIN_10_RS5 0x12
|
||||||
|
|
||||||
/* Definitions of getopt */
|
/* Definitions of getopt */
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
|
|
||||||
/* Kernel specific ACPICA configuration */
|
/* Kernel specific ACPICA configuration */
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
|
#define ACPI_PCI_CONFIGURED
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY
|
#ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY
|
||||||
#define ACPI_REDUCED_HARDWARE 1
|
#define ACPI_REDUCED_HARDWARE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -101,7 +101,7 @@ static inline bool has_acpi_companion(struct device *dev)
|
||||||
static inline void acpi_preset_companion(struct device *dev,
|
static inline void acpi_preset_companion(struct device *dev,
|
||||||
struct acpi_device *parent, u64 addr)
|
struct acpi_device *parent, u64 addr)
|
||||||
{
|
{
|
||||||
ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL));
|
ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const char *acpi_dev_name(struct acpi_device *adev)
|
static inline const char *acpi_dev_name(struct acpi_device *adev)
|
||||||
|
@ -340,7 +340,14 @@ struct pci_dev;
|
||||||
int acpi_pci_irq_enable (struct pci_dev *dev);
|
int acpi_pci_irq_enable (struct pci_dev *dev);
|
||||||
void acpi_penalize_isa_irq(int irq, int active);
|
void acpi_penalize_isa_irq(int irq, int active);
|
||||||
bool acpi_isa_irq_available(int irq);
|
bool acpi_isa_irq_available(int irq);
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
void acpi_penalize_sci_irq(int irq, int trigger, int polarity);
|
void acpi_penalize_sci_irq(int irq, int trigger, int polarity);
|
||||||
|
#else
|
||||||
|
static inline void acpi_penalize_sci_irq(int irq, int trigger,
|
||||||
|
int polarity)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
void acpi_pci_irq_disable (struct pci_dev *dev);
|
void acpi_pci_irq_disable (struct pci_dev *dev);
|
||||||
|
|
||||||
extern int ec_read(u8 addr, u8 *val);
|
extern int ec_read(u8 addr, u8 *val);
|
||||||
|
|
|
@ -1960,7 +1960,11 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev,
|
||||||
enum pcie_reset_state state);
|
enum pcie_reset_state state);
|
||||||
int pcibios_add_device(struct pci_dev *dev);
|
int pcibios_add_device(struct pci_dev *dev);
|
||||||
void pcibios_release_device(struct pci_dev *dev);
|
void pcibios_release_device(struct pci_dev *dev);
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
void pcibios_penalize_isa_irq(int irq, int active);
|
void pcibios_penalize_isa_irq(int irq, int active);
|
||||||
|
#else
|
||||||
|
static inline void pcibios_penalize_isa_irq(int irq, int active) {}
|
||||||
|
#endif
|
||||||
int pcibios_alloc_irq(struct pci_dev *dev);
|
int pcibios_alloc_irq(struct pci_dev *dev);
|
||||||
void pcibios_free_irq(struct pci_dev *dev);
|
void pcibios_free_irq(struct pci_dev *dev);
|
||||||
resource_size_t pcibios_default_alignment(void);
|
resource_size_t pcibios_default_alignment(void);
|
||||||
|
|
|
@ -106,7 +106,7 @@ static int ap_insert_action(char *argument, u32 to_be_done)
|
||||||
|
|
||||||
current_action++;
|
current_action++;
|
||||||
if (current_action > AP_MAX_ACTIONS) {
|
if (current_action > AP_MAX_ACTIONS) {
|
||||||
fprintf(stderr, "Too many table options (max %u)\n",
|
fprintf(stderr, "Too many table options (max %d)\n",
|
||||||
AP_MAX_ACTIONS);
|
AP_MAX_ACTIONS);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче