Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Shyam Sundar S K and committed by
Ilpo Järvinen
ebc68a34 d82e3d2d

+16 -1
+11 -1
drivers/platform/x86/amd/pmf/pmf.h
··· 631 631 static const struct amd_pmf_pb_bitmap custom_bios_inputs[] __used = { 632 632 {"NOTIFY_CUSTOM_BIOS_INPUT1", BIT(5)}, 633 633 {"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)}, 634 642 }; 635 643 636 644 enum platform_type { ··· 722 714 u32 workload_type; 723 715 u32 display_type; 724 716 u32 display_state; 725 - u32 rsvd5[150]; 717 + u32 rsvd5_1[17]; 718 + u32 bios_input_2[8]; 719 + u32 rsvd5[125]; 726 720 }; 727 721 728 722 struct ta_pmf_load_policy_table {
+5
drivers/platform/x86/amd/pmf/spc.c
··· 75 75 switch (index) { 76 76 case 0 ... 1: 77 77 return in->ev_info.bios_input_1[index]; 78 + case 2 ... 9: 79 + return in->ev_info.bios_input_2[index - 2]; 78 80 default: 79 81 return 0; 80 82 } ··· 123 121 switch (index) { 124 122 case 0 ... 1: 125 123 in->ev_info.bios_input_1[index] = value; 124 + break; 125 + case 2 ... 9: 126 + in->ev_info.bios_input_2[index - 2] = value; 126 127 break; 127 128 default: 128 129 return;