summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/mss/makefile
blob: e413b466621531062d8060b184183de9b6577a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/usr/isteps/mss/makefile $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
ROOTPATH = ../../../..

IMPORT_PATH              = ${ROOTPATH}/src/import
PROCEDURES_PATH          = ${IMPORT_PATH}/chips/p9/procedures
AXONE_PROCEDURES_PATH    = ${IMPORT_PATH}/chips/p9a/procedures
EXPLORER_PROCEDURES_PATH = ${IMPORT_PATH}/chips/ocmb/explorer/procedures
GEMINI_PROCEDURES_PATH   = ${IMPORT_PATH}/chips/ocmb/gemini/procedures

#Add all the extra include paths
EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/
EXTRAINCDIR += ${IMPORT_PATH}/chips/ocmb/explorer/common/include/
EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/chips/ocmb/explorer/procedures/hwp/memory/lib/
EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/generic/memory/lib/
EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/

MSS_LIB += ${PROCEDURES_PATH}/hwp/memory
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/ccs/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/dimm/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/dimm/ddr4/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/ecc/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/eff_config/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/fir/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/freq/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/mc/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/mcbist/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/phy/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/power_thermal/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/spd/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/utils/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/workarounds/
MSS_LIB += ${PROCEDURES_PATH}/hwp/memory/lib/rosetta_map/
MSS_LIB += ${ROOTPATH}/src/import/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/spd/lrdimm/ddr4/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/spd/rdimm/ddr4/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/spd/common/ddr4/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/spd/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/utils/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/utils/shared/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/utils/freq/
MSS_LIB += ${ROOTPATH}/src/import/generic/memory/lib/utils/mcbist/
MSS_LIB += ${AXONE_PROCEDURES_PATH}/hwp/memory/
MSS_LIB += ${AXONE_PROCEDURES_PATH}/hwp/memory/lib/
MSS_LIB += ${AXONE_PROCEDURES_PATH}/hwp/memory/lib/eff_config/
MSS_LIB += ${AXONE_PROCEDURES_PATH}/hwp/memory/lib/utils/
MSS_LIB += ${AXONE_PROCEDURES_PATH}/hwp/memory/lib/freq/
MSS_LIB += ${AXONE_PROCEDURES_PATH}/hwp/memory/lib/workarounds/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/eff_config/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/utils/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/freq/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/power_thermal/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/omi/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/i2c/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/fir/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/mcbist/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/phy/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/ecc/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/ccs/
MSS_LIB += ${EXPLORER_PROCEDURES_PATH}/hwp/memory/lib/workarounds/
MSS_LIB += ${GEMINI_PROCEDURES_PATH}/hwp/memory/
MSS_LIB += ${GEMINI_PROCEDURES_PATH}/hwp/memory/lib/


EXTRAINCDIR += ${MSS_LIB}

include ${ROOTPATH}/src/build/mkrules/script.rules.mk
include ${ROOTPATH}/src/build/mkrules/verbose.rules.mk

# Generate generic_system_accessors header file
MSS_GENERIC_PATH := $(IMPORT_PATH)/generic/memory/lib
MSS_GENERIC_INCLUDES := $(shell find $(MSS_GENERIC_PATH) -type d)

GENERATED = generic_system_accessors
COMMAND = gen_accessors.pl
$(GENERATED)_COMMAND_PATH = $(IMPORT_PATH)/generic/memory/tools/

OUTPATH = ${ROOTPATH}/obj/genfiles/generic/memory/lib/
FILE_PREFIX = mss_generic_system

SOURCES += $(IMPORT_PATH)/hwpf/fapi2/xml/attribute_info/system_attributes.xml
SOURCES += $(IMPORT_PATH)/generic/procedures/xml/attribute_info/generic_memory_mrw_attributes.xml
SOURCES += $(IMPORT_PATH)/chips/p9/procedures/xml/attribute_info/freq_attributes.xml

CLEAN_TARGETS += ${OUTPATH}/mss_generic_system_attribute_getters.H
CLEAN_TARGETS += ${OUTPATH}/.generic_system_accessors.built

