Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: BSD-3-Clause |
| 2 | |
| 3 | ifeq ($(CONFIG_SOC_AMD_CEZANNE),y) |
| 4 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 5 | subdirs-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += psp_verstage |
| 6 | |
Felix Held | e7a0202 | 2020-12-10 02:05:47 +0100 | [diff] [blame] | 7 | # Beware that all-y also adds the compilation unit to verstage on PSP |
Felix Held | 62ef88f | 2020-12-08 23:18:19 +0100 | [diff] [blame] | 8 | all-y += aoac.c |
Felix Held | 46cd1b5 | 2023-04-01 01:21:27 +0200 | [diff] [blame] | 9 | all-y += config.c |
| 10 | all-y += i2c.c |
Felix Held | c827278 | 2020-12-05 01:39:28 +0100 | [diff] [blame] | 11 | |
Felix Held | f008e0a | 2023-04-01 01:31:24 +0200 | [diff] [blame] | 12 | # all_x86-y adds the compilation unit to all stages that run on the x86 cores |
| 13 | all_x86-y += gpio.c |
| 14 | all_x86-y += uart.c |
| 15 | |
Felix Held | 153f92a | 2020-12-08 17:27:30 +0100 | [diff] [blame] | 16 | bootblock-y += early_fch.c |
Felix Held | 62afdb6 | 2022-01-10 23:37:58 +0100 | [diff] [blame] | 17 | bootblock-y += espi_util.c |
Felix Held | 44f4153 | 2020-12-09 02:01:16 +0100 | [diff] [blame] | 18 | |
Felix Held | 2421de6 | 2021-03-26 01:13:53 +0100 | [diff] [blame] | 19 | romstage-y += fsp_m_params.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 20 | romstage-y += romstage.c |
| 21 | |
Felix Held | 8602495 | 2021-02-03 23:44:28 +0100 | [diff] [blame] | 22 | ramstage-y += acpi.c |
Felix Held | 144c7aa | 2021-05-04 21:06:04 +0200 | [diff] [blame] | 23 | ramstage-y += agesa_acpi.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 24 | ramstage-y += chip.c |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 25 | ramstage-y += cpu.c |
Felix Held | 230dbd6 | 2021-01-28 23:40:52 +0100 | [diff] [blame] | 26 | ramstage-y += fch.c |
Felix Held | 793f371 | 2021-03-26 00:13:51 +0100 | [diff] [blame] | 27 | ramstage-y += fsp_s_params.c |
Felix Held | d5b51be | 2021-07-16 20:51:08 +0200 | [diff] [blame] | 28 | ramstage-y += graphics.c |
Felix Held | a24472a | 2021-07-13 18:21:27 +0200 | [diff] [blame] | 29 | ramstage-y += mca.c |
Raul E Rangel | cf6dc7d | 2021-02-05 16:00:41 -0700 | [diff] [blame] | 30 | ramstage-y += root_complex.c |
Felix Held | e77d939 | 2021-03-11 19:37:32 +0100 | [diff] [blame] | 31 | ramstage-y += xhci.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 32 | |
Mathew King | 45a33b0 | 2021-03-04 15:32:50 -0700 | [diff] [blame] | 33 | smm-y += gpio.c |
Felix Held | ee2a365 | 2021-02-09 23:43:17 +0100 | [diff] [blame] | 34 | smm-y += smihandler.c |
Raul E Rangel | f41ca1e | 2021-02-12 16:57:49 -0700 | [diff] [blame] | 35 | smm-$(CONFIG_DEBUG_SMI) += uart.c |
Felix Held | ee2a365 | 2021-02-09 23:43:17 +0100 | [diff] [blame] | 36 | |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 37 | CPPFLAGS_common += -I$(src)/soc/amd/cezanne/include |
Felix Held | 8602495 | 2021-02-03 23:44:28 +0100 | [diff] [blame] | 38 | CPPFLAGS_common += -I$(src)/soc/amd/cezanne/acpi |
Felix Held | 8d0a609 | 2021-01-14 01:40:50 +0100 | [diff] [blame] | 39 | CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/cezanne |
Konrad Adamczyk | 86dfcb8 | 2023-06-28 12:23:08 +0000 | [diff] [blame] | 40 | CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/common |
Felix Held | 8d0a609 | 2021-01-14 01:40:50 +0100 | [diff] [blame] | 41 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 42 | # ROMSIG Normally At ROMBASE + 0x20000 |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 43 | # +-----------+---------------+----------------+------------+ |
| 44 | # |0x55AA55AA | | | | |
| 45 | # +-----------+---------------+----------------+------------+ |
| 46 | # | | PSPDIR ADDR | BIOSDIR ADDR | |
| 47 | # +-----------+---------------+----------------+ |
| 48 | |
Robert Zieba | b26d005 | 2022-01-24 16:37:47 -0700 | [diff] [blame] | 49 | # 0x40 accounts for the cbfs_file struct + filename + metadata structs, aligned to 64 bytes |
| 50 | # Building the cbfs image will fail if the offset isn't large enough |
| 51 | AMD_FW_AB_POSITION := 0x40 |
| 52 | |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 53 | CEZANNE_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)) |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 55 | |
| 56 | CEZANNE_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)) |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [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 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 66 | |
Rob Barnes | e09b681 | 2021-04-15 17:21:19 -0600 | [diff] [blame] | 67 | ifeq ($(CONFIG_PSP_DISABLE_POSTCODES),y) |
| 68 | PSP_SOFTFUSE_BITS += 7 |
| 69 | endif |
| 70 | |
Raul E Rangel | fa4d051 | 2022-02-01 11:12:33 -0700 | [diff] [blame] | 71 | ifeq ($(CONFIG_PSP_INIT_ESPI),y) |
Rob Barnes | e09b681 | 2021-04-15 17:21:19 -0600 | [diff] [blame] | 72 | PSP_SOFTFUSE_BITS += 15 |
| 73 | endif |
| 74 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 75 | ifeq ($(CONFIG_PSP_UNLOCK_SECURE_DEBUG),y) |
| 76 | # Enable secure debug unlock |
| 77 | PSP_SOFTFUSE_BITS += 0 |
| 78 | OPT_TOKEN_UNLOCK="--token-unlock" |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 79 | endif |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 80 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 81 | ifeq ($(CONFIG_PSP_LOAD_MP2_FW),y) |
| 82 | OPT_PSP_LOAD_MP2_FW="--load-mp2-fw" |
| 83 | else |
| 84 | # Disable MP2 firmware loading |
| 85 | PSP_SOFTFUSE_BITS += 29 |
| 86 | endif |
| 87 | |
Rob Barnes | 3437a6f | 2021-12-10 14:28:21 -0700 | [diff] [blame] | 88 | ifeq ($(CONFIG_PSP_S0I3_RESUME_VERSTAGE),y) |
Rob Barnes | 4454c9a | 2021-12-17 10:37:43 -0700 | [diff] [blame] | 89 | PSP_SOFTFUSE_BITS += 58 |
Rob Barnes | 3437a6f | 2021-12-10 14:28:21 -0700 | [diff] [blame] | 90 | endif |
| 91 | |
Martin Roth | fdad5ad | 2021-04-16 11:36:01 -0600 | [diff] [blame] | 92 | # Use additional Soft Fuse bits specified in Kconfig |
Zheng Bao | 17022bb | 2021-05-13 22:38:05 +0800 | [diff] [blame] | 93 | PSP_SOFTFUSE_BITS += $(call strip_quotes, $(CONFIG_PSP_SOFTFUSE_BITS)) |
Martin Roth | fdad5ad | 2021-04-16 11:36:01 -0600 | [diff] [blame] | 94 | |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 95 | # type = 0x3a |
| 96 | ifeq ($(CONFIG_HAVE_PSP_WHITELIST_FILE),y) |
| 97 | PSP_WHITELIST_FILE=$(CONFIG_PSP_WHITELIST_FILE) |
| 98 | endif |
| 99 | |
Zheng Bao | c5b912f7 | 2022-02-11 11:53:32 +0800 | [diff] [blame] | 100 | # type = 0x55 |
| 101 | ifeq ($(CONFIG_HAVE_SPL_FILE),y) |
| 102 | SPL_TABLE_FILE=$(CONFIG_SPL_TABLE_FILE) |
| 103 | endif |
| 104 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 105 | # |
| 106 | # BIOS Directory Table items - proper ordering is managed by amdfwtool |
| 107 | # |
| 108 | |
| 109 | # type = 0x60 |
Matt Papageorge | a37ec52 | 2021-02-22 19:36:34 -0600 | [diff] [blame] | 110 | PSP_APCB_FILES=$(APCB_SOURCES) $(APCB_SOURCES_RECOVERY) |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 111 | |
| 112 | # type = 0x61 |
| 113 | PSP_APOB_BASE=$(CONFIG_PSP_APOB_DRAM_ADDRESS) |
| 114 | |
| 115 | # type = 0x62 |
| 116 | PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img |
| 117 | PSP_ELF_FILE=$(objcbfs)/bootblock.elf |
Felix Held | 3b89c95 | 2022-11-22 20:02:46 +0100 | [diff] [blame] | 118 | PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}') |
| 119 | PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}') |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 120 | |
Fred Reitberger | 2a1fc73 | 2023-07-17 09:09:42 -0400 | [diff] [blame] | 121 | ifneq ($(CONFIG_SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE),y) |
Felix Held | 4324bc6 | 2021-02-19 22:28:56 +0100 | [diff] [blame] | 122 | # type = 0x63 - construct APOB NV base/size from flash map |
| 123 | # 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] | 124 | APOB_NV_SIZE=$(call get_fmap_value,FMAP_SECTION_RW_MRC_CACHE_SIZE) |
| 125 | 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] | 126 | endif # !CONFIG_SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE |
Felix Held | 4324bc6 | 2021-02-19 22:28:56 +0100 | [diff] [blame] | 127 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 128 | ifeq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) |
| 129 | # type = 0x6B - PSP Shared memory location |
| 130 | ifneq ($(CONFIG_PSP_SHAREDMEM_SIZE),0x0) |
| 131 | PSP_SHAREDMEM_SIZE=$(CONFIG_PSP_SHAREDMEM_SIZE) |
| 132 | PSP_SHAREDMEM_BASE=$(shell awk '$$3 == "_psp_sharedmem_dram" {printf "0x" $$1}' $(objcbfs)/bootblock.map) |
| 133 | endif |
| 134 | |
| 135 | # type = 0x52 - PSP Bootloader Userspace Application (verstage) |
| 136 | PSP_VERSTAGE_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_FILE)) |
| 137 | PSP_VERSTAGE_SIG_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_SIGNING_TOKEN)) |
| 138 | endif # CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK |
| 139 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 140 | # Helper function to return a value with given bit set |
Martin Roth | fdad5ad | 2021-04-16 11:36:01 -0600 | [diff] [blame] | 141 | # Soft Fuse type = 0xb - See #55758 (NDA) for bit definitions. |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 142 | set-bit=$(call int-shift-left, 1 $(call _toint,$1)) |
| 143 | PSP_SOFTFUSE=$(shell A=$(call int-add, \ |
| 144 | $(foreach bit,$(PSP_SOFTFUSE_BITS),$(call set-bit,$(bit)))); printf "0x%x" $$A) |
| 145 | |
| 146 | # |
| 147 | # Build the arguments to amdfwtool (order is unimportant). Missing file names |
| 148 | # result in empty OPT_ variables, i.e. the argument is not passed to amdfwtool. |
| 149 | # |
| 150 | |
| 151 | add_opt_prefix=$(if $(call strip_quotes, $(1)), $(2) $(call strip_quotes, $(1)), ) |
| 152 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 153 | OPT_VERSTAGE_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_FILE), --verstage) |
| 154 | OPT_VERSTAGE_SIG_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_SIG_FILE), --verstage_sig) |
| 155 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 156 | OPT_PSP_APCB_FILES= $(if $(APCB_SOURCES), --instance 0 --apcb $(APCB_SOURCES)) \ |
| 157 | $(if $(APCB_SOURCES_RECOVERY), --instance 10 --apcb $(APCB_SOURCES_RECOVERY)) \ |
| 158 | $(if $(APCB_SOURCES_68), --instance 18 --apcb $(APCB_SOURCES_68)) |
| 159 | |
| 160 | OPT_APOB_ADDR=$(call add_opt_prefix, $(PSP_APOB_BASE), --apob-base) |
| 161 | OPT_PSP_BIOSBIN_FILE=$(call add_opt_prefix, $(PSP_BIOSBIN_FILE), --bios-bin) |
| 162 | OPT_PSP_BIOSBIN_DEST=$(call add_opt_prefix, $(PSP_BIOSBIN_DEST), --bios-bin-dest) |
| 163 | OPT_PSP_BIOSBIN_SIZE=$(call add_opt_prefix, $(PSP_BIOSBIN_SIZE), --bios-uncomp-size) |
| 164 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 165 | OPT_PSP_SHAREDMEM_BASE=$(call add_opt_prefix, $(PSP_SHAREDMEM_BASE), --sharedmem) |
| 166 | OPT_PSP_SHAREDMEM_SIZE=$(call add_opt_prefix, $(PSP_SHAREDMEM_SIZE), --sharedmem-size) |
Felix Held | 4324bc6 | 2021-02-19 22:28:56 +0100 | [diff] [blame] | 167 | OPT_APOB_NV_SIZE=$(call add_opt_prefix, $(APOB_NV_SIZE), --apob-nv-size) |
| 168 | OPT_APOB_NV_BASE=$(call add_opt_prefix, $(APOB_NV_BASE),--apob-nv-base) |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 169 | OPT_EFS_SPI_READ_MODE=$(call add_opt_prefix, $(CONFIG_EFS_SPI_READ_MODE), --spi-read-mode) |
| 170 | OPT_EFS_SPI_SPEED=$(call add_opt_prefix, $(CONFIG_EFS_SPI_SPEED), --spi-speed) |
| 171 | OPT_EFS_SPI_MICRON_FLAG=$(call add_opt_prefix, $(CONFIG_EFS_SPI_MICRON_FLAG), --spi-micron-flag) |
| 172 | |
| 173 | OPT_PSP_SOFTFUSE=$(call add_opt_prefix, $(PSP_SOFTFUSE), --soft-fuse) |
| 174 | |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 175 | OPT_WHITELIST_FILE=$(call add_opt_prefix, $(PSP_WHITELIST_FILE), --whitelist) |
Zheng Bao | c5b912f7 | 2022-02-11 11:53:32 +0800 | [diff] [blame] | 176 | OPT_SPL_TABLE_FILE=$(call add_opt_prefix, $(SPL_TABLE_FILE), --spl-table) |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 177 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 178 | AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \ |
| 179 | $(OPT_APOB_ADDR) \ |
Martin Roth | 0acf59d | 2023-03-08 15:18:24 -0700 | [diff] [blame] | 180 | $(OPT_DEBUG_AMDFWTOOL) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 181 | $(OPT_PSP_BIOSBIN_FILE) \ |
| 182 | $(OPT_PSP_BIOSBIN_DEST) \ |
| 183 | $(OPT_PSP_BIOSBIN_SIZE) \ |
| 184 | $(OPT_PSP_SOFTFUSE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 185 | $(OPT_PSP_LOAD_MP2_FW) \ |
Felix Held | 5f5b7dd | 2021-02-12 20:51:55 +0100 | [diff] [blame] | 186 | --use-pspsecureos \ |
Felix Held | bb3e9ef | 2021-02-12 18:26:08 +0100 | [diff] [blame] | 187 | --load-s0i3 \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 188 | $(OPT_TOKEN_UNLOCK) \ |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 189 | $(OPT_WHITELIST_FILE) \ |
Zheng Bao | c5b912f7 | 2022-02-11 11:53:32 +0800 | [diff] [blame] | 190 | $(OPT_SPL_TABLE_FILE) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 191 | $(OPT_PSP_SHAREDMEM_BASE) \ |
| 192 | $(OPT_PSP_SHAREDMEM_SIZE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 193 | $(OPT_EFS_SPI_READ_MODE) \ |
| 194 | $(OPT_EFS_SPI_SPEED) \ |
| 195 | $(OPT_EFS_SPI_MICRON_FLAG) \ |
| 196 | --config $(CONFIG_AMDFW_CONFIG_FILE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 197 | --flashsize $(CONFIG_ROM_SIZE) |
| 198 | |
| 199 | $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 200 | $(PSP_VERSTAGE_FILE) \ |
| 201 | $(PSP_VERSTAGE_SIG_FILE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 202 | $$(PSP_APCB_FILES) \ |
| 203 | $(DEP_FILES) \ |
| 204 | $(AMDFWTOOL) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 205 | $(obj)/fmap_config.h \ |
| 206 | $(objcbfs)/bootblock.elf # this target also creates the .map file |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 207 | $(if $(PSP_APCB_FILES), ,$(error APCB_SOURCES is not set)) |
| 208 | rm -f $@ |
| 209 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 210 | $(AMDFWTOOL) \ |
| 211 | $(AMDFW_COMMON_ARGS) \ |
Felix Held | 4324bc6 | 2021-02-19 22:28:56 +0100 | [diff] [blame] | 212 | $(OPT_APOB_NV_SIZE) \ |
| 213 | $(OPT_APOB_NV_BASE) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 214 | $(OPT_VERSTAGE_FILE) \ |
| 215 | $(OPT_VERSTAGE_SIG_FILE) \ |
Zheng Bao | 6bc0698 | 2023-02-14 13:26:31 +0800 | [diff] [blame^] | 216 | --location $(CONFIG_AMD_FWM_POSITION) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 217 | --multilevel \ |
| 218 | --output $@ |
| 219 | |
| 220 | $(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS) |
| 221 | rm -f $@ |
| 222 | @printf " AMDCOMPRS $(subst $(obj)/,,$(@))\n" |
| 223 | $(AMDCOMPRESS) --infile $(PSP_ELF_FILE) --outfile $@ --compress \ |
| 224 | --maxsize $(PSP_BIOSBIN_SIZE) |
| 225 | |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 226 | $(obj)/amdfw_a.rom: $(obj)/amdfw.rom |
| 227 | rm -f $@ |
| 228 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 229 | $(AMDFWTOOL) \ |
| 230 | $(AMDFW_COMMON_ARGS) \ |
| 231 | $(OPT_APOB_NV_SIZE) \ |
| 232 | $(OPT_APOB_NV_BASE) \ |
Fred Reitberger | e66ce2f | 2023-07-05 15:43:19 -0400 | [diff] [blame] | 233 | --location $(call _tohex,$(CEZANNE_FW_A_POSITION)) \ |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 234 | --anywhere \ |
| 235 | --multilevel \ |
| 236 | --output $@ |
| 237 | |
| 238 | $(obj)/amdfw_b.rom: $(obj)/amdfw.rom |
| 239 | rm -f $@ |
| 240 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 241 | $(AMDFWTOOL) \ |
| 242 | $(AMDFW_COMMON_ARGS) \ |
| 243 | $(OPT_APOB_NV_SIZE) \ |
| 244 | $(OPT_APOB_NV_BASE) \ |
Fred Reitberger | e66ce2f | 2023-07-05 15:43:19 -0400 | [diff] [blame] | 245 | --location $(call _tohex,$(CEZANNE_FW_B_POSITION)) \ |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 246 | --anywhere \ |
| 247 | --multilevel \ |
| 248 | --output $@ |
| 249 | |
| 250 | |
Matt DeVillier | f9fea86 | 2022-10-04 16:41:28 -0500 | [diff] [blame] | 251 | ifeq ($(CONFIG_VBOOT_SLOTS_RW_A)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy) |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 252 | cbfs-files-y += apu/amdfw_a |
| 253 | apu/amdfw_a-file := $(obj)/amdfw_a.rom |
Robert Zieba | b26d005 | 2022-01-24 16:37:47 -0700 | [diff] [blame] | 254 | # Ensure this ends up at the beginning of the FW_MAIN_A fmap region |
| 255 | apu/amdfw_a-position := $(AMD_FW_AB_POSITION) |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 256 | apu/amdfw_a-type := raw |
Matt DeVillier | f9fea86 | 2022-10-04 16:41:28 -0500 | [diff] [blame] | 257 | endif |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 258 | |
Matt DeVillier | f9fea86 | 2022-10-04 16:41:28 -0500 | [diff] [blame] | 259 | ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy) |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 260 | cbfs-files-y += apu/amdfw_b |
| 261 | apu/amdfw_b-file := $(obj)/amdfw_b.rom |
Robert Zieba | b26d005 | 2022-01-24 16:37:47 -0700 | [diff] [blame] | 262 | # Ensure this ends up at the beginning of the FW_MAIN_B fmap region |
| 263 | apu/amdfw_b-position := $(AMD_FW_AB_POSITION) |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 264 | apu/amdfw_b-type := raw |
| 265 | endif |
| 266 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 267 | endif # ($(CONFIG_SOC_AMD_CEZANNE),y) |