Skip to content

Commit 454b3c9

Browse files
committed
platform/x86/amd/pmf: Extend custom BIOS inputs for more policies
JIRA: https://issues.redhat.com/browse/RHEL-73301 commit ebc68a3 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Mon Sep 1 16:31:34 2025 +0530 platform/x86/amd/pmf: Extend custom BIOS inputs for more policies The existing amd_pmf driver is limited to supporting just two custom BIOS inputs. However, with the updates to the latest PMF TA, there's a requirement to broaden this capacity to handle 10 inputs, aligning with the TA firmware's capabilities. The necessary logic should be implemented to facilitate this expansion of functionality. Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Tested-by: Yijun Shen <Yijun.Shen@Dell.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20250901110140.2519072-4-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Steve Best <sbest@redhat.com>
1 parent d0e9d80 commit 454b3c9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

drivers/platform/x86/amd/pmf/pmf.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,14 @@ struct amd_pmf_pb_bitmap {
631631
static const struct amd_pmf_pb_bitmap custom_bios_inputs[] __used = {
632632
{"NOTIFY_CUSTOM_BIOS_INPUT1", BIT(5)},
633633
{"NOTIFY_CUSTOM_BIOS_INPUT2", BIT(6)},
634+
{"NOTIFY_CUSTOM_BIOS_INPUT3", BIT(7)},
635+
{"NOTIFY_CUSTOM_BIOS_INPUT4", BIT(8)},
636+
{"NOTIFY_CUSTOM_BIOS_INPUT5", BIT(9)},
637+
{"NOTIFY_CUSTOM_BIOS_INPUT6", BIT(10)},
638+
{"NOTIFY_CUSTOM_BIOS_INPUT7", BIT(11)},
639+
{"NOTIFY_CUSTOM_BIOS_INPUT8", BIT(12)},
640+
{"NOTIFY_CUSTOM_BIOS_INPUT9", BIT(13)},
641+
{"NOTIFY_CUSTOM_BIOS_INPUT10", BIT(14)},
634642
};
635643

636644
enum platform_type {
@@ -714,7 +722,9 @@ struct ta_pmf_condition_info {
714722
u32 workload_type;
715723
u32 display_type;
716724
u32 display_state;
717-
u32 rsvd5[150];
725+
u32 rsvd5_1[17];
726+
u32 bios_input_2[8];
727+
u32 rsvd5[125];
718728
};
719729

720730
struct ta_pmf_load_policy_table {

drivers/platform/x86/amd/pmf/spc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ static u32 amd_pmf_get_ta_custom_bios_inputs(struct ta_pmf_enact_table *in, int
7575
switch (index) {
7676
case 0 ... 1:
7777
return in->ev_info.bios_input_1[index];
78+
case 2 ... 9:
79+
return in->ev_info.bios_input_2[index - 2];
7880
default:
7981
return 0;
8082
}
@@ -122,6 +124,9 @@ static void amd_pmf_set_ta_custom_bios_input(struct ta_pmf_enact_table *in, int
122124
case 0 ... 1:
123125
in->ev_info.bios_input_1[index] = value;
124126
break;
127+
case 2 ... 9:
128+
in->ev_info.bios_input_2[index - 2] = value;
129+
break;
125130
default:
126131
return;
127132
}

0 commit comments

Comments
 (0)