define generic_system_accessors_RUN
		$(C1) mkdir $(OUTPATH) -p
		$(C1) $$< --system=AXONE --output-dir=$(OUTPATH) --output-file-prefix=$(FILE_PREFIX) $$(filter-out $$<,$$^)
endef

$(call BUILD_GENERATED)

# Generate generic_memory_accessors header file
GENERATED = generic_accessors
COMMAND = gen_accessors.pl
$(GENERATED)_COMMAND_PATH = $(IMPORT_PATH)/generic/memory/tools/

OUTPATH = ${ROOTPATH}/obj/genfiles/generic/memory/lib
FILE_PREFIX = mss_generic

SOURCES += $(IMPORT_PATH)/generic/procedures/xml/attribute_info/generic_memory_attributes.xml
SOURCES += $(IMPORT_PATH)/generic/procedures/xml/attribute_info/generic_dq_attributes.xml
SOURCES += $(IMPORT_PATH)/generic/procedures/xml/attribute_info/generic_memory_eff_attributes.xml
SOURCES += $(IMPORT_PATH)/generic/procedures/xml/attribute_info/generic_memory_si_attributes.xml

CLEAN_TARGETS += ${OUTPATH}/mss_generic_attribute_getters.H
CLEAN_TARGETS += ${OUTPATH}/mss_generic_attribute_setters.H
CLEAN_TARGETS += ${OUTPATH}/.generic_accessors.built

define generic_accessors_RUN
		$(C1) mkdir $(OUTPATH) -p
		$(C1) $$< --system=AXONE --output-dir=$(OUTPATH) --output-file-prefix=$(FILE_PREFIX) $$(filter-out $$<,$$^)
endef

$(call BUILD_GENERATED)

# Generate explorer_memory_accessors header file
GENERATED = gen_exp_accessors
COMMAND = gen_accessors.pl
$(GENERATED)_COMMAND_PATH = $(IMPORT_PATH)/generic/memory/tools/

OUTPATH = ${ROOTPATH}/obj/genfiles/chips/ocmb/explorer/procedures/hwp/memory/lib/
FILE_PREFIX = mss_explorer

SOURCES += $(shell find $(IMPORT_PATH)/chips/ocmb/explorer/procedures/xml/attribute_info/ -type f)

CLEAN_TARGETS += ${OUTPATH}/mss_explorer_attribute_getters.H
CLEAN_TARGETS += ${OUTPATH}/mss_explorer_attribute_setters.H
CLEAN_TARGETS += ${OUTPATH}/.gen_exp_accessors.built

define gen_exp_accessors_RUN
		$(C1) mkdir $(OUTPATH) -p
		$(C1) $$< --system=AXONE --output-dir=$(OUTPATH) --output-file-prefix=$(FILE_PREFIX) $$(filter-out $$<,$$^)
endef

$(call BUILD_GENERATED)

GENERATED = gen_p9a_accessors
COMMAND= gen_accessors.pl
$(GENERATED)_COMMAND_PATH = $(IMPORT_PATH)/generic/memory/tools/

OUTPATH = ${ROOTPATH}/obj/genfiles/chips/p9a/procedures/hwp/memory/lib/
FILE_PREFIX = mss_p9a

SOURCES += $(ROOTPATH)/chips/p9/procedures/xml/attribute_info/p9a_io_attributes.xml
SOURCES += $(ROOTPATH)/chips/p9/procedures/xml/attribute_info/p9a_omi_setup_bars.xml
SOURCES += $(ROOTPATH)/chips/p9/procedures/xml/attribute_info/p9a_omi_init.xml
SOURCES += $(ROOTPATH)/chips/p9/procedures/xml/attribute_info/p9a_omi_train.xml

CLEAN_TARGETS += ${OUTPATH}/mss_p9a_attribute_getters.H
CLEAN_TARGETS += ${OUTPATH}/mss_p9a_attribute_setters.H
CLEAN_TARGETS += ${OUTPATH}/.gen_p9a_accessors.built

