summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorCliff Huang <cliff.huang@intel.com>2023-09-07 09:39:37 -0700
committerFelix Held <felix-coreboot@felixheld.de>2023-09-14 12:03:32 +0000
commit95e4ffe848d2304045ec44bcb8f71d104104d688 (patch)
tree0da31e9135cd3a773cc9814962596596905d9985 /src/drivers/intel
parent4c618cdd7967d258ced2680ea95a5fad9c271684 (diff)
acpi: Comply with ACPI specification by making _STR unicode strings
_STR should return Unicode string. From ACPI spec: 6.1.10 _STR (String) The _STR object evaluates to an Unicode string that describes the device or thermal zone. BUG=NA TEST=Check the changed _STR in SSDT to see if Unicode() macro is used Signed-off-by: Cliff Huang <cliff.huang@intel.com> Change-Id: I1f4b55a268c1dadbae456afe5821ae161b8e15a5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77695 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/dptf/dptf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c
index f616d759e8..71a4ec340d 100644
--- a/src/drivers/intel/dptf/dptf.c
+++ b/src/drivers/intel/dptf/dptf.c
@@ -112,7 +112,7 @@ static void dptf_write_generic_participant(const char *name,
acpigen_write_STA(sta_val);
if (str)
- acpigen_write_name_string("_STR", str);
+ acpigen_write_name_unicode("_STR", str);
acpigen_write_name_integer("PTYP", ptype);
@@ -143,7 +143,7 @@ static void write_fan(const struct drivers_intel_dptf_config *config,
acpigen_write_name("_HID");
dptf_write_hid(platform_info->use_eisa_hids, platform_info->fan_hid);
acpigen_write_name_integer("_UID", fan_uid++);
- acpigen_write_name_string("_STR", DEFAULT_FAN_STR);
+ acpigen_write_name_unicode("_STR", DEFAULT_FAN_STR);
acpigen_write_name_integer("PTYP", DPTF_GENERIC_PARTICIPANT_TYPE_FAN);
acpigen_write_STA(get_STA_value(config, participant));
acpigen_pop_len(); /* Device */
@@ -329,7 +329,7 @@ static void write_create_tpch(const struct dptf_platform_info *platform_info)
acpigen_write_device("TPCH");
acpigen_write_name("_HID");
dptf_write_hid(platform_info->use_eisa_hids, platform_info->tpch_device_hid);
- acpigen_write_name_string("_STR", DEFAULT_TPCH_STR);
+ acpigen_write_name_unicode("_STR", DEFAULT_TPCH_STR);
acpigen_write_name_integer("PTYP", DPTF_GENERIC_PARTICIPANT_TYPE_TPCH);
acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON);
}
@@ -402,7 +402,7 @@ static void write_create_tpwr(const struct drivers_intel_dptf_config *config,
if (platform_info->tpwr_device_hid != NULL)
dptf_write_hid(platform_info->use_eisa_hids, platform_info->tpwr_device_hid);
acpigen_write_name_string("_UID", "TPWR");
- acpigen_write_name_string("_STR", DEFAULT_POWER_STR);
+ acpigen_write_name_unicode("_STR", DEFAULT_POWER_STR);
acpigen_write_name_integer("PTYP", DPTF_GENERIC_PARTICIPANT_TYPE_POWER);
acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON);
@@ -429,7 +429,7 @@ static void write_create_tbat(const struct dptf_platform_info *platform_info)
if (platform_info->tbat_device_hid != NULL)
dptf_write_hid(platform_info->use_eisa_hids, platform_info->tbat_device_hid);
acpigen_write_name_string("_UID", "1");
- acpigen_write_name_string("_STR", DEFAULT_BATTERY_STR);
+ acpigen_write_name_unicode("_STR", DEFAULT_BATTERY_STR);
acpigen_write_name_integer("PTYP", DPTF_GENERIC_PARTICIPANT_TYPE_BATTERY);
acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON);
acpigen_write_device_end(); /* TBAT Battery Participant Device */