2017-05-05 05:17:45 +02:00
|
|
|
#*****************************************************************************
|
|
|
|
#
|
|
|
|
# Copyright (c) 2012, 2016-2017 Advanced Micro Devices, Inc.
|
|
|
|
# 2013 - 2014 Sage Electronic Engineering, LLC
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are met:
|
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# * Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
|
|
|
# * Neither the name of Advanced Micro Devices, Inc. nor the names of
|
|
|
|
# its contributors may be used to endorse or promote products derived
|
|
|
|
# from this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
# DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
|
|
|
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
#*****************************************************************************
|
2019-06-19 03:19:47 +02:00
|
|
|
ifeq ($(CONFIG_SOC_AMD_MERLINFALCON)$(CONFIG_SOC_AMD_STONEYRIDGE_FP4)$(CONFIG_SOC_AMD_STONEYRIDGE_FT4),y)
|
2017-05-08 00:47:36 +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
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2017-07-26 02:46:46 +02:00
|
|
|
bootblock-$(CONFIG_STONEYRIDGE_UART) += uart.c
|
2017-10-02 21:46:50 +02:00
|
|
|
bootblock-y += BiosCallOuts.c
|
2017-07-26 02:46:46 +02:00
|
|
|
bootblock-y += bootblock/bootblock.c
|
2018-02-06 00:46:41 +01:00
|
|
|
bootblock-y += gpio.c
|
2017-12-21 00:06:03 +01:00
|
|
|
bootblock-y += i2c.c
|
2018-12-28 15:48:58 +01:00
|
|
|
bootblock-$(CONFIG_USBDEBUG) += enable_usbdebug.c
|
2018-01-23 18:53:05 +01:00
|
|
|
bootblock-y += monotonic_timer.c
|
2017-09-15 23:23:04 +02:00
|
|
|
bootblock-y += pmutil.c
|
2017-11-12 22:54:09 +01:00
|
|
|
bootblock-y += reset.c
|
2017-07-26 02:46:46 +02:00
|
|
|
bootblock-y += tsc_freq.c
|
2017-11-24 15:41:29 +01:00
|
|
|
bootblock-y += southbridge.c
|
2018-04-04 19:35:21 +02:00
|
|
|
bootblock-y += nb_util.c
|
2018-04-26 00:43:18 +02:00
|
|
|
bootblock-$(CONFIG_SPI_FLASH) += spi.c
|
2018-04-21 01:50:12 +02:00
|
|
|
bootblock-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
|
2017-07-26 02:46:46 +02:00
|
|
|
|
2017-10-02 21:46:50 +02:00
|
|
|
romstage-y += BiosCallOuts.c
|
2017-12-21 00:06:03 +01:00
|
|
|
romstage-y += i2c.c
|
2017-07-26 02:46:46 +02:00
|
|
|
romstage-y += romstage.c
|
2018-12-28 15:48:58 +01:00
|
|
|
romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
|
2017-06-23 05:39:03 +02:00
|
|
|
romstage-y += gpio.c
|
2018-01-23 18:53:05 +01:00
|
|
|
romstage-y += monotonic_timer.c
|
2017-09-15 23:23:04 +02:00
|
|
|
romstage-y += pmutil.c
|
2017-11-12 22:54:09 +01:00
|
|
|
romstage-y += reset.c
|
2017-05-05 05:17:45 +02:00
|
|
|
romstage-y += smbus.c
|
|
|
|
romstage-y += smbus_spd.c
|
2017-05-16 02:55:11 +02:00
|
|
|
romstage-y += ramtop.c
|
2017-05-05 05:17:45 +02:00
|
|
|
romstage-$(CONFIG_STONEYRIDGE_UART) += uart.c
|
2017-06-16 18:10:17 +02:00
|
|
|
romstage-y += tsc_freq.c
|
2017-11-24 15:41:29 +01:00
|
|
|
romstage-y += southbridge.c
|
2018-04-04 19:35:21 +02:00
|
|
|
romstage-y += nb_util.c
|
2018-04-26 00:43:18 +02:00
|
|
|
romstage-$(CONFIG_SPI_FLASH) += spi.c
|
2018-04-21 01:50:12 +02:00
|
|
|
romstage-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2018-02-06 00:46:41 +01:00
|
|
|
verstage-y += gpio.c
|
2017-12-21 00:06:03 +01:00
|
|
|
verstage-y += i2c.c
|
2018-01-23 18:53:05 +01:00
|
|
|
verstage-y += monotonic_timer.c
|
2017-09-15 23:23:04 +02:00
|
|
|
verstage-y += pmutil.c
|
2017-06-10 00:35:14 +02:00
|
|
|
verstage-y += reset.c
|
|
|
|
verstage-$(CONFIG_STONEYRIDGE_UART) += uart.c
|
|
|
|
verstage-y += tsc_freq.c
|
2018-04-04 19:35:21 +02:00
|
|
|
verstage-y += nb_util.c
|
2018-04-26 00:43:18 +02:00
|
|
|
verstage-$(CONFIG_SPI_FLASH) += spi.c
|
2017-06-10 00:35:14 +02:00
|
|
|
|
2018-01-23 18:53:05 +01:00
|
|
|
postcar-y += monotonic_timer.c
|
2017-09-21 20:27:12 +02:00
|
|
|
postcar-$(CONFIG_STONEYRIDGE_UART) += uart.c
|
|
|
|
postcar-y += ramtop.c
|
2018-04-04 19:35:21 +02:00
|
|
|
postcar-y += nb_util.c
|
2018-11-26 15:04:46 +01:00
|
|
|
postcar-$(CONFIG_VBOOT_MEASURED_BOOT) += i2c.c
|
2018-11-08 10:59:40 +01:00
|
|
|
postcar-y += tsc_freq.c
|
2017-09-21 20:27:12 +02:00
|
|
|
|
2017-10-02 21:46:50 +02:00
|
|
|
ramstage-y += BiosCallOuts.c
|
2017-12-21 00:06:03 +01:00
|
|
|
ramstage-y += i2c.c
|
2017-05-05 05:17:45 +02:00
|
|
|
ramstage-y += chip.c
|
2017-09-14 01:24:53 +02:00
|
|
|
ramstage-y += cpu.c
|
2018-09-04 21:11:42 +02:00
|
|
|
ramstage-y += mca.c
|
2017-05-05 05:17:45 +02:00
|
|
|
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
|
2017-06-19 01:33:30 +02:00
|
|
|
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
|
2017-05-05 05:17:45 +02:00
|
|
|
ramstage-y += gpio.c
|
2018-01-23 18:53:05 +01:00
|
|
|
ramstage-y += monotonic_timer.c
|
2017-08-08 03:08:24 +02:00
|
|
|
ramstage-y += southbridge.c
|
2017-05-16 02:55:11 +02:00
|
|
|
ramstage-y += northbridge.c
|
2017-09-15 23:23:04 +02:00
|
|
|
ramstage-y += pmutil.c
|
2017-05-05 05:17:45 +02:00
|
|
|
ramstage-y += reset.c
|
|
|
|
ramstage-y += sata.c
|
|
|
|
ramstage-y += sm.c
|
|
|
|
ramstage-y += smbus.c
|
2017-05-16 02:55:11 +02:00
|
|
|
ramstage-y += ramtop.c
|
2017-05-05 05:17:45 +02:00
|
|
|
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c
|
|
|
|
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
|
|
|
|
ramstage-$(CONFIG_STONEYRIDGE_UART) += uart.c
|
|
|
|
ramstage-y += usb.c
|
2017-06-16 18:10:17 +02:00
|
|
|
ramstage-y += tsc_freq.c
|
2017-11-09 06:18:38 +01:00
|
|
|
ramstage-$(CONFIG_SPI_FLASH) += spi.c
|
2018-01-24 20:07:11 +01:00
|
|
|
ramstage-y += finalize.c
|
2018-04-04 19:35:21 +02:00
|
|
|
ramstage-y += nb_util.c
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2018-01-23 18:53:05 +01:00
|
|
|
smm-y += monotonic_timer.c
|
2017-09-27 21:32:00 +02:00
|
|
|
smm-y += smihandler.c
|
|
|
|
smm-y += smi_util.c
|
|
|
|
smm-y += tsc_freq.c
|
2017-09-27 21:26:23 +02:00
|
|
|
smm-$(CONFIG_DEBUG_SMI) += uart.c
|
2017-11-09 06:18:38 +01:00
|
|
|
smm-$(CONFIG_SPI_FLASH) += spi.c
|
2018-04-04 19:35:21 +02:00
|
|
|
smm-y += nb_util.c
|
2018-07-15 01:08:27 +02:00
|
|
|
smm-y += gpio.c
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge
|
|
|
|
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/include
|
|
|
|
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/acpi
|
|
|
|
|
2017-09-08 22:39:35 +02:00
|
|
|
# ROMSIG Normally At ROMBASE + 0x20000
|
|
|
|
# Overridden by CONFIG_AMD_FWM_POSITION_INDEX
|
2017-05-05 05:17:45 +02:00
|
|
|
# +-----------+---------------+----------------+------------+
|
|
|
|
# |0x55AA55AA |EC ROM Address |GEC ROM Address |USB3 ROM |
|
|
|
|
# +-----------+---------------+----------------+------------+
|
|
|
|
# |PSPDIR ADDR|
|
|
|
|
# +-----------+
|
|
|
|
#
|
|
|
|
# EC ROM should be 64K aligned.
|
2017-09-08 22:39:35 +02:00
|
|
|
STONEYRIDGE_FWM_POSITION=$(call int-add, \
|
|
|
|
$(call int-subtract, 0xffffffff \
|
|
|
|
$(call int-shift-left, \
|
|
|
|
0x80000 $(CONFIG_AMD_FWM_POSITION_INDEX))) 0x20000 1)
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
### 0
|
|
|
|
FIRMWARE_LOCATE=$(dir $(call strip_quotes, $(CONFIG_AMD_PUBKEY_FILE)))
|
2019-06-19 03:19:47 +02:00
|
|
|
ifeq ($(CONFIG_HAVE_MERLINFALCON_BINARIES),y)
|
|
|
|
FIRMWARE_TYPE=CZ
|
|
|
|
else
|
2017-05-05 05:17:45 +02:00
|
|
|
FIRMWARE_TYPE=ST
|
2019-06-19 03:19:47 +02:00
|
|
|
endif
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###5
|
2017-09-07 21:52:19 +02:00
|
|
|
PUBSIGNEDKEY_FILE=$(top)/$(FIRMWARE_LOCATE)/RtmPubSigned$(FIRMWARE_TYPE).key
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###1
|
2017-09-07 21:52:19 +02:00
|
|
|
PSPBTLDR_FILE=$(top)/$(FIRMWARE_LOCATE)/PspBootLoader_prod_$(FIRMWARE_TYPE).sbin
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###3
|
2017-09-07 21:52:19 +02:00
|
|
|
PSPRCVR_FILE=$(top)/$(FIRMWARE_LOCATE)/PspRecoveryBootLoader_prod_$(FIRMWARE_TYPE).sbin
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###4
|
2017-09-07 21:52:19 +02:00
|
|
|
PSPNVRAM_FILE=$(top)/$(FIRMWARE_LOCATE)/PspNvram$(FIRMWARE_TYPE).bin
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2017-09-07 21:23:55 +02:00
|
|
|
###8 - Check for SMU firmware named either *.sbin or *.csbin
|
|
|
|
### TODO: Remove *.sbin section after the blobs repo is updated.
|
2017-09-07 21:52:19 +02:00
|
|
|
SMUFWM_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware_$(FIRMWARE_TYPE).csbin
|
|
|
|
SMUFWM_FN_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware_$(FIRMWARE_TYPE)_FN.csbin
|
|
|
|
ifeq ("$(wildcard $(SMUFWM_FILE))","")
|
|
|
|
SMUFWM_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware$(FIRMWARE_TYPE).sbin
|
|
|
|
SMUFWM_FN_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware$(FIRMWARE_TYPE)_FN.sbin
|
2017-09-07 21:23:55 +02:00
|
|
|
endif
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###95
|
2017-09-07 21:52:19 +02:00
|
|
|
SMUSCS_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuScs$(FIRMWARE_TYPE).bin
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###9
|
2017-09-07 21:52:19 +02:00
|
|
|
PSPSECUREDEBUG_FILE=$(top)/$(FIRMWARE_LOCATE)/PspSecureDebug$(FIRMWARE_TYPE).Key
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2019-03-14 19:42:46 +01:00
|
|
|
ifeq ($(CONFIG_USE_PSPSECUREOS),y)
|
2017-09-07 21:23:55 +02:00
|
|
|
###2
|
2017-09-07 21:52:19 +02:00
|
|
|
PSPSCUREOS_FILE=$(top)/$(FIRMWARE_LOCATE)/PspSecureOs_prod_$(FIRMWARE_TYPE).csbin
|
2017-09-07 21:23:55 +02:00
|
|
|
|
2017-05-05 05:17:45 +02:00
|
|
|
###12
|
2017-09-07 21:52:19 +02:00
|
|
|
PSPTRUSTLETS_FILE=$(wildcard $(top)/$(FIRMWARE_LOCATE)/PspTrustlets*_prod_$(FIRMWARE_TYPE).cbin)
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
###13
|
2017-09-07 21:52:19 +02:00
|
|
|
TRUSTLETKEY_FILE=$(top)/$(FIRMWARE_LOCATE)/TrustletKey_prod_$(FIRMWARE_TYPE).sbin
|
2017-09-07 21:23:55 +02:00
|
|
|
endif
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2017-09-07 21:23:55 +02:00
|
|
|
###18- Check for SMU firmware2 named either *.sbin or *.csbin
|
|
|
|
### TODO: Remove *.sbin section after the blobs repo is updated.
|
2017-09-07 21:52:19 +02:00
|
|
|
SMUFIRMWARE2_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware2_prod_$(FIRMWARE_TYPE).csbin
|
|
|
|
SMUFIRMWARE2_FN_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware2_prod_$(FIRMWARE_TYPE)_FN.csbin
|
|
|
|
ifeq ("$(wildcard $(SMUFIRMWARE2_FILE))","")
|
|
|
|
SMUFIRMWARE2_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware2_prod_$(FIRMWARE_TYPE).sbin
|
|
|
|
SMUFIRMWARE2_FN_FILE=$(top)/$(FIRMWARE_LOCATE)/SmuFirmware2_prod_$(FIRMWARE_TYPE)_FN.sbin
|
2017-09-07 21:23:55 +02:00
|
|
|
endif
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2019-06-19 03:19:47 +02:00
|
|
|
ifeq ("$(wildcard $(SMUFWM_FN_FILE))","")
|
|
|
|
SMUFWM_FN_FILE=
|
|
|
|
SMUFIRMWARE2_FN_FILE=
|
|
|
|
endif
|
|
|
|
|
2017-05-05 05:17:45 +02:00
|
|
|
add_opt_prefix=$(if $(call strip_quotes, $(1)), $(2) $(call strip_quotes, $(1)), )
|
|
|
|
|
|
|
|
OPT_STONEYRIDGE_XHCI_FWM_FILE=$(call add_opt_prefix, $(CONFIG_STONEYRIDGE_XHCI_FWM_FILE), --xhci)
|
|
|
|
OPT_STONEYRIDGE_GEC_FWM_FILE=$(call add_opt_prefix, $(CONFIG_STONEYRIDGE_GEC_FWM_FILEddd), --gec)
|
|
|
|
|
2019-02-28 20:09:47 +01:00
|
|
|
OPT_AMD_PUBKEY_FILE=$(call add_opt_prefix, $(CONFIG_AMD_PUBKEY_FILE), --pubkey)
|
|
|
|
OPT_PSPBTLDR_FILE=$(call add_opt_prefix, $(PSPBTLDR_FILE), --bootloader)
|
|
|
|
OPT_SMUFWM_FILE=$(call add_opt_prefix, $(SMUFWM_FILE), --smufirmware)
|
|
|
|
OPT_PSPRCVR_FILE=$(call add_opt_prefix, $(PSPRCVR_FILE), --recovery)
|
|
|
|
OPT_PUBSIGNEDKEY_FILE=$(call add_opt_prefix, $(PUBSIGNEDKEY_FILE), --rtmpubkey)
|
|
|
|
OPT_PSPNVRAM_FILE=$(call add_opt_prefix, $(PSPNVRAM_FILE), --nvram)
|
|
|
|
OPT_PSPSECUREDEBUG_FILE=$(call add_opt_prefix, $(PSPSECUREDEBUG_FILE), --securedebug)
|
2019-03-14 19:42:46 +01:00
|
|
|
ifeq ($(CONFIG_USE_PSPSECUREOS),y)
|
2019-02-28 20:09:47 +01:00
|
|
|
OPT_PSPSCUREOS_FILE=$(call add_opt_prefix, $(PSPSCUREOS_FILE), --secureos)
|
|
|
|
OPT_PSPTRUSTLETS_FILE=$(call add_opt_prefix, $(PSPTRUSTLETS_FILE), --trustlets)
|
|
|
|
OPT_TRUSTLETKEY_FILE=$(call add_opt_prefix, $(TRUSTLETKEY_FILE), --trustletkey)
|
2017-09-07 21:23:55 +02:00
|
|
|
endif
|
2019-02-28 20:09:47 +01:00
|
|
|
OPT_SMUFIRMWARE2_FILE=$(call add_opt_prefix, $(SMUFIRMWARE2_FILE), --smufirmware2)
|
|
|
|
OPT_SMUSCS_FILE=$(call add_opt_prefix, $(SMUSCS_FILE), --smuscs)
|
2019-03-04 20:02:14 +01:00
|
|
|
SUBPROG_FN_SMU_FW=1
|
|
|
|
OPT_SMUFWM_FN_FILE=$(call add_opt_prefix, $(SMUFWM_FN_FILE), --subprogram $(SUBPROG_FN_SMU_FW) --smufirmware)
|
|
|
|
OPT_SMUFIRMWARE2_FN_FILE=$(call add_opt_prefix, $(SMUFIRMWARE2_FN_FILE), --subprogram $(SUBPROG_FN_SMU_FW) --smufirmware2)
|
2017-05-05 05:17:45 +02:00
|
|
|
|
2019-06-19 03:19:47 +02:00
|
|
|
ifeq ($(FIRMWARE_TYPE),ST)
|
|
|
|
OPT_COMBOCAPABLE=--combo-capable
|
|
|
|
endif
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
$(obj)/amdfw.rom: $(call strip_quotes, $(CONFIG_STONEYRIDGE_XHCI_FWM_FILE)) \
|
|
|
|
$(call strip_quotes, $(CONFIG_STONEYRIDGE_GEC_FWM_FILE)) \
|
|
|
|
$(call strip_quotes, $(CONFIG_AMD_PUBKEY_FILE)) \
|
2017-09-07 21:52:19 +02:00
|
|
|
$(call strip_quotes, $(PUBSIGNEDKEY_FILE)) \
|
|
|
|
$(call strip_quotes, $(PSPBTLDR_FILE)) \
|
|
|
|
$(call strip_quotes, $(PSPRCVR_FILE)) \
|
|
|
|
$(call strip_quotes, $(PSPSCUREOS_FILE)) \
|
|
|
|
$(call strip_quotes, $(PSPNVRAM_FILE)) \
|
|
|
|
$(call strip_quotes, $(SMUFWM_FILE)) \
|
|
|
|
$(call strip_quotes, $(SMUFWM_FN_FILE)) \
|
|
|
|
$(call strip_quotes, $(SMUSCS_FILE)) \
|
|
|
|
$(call strip_quotes, $(PSPSECUREDEBUG_FILE)) \
|
|
|
|
$(call strip_quotes, $(PSPTRUSTLETS_FILE)) \
|
|
|
|
$(call strip_quotes, $(TRUSTLETKEY_FILE)) \
|
|
|
|
$(call strip_quotes, $(SMUFIRMWARE2_FILE)) \
|
|
|
|
$(call strip_quotes, $(SMUFIRMWARE2_FN_FILE)) \
|
2017-05-05 05:17:45 +02:00
|
|
|
$(AMDFWTOOL)
|
|
|
|
rm -f $@
|
|
|
|
@printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n"
|
|
|
|
$(AMDFWTOOL) \
|
|
|
|
$(OPT_STONEYRIDGE_XHCI_FWM_FILE) \
|
|
|
|
$(OPT_STONEYRIDGE_GEC_FWM_FILE) \
|
|
|
|
$(OPT_AMD_PUBKEY_FILE) \
|
|
|
|
$(OPT_PSPBTLDR_FILE) \
|
|
|
|
$(OPT_SMUFWM_FILE) \
|
|
|
|
$(OPT_PSPRCVR_FILE) \
|
|
|
|
$(OPT_PUBSIGNEDKEY_FILE) \
|
|
|
|
$(OPT_PSPSCUREOS_FILE) \
|
|
|
|
$(OPT_PSPNVRAM_FILE) \
|
|
|
|
$(OPT_PSPSECUREDEBUG_FILE) \
|
|
|
|
$(OPT_PSPTRUSTLETS_FILE) \
|
|
|
|
$(OPT_TRUSTLETKEY_FILE) \
|
|
|
|
$(OPT_SMUFIRMWARE2_FILE) \
|
|
|
|
$(OPT_SMUSCS_FILE) \
|
2019-02-28 20:09:47 +01:00
|
|
|
$(OPT_AMD_PUBKEY_FILE) \
|
|
|
|
$(OPT_PSPBTLDR_FILE) \
|
|
|
|
$(OPT_SMUFWM_FILE) \
|
|
|
|
$(OPT_SMUFWM_FN_FILE) \
|
|
|
|
$(OPT_PSPRCVR_FILE) \
|
|
|
|
$(OPT_PUBSIGNEDKEY_FILE) \
|
|
|
|
$(OPT_PSPSCUREOS_FILE) \
|
|
|
|
$(OPT_PSPNVRAM_FILE) \
|
|
|
|
$(OPT_PSPSECUREDEBUG_FILE) \
|
|
|
|
$(OPT_PSPTRUSTLETS_FILE) \
|
|
|
|
$(OPT_TRUSTLETKEY_FILE) \
|
|
|
|
$(OPT_SMUFIRMWARE2_FILE) \
|
|
|
|
$(OPT_SMUFIRMWARE2_FN_FILE) \
|
|
|
|
$(OPT_SMUSCS_FILE) \
|
2019-06-19 03:19:47 +02:00
|
|
|
$(OPT_COMBOCAPABLE)\
|
2017-05-05 05:17:45 +02:00
|
|
|
--flashsize $(CONFIG_ROM_SIZE) \
|
2017-10-03 22:24:07 +02:00
|
|
|
--location $(shell printf "0x%x" $(STONEYRIDGE_FWM_POSITION)) \
|
2017-05-05 05:17:45 +02:00
|
|
|
--output $@
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
|
|
|
|
PHONY+=add_amdfw
|
|
|
|
INTERMEDIATE+=add_amdfw
|
|
|
|
|
2017-10-03 23:54:45 +02:00
|
|
|
# Calculate firmware position inside the ROM
|
|
|
|
STONEYRIDGE_FWM_ROM_POSITION=$(call int-add, \
|
|
|
|
$(call int-subtract, $(CONFIG_ROM_SIZE) \
|
|
|
|
$(call int-shift-left, \
|
|
|
|
0x80000 $(CONFIG_AMD_FWM_POSITION_INDEX))) 0x20000)
|
|
|
|
|
2017-05-05 05:17:45 +02:00
|
|
|
add_amdfw: $(obj)/coreboot.pre $(obj)/amdfw.rom
|
2017-10-03 23:54:45 +02:00
|
|
|
printf " DD Adding AMD Firmware at ROM offset 0x%x\n" \
|
|
|
|
"$(STONEYRIDGE_FWM_ROM_POSITION)"
|
2017-05-05 05:17:45 +02:00
|
|
|
dd if=$(obj)/amdfw.rom \
|
2017-10-03 23:54:45 +02:00
|
|
|
of=$(obj)/coreboot.pre conv=notrunc bs=1 \
|
|
|
|
seek=$(STONEYRIDGE_FWM_ROM_POSITION) >/dev/null 2>&1
|
2017-05-05 05:17:45 +02:00
|
|
|
|
|
|
|
else # ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
|
|
|
|
|
|
|
|
cbfs-files-y += apu/amdfw
|
|
|
|
apu/amdfw-file := $(obj)/amdfw.rom
|
|
|
|
apu/amdfw-position := $(STONEYRIDGE_FWM_POSITION)
|
|
|
|
apu/amdfw-type := raw
|
|
|
|
|
|
|
|
endif # ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
|
|
|
|
|
2017-10-30 23:11:45 +01:00
|
|
|
ifeq ($(CONFIG_SOC_AMD_PSP_SELECTABLE_SMU_FW),y)
|
|
|
|
|
|
|
|
cbfs-files-y += smu_fw
|
|
|
|
cbfs-files-y += smu_fw2
|
|
|
|
smu_fw-type := raw
|
|
|
|
smu_fw2-type := raw
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_SOC_AMD_SMU_FANLESS),y)
|
|
|
|
smu_fw-file := $(SMUFWM_FN_FILE)
|
|
|
|
smu_fw2-file := $(SMUFIRMWARE2_FN_FILE)
|
|
|
|
else ifeq ($(CONFIG_SOC_AMD_SMU_FANNED),y)
|
|
|
|
smu_fw-file := $(SMUFWM_FILE)
|
|
|
|
smu_fw2-file := $(SMUFIRMWARE2_FILE)
|
|
|
|
else
|
|
|
|
$(error "Proper SMU Firmware not selected")
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif # ifeq ($(CONFIG_SOC_AMD_PSP_SELECTABLE_SMU_FW),y)
|
|
|
|
|
2019-06-19 03:19:47 +02:00
|
|
|
endif # ($(CONFIG_SOC_AMD_MERLINFALCON)$(CONFIG_SOC_AMD_STONEYRIDGE_FP4)$(CONFIG_SOC_AMD_STONEYRIDGE_FT4),y)
|