define gen_p9a_accessors_RUN
		$(C1) mkdir $(OUTPATH) -p
		$(C1) $$< --system=AXONE --output-dir=$(OUTPATH) --output-file-prefix=$(FILE_PREFIX) $$(filter-out $$<,$$^)
endef

$(call BUILD_GENERATED)

# Generate pmic_accessors header file
GENERATED = gen_pmic_accessors
COMMAND = gen_accessors.pl
$(GENERATED)_COMMAND_PATH = $(IMPORT_PATH)/generic/memory/tools/

OUTPATH = ${ROOTPATH}/obj/genfiles/chips/ocmb/common/procedures/hwp/pmic/lib/
FILE_PREFIX = mss_pmic

SOURCES += $(ROOTPATH)/chips/ocmb/common/procedures/xml/attribute_info/pmic_eff_attributes.xml

CLEAN_TARGETS += ${OUTPATH}/mss_pmic_attribute_getters.H
CLEAN_TARGETS += ${OUTPATH}/mss_pmic_attribute_setters.H
CLEAN_TARGETS += ${OUTPATH}/.gen_pmic_accessors.built

define gen_pmic_accessors_RUN
		$(C1) mkdir $(OUTPATH) -p
		$(C1) $$< --system=AXONE --output-dir=$(OUTPATH) --output-file-prefix=$(FILE_PREFIX) $$(filter-out $$<,$$^)
endef

$(call BUILD_GENERATED)

# Add common and generated parts to object list.

MSS_PATH := $(PROCEDURES_PATH)/hwp/memory/lib
MSS_SOURCE := $(shell find $(MSS_PATH) -name '*.C' -exec basename {} \;)
MSS_MODULE_OBJS += $(patsubst %.C,%.o,$(MSS_SOURCE))

MSS_PATH_GENERIC_MEMORY := ${ROOTPATH}/src/import/generic/memory/lib
MSS_GENERIC_MEMORY_SOURCE := $(shell find $(MSS_PATH_GENERIC_MEMORY) -name '*.C' -exec basename {} \;)
MSS_MODULE_OBJS += $(patsubst %.C,%.o,$(MSS_GENERIC_MEMORY_SOURCE))

MSS_PATH_AXONE := $(AXONE_PROCEDURES_PATH)/hwp/memory/lib
MSS_AXONE_SOURCE := $(shell find $(MSS_PATH_AXONE) -name '*.C' -exec basename {} \;)
MSS_MODULE_OBJS += $(if $(CONFIG_AXONE),$(patsubst %.C,%.o,$(MSS_AXONE_SOURCE)),)

MSS_PATH_EXPLORER := $(EXPLORER_PROCEDURES_PATH)/hwp/memory/lib
MSS_EXPLORER_SOURCE := $(shell find $(MSS_PATH_EXPLORER) -name '*.C' -exec basename {} \;)
#must bring explorer_memory_size.o in even in Nimbus/Cumulus builds because of p9_mss_grouping nest HWP
MSS_MODULE_OBJS += $(if $(CONFIG_AXONE),$(patsubst %.C,%.o,$(MSS_EXPLORER_SOURCE)),explorer_memory_size.o)

MSS_PATH_GEMINI := $(GEMINI_PROCEDURES_PATH)/hwp/memory/lib
MSS_GEMINI_SOURCE := $(shell find $(MSS_PATH_GEMINI) -name '*.C' -exec basename {} \;)
MSS_MODULE_OBJS += $(if $(CONFIG_AXONE),$(patsubst %.C,%.o,$(MSS_GEMINI_SOURCE)),)


MODULE = isteps_mss

OBJS += $(MSS_MODULE_OBJS)
$(call BUILD_MODULE)

VPATH += ${MSS_LIB}

SUBDIRS += runtime

#HWP build tool
include ${ROOTPATH}/procedure.rules.mk
include ${ROOTPATH}/config.mk


OpenPOWER on IntegriCloud