Skip to content

Commit 499ec56

Browse files
Ilya Smirnovdcrowell77
Ilya Smirnov
authored andcommitted
Odyssey CI
This commit enables Odyssey boot to come to istep 20.2 and runs some of the unit tests at that time. Change-Id: I050da7ee3b5f1cf6d96ea424f2793827471cdfcc JIRA: PFHB-471 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/150316 Reviewed-by: Deborah L McLemore <[email protected]> Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins Combined Simics CI <[email protected]> Reviewed-by: Matthew Raybuck <[email protected]> Tested-by: Jenkins OP HW <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Tested-by: Jenkins Server <[email protected]> Tested-by: Hostboot CI <[email protected]> Reviewed-by: Daniel M Crowell <[email protected]>
1 parent bb6458f commit 499ec56

27 files changed

+236
-29
lines changed

src/HBconfig

+6
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,9 @@ config SUPPORT_EEPROM_HWACCESS
7373
the devices with associated records pre-populated into the EECACHE PNOR
7474
partition will be marked as present; all devices without existing EECACHE
7575
records will be marked as not present.
76+
77+
config ODYSSEY_BRINGUP
78+
default n
79+
help
80+
A flag indicating Odyssey bringup. Some code paths may be cut/avoided
81+
during the bringup. Eventually, this flag needs to be removed.

src/build/citest/build-script

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# OpenPOWER HostBoot Project
88
#
9-
# Contributors Listed Below - COPYRIGHT 2014,2022
9+
# Contributors Listed Below - COPYRIGHT 2014,2023
1010
# [+] International Business Machines Corp.
1111
#
1212
#
@@ -98,7 +98,7 @@ fi
9898

9999
# Create holding environment, build HB, and populate holding environment
100100
echo "#--------------------------------"
101-
if [ "$CHIP" == "P10" ] || [ "$CHIP" == "VPO" ] || [ "$CHIP" == "BONITO" ];then
101+
if [ "$CHIP" == "P10" ] || [ "$CHIP" == "VPO" ] || [ "$CHIP" == "BONITO" ] || [ "$CHIP" == "ODYSSEY" ];then
102102
echo "As things stand, when doing a P10 Standalone build, a Sandbox is "
103103
echo "still created because Simics' autosim depends on it."
104104
export SETUP_FOR_STANDALONE="1"
@@ -112,6 +112,10 @@ echo "PNOR=$PNOR"
112112
echo "CONFIG_FILE=$CONFIG_FILE"
113113
echo "#--------------------------------"
114114

115+
if [ "$CHIP" == "ODYSSEY" ]; then
116+
export HB_USE_ODYSSEY="1"
117+
fi
118+
115119
#export HOSTBOOT_DEBUG=1 #-- Ensure printkd / tracd is compiled in.
116120

117121
# Create simics sandbox.

src/build/citest/cxxtest-start.sh

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ if [[ $SETUP_FOR_STANDALONE -eq 1 ]];then
8787
if [ -z "${HB_USE_ODYSSEY}" ]; then
8888
echo "Using DDR4/Explorer DDIMMs"
8989
else
90+
# FIXME JIRA: PFHB-477 copy in DDR5 SPD and attribute override file for Odyssey.
91+
cp /gsa/ausgsa/home/i/s/ismirno/public/debug/odyssey/DDR5_new.bin ${STANDALONE}/simics
92+
cp /gsa/ausgsa/home/i/s/ismirno/public/debug/odyssey/run_ody_hwp_from_host.bin ${STANDALONE}/simics/attribute_override.bin
93+
9094
echo "Using DDR5/Odyssey DDIMMs"
9195
START_SIMICS_CMD+=" dimm_type=ody"
9296
# Odyssey params

src/build/citest/setup-env

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# OpenPOWER HostBoot Project
88
#
9-
# Contributors Listed Below - COPYRIGHT 2014,2022
9+
# Contributors Listed Below - COPYRIGHT 2014,2023
1010
# [+] International Business Machines Corp.
1111
#
1212
#
@@ -39,6 +39,10 @@ if [ "$CHIP" == "P10" ];
3939
then
4040
export CONFIG_FILE=src/build/configs/simics_p10.config
4141
export MACHINE=p10_standalone
42+
elif [ "$CHIP" == "ODYSSEY" ];
43+
then
44+
export CONFIG_FILE=src/build/configs/odyssey.config
45+
export MACHINE=p10_standalone
4246
elif [ "$CHIP" == "BONITO" ];
4347
then
4448
export CONFIG_FILE=src/build/configs/simics_p10.config

