Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 1 | # SPDX-License-Identifier: BSD-3-Clause |
| 2 | |
| 3 | # TODO: Move as much as possible to common |
| 4 | # TODO: Update for Glinda |
| 5 | |
| 6 | ifeq ($(CONFIG_SOC_AMD_GLINDA),y) |
| 7 | |
| 8 | subdirs-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += psp_verstage |
| 9 | |
| 10 | # Beware that all-y also adds the compilation unit to verstage on PSP |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 11 | all-y += aoac.c |
Felix Held | 46cd1b5 | 2023-04-01 01:21:27 +0200 | [diff] [blame] | 12 | all-y += config.c |
| 13 | all-y += i2c.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 14 | |
Felix Held | f008e0a | 2023-04-01 01:31:24 +0200 | [diff] [blame] | 15 | # all_x86-y adds the compilation unit to all stages that run on the x86 cores |
| 16 | all_x86-y += gpio.c |
| 17 | all_x86-y += uart.c |
| 18 | |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 19 | bootblock-y += early_fch.c |
| 20 | bootblock-y += espi_util.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 21 | |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 22 | verstage-y += espi_util.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 23 | |
| 24 | romstage-y += fsp_m_params.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 25 | |
| 26 | ramstage-y += acpi.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 27 | ramstage-y += chip.c |
| 28 | ramstage-y += cpu.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 29 | ramstage-y += fch.c |
| 30 | ramstage-y += fsp_s_params.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 31 | ramstage-y += mca.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 32 | ramstage-y += root_complex.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 33 | ramstage-y += xhci.c |
| 34 | |
| 35 | smm-y += gpio.c |
| 36 | smm-y += smihandler.c |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 37 | smm-$(CONFIG_DEBUG_SMI) += uart.c |
| 38 | |
| 39 | CPPFLAGS_common += -I$(src)/soc/amd/glinda/include |
| 40 | CPPFLAGS_common += -I$(src)/soc/amd/glinda/acpi |
| 41 | CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/glinda |
| 42 | CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/common |
| 43 | |
Karthikeyan Ramasubramanian | 3167fb7 | 2023-10-16 14:53:57 -0600 | [diff] [blame] | 44 | # Building the cbfs image will fail if the offset, aligned to 64 bytes, isn't large enough |
| 45 | ifeq ($(CONFIG_CBFS_VERIFICATION),y) |
| 46 | # 0x80 accounts for the cbfs_file struct + filename + metadata structs |
| 47 | AMD_FW_AB_POSITION := 0x80 |
| 48 | else # ($(CONFIG_CBFS_VERIFICATION), y) |
| 49 | # 0x40 accounts for the cbfs_file struct + filename + metadata structs without hash attribute |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 50 | AMD_FW_AB_POSITION := 0x40 |
Karthikeyan Ramasubramanian | 3167fb7 | 2023-10-16 14:53:57 -0600 | [diff] [blame] | 51 | endif # ($(CONFIG_CBFS_VERIFICATION), y) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 52 | |
| 53 | GLINDA_FW_A_POSITION=$(call int-add, \ |
Matt DeVillier | 163dbdd | 2023-06-29 16:56:09 -0500 | [diff] [blame] | 54 | $(call get_fmap_value,FMAP_SECTION_FW_MAIN_A_START) $(AMD_FW_AB_POSITION)) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 55 | |
| 56 | GLINDA_FW_B_POSITION=$(call int-add, \ |
Matt DeVillier | 163dbdd | 2023-06-29 16:56:09 -0500 | [diff] [blame] | 57 | $(call get_fmap_value,FMAP_SECTION_FW_MAIN_B_START) $(AMD_FW_AB_POSITION)) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 58 | # |
| 59 | # PSP Directory Table items |
| 60 | # |
| 61 | # Certain ordering requirements apply, however these are ensured by amdfwtool. |
| 62 | # For more information see "AMD Platform Security Processor BIOS Architecture |
| 63 | # Design Guide for AMD Family 17h Processors" (PID #55758, NDA only). |
| 64 | # |
| 65 | |
| 66 | ifeq ($(CONFIG_PSP_DISABLE_POSTCODES),y) |
| 67 | PSP_SOFTFUSE_BITS += 7 |
| 68 | endif |
| 69 | |
| 70 | ifeq ($(CONFIG_PSP_UNLOCK_SECURE_DEBUG),y) |
| 71 | # Enable secure debug unlock |
| 72 | PSP_SOFTFUSE_BITS += 0 |
| 73 | OPT_TOKEN_UNLOCK="--token-unlock" |
| 74 | endif |
| 75 | |
| 76 | ifeq ($(CONFIG_PSP_LOAD_MP2_FW),y) |
| 77 | OPT_PSP_LOAD_MP2_FW="--load-mp2-fw" |
| 78 | else |
| 79 | # Disable MP2 firmware loading |
| 80 | PSP_SOFTFUSE_BITS += 29 |
| 81 | endif |
| 82 | |
| 83 | # Use additional Soft Fuse bits specified in Kconfig |
| 84 | PSP_SOFTFUSE_BITS += $(call strip_quotes, $(CONFIG_PSP_SOFTFUSE_BITS)) |
| 85 | |
| 86 | # type = 0x3a |
| 87 | ifeq ($(CONFIG_HAVE_PSP_WHITELIST_FILE),y) |
| 88 | PSP_WHITELIST_FILE=$(CONFIG_PSP_WHITELIST_FILE) |
| 89 | endif |
| 90 | |
| 91 | # type = 0x55 |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 92 | SPL_TABLE_FILE=$(CONFIG_SPL_TABLE_FILE) |
| 93 | ifeq ($(CONFIG_HAVE_SPL_RW_AB_FILE),y) |
| 94 | SPL_RW_AB_TABLE_FILE=$(CONFIG_SPL_RW_AB_TABLE_FILE) |
| 95 | else |
| 96 | SPL_RW_AB_TABLE_FILE=$(CONFIG_SPL_TABLE_FILE) |
| 97 | endif |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 98 | |
| 99 | # |
| 100 | # BIOS Directory Table items - proper ordering is managed by amdfwtool |
| 101 | # |
| 102 | |
| 103 | # type = 0x60 |
| 104 | PSP_APCB_FILES=$(APCB_SOURCES) $(APCB_SOURCES_RECOVERY) |
| 105 | |
| 106 | # type = 0x61 |
| 107 | PSP_APOB_BASE=$(CONFIG_PSP_APOB_DRAM_ADDRESS) |
| 108 | |
| 109 | # type = 0x62 |
| 110 | PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img |
| 111 | PSP_ELF_FILE=$(objcbfs)/bootblock.elf |
Felix Held | 3b89c95 | 2022-11-22 20:02:46 +0100 | [diff] [blame] | 112 | PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}') |
| 113 | PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}') |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 114 | |
Fred Reitberger | 2a1fc73 | 2023-07-17 09:09:42 -0400 | [diff] [blame] | 115 | ifneq ($(CONFIG_SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE),y) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 116 | # type = 0x63 - construct APOB NV base/size from flash map |
| 117 | # The flashmap section used for this is expected to be named RW_MRC_CACHE |
Matt DeVillier | 163dbdd | 2023-06-29 16:56:09 -0500 | [diff] [blame] | 118 | APOB_NV_SIZE=$(call get_fmap_value,FMAP_SECTION_RW_MRC_CACHE_SIZE) |
| 119 | APOB_NV_BASE=$(call get_fmap_value,FMAP_SECTION_RW_MRC_CACHE_START) |
Fred Reitberger | 2a1fc73 | 2023-07-17 09:09:42 -0400 | [diff] [blame] | 120 | endif # !CONFIG_SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 121 | |
| 122 | ifeq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) |
| 123 | # type = 0x6B - PSP Shared memory location |
| 124 | ifneq ($(CONFIG_PSP_SHAREDMEM_SIZE),0x0) |
| 125 | PSP_SHAREDMEM_SIZE=$(CONFIG_PSP_SHAREDMEM_SIZE) |
| 126 | PSP_SHAREDMEM_BASE=$(shell awk '$$3 == "_psp_sharedmem_dram" {printf "0x" $$1}' $(objcbfs)/bootblock.map) |
| 127 | endif |
| 128 | |
| 129 | # type = 0x52 - PSP Bootloader Userspace Application (verstage) |
| 130 | PSP_VERSTAGE_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_FILE)) |
| 131 | PSP_VERSTAGE_SIG_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_SIGNING_TOKEN)) |
| 132 | endif # CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK |
| 133 | |
| 134 | ifeq ($(CONFIG_SEPARATE_SIGNED_PSPFW),y) |
| 135 | SIGNED_AMDFW_A_POSITION=$(call int-subtract, \ |
Matt DeVillier | 163dbdd | 2023-06-29 16:56:09 -0500 | [diff] [blame] | 136 | $(call get_fmap_value,FMAP_SECTION_SIGNED_AMDFW_A_START) \ |
| 137 | $(call get_fmap_value,FMAP_SECTION_FLASH_START)) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 138 | SIGNED_AMDFW_B_POSITION=$(call int-subtract, \ |
Matt DeVillier | 163dbdd | 2023-06-29 16:56:09 -0500 | [diff] [blame] | 139 | $(call get_fmap_value,FMAP_SECTION_SIGNED_AMDFW_B_START) \ |
| 140 | $(call get_fmap_value,FMAP_SECTION_FLASH_START)) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 141 | SIGNED_AMDFW_A_FILE=$(obj)/amdfw_a.rom.signed |
| 142 | SIGNED_AMDFW_B_FILE=$(obj)/amdfw_b.rom.signed |
| 143 | endif # CONFIG_SEPARATE_SIGNED_PSPFW |
| 144 | |
| 145 | # Helper function to return a value with given bit set |
| 146 | # Soft Fuse type = 0xb - See #55758 (NDA) for bit definitions. |
| 147 | set-bit=$(call int-shift-left, 1 $(call _toint,$1)) |
| 148 | PSP_SOFTFUSE=$(shell A=$(call int-add, \ |
Matt DeVillier | 0daefa5 | 2023-10-30 20:58:41 -0500 | [diff] [blame] | 149 | $(foreach bit,$(sort $(PSP_SOFTFUSE_BITS)),$(call set-bit,$(bit)))); printf "0x%x" $$A) |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 150 | |
| 151 | # |
| 152 | # Build the arguments to amdfwtool (order is unimportant). Missing file names |
| 153 | # result in empty OPT_ variables, i.e. the argument is not passed to amdfwtool. |
| 154 | # |
| 155 | |
| 156 | add_opt_prefix=$(if $(call strip_quotes, $(1)), $(2) $(call strip_quotes, $(1)), ) |
| 157 | |
| 158 | OPT_VERSTAGE_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_FILE), --verstage) |
| 159 | OPT_VERSTAGE_SIG_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_SIG_FILE), --verstage_sig) |
| 160 | |
| 161 | OPT_PSP_APCB_FILES= $(if $(APCB_SOURCES), --instance 0 --apcb $(APCB_SOURCES)) \ |
| 162 | $(if $(APCB_SOURCES_RECOVERY), --instance 10 --apcb $(APCB_SOURCES_RECOVERY)) \ |
| 163 | $(if $(APCB_SOURCES_68), --instance 18 --apcb $(APCB_SOURCES_68)) |
| 164 | |
| 165 | OPT_APOB_ADDR=$(call add_opt_prefix, $(PSP_APOB_BASE), --apob-base) |
| 166 | OPT_PSP_BIOSBIN_FILE=$(call add_opt_prefix, $(PSP_BIOSBIN_FILE), --bios-bin) |
| 167 | OPT_PSP_BIOSBIN_DEST=$(call add_opt_prefix, $(PSP_BIOSBIN_DEST), --bios-bin-dest) |
| 168 | OPT_PSP_BIOSBIN_SIZE=$(call add_opt_prefix, $(PSP_BIOSBIN_SIZE), --bios-uncomp-size) |
| 169 | |
| 170 | OPT_PSP_SHAREDMEM_BASE=$(call add_opt_prefix, $(PSP_SHAREDMEM_BASE), --sharedmem) |
| 171 | OPT_PSP_SHAREDMEM_SIZE=$(call add_opt_prefix, $(PSP_SHAREDMEM_SIZE), --sharedmem-size) |
| 172 | OPT_APOB_NV_SIZE=$(call add_opt_prefix, $(APOB_NV_SIZE), --apob-nv-size) |
| 173 | OPT_APOB_NV_BASE=$(call add_opt_prefix, $(APOB_NV_BASE),--apob-nv-base) |
| 174 | OPT_EFS_SPI_READ_MODE=$(call add_opt_prefix, $(CONFIG_EFS_SPI_READ_MODE), --spi-read-mode) |
| 175 | OPT_EFS_SPI_SPEED=$(call add_opt_prefix, $(CONFIG_EFS_SPI_SPEED), --spi-speed) |
| 176 | OPT_EFS_SPI_MICRON_FLAG=$(call add_opt_prefix, $(CONFIG_EFS_SPI_MICRON_FLAG), --spi-micron-flag) |
| 177 | |
| 178 | OPT_SIGNED_AMDFW_A_POSITION=$(call add_opt_prefix, $(SIGNED_AMDFW_A_POSITION), --signed-addr) |
| 179 | OPT_SIGNED_AMDFW_A_FILE=$(call add_opt_prefix, $(SIGNED_AMDFW_A_FILE), --signed-output) |
| 180 | OPT_SIGNED_AMDFW_B_POSITION=$(call add_opt_prefix, $(SIGNED_AMDFW_B_POSITION), --signed-addr) |
| 181 | OPT_SIGNED_AMDFW_B_FILE=$(call add_opt_prefix, $(SIGNED_AMDFW_B_FILE), --signed-output) |
| 182 | |
| 183 | OPT_PSP_SOFTFUSE=$(call add_opt_prefix, $(PSP_SOFTFUSE), --soft-fuse) |
| 184 | |
| 185 | OPT_WHITELIST_FILE=$(call add_opt_prefix, $(PSP_WHITELIST_FILE), --whitelist) |
| 186 | OPT_SPL_TABLE_FILE=$(call add_opt_prefix, $(SPL_TABLE_FILE), --spl-table) |
| 187 | OPT_SPL_RW_AB_TABLE_FILE=$(call add_opt_prefix, $(SPL_RW_AB_TABLE_FILE), --spl-table) |
| 188 | |
| 189 | # If vboot uses 2 RW slots, then 2 copies of PSP binaries are redundant |
| 190 | OPT_RECOVERY_AB_SINGLE_COPY=$(if $(CONFIG_VBOOT_SLOTS_RW_AB), --recovery-ab-single-copy) |
| 191 | |
| 192 | AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \ |
| 193 | $(OPT_APOB_ADDR) \ |
Martin Roth | 0acf59d | 2023-03-08 15:18:24 -0700 | [diff] [blame] | 194 | $(OPT_DEBUG_AMDFWTOOL) \ |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 195 | $(OPT_PSP_BIOSBIN_FILE) \ |
| 196 | $(OPT_PSP_BIOSBIN_DEST) \ |
| 197 | $(OPT_PSP_BIOSBIN_SIZE) \ |
| 198 | $(OPT_PSP_SOFTFUSE) \ |
| 199 | $(OPT_PSP_LOAD_MP2_FW) \ |
| 200 | --use-pspsecureos \ |
| 201 | --load-s0i3 \ |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 202 | $(OPT_TOKEN_UNLOCK) \ |
| 203 | $(OPT_WHITELIST_FILE) \ |
| 204 | $(OPT_PSP_SHAREDMEM_BASE) \ |
| 205 | $(OPT_PSP_SHAREDMEM_SIZE) \ |
| 206 | $(OPT_EFS_SPI_READ_MODE) \ |
| 207 | $(OPT_EFS_SPI_SPEED) \ |
| 208 | $(OPT_EFS_SPI_MICRON_FLAG) \ |
| 209 | --config $(CONFIG_AMDFW_CONFIG_FILE) \ |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 210 | --flashsize $(CONFIG_ROM_SIZE) \ |
| 211 | $(OPT_RECOVERY_AB_SINGLE_COPY) |
| 212 | |
| 213 | $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ |
| 214 | $(PSP_VERSTAGE_FILE) \ |
| 215 | $(PSP_VERSTAGE_SIG_FILE) \ |
| 216 | $$(PSP_APCB_FILES) \ |
| 217 | $(DEP_FILES) \ |
| 218 | $(AMDFWTOOL) \ |
| 219 | $(obj)/fmap_config.h \ |
| 220 | $(objcbfs)/bootblock.elf # this target also creates the .map file |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 221 | rm -f $@ |
| 222 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 223 | $(AMDFWTOOL) \ |
| 224 | $(AMDFW_COMMON_ARGS) \ |
| 225 | $(OPT_APOB_NV_SIZE) \ |
| 226 | $(OPT_APOB_NV_BASE) \ |
| 227 | $(OPT_VERSTAGE_FILE) \ |
| 228 | $(OPT_VERSTAGE_SIG_FILE) \ |
| 229 | $(OPT_SPL_TABLE_FILE) \ |
Zheng Bao | 6bc0698 | 2023-02-14 13:26:31 +0800 | [diff] [blame] | 230 | --location $(CONFIG_AMD_FWM_POSITION) \ |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 231 | --output $@ |
| 232 | |
| 233 | $(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS) |
| 234 | rm -f $@ |
| 235 | @printf " AMDCOMPRS $(subst $(obj)/,,$(@))\n" |
| 236 | $(AMDCOMPRESS) --infile $(PSP_ELF_FILE) --outfile $@ --compress \ |
| 237 | --maxsize $(PSP_BIOSBIN_SIZE) |
| 238 | |
| 239 | $(obj)/amdfw_a.rom: $(obj)/amdfw.rom |
| 240 | rm -f $@ |
| 241 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 242 | $(AMDFWTOOL) \ |
| 243 | $(AMDFW_COMMON_ARGS) \ |
| 244 | $(OPT_APOB_NV_SIZE) \ |
| 245 | $(OPT_APOB_NV_BASE) \ |
| 246 | $(OPT_SPL_RW_AB_TABLE_FILE) \ |
| 247 | $(OPT_SIGNED_AMDFW_A_POSITION) \ |
| 248 | $(OPT_SIGNED_AMDFW_A_FILE) \ |
Fred Reitberger | e66ce2f | 2023-07-05 15:43:19 -0400 | [diff] [blame] | 249 | --location $(call _tohex,$(GLINDA_FW_A_POSITION)) \ |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 250 | --anywhere \ |
| 251 | --output $@ |
| 252 | |
| 253 | $(obj)/amdfw_b.rom: $(obj)/amdfw.rom |
| 254 | rm -f $@ |
| 255 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 256 | $(AMDFWTOOL) \ |
| 257 | $(AMDFW_COMMON_ARGS) \ |
| 258 | $(OPT_APOB_NV_SIZE) \ |
| 259 | $(OPT_APOB_NV_BASE) \ |
| 260 | $(OPT_SPL_RW_AB_TABLE_FILE) \ |
| 261 | $(OPT_SIGNED_AMDFW_B_POSITION) \ |
| 262 | $(OPT_SIGNED_AMDFW_B_FILE) \ |
Fred Reitberger | e66ce2f | 2023-07-05 15:43:19 -0400 | [diff] [blame] | 263 | --location $(call _tohex,$(GLINDA_FW_B_POSITION)) \ |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 264 | --anywhere \ |
| 265 | --output $@ |
| 266 | |
| 267 | |
Martin Roth | f95a11e | 2022-10-21 16:43:08 -0600 | [diff] [blame] | 268 | ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy) |
| 269 | cbfs-files-y += apu/amdfw_a |
| 270 | apu/amdfw_a-file := $(obj)/amdfw_a.rom |
| 271 | apu/amdfw_a-position := $(AMD_FW_AB_POSITION) |
| 272 | apu/amdfw_a-type := raw |
| 273 | |
| 274 | cbfs-files-y += apu/amdfw_b |
| 275 | apu/amdfw_b-file := $(obj)/amdfw_b.rom |
| 276 | apu/amdfw_b-position := $(AMD_FW_AB_POSITION) |
| 277 | apu/amdfw_b-type := raw |
| 278 | |
| 279 | ifeq ($(CONFIG_SEPARATE_SIGNED_PSPFW),y) |
| 280 | build_complete:: $(obj)/amdfw_a.rom $(obj)/amdfw_b.rom |
| 281 | @printf " Adding Signed ROM and HASH\n" |
| 282 | $(CBFSTOOL) $(obj)/coreboot.rom write -u -r SIGNED_AMDFW_A -i 0 -f $(obj)/amdfw_a.rom.signed |
| 283 | $(CBFSTOOL) $(obj)/coreboot.rom write -u -r SIGNED_AMDFW_B -i 0 -f $(obj)/amdfw_b.rom.signed |
| 284 | $(CBFSTOOL) $(obj)/coreboot.rom add -r FW_MAIN_A -f $(obj)/amdfw_a.rom.signed.hash \ |
| 285 | -n apu/amdfw_a_hash -t raw |
| 286 | $(CBFSTOOL) $(obj)/coreboot.rom add -r FW_MAIN_B -f $(obj)/amdfw_b.rom.signed.hash \ |
| 287 | -n apu/amdfw_b_hash -t raw |
| 288 | endif # CONFIG_SEPARATE_SIGNED_PSPFW |
| 289 | endif |
| 290 | |
| 291 | endif # ($(CONFIG_SOC_AMD_GLINDA),y) |