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 | |
Felix Held | 8861562 | 2021-01-19 23:51:45 +0100 | [diff] [blame] | 5 | subdirs-y += ../../../cpu/x86/lapic |
Felix Held | dffdea8 | 2020-12-09 23:04:29 +0100 | [diff] [blame] | 6 | subdirs-y += ../../../cpu/x86/mtrr |
| 7 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 8 | subdirs-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += psp_verstage |
| 9 | |
Felix Held | e7a0202 | 2020-12-10 02:05:47 +0100 | [diff] [blame] | 10 | # 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] | 11 | all-y += config.c |
| 12 | all-y += aoac.c |
Felix Held | c827278 | 2020-12-05 01:39:28 +0100 | [diff] [blame] | 13 | |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 14 | bootblock-y += bootblock.c |
Felix Held | 153f92a | 2020-12-08 17:27:30 +0100 | [diff] [blame] | 15 | bootblock-y += early_fch.c |
Zheng Bao | b0f00ed | 2021-03-16 15:28:49 +0800 | [diff] [blame] | 16 | bootblock-y += i2c.c |
Felix Held | 07462ef | 2020-12-11 15:55:45 +0100 | [diff] [blame] | 17 | bootblock-y += gpio.c |
Raul E Rangel | 969a5c8 | 2021-02-05 15:56:52 -0700 | [diff] [blame] | 18 | bootblock-y += reset.c |
Felix Held | 8a3d4d5 | 2021-01-13 03:06:21 +0100 | [diff] [blame] | 19 | bootblock-y += uart.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 20 | |
Zheng Bao | b0f00ed | 2021-03-16 15:28:49 +0800 | [diff] [blame] | 21 | verstage-y += i2c.c |
Felix Held | 07462ef | 2020-12-11 15:55:45 +0100 | [diff] [blame] | 22 | verstage_x86-y += gpio.c |
Raul E Rangel | 969a5c8 | 2021-02-05 15:56:52 -0700 | [diff] [blame] | 23 | verstage_x86-y += reset.c |
Felix Held | 8a3d4d5 | 2021-01-13 03:06:21 +0100 | [diff] [blame] | 24 | verstage_x86-y += uart.c |
Felix Held | 44f4153 | 2020-12-09 02:01:16 +0100 | [diff] [blame] | 25 | |
Felix Held | 2421de6 | 2021-03-26 01:13:53 +0100 | [diff] [blame] | 26 | romstage-y += fsp_m_params.c |
Zheng Bao | b0f00ed | 2021-03-16 15:28:49 +0800 | [diff] [blame] | 27 | romstage-y += i2c.c |
Felix Held | 07462ef | 2020-12-11 15:55:45 +0100 | [diff] [blame] | 28 | romstage-y += gpio.c |
Raul E Rangel | 969a5c8 | 2021-02-05 15:56:52 -0700 | [diff] [blame] | 29 | romstage-y += reset.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 30 | romstage-y += romstage.c |
Felix Held | 8a3d4d5 | 2021-01-13 03:06:21 +0100 | [diff] [blame] | 31 | romstage-y += uart.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 32 | |
Zheng Bao | b0f00ed | 2021-03-16 15:28:49 +0800 | [diff] [blame] | 33 | ramstage-y += i2c.c |
Felix Held | 8602495 | 2021-02-03 23:44:28 +0100 | [diff] [blame] | 34 | ramstage-y += acpi.c |
Felix Held | 144c7aa | 2021-05-04 21:06:04 +0200 | [diff] [blame] | 35 | ramstage-y += agesa_acpi.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 36 | ramstage-y += chip.c |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 37 | ramstage-y += cpu.c |
Felix Held | ea32c52 | 2021-02-13 01:42:44 +0100 | [diff] [blame] | 38 | ramstage-y += data_fabric.c |
Felix Held | 230dbd6 | 2021-01-28 23:40:52 +0100 | [diff] [blame] | 39 | ramstage-y += fch.c |
Felix Held | 793f371 | 2021-03-26 00:13:51 +0100 | [diff] [blame] | 40 | ramstage-y += fsp_s_params.c |
Felix Held | 07462ef | 2020-12-11 15:55:45 +0100 | [diff] [blame] | 41 | ramstage-y += gpio.c |
Raul E Rangel | 969a5c8 | 2021-02-05 15:56:52 -0700 | [diff] [blame] | 42 | ramstage-y += reset.c |
Raul E Rangel | cf6dc7d | 2021-02-05 16:00:41 -0700 | [diff] [blame] | 43 | ramstage-y += root_complex.c |
Felix Held | 8a3d4d5 | 2021-01-13 03:06:21 +0100 | [diff] [blame] | 44 | ramstage-y += uart.c |
Felix Held | e77d939 | 2021-03-11 19:37:32 +0100 | [diff] [blame] | 45 | ramstage-y += xhci.c |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 46 | |
Mathew King | 45a33b0 | 2021-03-04 15:32:50 -0700 | [diff] [blame] | 47 | smm-y += gpio.c |
Felix Held | ee2a365 | 2021-02-09 23:43:17 +0100 | [diff] [blame] | 48 | smm-y += smihandler.c |
Felix Held | 7f3f52d | 2021-03-03 18:56:41 +0100 | [diff] [blame] | 49 | smm-y += smu.c |
Raul E Rangel | f41ca1e | 2021-02-12 16:57:49 -0700 | [diff] [blame] | 50 | smm-$(CONFIG_DEBUG_SMI) += uart.c |
Felix Held | ee2a365 | 2021-02-09 23:43:17 +0100 | [diff] [blame] | 51 | |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 52 | CPPFLAGS_common += -I$(src)/soc/amd/cezanne/include |
Felix Held | 8602495 | 2021-02-03 23:44:28 +0100 | [diff] [blame] | 53 | CPPFLAGS_common += -I$(src)/soc/amd/cezanne/acpi |
Felix Held | 8d0a609 | 2021-01-14 01:40:50 +0100 | [diff] [blame] | 54 | CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/cezanne |
| 55 | |
| 56 | $(call strip_quotes,$(CONFIG_FSP_M_CBFS))-options := -b $(CONFIG_FSP_M_ADDR) |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 57 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 58 | MAINBOARD_BLOBS_DIR:=$(top)/3rdparty/blobs/mainboard/$(MAINBOARDDIR) |
| 59 | |
| 60 | # ROMSIG Normally At ROMBASE + 0x20000 |
| 61 | # Overridden by CONFIG_AMD_FWM_POSITION_INDEX |
| 62 | # +-----------+---------------+----------------+------------+ |
| 63 | # |0x55AA55AA | | | | |
| 64 | # +-----------+---------------+----------------+------------+ |
| 65 | # | | PSPDIR ADDR | BIOSDIR ADDR | |
| 66 | # +-----------+---------------+----------------+ |
| 67 | |
Zheng Bao | 8516c21 | 2021-01-23 10:09:00 +0800 | [diff] [blame] | 68 | $(if $(CONFIG_AMD_FWM_POSITION_INDEX), ,\ |
| 69 | $(error Invalid AMD firmware position index. Check if the board sets a valid ROM size)) |
| 70 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 71 | CEZANNE_FWM_POSITION=$(call int-add, \ |
| 72 | $(call int-subtract, 0xffffffff \ |
| 73 | $(call int-shift-left, \ |
| 74 | 0x80000 $(CONFIG_AMD_FWM_POSITION_INDEX))) 0x20000 1) |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 75 | |
| 76 | CEZANNE_FW_A_POSITION=$(call int-add, \ |
| 77 | $(shell awk '$$2 == "FMAP_SECTION_FW_MAIN_A_START" {print $$3}' $(obj)/fmap_config.h) \ |
| 78 | 0x40) |
| 79 | |
| 80 | CEZANNE_FW_B_POSITION=$(call int-add, \ |
| 81 | $(shell awk '$$2 == "FMAP_SECTION_FW_MAIN_B_START" {print $$3}' $(obj)/fmap_config.h) \ |
| 82 | 0x40) |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 83 | # |
| 84 | # PSP Directory Table items |
| 85 | # |
| 86 | # Certain ordering requirements apply, however these are ensured by amdfwtool. |
| 87 | # For more information see "AMD Platform Security Processor BIOS Architecture |
| 88 | # Design Guide for AMD Family 17h Processors" (PID #55758, NDA only). |
| 89 | # |
| 90 | |
| 91 | FIRMWARE_LOCATION=$(shell grep -e FIRMWARE_LOCATION $(CONFIG_AMDFW_CONFIG_FILE) | awk '{print $$2}') |
| 92 | |
Rob Barnes | e09b681 | 2021-04-15 17:21:19 -0600 | [diff] [blame] | 93 | ifeq ($(CONFIG_PSP_DISABLE_POSTCODES),y) |
| 94 | PSP_SOFTFUSE_BITS += 7 |
| 95 | endif |
| 96 | |
| 97 | ifeq ($(CONFIG_PSP_POSTCODES_ON_ESPI),y) |
| 98 | PSP_SOFTFUSE_BITS += 15 |
| 99 | endif |
| 100 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 101 | ifeq ($(CONFIG_PSP_UNLOCK_SECURE_DEBUG),y) |
| 102 | # Enable secure debug unlock |
| 103 | PSP_SOFTFUSE_BITS += 0 |
| 104 | OPT_TOKEN_UNLOCK="--token-unlock" |
Felix Held | dc2d356 | 2020-12-02 14:38:53 +0100 | [diff] [blame] | 105 | endif |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 106 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 107 | ifeq ($(CONFIG_PSP_LOAD_MP2_FW),y) |
| 108 | OPT_PSP_LOAD_MP2_FW="--load-mp2-fw" |
| 109 | else |
| 110 | # Disable MP2 firmware loading |
| 111 | PSP_SOFTFUSE_BITS += 29 |
| 112 | endif |
| 113 | |
Martin Roth | fdad5ad | 2021-04-16 11:36:01 -0600 | [diff] [blame] | 114 | # Use additional Soft Fuse bits specified in Kconfig |
Zheng Bao | 17022bb | 2021-05-13 22:38:05 +0800 | [diff] [blame] | 115 | PSP_SOFTFUSE_BITS += $(call strip_quotes, $(CONFIG_PSP_SOFTFUSE_BITS)) |
Martin Roth | fdad5ad | 2021-04-16 11:36:01 -0600 | [diff] [blame] | 116 | |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 117 | # type = 0x3a |
| 118 | ifeq ($(CONFIG_HAVE_PSP_WHITELIST_FILE),y) |
| 119 | PSP_WHITELIST_FILE=$(CONFIG_PSP_WHITELIST_FILE) |
| 120 | endif |
| 121 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 122 | # |
| 123 | # BIOS Directory Table items - proper ordering is managed by amdfwtool |
| 124 | # |
| 125 | |
| 126 | # type = 0x60 |
Matt Papageorge | a37ec52 | 2021-02-22 19:36:34 -0600 | [diff] [blame] | 127 | PSP_APCB_FILES=$(APCB_SOURCES) $(APCB_SOURCES_RECOVERY) |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 128 | |
| 129 | # type = 0x61 |
| 130 | PSP_APOB_BASE=$(CONFIG_PSP_APOB_DRAM_ADDRESS) |
| 131 | |
| 132 | # type = 0x62 |
| 133 | PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img |
| 134 | PSP_ELF_FILE=$(objcbfs)/bootblock.elf |
| 135 | PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}') |
| 136 | PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}') |
| 137 | |
Felix Held | 4324bc6 | 2021-02-19 22:28:56 +0100 | [diff] [blame] | 138 | # type = 0x63 - construct APOB NV base/size from flash map |
| 139 | # The flashmap section used for this is expected to be named RW_MRC_CACHE |
| 140 | APOB_NV_SIZE=$(shell awk '$$2 == "FMAP_SECTION_RW_MRC_CACHE_SIZE" {print $$3}' $(obj)/fmap_config.h) |
| 141 | APOB_NV_BASE=$(shell awk '$$2 == "FMAP_SECTION_RW_MRC_CACHE_START" {print $$3}' $(obj)/fmap_config.h) |
| 142 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 143 | ifeq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) |
| 144 | # type = 0x6B - PSP Shared memory location |
| 145 | ifneq ($(CONFIG_PSP_SHAREDMEM_SIZE),0x0) |
| 146 | PSP_SHAREDMEM_SIZE=$(CONFIG_PSP_SHAREDMEM_SIZE) |
| 147 | PSP_SHAREDMEM_BASE=$(shell awk '$$3 == "_psp_sharedmem_dram" {printf "0x" $$1}' $(objcbfs)/bootblock.map) |
| 148 | endif |
| 149 | |
| 150 | # type = 0x52 - PSP Bootloader Userspace Application (verstage) |
| 151 | PSP_VERSTAGE_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_FILE)) |
| 152 | PSP_VERSTAGE_SIG_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_SIGNING_TOKEN)) |
| 153 | endif # CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK |
| 154 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 155 | # Helper function to return a value with given bit set |
Martin Roth | fdad5ad | 2021-04-16 11:36:01 -0600 | [diff] [blame] | 156 | # Soft Fuse type = 0xb - See #55758 (NDA) for bit definitions. |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 157 | set-bit=$(call int-shift-left, 1 $(call _toint,$1)) |
| 158 | PSP_SOFTFUSE=$(shell A=$(call int-add, \ |
| 159 | $(foreach bit,$(PSP_SOFTFUSE_BITS),$(call set-bit,$(bit)))); printf "0x%x" $$A) |
| 160 | |
| 161 | # |
| 162 | # Build the arguments to amdfwtool (order is unimportant). Missing file names |
| 163 | # result in empty OPT_ variables, i.e. the argument is not passed to amdfwtool. |
| 164 | # |
| 165 | |
| 166 | add_opt_prefix=$(if $(call strip_quotes, $(1)), $(2) $(call strip_quotes, $(1)), ) |
| 167 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 168 | OPT_VERSTAGE_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_FILE), --verstage) |
| 169 | OPT_VERSTAGE_SIG_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_SIG_FILE), --verstage_sig) |
| 170 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 171 | OPT_PSP_APCB_FILES= $(if $(APCB_SOURCES), --instance 0 --apcb $(APCB_SOURCES)) \ |
| 172 | $(if $(APCB_SOURCES_RECOVERY), --instance 10 --apcb $(APCB_SOURCES_RECOVERY)) \ |
| 173 | $(if $(APCB_SOURCES_68), --instance 18 --apcb $(APCB_SOURCES_68)) |
| 174 | |
| 175 | OPT_APOB_ADDR=$(call add_opt_prefix, $(PSP_APOB_BASE), --apob-base) |
| 176 | OPT_PSP_BIOSBIN_FILE=$(call add_opt_prefix, $(PSP_BIOSBIN_FILE), --bios-bin) |
| 177 | OPT_PSP_BIOSBIN_DEST=$(call add_opt_prefix, $(PSP_BIOSBIN_DEST), --bios-bin-dest) |
| 178 | OPT_PSP_BIOSBIN_SIZE=$(call add_opt_prefix, $(PSP_BIOSBIN_SIZE), --bios-uncomp-size) |
| 179 | |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 180 | OPT_PSP_SHAREDMEM_BASE=$(call add_opt_prefix, $(PSP_SHAREDMEM_BASE), --sharedmem) |
| 181 | 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] | 182 | OPT_APOB_NV_SIZE=$(call add_opt_prefix, $(APOB_NV_SIZE), --apob-nv-size) |
| 183 | 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] | 184 | OPT_EFS_SPI_READ_MODE=$(call add_opt_prefix, $(CONFIG_EFS_SPI_READ_MODE), --spi-read-mode) |
| 185 | OPT_EFS_SPI_SPEED=$(call add_opt_prefix, $(CONFIG_EFS_SPI_SPEED), --spi-speed) |
| 186 | OPT_EFS_SPI_MICRON_FLAG=$(call add_opt_prefix, $(CONFIG_EFS_SPI_MICRON_FLAG), --spi-micron-flag) |
| 187 | |
| 188 | OPT_PSP_SOFTFUSE=$(call add_opt_prefix, $(PSP_SOFTFUSE), --soft-fuse) |
| 189 | |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 190 | OPT_WHITELIST_FILE=$(call add_opt_prefix, $(PSP_WHITELIST_FILE), --whitelist) |
| 191 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 192 | # Add all the files listed in the config file |
| 193 | POUND_SIGN=$(call strip_quotes, "\#") |
| 194 | DEP_FILES= $(patsubst %,$(FIRMWARE_LOCATION)/%, $(shell sed -e /^$(POUND_SIGN)/d -e /*/d -e /^FIRMWARE_LOCATION/d $(CONFIG_AMDFW_CONFIG_FILE) | awk '{print $$2}' )) |
| 195 | |
| 196 | AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \ |
| 197 | $(OPT_APOB_ADDR) \ |
| 198 | $(OPT_PSP_BIOSBIN_FILE) \ |
| 199 | $(OPT_PSP_BIOSBIN_DEST) \ |
| 200 | $(OPT_PSP_BIOSBIN_SIZE) \ |
| 201 | $(OPT_PSP_SOFTFUSE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 202 | $(OPT_PSP_LOAD_MP2_FW) \ |
Felix Held | 5f5b7dd | 2021-02-12 20:51:55 +0100 | [diff] [blame] | 203 | --use-pspsecureos \ |
Felix Held | bb3e9ef | 2021-02-12 18:26:08 +0100 | [diff] [blame] | 204 | --load-s0i3 \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 205 | --combo-capable \ |
| 206 | $(OPT_TOKEN_UNLOCK) \ |
Raul E Rangel | 97b8b17 | 2021-02-24 16:59:32 -0700 | [diff] [blame] | 207 | $(OPT_WHITELIST_FILE) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 208 | $(OPT_PSP_SHAREDMEM_BASE) \ |
| 209 | $(OPT_PSP_SHAREDMEM_SIZE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 210 | $(OPT_EFS_SPI_READ_MODE) \ |
| 211 | $(OPT_EFS_SPI_SPEED) \ |
| 212 | $(OPT_EFS_SPI_MICRON_FLAG) \ |
| 213 | --config $(CONFIG_AMDFW_CONFIG_FILE) \ |
| 214 | --soc-name "Cezanne" \ |
| 215 | --flashsize $(CONFIG_ROM_SIZE) |
| 216 | |
| 217 | $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 218 | $(PSP_VERSTAGE_FILE) \ |
| 219 | $(PSP_VERSTAGE_SIG_FILE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 220 | $$(PSP_APCB_FILES) \ |
| 221 | $(DEP_FILES) \ |
| 222 | $(AMDFWTOOL) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 223 | $(obj)/fmap_config.h \ |
| 224 | $(objcbfs)/bootblock.elf # this target also creates the .map file |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 225 | $(if $(PSP_APCB_FILES), ,$(error APCB_SOURCES is not set)) |
| 226 | rm -f $@ |
| 227 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 228 | $(AMDFWTOOL) \ |
| 229 | $(AMDFW_COMMON_ARGS) \ |
Felix Held | 4324bc6 | 2021-02-19 22:28:56 +0100 | [diff] [blame] | 230 | $(OPT_APOB_NV_SIZE) \ |
| 231 | $(OPT_APOB_NV_BASE) \ |
Kangheui Won | b997b0a0 | 2021-04-29 15:19:03 +1000 | [diff] [blame] | 232 | $(OPT_VERSTAGE_FILE) \ |
| 233 | $(OPT_VERSTAGE_SIG_FILE) \ |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 234 | --location $(shell printf "%#x" $(CEZANNE_FWM_POSITION)) \ |
| 235 | --multilevel \ |
| 236 | --output $@ |
| 237 | |
| 238 | $(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS) |
| 239 | rm -f $@ |
| 240 | @printf " AMDCOMPRS $(subst $(obj)/,,$(@))\n" |
| 241 | $(AMDCOMPRESS) --infile $(PSP_ELF_FILE) --outfile $@ --compress \ |
| 242 | --maxsize $(PSP_BIOSBIN_SIZE) |
| 243 | |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 244 | $(obj)/amdfw_a.rom: $(obj)/amdfw.rom |
| 245 | rm -f $@ |
| 246 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 247 | $(AMDFWTOOL) \ |
| 248 | $(AMDFW_COMMON_ARGS) \ |
| 249 | $(OPT_APOB_NV_SIZE) \ |
| 250 | $(OPT_APOB_NV_BASE) \ |
| 251 | --location $(shell printf "%#x" $(CEZANNE_FW_A_POSITION)) \ |
| 252 | --anywhere \ |
| 253 | --multilevel \ |
| 254 | --output $@ |
| 255 | |
| 256 | $(obj)/amdfw_b.rom: $(obj)/amdfw.rom |
| 257 | rm -f $@ |
| 258 | @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n" |
| 259 | $(AMDFWTOOL) \ |
| 260 | $(AMDFW_COMMON_ARGS) \ |
| 261 | $(OPT_APOB_NV_SIZE) \ |
| 262 | $(OPT_APOB_NV_BASE) \ |
| 263 | --location $(shell printf "%#x" $(CEZANNE_FW_B_POSITION)) \ |
| 264 | --anywhere \ |
| 265 | --multilevel \ |
| 266 | --output $@ |
| 267 | |
| 268 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 269 | cbfs-files-y += apu/amdfw |
| 270 | apu/amdfw-file := $(obj)/amdfw.rom |
| 271 | apu/amdfw-position := $(CEZANNE_FWM_POSITION) |
| 272 | apu/amdfw-type := raw |
| 273 | |
Kangheui Won | 1b2eeb1 | 2021-05-06 13:09:12 +1000 | [diff] [blame] | 274 | ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy) |
| 275 | cbfs-files-y += apu/amdfw_a |
| 276 | apu/amdfw_a-file := $(obj)/amdfw_a.rom |
| 277 | apu/amdfw_a-position := $(call strip_quotes, $(CEZANNE_FW_A_POSITION)) |
| 278 | apu/amdfw_a-type := raw |
| 279 | |
| 280 | cbfs-files-y += apu/amdfw_b |
| 281 | apu/amdfw_b-file := $(obj)/amdfw_b.rom |
| 282 | apu/amdfw_b-position := $(call strip_quotes, $(CEZANNE_FW_B_POSITION)) |
| 283 | apu/amdfw_b-type := raw |
| 284 | endif |
| 285 | |
Zheng Bao | b04405f | 2021-01-19 22:37:59 +0800 | [diff] [blame] | 286 | cpu_microcode_bins += $(wildcard ${FIRMWARE_LOCATION}/UcodePatch_*.bin) |
| 287 | |
Zheng Bao | f51738d | 2021-01-20 16:43:52 +0800 | [diff] [blame] | 288 | endif # ($(CONFIG_SOC_AMD_CEZANNE),y) |