src/build/configs/odyssey.config

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#Run cxx testcases during boot
2+
set EARLY_TESTCASES
3+
4+
#Optional cxxtest conditional compilations
5+
set COMPILE_CXXTEST_HOOKS
6+
7+
#enable EEPROM caching with hardware access
8+
set SUPPORT_EEPROM_CACHING
9+
set SUPPORT_EEPROM_HWACCESS
10+
11+
set PNORDD_IS_SFC
12+
set SFC_IS_AST2400
13+
14+
#there is currently no planar vpd in the standalone model
15+
unset HAVE_PVPD
16+
17+
# Skip CRC check in exp_inband.C
18+
set P10_BRING_UP
19+
20+
# Enable Console
21+
set CONSOLE
22+
23+
# Enable FFDC output to Console
24+
set CONSOLE_OUTPUT_FFDCDISPLAY
25+
26+
# Enable HTMGT for OCC
27+
set HTMGT
28+
29+
set START_OCC_DURING_BOOT
30+
31+
# Disable MCTP and PLDM, because there is no BMC to talk to in standalone
32+
unset MCTP
33+
unset PLDM
34+
35+
# Enable MCTP/PLDM testcases
36+
set MCTP_TESTCASES
37+
set PLDM_TESTCASES
38+
39+
# Enable the VPD ECC algorithms
40+
set COMPILE_VPD_ECC_ALGORITHMS
41+
42+
# Disable persistent RW attributes
43+
unset ENABLE_PERSISTENT_RW_ATTR
44+
45+
# Set Odyssey bringup compile flag
46+
set ODYSSEY_BRINGUP

src/build/simics/startup.simics

+11
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,14 @@ if($machine_name == "p10_standalone" or $machine_name == "bonito") {
275275
} else {
276276
run-command-file (lookup-file -query ($hb_script_location + "/combined.simics"))
277277
}
278+
279+
$use_odyssey = "0"
280+
@if 'HB_USE_ODYSSEY' in os.environ: simenv.use_odyssey = "1"
281+
if($use_odyssey == "1") {
282+
echo "Loading DDR5_new"
283+
foreach $dimm in (list-components backplane0 ddimm_ody) {
284+
echo "Copy to "+$dimm
285+
$dimm.image_VPD[0].load-file "DDR5_new.bin"
286+
$dimm.image_VPD[1].load-file "DDR5_new.bin"
287+
}
288+
}

src/build/tools/hb

+3
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ hb_startsimics()
574574
if [ -z "${HB_USE_ODYSSEY}" ]; then
575575
echo "Using DDR4/Explorer DDIMMs"
576576
else
577+
# FIXME JIRA: PFHB-477 copy in DDR5 SPD and attribute override file for Odyssey.
578+
cp /gsa/ausgsa/home/i/s/ismirno/public/debug/odyssey/DDR5_new.bin ${PROJECT_ROOT}/standalone/simics/
579+
cp /gsa/ausgsa/home/i/s/ismirno/public/debug/odyssey/run_ody_hwp_from_host.bin ${PROJECT_ROOT}/standalone/simics/attribute_override.bin
577580
echo "Using DDR5/Odyssey DDIMMs"
578581
STARTSIMCMD+=(dimm_type=ody)
579582
fi

src/include/usr/isteps/istep20list.H

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2012,2019 */
8+
/* Contributors Listed Below - COPYRIGHT 2012,2023 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -91,6 +91,12 @@ const DepModInfo g_istep20Dependancies = {
9191
DEP_LIB(libistep20.so),
9292
DEP_LIB(libxz.so),
9393
DEP_LIB(libruntime.so),
94+
// TODO JIRA: PFHB-477 remove the below libs once unit tests move to the end of istep 21
95+
DEP_LIB(libsecureboot_ext.so),
96+
DEP_LIB(libhtmgt.so),
97+
DEP_LIB(libimageprocs.so),
98+
DEP_LIB(libruntime.so),
99+
DEP_LIB(libpm.so),
94100
NULL
95101
}
96102
};

src/makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ TESTCASE_MODULES += $(if $(CONFIG_EARLY_TESTCASES) && $(FSP_BUILD) ,,testnvram)
283283
TESTCASE_MODULES += testsmf
284284
TESTCASE_MODULES += testexpaccess
285285
TESTCASE_MODULES += testmdsaccess
286-
TESTCASE_MODULES += testrtloader
286+
# TODO JIRA: PFHB-477 This test is not working in 20.2
287+
TESTCASE_MODULES += $(if $(CONFIG_ODYSSEY_BRINGUP), ,testrtloader)
287288
TESTCASE_MODULES += testexpupd
288289
TESTCASE_MODULES += testspi
289290
TESTCASE_MODULES += testspiserial

src/usr/cxxtest/cxxtestexec.C

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2011,2022 */
8+
/* Contributors Listed Below - COPYRIGHT 2011,2023 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */

