Unverified Commit be3a5f25 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!413 ACPI: Add Platform Runtime Mechanism(PRM) feature support

Merge Pull Request from: @aubrey-intel 
 
 **Content:** 
- In order to meet the massive industry wide push, Platform Runtime Mechanism
(PRM) provides means to reduce System Management Mode (SMM) foot print. PRM
introduces the capability of transitioning certain usages that were executed
out of SMM, to a code that executes with the OS/VMM context.
- There are 15 patches in total in this patch set to Add Platform Runtime
Mechanism(PRM) feature support in openEuler. 14 patches are from upstream
kernel and 1 patch is for the default kconfig change.

 **Intel-kernel issue:** 
- #I6HNB8

 **Passed Test:**
- OS kernel built and run the successfully on OpenEuler 22.03 LTS with and without ACPI PRMT support
- PRM sample handler was invoked successfully from user space and the content in ACPI parameter buffer was verified.

 **Known issue:**
- N/A

 **Default config change:**
```
CONFIG_ACPI_PRMT=y
CONFIG_ACPI_DEBUGGER=y
CONFIG_ACPI_DEBUGGER_USER=m
```

 **Specification Link:**
https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf 
 
Link:https://gitee.com/openeuler/kernel/pulls/413

 

Reviewed-by: default avatarJason Zeng <jason.zeng@intel.com>
Reviewed-by: default avatarAichun Shi <aichun.shi@intel.com>
Reviewed-by: default avatarLiu Chao <liuchao173@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 13a3df7a ab5e9b99
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -543,7 +543,8 @@ CONFIG_ACPI=y
CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
# CONFIG_ACPI_DEBUGGER is not set
CONFIG_ACPI_DEBUGGER=y
CONFIG_ACPI_DEBUGGER_USER=m
CONFIG_ACPI_SPCR_TABLE=y
CONFIG_ACPI_LPIT=y
CONFIG_ACPI_SLEEP=y
@@ -597,6 +598,7 @@ CONFIG_ACPI_ADXL=y
# CONFIG_ACPI_CONFIGFS is not set
CONFIG_PMIC_OPREGION=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_PRMT=y
CONFIG_SFI=y

#
+15 −0
Original line number Diff line number Diff line
@@ -538,3 +538,18 @@ config X86_PM_TIMER

	  You should nearly always say Y here because many modern
	  systems require this timer.

config ACPI_PRMT
	bool "Platform Runtime Mechanism Support"
	depends on EFI && X86_64
	default y
	help
	  Platform Runtime Mechanism (PRM) is a firmware interface exposing a
	  set of binary executables that can be called from the AML interpreter
	  or directly from device drivers.

	  Say Y to enable the AML interpreter to execute the PRM code.

	  While this feature is optional in principle, leaving it out may
	  substantially increase computational overhead related to the
	  initialization of some server systems.
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ acpi-y += acpi_lpat.o
acpi-$(CONFIG_ACPI_LPIT)	+= acpi_lpit.o
acpi-$(CONFIG_ACPI_GENERIC_GSI) += irq.o
acpi-$(CONFIG_ACPI_WATCHDOG)	+= acpi_watchdog.o
acpi-$(CONFIG_ACPI_PRMT)	+= prmt.o

# Address translation
acpi-$(CONFIG_ACPI_ADXL)	+= acpi_adxl.o
+2 −0
Original line number Diff line number Diff line
@@ -736,6 +736,8 @@ const char *acpi_ah_match_uuid(u8 *data);
 */
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer);

acpi_status acpi_ut_convert_uuid_to_string(char *uuid_buffer, char *out_string);
#endif

#endif				/* _ACUTILS_H */
+6 −2
Original line number Diff line number Diff line
@@ -139,7 +139,9 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
		    || obj_desc->field.region_obj->region.space_id ==
		    ACPI_ADR_SPACE_GSBUS
		    || obj_desc->field.region_obj->region.space_id ==
		    ACPI_ADR_SPACE_IPMI)) {
		    ACPI_ADR_SPACE_IPMI
		    || obj_desc->field.region_obj->region.space_id ==
		    ACPI_ADR_SPACE_PLATFORM_RT)) {

		/* SMBus, GSBus, IPMI serial */

@@ -301,7 +303,9 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
		    || obj_desc->field.region_obj->region.space_id ==
		    ACPI_ADR_SPACE_GSBUS
		    || obj_desc->field.region_obj->region.space_id ==
		    ACPI_ADR_SPACE_IPMI)) {
		    ACPI_ADR_SPACE_IPMI
		    || obj_desc->field.region_obj->region.space_id ==
		    ACPI_ADR_SPACE_PLATFORM_RT)) {

		/* SMBus, GSBus, IPMI serial */

Loading