Debian Codegraph @

src/soc/amd/common/block/psp/Kconfig

raw
1 ## SPDX-License-Identifier: GPL-2.0-only
2
3 config SOC_AMD_COMMON_BLOCK_PSP
4 bool
5 help
6 This option builds in the Platform Security Processor initialization
7 functions. Do not select this directly in SoC code, select
8 SOC_AMD_COMMON_BLOCK_PSP_GENx instead.
9
10 config SOC_AMD_COMMON_BLOCK_PSP_GEN1
11 bool
12 select SOC_AMD_COMMON_BLOCK_PSP
13 help
14 Used by the PSP in AMD systems before family 17h, e.g. stoneyridge.
15
16 config SOC_AMD_COMMON_BLOCK_PSP_GEN2
17 bool
18 select SOC_AMD_COMMON_BLOCK_PSP
19 select SOC_AMD_COMMON_BLOCK_SMN
20 help
21 Used by the PSP in AMD family 17h, 19h and possibly newer CPUs.
22
23 config SOC_AMD_PSP_SELECTABLE_SMU_FW
24 bool
25 help
26 Some PSP implementations allow storing SMU firmware into cbfs and
27 calling the PSP to load the blobs at the proper time.
28
29 The soc/<codename> should select this if its PSP supports the feature
30 and each mainboard can choose to select an appropriate fanless or
31 fanned set of blobs. Ask your AMD representative whether your APU
32 is considered fanless.
33
34 config SOC_AMD_COMMON_BLOCK_PSP_RPMC
35 bool
36 depends on SOC_AMD_COMMON_BLOCK_PSP_GEN2
37 select SPI_FLASH_RPMC
38 help
39 Select this option in the SoC's Kconfig to include the support for
40 the replay-protected monotonic counter (RPMC) feature.
41
42 config PERFORM_RPMC_PROVISIONING
43 bool "Send RPMC fusing command to PSP"
44 default n
45 depends on SOC_AMD_COMMON_BLOCK_PSP_RPMC
46 help
47 Send the RPMC root key provisioning command to the PSP in case it's
48 not already fused. Sending this command will fuse the silicon which
49 is a permanent change.
50
51 config SOC_AMD_COMMON_BLOCK_PSP_SPL
52 bool
53 help
54 Select this option in the SoC's Kconfig to include the Security Patch
55 Level (SPL) support code. This code will only send the actual SPL
56 fuse update command to the PSP if the PERFORM_SPL_FUSING option is
57 also selected.
58
59 config PERFORM_SPL_FUSING
60 bool "Send SPL fusing command to PSP"
61 default n
62 depends on SOC_AMD_COMMON_BLOCK_PSP_SPL
63 help
64 Send the Security Patch Level (SPL) fusing command to the PSP in
65 order to update the minimum SPL version to be written to the SoC's
66 fuse bits. This will prevent using any embedded firmware components
67 with lower SPL version.
68
69 If unsure, answer 'n'
70
71 config SPL_TABLE_FILE
72 string "SPL table file override"
73 depends on SOC_AMD_COMMON_BLOCK_PSP_SPL
74 help
75 Provide a mainboard-specific Security Patch Level (SPL) table file
76 override. The SPL file is required to support PSP FW anti-rollback
77 and needs to be created by AMD. The default SPL file specified in the
78 SoC's fw.cfg is in the corresponding folder of the amd_blobs submodule
79 and applies to all boards that use the SoC without verstage on PSP.
80 In the verstage on PSP case, a different SPL file is specific as an
81 override via this Kconfig option.
82
83 config HAVE_SPL_RW_AB_FILE
84 bool "Have a separate mainboard-specific SPL file in RW A/B partitions"
85 depends on SOC_AMD_COMMON_BLOCK_PSP_SPL
86 depends on VBOOT_SLOTS_RW_AB
87 help
88 Have separate mainboard-specific Security Patch Level (SPL) table
89 file for the RW A/B FMAP partitions.
90
91 config SPL_RW_AB_TABLE_FILE
92 string "Separate SPL table file override for RW A/B partitions"
93 depends on HAVE_SPL_RW_AB_FILE
94
95 config PSP_PLATFORM_SECURE_BOOT
96 bool "Platform secure boot enable"
97 depends on SOC_AMD_COMMON_BLOCK_PSP_GEN2
98 default n
99 help
100 Select this config to enable PSP Platform Secure Boot.
101
102 Platform Secure Boot will automatically be fused on boot if the
103 coreboot ROM is properly signed and can not be disabled once fused.
104 Refer AMD PSB user guide doc# 56654, Revision# 1.00, this document is
105 only available with NDA customers.
106
107 config SOC_AMD_COMMON_BLOCK_PSP_SMI
108 bool
109 select SPI_FLASH_SMM if BOOT_DEVICE_SPI_FLASH_RW_NOMMAP
110 help
111 Add PSP SMI handler for SPI flash access.
112
113 When ROM armor isn't enabled, the x86 part owns the SPI controller,
114 so when the PSP wants to access the SPI flash, it sends an SMI to the
115 x86 side and the corresponding SMI handler will do the SPI flash
116 access for the PSP.
117
118 WARNING: Since the flash access in the SMI handler is a blocking
119 operation during which all cores stay in SMM, an erase operation may
120 lock up the system for a long enough time to be noticeable. Reads and
121 writes with small data sizes are less problematic. This is AMD
122 specific design and should be enabled when PSP requires to access the
123 SPI flash after the BOOT_DONE PSP command.
124
125 config PSP_INCLUDES_HSP
126 bool
127 depends on SOC_AMD_COMMON_BLOCK_PSP
128 help
129 Select this config to indicate SoC includes Hardware Security Processor(HSP).
130
131 config AMD_FWM_POSITION_20000_DEFAULT
132 # This is the default if nothing else is selected
133 bool
134
135 config AMD_FWM_POSITION_420000_DEFAULT
136 bool
137
138 config AMD_FWM_POSITION_820000_DEFAULT
139 bool
140
141 config AMD_FWM_POSITION_C20000_DEFAULT
142 bool
143
144 config AMD_FWM_POSITION_E20000_DEFAULT
145 bool
146
147 config AMD_FWM_POSITION_F20000_DEFAULT
148 bool
149
150 config AMD_FWM_POSITION_FA0000_DEFAULT
151 bool
152
153 choice
154 prompt "AMD FW position"
155 default AMD_FWM_POSITION_420000 if AMD_FWM_POSITION_420000_DEFAULT
156 default AMD_FWM_POSITION_820000 if AMD_FWM_POSITION_820000_DEFAULT
157 default AMD_FWM_POSITION_C20000 if AMD_FWM_POSITION_C20000_DEFAULT
158 default AMD_FWM_POSITION_E20000 if AMD_FWM_POSITION_E20000_DEFAULT
159 default AMD_FWM_POSITION_F20000 if AMD_FWM_POSITION_F20000_DEFAULT
160 default AMD_FWM_POSITION_FA0000 if AMD_FWM_POSITION_FA0000_DEFAULT
161 default AMD_FWM_POSITION_20000
162 help
163 Set the position on flash offset where the AMD FW needs to be.
164 This position is relative to a 16MB flash window. If the flash
165 size is smaller than 16MB it gets mapped at the top of that window.
166
167 config AMD_FWM_POSITION_20000
168 bool "0x20000"
169
170 config AMD_FWM_POSITION_420000
171 bool "0x420000"
172
173 config AMD_FWM_POSITION_820000
174 bool "0x820000"
175
176 config AMD_FWM_POSITION_C20000
177 bool "0xC20000"
178
179 config AMD_FWM_POSITION_E20000
180 bool "0xE20000"
181
182 config AMD_FWM_POSITION_F20000
183 bool "0xF20000"
184
185 config AMD_FWM_POSITION_FA0000
186 bool "0xFA0000"
187
188 endchoice
189
190 config AMD_FWM_POSITION
191 hex
192 default 0x20000 if AMD_FWM_POSITION_20000
193 default 0x420000 if AMD_FWM_POSITION_420000
194 default 0x820000 if AMD_FWM_POSITION_820000
195 default 0xc20000 if AMD_FWM_POSITION_C20000
196 default 0xe20000 if AMD_FWM_POSITION_E20000
197 default 0xf20000 if AMD_FWM_POSITION_F20000
198 default 0xfa0000 if AMD_FWM_POSITION_FA0000
199
200 config USE_AMDFWTOOL
201 bool
202 default y if SOC_AMD_COMMON_BLOCK_PSP
203 help
204 Select this if AMDFWTOOL needs to be built
205
206 config PSPV2_MBOX_CMD_OFFSET
207 hex
208 default 0x10570