src/usr/expaccess/test/expscomtest.H

+36-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include <lib/shared/exp_consts.H>
4444
#include "exptest_utils.H"
4545
#include "../expscom_trace.H"
46-
46+
#include <targeting/odyutil.H>
4747

4848
using namespace TARGETING;
4949
using namespace ERRORLOG;
@@ -170,6 +170,13 @@ public:
170170
break;
171171
}
172172

173+
// Skip the test if we have Odyssey chips present
174+
if(TARGETING::UTIL::isOdysseyChip(l_explorerList[0]))
175+
{
176+
TS_INFO("testExpscomI2c: Odyssey chip detected; skipping the test");
177+
break;
178+
}
179+
173180
// Get the system's MEM_PORT units, we will use these as test targets
174181
TargetHandleList l_memportList;
175182
getAllChiplets( l_memportList,
@@ -448,6 +455,13 @@ public:
448455
break;
449456
}
450457

458+
// Skip the test if we have Odyssey chips present
459+
if(TARGETING::UTIL::isOdysseyChip(l_explorerList[0]))
460+
{
461+
TS_INFO("testExpscomI2cPlatform: Odyssey chip detected; skipping the test");
462+
break;
463+
}
464+
451465
// We will use the first and last targets for these scom tests
452466
auto l_firstExpChip = l_explorerList.front();
453467
auto l_lastExpChip = l_explorerList.back();
@@ -608,6 +622,13 @@ public:
608622
break;
609623
}
610624

625+
// Skip the test if we have Odyssey chips present
626+
if(TARGETING::UTIL::isOdysseyChip(l_explorerList[0]))
627+
{
628+
TS_INFO("testExpscomMmio: Odyssey chip detected; skipping the test");
629+
break;
630+
}
631+
611632
auto l_firstExpChip = l_explorerList.front();
612633
auto l_lastExpChip = l_explorerList.back();
613634

@@ -783,6 +804,13 @@ public:
783804
break;
784805
}
785806

807+
// Skip the test if we have Odyssey chips present
808+
if(TARGETING::UTIL::isOdysseyChip(l_explorerList[0]))
809+
{
810+
TS_INFO("testExpscomCombined: Odyssey chip detected; skipping the test");
811+
break;
812+
}
813+
786814
auto l_firstExpChip = l_explorerList.front();
787815
auto l_lastExpChip = l_explorerList.back();
788816

@@ -974,6 +1002,13 @@ public:
9741002
break;
9751003
}
9761004

1005+
// Skip the test if we have Odyssey chips present
1006+
if(TARGETING::UTIL::isOdysseyChip(l_explorerList[0]))
1007+
{
1008+
TS_INFO("testExpscomSbe: Odyssey chip detected; skipping the test");
1009+
break;
1010+
}
1011+
9771012
auto l_firstExpChip = l_explorerList.front();
9781013
auto l_lastExpChip = l_explorerList.back();
9791014

src/usr/expaccess/test/test.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# OpenPOWER HostBoot Project
77
#
8-
# Contributors Listed Below - COPYRIGHT 2019,2021
8+
# Contributors Listed Below - COPYRIGHT 2019,2023
99
# [+] International Business Machines Corp.
1010
#
1111
#
@@ -34,6 +34,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import
3434
EXTRAINCDIR += ${ROOTPATH}/src/usr/expaccess
3535
EXTRAINCDIR += ${ROOTPATH}/src/usr/expaccess/test
3636
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p10/common/include/
37+
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/
3738

3839
VPATH += ${ROOTPATH}/src/usr/expaccess/test/
3940
VPATH += ${ROOTPATH}/src/usr/expaccess/

src/usr/fapi2/test/fapi2MmioAccessTest.H

