2020-04-18 22:26:39 +02:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2019-04-23 00:08:31 +02:00
|
|
|
ifeq ($(CONFIG_SOC_AMD_PICASSO),y)
|
2019-04-22 22:55:16 +02:00
|
|
|
|
|
|
|
subdirs-y += ../../../cpu/amd/mtrr/
|
|
|
|
subdirs-y += ../../../cpu/x86/tsc
|
|
|
|
subdirs-y += ../../../cpu/x86/lapic
|
|
|
|
subdirs-y += ../../../cpu/x86/cache
|
|
|
|
subdirs-y += ../../../cpu/x86/mtrr
|
|
|
|
subdirs-y += ../../../cpu/x86/pae
|
|
|
|
subdirs-y += ../../../cpu/x86/smm
|
2020-05-28 08:44:50 +02:00
|
|
|
subdirs-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += psp_verstage
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2020-04-04 02:37:04 +02:00
|
|
|
bootblock-y += bootblock/pre_c.S
|
|
|
|
bootblock-y += bootblock/bootblock.c
|
2020-06-11 22:06:11 +02:00
|
|
|
bootblock-y += aoac.c
|
2020-04-04 02:37:04 +02:00
|
|
|
bootblock-y += southbridge.c
|
|
|
|
bootblock-y += i2c.c
|
2020-06-13 09:16:26 +02:00
|
|
|
bootblock-y += uart.c
|
2020-06-18 15:54:43 +02:00
|
|
|
bootblock-$(CONFIG_PICASSO_CONSOLE_UART) += uart_console.c
|
2020-10-04 12:12:06 +02:00
|
|
|
bootblock-y += monotonic_timer.c
|
2020-04-04 02:37:04 +02:00
|
|
|
bootblock-y += tsc_freq.c
|
|
|
|
bootblock-y += gpio.c
|
|
|
|
bootblock-y += smi_util.c
|
2020-05-09 23:26:37 +02:00
|
|
|
bootblock-y += config.c
|
2020-10-02 22:51:40 +02:00
|
|
|
bootblock-y += pmutil.c
|
2020-08-13 19:06:18 +02:00
|
|
|
bootblock-y += reset.c
|
2020-10-06 23:29:28 +02:00
|
|
|
bootblock-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += bootblock/vboot_bootblock.c
|
2020-04-04 02:37:04 +02:00
|
|
|
|
2019-04-22 22:55:16 +02:00
|
|
|
romstage-y += i2c.c
|
|
|
|
romstage-y += romstage.c
|
|
|
|
romstage-y += gpio.c
|
|
|
|
romstage-y += pmutil.c
|
2020-05-28 08:44:50 +02:00
|
|
|
romstage-y += reset.c
|
2019-08-03 20:28:40 +02:00
|
|
|
romstage-y += memmap.c
|
2020-06-13 09:16:26 +02:00
|
|
|
romstage-y += uart.c
|
2020-06-18 15:54:43 +02:00
|
|
|
romstage-$(CONFIG_PICASSO_CONSOLE_UART) += uart_console.c
|
2020-10-04 12:12:06 +02:00
|
|
|
romstage-y += monotonic_timer.c
|
2019-04-22 22:55:16 +02:00
|
|
|
romstage-y += tsc_freq.c
|
2020-06-11 22:06:11 +02:00
|
|
|
romstage-y += aoac.c
|
2019-04-22 22:55:16 +02:00
|
|
|
romstage-y += southbridge.c
|
|
|
|
romstage-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
|
2020-01-24 17:42:57 +01:00
|
|
|
romstage-y += psp.c
|
2020-05-09 23:26:37 +02:00
|
|
|
romstage-y += config.c
|
2020-06-08 21:30:40 +02:00
|
|
|
romstage-y += mrc_cache.c
|
2019-04-22 22:55:16 +02:00
|
|
|
|
|
|
|
verstage-y += i2c.c
|
|
|
|
verstage-y += pmutil.c
|
2020-05-09 23:26:37 +02:00
|
|
|
verstage-y += config.c
|
2020-06-11 22:06:11 +02:00
|
|
|
verstage-y += aoac.c
|
2020-05-28 08:44:50 +02:00
|
|
|
verstage_x86-y += gpio.c
|
|
|
|
verstage_x86-y += uart.c
|
|
|
|
verstage_x86-$(CONFIG_PICASSO_CONSOLE_UART) += uart_console.c
|
2020-10-04 12:12:06 +02:00
|
|
|
verstage_x86-y += monotonic_timer.c
|
2020-05-28 08:44:50 +02:00
|
|
|
verstage_x86-y += tsc_freq.c
|
|
|
|
verstage_x86-y += reset.c
|
2019-04-22 22:55:16 +02:00
|
|
|
|
|
|
|
ramstage-y += i2c.c
|
|
|
|
ramstage-y += chip.c
|
|
|
|
ramstage-y += cpu.c
|
2020-07-09 01:54:40 +02:00
|
|
|
ramstage-y += data_fabric.c
|
2019-07-16 23:46:35 +02:00
|
|
|
ramstage-y += root_complex.c
|
2019-04-22 22:55:16 +02:00
|
|
|
ramstage-y += mca.c
|
|
|
|
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
|
soc/amd/picasso: Install AGESA ACPI tables
AGESA FSP provides additional ACPI tables that are required.
BUG=b:133337564, b:153675915
TEST=Boot trembyle to OS and dump ACPI tables.
ACPI: added table 2/32, length now 44
ACPI: * MCFG
ACPI: added table 3/32, length now 48
ACPI: * TPM2
TPM2 log created at 0xcc513000
ACPI: added table 4/32, length now 52
ACPI: * MADT
ACPI: added table 5/32, length now 56
current = cc635af0
Searching for AGESA FSP ACPI Tables
ACPI: * SSDT (AGESA).
ACPI: added table 6/32, length now 60
ACPI: * CRAT (AGESA).
ACPI: added table 7/32, length now 64
ACPI: * ALIB (AGESA).
ACPI: added table 8/32, length now 68
ACPI: * IVRS (AGESA).
ACPI: added table 9/32, length now 72
ACPI: * HPET
ACPI: added table 10/32, length now 76
Copying initialized VBIOS image from 0x000c0000
ACPI: * VFCT at cc63ca30
ACPI: added table 11/32, length now 80
ACPI: done.
ACPI tables: 102048 bytes.
[ 0.042326] ACPI: Early table checksum verification disabled
[ 0.048621] ACPI: RSDP 0x00000000000F0000 000024 (v02 COREv4)
[ 0.055011] ACPI: XSDT 0x00000000CC6310E0 00007C (v01 COREv4 COREBOOT 00000000 CORE 20200110)
[ 0.064506] ACPI: FACP 0x00000000CC634850 000114 (v06 COREv4 COREBOOT 00000000 CORE 20200110)
[ 0.073998] ACPI: DSDT 0x00000000CC631280 0035CF (v02 COREv4 COREBOOT 00010001 INTL 20200110)
[ 0.083488] ACPI: FACS 0x00000000CC631240 000040
[ 0.088623] ACPI: SSDT 0x00000000CC634970 00103D (v02 COREv4 COREBOOT 0000002A CORE 20200110)
[ 0.098114] ACPI: MCFG 0x00000000CC6359B0 00003C (v01 COREv4 COREBOOT 00000000 CORE 20200110)
[ 0.107606] ACPI: TPM2 0x00000000CC6359F0 00004C (v04 COREv4 COREBOOT 00000000 CORE 20200110)
[ 0.117100] ACPI: APIC 0x00000000CC635A40 0000A6 (v03 COREv4 COREBOOT 00000000 CORE 20200110)
[ 0.126592] ACPI: SSDT 0x00000000CC635AF0 00119C (v01 AMD AMD CPU 00000001 AMD 00000001)
[ 0.136082] ACPI: CRAT 0x00000000CC636C90 000810 (v01 AMD AMD CRAT 00000001 AMD 00000001)
[ 0.145573] ACPI: SSDT 0x00000000CC6374A0 005419 (v02 AMD AmdTable 00000002 MSFT 02000002)
[ 0.155064] ACPI: IVRS 0x00000000CC63C8C0 000126 (v02 AMD AMD IVRS 00000001 AMD 00000000)
[ 0.164556] ACPI: HPET 0x00000000CC63C9F0 000038 (v01 COREv4 COREBOOT 00000000 CORE 20200110)
[ 0.174047] ACPI: VFCT 0x00000000CC63CA30 00D469 (v01 COREv4 COREBOOT 00000000 CORE 20200110)
Signed-off-by: Matt Papageorge <matt.papageorge@amd.corp-partner.google.com>
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ic1e87c0f7a7c736592dd8c5c6765ef9a37ed7a40
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41804
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-14 00:00:12 +01:00
|
|
|
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += agesa_acpi.c
|
2019-04-22 22:55:16 +02:00
|
|
|
ramstage-y += gpio.c
|
2020-06-11 22:06:11 +02:00
|
|
|
ramstage-y += aoac.c
|
2019-04-22 22:55:16 +02:00
|
|
|
ramstage-y += southbridge.c
|
|
|
|
ramstage-y += pmutil.c
|
2020-05-28 08:44:50 +02:00
|
|
|
ramstage-y += reset.c
|
2019-08-16 16:45:20 +02:00
|
|
|
ramstage-y += acp.c
|
2019-04-22 22:55:16 +02:00
|
|
|
ramstage-y += sata.c
|
2019-08-03 20:28:40 +02:00
|
|
|
ramstage-y += memmap.c
|
2019-04-22 22:55:16 +02:00
|
|
|
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c
|
|
|
|
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
|
2020-06-13 09:16:26 +02:00
|
|
|
ramstage-y += uart.c
|
2020-06-18 15:54:43 +02:00
|
|
|
ramstage-$(CONFIG_PICASSO_CONSOLE_UART) += uart_console.c
|
2020-10-04 12:12:06 +02:00
|
|
|
ramstage-y += monotonic_timer.c
|
2019-04-22 22:55:16 +02:00
|
|
|
ramstage-y += tsc_freq.c
|
|
|
|
ramstage-y += finalize.c
|
2020-02-17 21:17:19 +01:00
|
|
|
ramstage-y += soc_util.c
|
2020-01-24 17:42:57 +01:00
|
|
|
ramstage-y += psp.c
|
2020-04-09 22:16:55 +02:00
|
|
|
ramstage-y += fsp_params.c
|
2020-05-09 23:26:37 +02:00
|
|
|
ramstage-y += config.c
|
2020-06-09 03:47:06 +02:00
|
|
|
ramstage-y += update_microcode.c
|
2020-02-06 00:46:30 +01:00
|
|
|
ramstage-y += graphics.c
|
2020-07-09 00:47:19 +02:00
|
|
|
ramstage-y += pcie_gpp.c
|
2020-07-09 20:08:58 +02:00
|
|
|
ramstage-y += xhci.c
|
2020-04-13 09:27:12 +02:00
|
|
|
ramstage-y += dmi.c
|
2019-04-22 22:55:16 +02:00
|
|
|
|
|
|
|
smm-y += smihandler.c
|
|
|
|
smm-y += smi_util.c
|
2020-10-04 12:12:06 +02:00
|
|
|
smm-y += monotonic_timer.c
|
2019-04-22 22:55:16 +02:00
|
|
|
smm-y += tsc_freq.c
|
2020-06-18 15:54:43 +02:00
|
|
|
ifeq ($(CONFIG_DEBUG_SMI),y)
|
|
|
|
smm-y += uart.c
|
|
|
|
smm-$(CONFIG_PICASSO_CONSOLE_UART) += uart_console.c
|
|
|
|
endif
|
2019-04-22 22:55:16 +02:00
|
|
|
smm-y += gpio.c
|
2020-01-24 17:42:57 +01:00
|
|
|
smm-y += psp.c
|
2020-04-23 14:43:44 +02:00
|
|
|
smm-y += smu.c
|
2020-05-09 23:26:37 +02:00
|
|
|
smm-y += config.c
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2019-04-23 00:32:58 +02:00
|
|
|
CPPFLAGS_common += -I$(src)/soc/amd/picasso
|
|
|
|
CPPFLAGS_common += -I$(src)/soc/amd/picasso/include
|
|
|
|
CPPFLAGS_common += -I$(src)/soc/amd/picasso/acpi
|
2020-01-21 07:05:31 +01:00
|
|
|
CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/picasso
|
2020-10-07 02:11:12 +02:00
|
|
|
CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/picasso/include
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2020-05-13 22:01:09 +02:00
|
|
|
MAINBOARD_BLOBS_DIR:=$(top)/3rdparty/blobs/mainboard/$(MAINBOARDDIR)
|
|
|
|
|
2019-04-22 22:55:16 +02:00
|
|
|
# ROMSIG Normally At ROMBASE + 0x20000
|
|
|
|
# Overridden by CONFIG_AMD_FWM_POSITION_INDEX
|
|
|
|
# +-----------+---------------+----------------+------------+
|
2019-06-19 19:46:06 +02:00
|
|
|
# |0x55AA55AA | | | |
|
2019-04-22 22:55:16 +02:00
|
|
|
# +-----------+---------------+----------------+------------+
|
2019-06-19 19:46:06 +02:00
|
|
|
# | | PSPDIR ADDR | BIOSDIR ADDR |
|
|
|
|
# +-----------+---------------+----------------+
|
|
|
|
|
2019-06-11 20:18:20 +02:00
|
|
|
PICASSO_FWM_POSITION=$(call int-add, \
|
2019-04-22 22:55:16 +02:00
|
|
|
$(call int-subtract, 0xffffffff \
|
|
|
|
$(call int-shift-left, \
|
|
|
|
0x80000 $(CONFIG_AMD_FWM_POSITION_INDEX))) 0x20000 1)
|
|
|
|
|
2019-06-19 19:46:06 +02:00
|
|
|
#
|
|
|
|
# PSP Directory Table items
|
|
|
|
#
|
|
|
|
# Certain ordering requirements apply, however these are ensured by amdfwtool.
|
|
|
|
# For more information see "AMD Platform Security Processor BIOS Architecture
|
|
|
|
# Design Guide for AMD Family 17h Processors" (PID #55758, NDA only).
|
|
|
|
#
|
|
|
|
|
2020-10-28 04:38:09 +01:00
|
|
|
FIRMWARE_LOCATE=$(shell grep -e FIRMWARE_LOCATE $(CONFIG_AMDFW_CONFIG_FILE) | awk '{print $$2}')
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2020-04-25 00:52:04 +02:00
|
|
|
ifeq ($(CONFIG_PSP_UNLOCK_SECURE_DEBUG),y)
|
2020-04-24 23:04:07 +02:00
|
|
|
# Enable secure debug unlock
|
|
|
|
PSP_SOFTFUSE_BITS += 0
|
2020-10-28 04:38:09 +01:00
|
|
|
OPT_TOKEN_UNLOCK="--token-unlock"
|
2020-04-25 00:52:04 +02:00
|
|
|
endif
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2020-09-11 11:06:19 +02:00
|
|
|
ifeq ($(CONFIG_USE_PSPSECUREOS),y)
|
2020-04-24 04:48:28 +02:00
|
|
|
# types = 0x2
|
2020-10-28 04:38:09 +01:00
|
|
|
OPT_PSP_USE_PSPSECUREOS="--use-pspsecureos"
|
2019-04-22 22:55:16 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2019-06-19 19:46:06 +02:00
|
|
|
ifeq ($(CONFIG_PSP_LOAD_MP2_FW),y)
|
2020-10-28 04:38:09 +01:00
|
|
|
OPT_PSP_LOAD_MP2_FW="--load-mp2-fw"
|
2019-06-19 19:46:06 +02:00
|
|
|
else
|
2020-04-24 23:04:07 +02:00
|
|
|
# Disable MP2 firmware loading
|
|
|
|
PSP_SOFTFUSE_BITS += 29
|
2019-06-19 19:46:06 +02:00
|
|
|
endif
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2019-06-19 19:46:06 +02:00
|
|
|
ifeq ($(CONFIG_PSP_LOAD_S0I3_FW),y)
|
2020-10-28 04:38:09 +01:00
|
|
|
OPT_PSP_LOAD_S0I3_FW="--load-s0i3"
|
2019-04-22 22:55:16 +02:00
|
|
|
endif
|
|
|
|
|
2019-06-19 19:46:06 +02:00
|
|
|
# type = 0x3a
|
|
|
|
ifeq ($(CONFIG_HAVE_PSP_WHITELIST_FILE),y)
|
|
|
|
PSP_WHITELIST_FILE=$(CONFIG_PSP_WHITELIST_FILE)
|
2019-04-22 22:55:16 +02:00
|
|
|
endif
|
2019-06-19 19:46:06 +02:00
|
|
|
#
|
|
|
|
# BIOS Directory Table items - proper ordering is managed by amdfwtool
|
|
|
|
#
|
|
|
|
|
|
|
|
# type = 0x60
|
2020-09-09 21:19:09 +02:00
|
|
|
PSP_APCB_FILES=$(APCB_SOURCES)
|
2019-06-19 19:46:06 +02:00
|
|
|
|
|
|
|
# type = 0x61
|
2020-01-21 03:56:30 +01:00
|
|
|
PSP_APOB_BASE=$(CONFIG_PSP_APOB_DRAM_ADDRESS)
|
2019-06-19 19:46:06 +02:00
|
|
|
|
|
|
|
# type = 0x62
|
|
|
|
PSP_BIOSBIN_FILE=$(obj)/amd_biospsp.img
|
2020-04-04 02:37:04 +02:00
|
|
|
PSP_ELF_FILE=$(objcbfs)/bootblock.elf
|
2020-08-17 05:11:48 +02:00
|
|
|
PSP_BIOSBIN_SIZE=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$5}')
|
|
|
|
PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -l $(PSP_ELF_FILE) | grep LOAD | awk '{print $$3}')
|
2020-01-21 03:56:30 +01:00
|
|
|
# type = 0x63 - construct APOB NV base/size from flash map
|
2020-09-22 01:23:54 +02:00
|
|
|
# The flashmap section used for this is expected to be named RW_MRC_CACHE
|
|
|
|
APOB_NV_SIZE=$(shell grep "FMAP_SECTION_RW_MRC_CACHE_SIZE" $(obj)/fmap_config.h | awk '{print $$(NF)}')
|
|
|
|
APOB_NV_BASE=$(shell grep "FMAP_SECTION_RW_MRC_CACHE_START" $(obj)/fmap_config.h | awk '{print $$(NF)}')
|
2019-06-19 19:46:06 +02:00
|
|
|
|
|
|
|
# type = 0x66
|
2020-04-29 22:21:22 +02:00
|
|
|
PSP_UCODE_FILE1=$(FIRMWARE_LOCATE)/UcodePatch_PCO_B1.bin
|
|
|
|
PSP_UCODE_FILE2=$(FIRMWARE_LOCATE)/UcodePatch_PCO_B0.bin
|
|
|
|
PSP_UCODE_FILE3=$(FIRMWARE_LOCATE)/UcodePatch_RV2_A0.bin
|
2019-06-19 19:46:06 +02:00
|
|
|
|
2020-06-14 18:38:32 +02:00
|
|
|
ifeq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y)
|
|
|
|
# type = 0x6B - PSP Shared memory location
|
|
|
|
ifneq ($(CONFIG_PSP_SHAREDMEM_SIZE),0x0)
|
|
|
|
PSP_SHAREDMEM_SIZE=$(CONFIG_PSP_SHAREDMEM_SIZE)
|
|
|
|
_PSP_SHAREDMEM_BASE=$(shell grep _psp_sharedmem_dram $(obj)/cbfs/$(CONFIG_CBFS_PREFIX)/bootblock.map | cut -f1 -d' ')
|
|
|
|
PSP_SHAREDMEM_BASE=$(shell printf "0x%s" $(_PSP_SHAREDMEM_BASE))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# type = 0x52 - PSP Bootloader Userspace Application (verstage)
|
2020-09-01 19:00:28 +02:00
|
|
|
PSP_VERSTAGE_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_FILE))
|
2020-09-01 19:04:21 +02:00
|
|
|
PSP_VERSTAGE_SIG_FILE=$(call strip_quotes,$(CONFIG_PSP_VERSTAGE_SIGNING_TOKEN))
|
2020-06-14 18:38:32 +02:00
|
|
|
endif # CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK
|
|
|
|
|
2020-04-24 23:04:07 +02:00
|
|
|
# type = 0xb - See #55758 (NDA) for bit definitions.
|
|
|
|
PSP_SOFTFUSE_BITS += 28
|
|
|
|
|
|
|
|
# Helper function to return a value with given bit set
|
|
|
|
set-bit=$(call int-shift-left, 1 $(call _toint,$1))
|
|
|
|
PSP_SOFTFUSE=$(shell A=$(call int-add, \
|
|
|
|
$(foreach bit,$(PSP_SOFTFUSE_BITS),$(call set-bit,$(bit)))); printf "0x%x" $$A)
|
|
|
|
|
2019-06-19 19:46:06 +02:00
|
|
|
#
|
|
|
|
# Build the arguments to amdfwtool (order is unimportant). Missing file names
|
|
|
|
# result in empty OPT_ variables, i.e. the argument is not passed to amdfwtool.
|
|
|
|
#
|
|
|
|
|
2019-04-22 22:55:16 +02:00
|
|
|
add_opt_prefix=$(if $(call strip_quotes, $(1)), $(2) $(call strip_quotes, $(1)), )
|
|
|
|
|
2020-06-14 18:38:32 +02:00
|
|
|
OPT_VERSTAGE_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_FILE), --verstage)
|
2020-09-01 19:04:21 +02:00
|
|
|
OPT_VERSTAGE_SIG_FILE=$(call add_opt_prefix, $(PSP_VERSTAGE_SIG_FILE), --verstage_sig)
|
2019-06-19 19:46:06 +02:00
|
|
|
|
2020-05-13 22:01:09 +02:00
|
|
|
OPT_PSP_APCB_FILES=$(foreach i, $(shell seq $(words $(PSP_APCB_FILES))), \
|
|
|
|
$(call add_opt_prefix, $(word $(i), $(PSP_APCB_FILES)), \
|
|
|
|
--instance $(shell printf "%x" $$(($(i)-1))) --apcb ))
|
|
|
|
|
2019-06-19 19:46:06 +02:00
|
|
|
OPT_APOB_ADDR=$(call add_opt_prefix, $(PSP_APOB_BASE), --apob-base)
|
|
|
|
OPT_PSP_BIOSBIN_FILE=$(call add_opt_prefix, $(PSP_BIOSBIN_FILE), --bios-bin)
|
|
|
|
OPT_PSP_BIOSBIN_DEST=$(call add_opt_prefix, $(PSP_BIOSBIN_DEST), --bios-bin-dest)
|
|
|
|
OPT_PSP_BIOSBIN_SIZE=$(call add_opt_prefix, $(PSP_BIOSBIN_SIZE), --bios-uncomp-size)
|
2020-10-28 04:38:09 +01:00
|
|
|
|
2020-06-14 18:38:32 +02:00
|
|
|
OPT_PSP_SHAREDMEM_BASE=$(call add_opt_prefix, $(PSP_SHAREDMEM_BASE), --sharedmem)
|
|
|
|
OPT_PSP_SHAREDMEM_SIZE=$(call add_opt_prefix, $(PSP_SHAREDMEM_SIZE), --sharedmem-size)
|
2020-06-26 01:31:54 +02:00
|
|
|
OPT_APOB_NV_SIZE=$(call add_opt_prefix, $(APOB_NV_SIZE), --apob-nv-size)
|
|
|
|
OPT_APOB_NV_BASE=$(call add_opt_prefix, $(APOB_NV_BASE),--apob-nv-base)
|
2020-07-08 18:33:48 +02:00
|
|
|
OPT_EFS_SPI_READ_MODE=$(call add_opt_prefix, $(CONFIG_EFS_SPI_READ_MODE), --spi-read-mode)
|
|
|
|
OPT_EFS_SPI_SPEED=$(call add_opt_prefix, $(CONFIG_EFS_SPI_SPEED), --spi-speed)
|
|
|
|
OPT_EFS_SPI_MICRON_FLAG=$(call add_opt_prefix, $(CONFIG_EFS_SPI_MICRON_FLAG), --spi-micron-flag)
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2020-10-28 04:38:09 +01:00
|
|
|
OPT_PSP_SOFTFUSE=$(call add_opt_prefix, $(PSP_SOFTFUSE), --soft-fuse)
|
|
|
|
|
2020-07-30 00:37:57 +02:00
|
|
|
ifeq ($(CONFIG_VBOOT),)
|
|
|
|
OPT_APOB0_NV_SIZE=$(OPT_APOB_NV_SIZE)
|
|
|
|
OPT_APOB0_NV_BASE=$(OPT_APOB_NV_BASE)
|
|
|
|
endif
|
|
|
|
|
2020-10-28 04:38:09 +01:00
|
|
|
OPT_WHITELIST_FILE=$(call add_opt_prefix, $(PSP_WHITELIST_FILE), --whitelist)
|
|
|
|
|
|
|
|
# Add all the files listed in the config file
|
|
|
|
DEP_FILES=$(shell $(AMDFWTOOL) --config $(CONFIG_AMDFW_CONFIG_FILE) --depend)
|
|
|
|
|
|
|
|
AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
|
2020-06-05 05:31:41 +02:00
|
|
|
$(OPT_APOB_ADDR) \
|
|
|
|
$(OPT_PSP_BIOSBIN_FILE) \
|
|
|
|
$(OPT_PSP_BIOSBIN_DEST) \
|
|
|
|
$(OPT_PSP_BIOSBIN_SIZE) \
|
|
|
|
$(OPT_PSP_SOFTFUSE) \
|
2020-10-28 04:38:09 +01:00
|
|
|
$(OPT_PSP_USE_PSPSECUREOS) \
|
|
|
|
$(OPT_PSP_LOAD_MP2_FW) \
|
|
|
|
$(OPT_PSP_LOAD_S0I3_FW) \
|
2020-06-05 05:31:41 +02:00
|
|
|
$(OPT_WHITELIST_FILE) \
|
|
|
|
$(OPT_SEC_DEBUG_FILE) \
|
|
|
|
$(OPT_PSP_SHAREDMEM_BASE) \
|
|
|
|
$(OPT_PSP_SHAREDMEM_SIZE) \
|
|
|
|
--combo-capable \
|
|
|
|
$(OPT_TOKEN_UNLOCK) \
|
2020-07-08 18:33:48 +02:00
|
|
|
$(OPT_EFS_SPI_READ_MODE) \
|
|
|
|
$(OPT_EFS_SPI_SPEED) \
|
|
|
|
$(OPT_EFS_SPI_MICRON_FLAG) \
|
2020-10-28 04:38:09 +01:00
|
|
|
--config $(CONFIG_AMDFW_CONFIG_FILE) \
|
2020-07-08 18:33:48 +02:00
|
|
|
--soc-name "Picasso" \
|
2020-06-05 05:31:41 +02:00
|
|
|
--flashsize $(CONFIG_ROM_SIZE)
|
|
|
|
|
2020-10-28 04:38:09 +01:00
|
|
|
$(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \
|
2020-06-14 18:38:32 +02:00
|
|
|
$(PSP_VERSTAGE_FILE) \
|
2020-09-01 19:04:21 +02:00
|
|
|
$(PSP_VERSTAGE_SIG_FILE) \
|
2020-05-13 22:01:09 +02:00
|
|
|
$$(PSP_APCB_FILES) \
|
2020-10-28 04:38:09 +01:00
|
|
|
$(DEP_FILES) \
|
2020-01-21 03:56:30 +01:00
|
|
|
$(AMDFWTOOL) \
|
2020-09-22 01:23:54 +02:00
|
|
|
$(obj)/fmap_config.h
|
2020-09-09 21:19:09 +02:00
|
|
|
$(if $(PSP_APCB_FILES), ,$(error APCB_SOURCES is not set))
|
2019-04-22 22:55:16 +02:00
|
|
|
rm -f $@
|
|
|
|
@printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n"
|
|
|
|
$(AMDFWTOOL) \
|
2020-09-01 19:05:53 +02:00
|
|
|
$(OPT_PSPBTLDR_FILE) \
|
2020-06-05 05:31:41 +02:00
|
|
|
$(AMDFW_COMMON_ARGS) \
|
2020-07-30 00:37:57 +02:00
|
|
|
$(OPT_APOB0_NV_SIZE) \
|
|
|
|
$(OPT_APOB0_NV_BASE) \
|
2020-09-01 19:05:53 +02:00
|
|
|
$(OPT_VERSTAGE_FILE) \
|
2020-09-01 19:04:21 +02:00
|
|
|
$(OPT_VERSTAGE_SIG_FILE) \
|
2020-06-05 05:31:41 +02:00
|
|
|
--location $(shell printf "%#x" $(PICASSO_FWM_POSITION)) \
|
|
|
|
--output $@
|
2019-04-22 22:55:16 +02:00
|
|
|
|
2020-04-04 02:37:04 +02:00
|
|
|
$(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS)
|
2019-06-19 19:46:06 +02:00
|
|
|
rm -f $@
|
|
|
|
@printf " AMDCOMPRS $(subst $(obj)/,,$(@))\n"
|
2020-04-04 02:37:04 +02:00
|
|
|
$(AMDCOMPRESS) --infile $(PSP_ELF_FILE) --outfile $@ --compress \
|
2019-06-19 19:46:06 +02:00
|
|
|
--maxsize $(PSP_BIOSBIN_SIZE)
|
|
|
|
|
2020-06-05 05:31:41 +02:00
|
|
|
$(obj)/amdfw_a.rom: $(obj)/amdfw.rom
|
|
|
|
rm -f $@
|
|
|
|
@printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n"
|
|
|
|
$(AMDFWTOOL) \
|
|
|
|
$(AMDFW_COMMON_ARGS) \
|
2020-07-30 00:37:57 +02:00
|
|
|
$(OPT_APOB_NV_SIZE) \
|
|
|
|
$(OPT_APOB_NV_BASE) \
|
2020-06-05 05:31:41 +02:00
|
|
|
--location $(shell printf "%#x" $(CONFIG_PICASSO_FW_A_POSITION)) \
|
|
|
|
--anywhere \
|
|
|
|
--output $@
|
|
|
|
|
|
|
|
$(obj)/amdfw_b.rom: $(obj)/amdfw.rom
|
|
|
|
rm -f $@
|
|
|
|
@printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n"
|
|
|
|
$(AMDFWTOOL) \
|
|
|
|
$(AMDFW_COMMON_ARGS) \
|
2020-07-30 00:37:57 +02:00
|
|
|
$(OPT_APOB_NV_SIZE) \
|
|
|
|
$(OPT_APOB_NV_BASE) \
|
2020-06-05 05:31:41 +02:00
|
|
|
--location $(shell printf "%#x" $(CONFIG_PICASSO_FW_B_POSITION)) \
|
|
|
|
--anywhere \
|
|
|
|
--output $@
|
|
|
|
|
2019-04-22 22:55:16 +02:00
|
|
|
cbfs-files-y += apu/amdfw
|
|
|
|
apu/amdfw-file := $(obj)/amdfw.rom
|
2019-06-11 20:18:20 +02:00
|
|
|
apu/amdfw-position := $(PICASSO_FWM_POSITION)
|
2019-04-22 22:55:16 +02:00
|
|
|
apu/amdfw-type := raw
|
|
|
|
|
2020-06-05 05:31:41 +02:00
|
|
|
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy)
|
|
|
|
cbfs-files-y += apu/amdfw_a
|
|
|
|
apu/amdfw_a-file := $(obj)/amdfw_a.rom
|
|
|
|
apu/amdfw_a-position := $(call strip_quotes, $(CONFIG_PICASSO_FW_A_POSITION))
|
|
|
|
apu/amdfw_a-type := raw
|
|
|
|
|
|
|
|
cbfs-files-y += apu/amdfw_b
|
|
|
|
apu/amdfw_b-file := $(obj)/amdfw_b.rom
|
|
|
|
apu/amdfw_b-position := $(call strip_quotes, $(CONFIG_PICASSO_FW_B_POSITION))
|
|
|
|
apu/amdfw_b-type := raw
|
|
|
|
endif
|
|
|
|
|
2020-05-28 20:21:26 +02:00
|
|
|
$(call strip_quotes,$(CONFIG_FSP_M_CBFS))-options := -b $(CONFIG_FSP_M_ADDR)
|
|
|
|
|
2020-06-09 03:47:06 +02:00
|
|
|
cpu_microcode_bins += $(wildcard 3rdparty/amd_blobs/picasso/PSP/UcodePatch_*.bin)
|
|
|
|
|
2019-04-23 00:08:31 +02:00
|
|
|
endif # ($(CONFIG_SOC_AMD_PICASSO),y)
|