Debian Codegraph @

src/southbridge/amd/pi/hudson/Makefile.mk

raw symbols SCIP
1 ## SPDX-License-Identifier: BSD-3-Clause
2
3 # Copyright (c) 2012, Advanced Micro Devices, Inc.
4 # 2013 - 2014, Sage Electronic Engineering, LLC
5
6 bootblock-y += bootblock.c
7 bootblock-y += early_setup.c
8 bootblock-$(CONFIG_USBDEBUG) += enable_usbdebug.c
9
10 romstage-y += early_setup.c
11 romstage-y += enable_usbdebug.c
12 romstage-$(CONFIG_HUDSON_IMC_FWM) += imc.c
13 romstage-y += smbus.c
14 romstage-y += smbus_spd.c
15
16 verstage-y += early_setup.c
17
18 ramstage-y += enable_usbdebug.c
19 ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c
20 ramstage-y += hda.c
21 ramstage-y += hudson.c
22 ramstage-y += ide.c
23 ramstage-$(CONFIG_HUDSON_IMC_FWM) += imc.c
24 ramstage-y += lpc.c
25 ramstage-y += pci.c
26 ramstage-y += pcie.c
27 ramstage-y += sata.c
28 ramstage-y += sd.c
29 ramstage-y += sm.c
30 ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c
31 ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
32 ramstage-y += usb.c
33
34 all-y += reset.c
35
36 smm-y += smihandler.c
37 smm-y += smi_util.c
38
39 CPPFLAGS_common += -I$(src)/southbridge/amd/pi/hudson/include
40
41 # ROMSIG At ROMBASE + 0x20000:
42 # +-----------+---------------+----------------+------------+
43 # |0x55AA55AA |EC ROM Address |GEC ROM Address |USB3 ROM |
44 # +-----------+---------------+----------------+------------+
45 # |PSPDIR ADDR|
46 # +-----------+
47 #
48 # EC ROM should be 64K aligned.
49
50 ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
51 HUDSON_FWM_POSITION=0x20000
52 else
53 HUDSON_FWM_POSITION=0x720000
54 endif
55
56 ifeq ($(CONFIG_HUDSON_PSP), y)
57
58 ifeq ($(CONFIG_CPU_AMD_PI_00730F01), y)
59 FIRMWARE_TYPE=
60
61 endif
62
63 #PUBSIGNEDKEY_FILE=$(top)/$(FIRMWARE_LOCATION)/RtmPubSigned$(FIRMWARE_TYPE).key
64 #PSPNVRAM_FILE=$(top)/$(FIRMWARE_LOCATION)/PspNvram$(FIRMWARE_TYPE).bin
65 #PSPSECUREDEBUG_FILE=$(top)/$(FIRMWARE_LOCATION)/PspSecureDebug$(FIRMWARE_TYPE).Key
66
67 endif
68
69 add_opt_prefix=$(if $(call strip_quotes, $(1)), $(2) $(call strip_quotes, $(1)), )
70
71 OPT_HUDSON_XHCI_FWM_FILE=$(call add_opt_prefix, $(CONFIG_HUDSON_XHCI_FWM_FILE), --xhci)
72 OPT_HUDSON_IMC_FWM_FILE=$(call add_opt_prefix, $(CONFIG_HUDSON_IMC_FWM_FILE), --imc)
73 OPT_HUDSON_GEC_FWM_FILE=$(call add_opt_prefix, $(CONFIG_HUDSON_GEC_FWM_FILEddd), --gec)
74
75 OPT_AMD_PUBKEY_FILE=$(call add_opt_prefix, $(CONFIG_AMD_PUBKEY_FILE), --pubkey)
76 OPT_PSPBTLDR_FILE=$(call add_opt_prefix, $(PSPBTLDR_FILE), --bootloader)
77 OPT_SMUFWM_FILE=$(call add_opt_prefix, $(SMUFWM_FILE), --smufirmware)
78 OPT_PSPRCVR_FILE=$(call add_opt_prefix, $(PSPRCVR_FILE), --recovery)
79 OPT_PUBSIGNEDKEY_FILE=$(call add_opt_prefix, $(PUBSIGNEDKEY_FILE), --rtmpubkey)
80 OPT_PSPSECUREOS_FILE=$(call add_opt_prefix, $(PSPSECUREOS_FILE), --secureos)
81 OPT_PSPNVRAM_FILE=$(call add_opt_prefix, $(PSPNVRAM_FILE), --nvram)
82 OPT_PSPSECUREDEBUG_FILE=$(call add_opt_prefix, $(PSPSECUREDEBUG_FILE), --securedebug)
83 OPT_PSPTRUSTLETS_FILE=$(call add_opt_prefix, $(PSPTRUSTLETS_FILE), --trustlets)
84 OPT_TRUSTLETKEY_FILE=$(call add_opt_prefix, $(TRUSTLETKEY_FILE), --trustletkey)
85 OPT_SMUFIRMWARE2_FILE=$(call add_opt_prefix, $(SMUFIRMWARE2_FILE), --smufirmware2)
86 OPT_SMUSCS_FILE=$(call add_opt_prefix, $(SMUSCS_FILE), --smuscs)
87
88 $(obj)/amdfw.rom: $(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE)) \
89 $(call strip_quotes, $(CONFIG_HUDSON_IMC_FWM_FILE)) \
90 $(call strip_quotes, $(CONFIG_HUDSON_GEC_FWM_FILE)) \
91 $(call strip_quotes, $(AMD_PUBKEY2_FILE)) \
92 $(call strip_quotes, $(PUBSIGNEDKEY2_FILE)) \
93 $(call strip_quotes, $(PSPBTLDR2_FILE)) \
94 $(call strip_quotes, $(SMUFWM2_FILE)) \
95 $(call strip_quotes, $(SMUFWM2_FN_FILE)) \
96 $(call strip_quotes, $(PSPRCVR2_FILE)) \
97 $(call strip_quotes, $(PSPSECUREOS2_FILE)) \
98 $(call strip_quotes, $(PSPNVRAM2_FILE)) \
99 $(call strip_quotes, $(SMUSCS2_FILE)) \
100 $(call strip_quotes, $(PSPSECUREDEBUG2_FILE)) \
101 $(call strip_quotes, $(PSPTRUSTLETS2_FILE)) \
102 $(call strip_quotes, $(TRUSTLETKEY2_FILE)) \
103 $(call strip_quotes, $(SMUFIRMWARE2_2_FILE)) \
104 $(call strip_quotes, $(SMUFIRMWARE2_2_FN_FILE)) \
105 $(DEP_FILES) \
106 $(AMDFWTOOL)
107 rm -f $@
108 @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n"
109 $(AMDFWTOOL) \
110 $(OPT_HUDSON_XHCI_FWM_FILE) \
111 $(OPT_HUDSON_IMC_FWM_FILE) \
112 $(OPT_HUDSON_GEC_FWM_FILE) \
113 $(OPT_2AMD_PUBKEY_FILE) \
114 $(OPT_2PSPBTLDR_FILE) \
115 $(OPT_2SMUFWM_FILE) \
116 $(OPT_2SMUFWM_FN_FILE) \
117 $(OPT_2PSPRCVR_FILE) \
118 $(OPT_2PUBSIGNEDKEY_FILE) \
119 $(OPT_2PSPSECUREOS_FILE) \
120 $(OPT_2PSPNVRAM_FILE) \
121 $(OPT_2PSPSECUREDEBUG_FILE) \
122 $(OPT_2PSPTRUSTLETS_FILE) \
123 $(OPT_2TRUSTLETKEY_FILE) \
124 $(OPT_2SMUFIRMWARE2_FILE) \
125 $(OPT_2SMUFIRMWARE2_FN_FILE) \
126 $(OPT_2SMUSCS_FILE) \
127 --flashsize $(CONFIG_ROM_SIZE) \
128 --location $(HUDSON_FWM_POSITION) \
129 --config $(CONFIG_AMDFW_CONFIG_FILE) \
130 --output $@
131
132 ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
133 $(call add_intermediate, add_amdfw, $(obj)/amdfw.rom)
134 printf " DD Adding AMD Firmware\n"
135 dd if=$(obj)/amdfw.rom \
136 of=$< conv=notrunc bs=1 seek=131072 >/dev/null 2>&1
137
138 else # ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
139
140 cbfs-files-y += apu/amdfw
141 apu/amdfw-file := $(obj)/amdfw.rom
142 apu/amdfw-position := $(HUDSON_FWM_POSITION)
143 apu/amdfw-type := raw
144
145 endif # ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)