+13-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2018,2020 */
8+
/* Contributors Listed Below - COPYRIGHT 2018,2023 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -39,6 +39,7 @@
3939
#include <p10_mmiotests.H>
4040
#include <plat_hwp_invoker.H>
4141
#include <test/exptest_utils.H>
42+
#include <targeting/odyutil.H>
4243

4344
using namespace fapi2;
4445

@@ -119,6 +120,11 @@ void test_fapi2MmioInvalidSizes()
119120

120121
for (auto & l_ocmb: l_ocmbTargetList)
121122
{
123+
if(TARGETING::UTIL::isOdysseyChip(l_ocmb))
124+
{
125+
TS_INFO("test_fapi2MmioInvalidSizes() - Odyssey chip detected; skipping the test");
126+
continue; // TODO JIRA: PFHB-477 re-enable this test for Odyssey
127+
}
122128
Target<fapi2::TARGET_TYPE_OCMB_CHIP> fapi2_ocmbTarget( l_ocmb );
123129
auto first_ocmb_info = l_ocmb->getAttr<TARGETING::ATTR_SCOM_SWITCHES>();
124130
if (!first_ocmb_info.useInbandScom)
@@ -193,6 +199,12 @@ void test_fapi2MmioAccess()
193199
mutex_lock(iv_serializeTestMutex);
194200
for (auto & l_ocmb: l_chipList)
195201
{
202+
if(TARGETING::UTIL::isOdysseyChip(l_ocmb))
203+
{
204+
TS_INFO("test_fapi2MmioAccess() - Odyssey chip detected; skipping the test");
205+
continue; // TODO JIRA: PFHB-477 re-enable this test for Odyssey
206+
}
207+
196208
Target<fapi2::TARGET_TYPE_OCMB_CHIP> l_fapi2_target( l_ocmb );
197209

198210
numTests++;

src/usr/fapi2/test/fapi2PlatGetVpdOcmbChipTest.C

+20-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2016,2022 */
8+
/* Contributors Listed Below - COPYRIGHT 2016,2023 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -25,6 +25,7 @@
2525

2626
#include <fapi2PlatGetVpdOcmbChipTest.H>
2727
#include <plat_vpd_access.H>
28+
#include <targeting/odyutil.H>
2829

2930
// The maximum size of a the EFD buffer
3031
// Ony used if failed to get buffer size
@@ -275,6 +276,12 @@ void fapi2PlatGetVpdOcmbChipTest::testPlatGetVPD_EFD()
275276
++l_numTests;
276277
do
277278
{
279+
// TODO JIRA: PFHB-477 re-enable this test for Odyssey
280+
if(TARGETING::UTIL::isOdysseyChip(l_ocmbChipTarget.get()))
281+
{
282+
break;
283+
}
284+
278285
TS_INFO("testGetVPD_EFD: Test case 7 start");
279286

280287
// Initialize the other input variables
@@ -308,6 +315,12 @@ void fapi2PlatGetVpdOcmbChipTest::testPlatGetVPD_EFD()
308315
++l_numTests;
309316
do
310317
{
318+
// TODO JIRA: PFHB-477 re-enable this test for Odyssey
319+
if(TARGETING::UTIL::isOdysseyChip(l_ocmbChipTarget.get()))
320+
{
321+
break;
322+
}
323+
311324
TS_INFO("testGetVPD_EFD: Test case 8 start");
312325

313326
// Initialize the other input variables
@@ -376,6 +389,12 @@ void fapi2PlatGetVpdOcmbChipTest::testPlatGetVPD_EFD()
376389
++l_numTests;
377390
do
378391
{
392+
// TODO JIRA: PFHB-477 re-enable this test for Odyssey
393+
if(TARGETING::UTIL::isOdysseyChip(l_ocmbChipTarget.get()))
394+
{
395+
break;
396+
}
397+
379398
TS_INFO("testGetVPD_EFD: Test case 10 start");
380399

381400
// Initialize the other input variables

src/usr/fapi2/test/fapi2SpdTestCxx.H

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ class SPDTest: public CxxTest::TestSuite
148148
{
149149
l_compareSize = SPD::OCMB_SPD_EFD_COMBINED_SIZE;
150150
}
151+
else if( (l_memModule == SPD::MOD_TYPE_DDIMM) && (l_memGen == SPD::DDR5_TYPE) )
152+
{
153+
l_compareSize = SPD::OCMB_SPD_EFD_COMBINED_SIZE_DDR5;
154+
}
151155
else if( (l_memModule != SPD::MOD_TYPE_DDIMM) && (l_memGen == SPD::DDR4_TYPE) )
152156
{
153157
l_compareSize = SPD::DDR4_SPD_SIZE;

0 commit comments

Comments
 (0)