Skip to content

Commit 103be55

Browse files
Austin Cuiop-jenkins
authored andcommitted
EKB P9 build fix on RHEL7 systems
Updated images makefile to populate CHIPS correctly. Updated plat.H file. Updated eff_dimm.C file. Updated build-script file. Updated fapi2CreateAttrGetSetMacros.pl & plat.H file. Updated generateCmskWrapper.pl file. Updated scan_procedures_rules.mk file. Updated initfiles.mk file. Updated p9a_mss_eff_config.mk file. Updated p9_pm_pfet_control.mk file again. Updated files according to comments from code reviews. Updated exp_fw_update_wrap.mk file. Updated env.bash and many other *.H, *.C, *.mk files. Updated 01mss_lab.mk, p9c_mss_dump_regs.mk, and some other files. Updated *.mk and *common.mk files to change calling macro functions. Fixed several problems incluidng memcpy error. Fixed macro function error and other problems for files not found. Updated several C and mk files including p9_pstate_parameter_block.C. Updated initCompiler.y file seven files: p9_pm_recovery_ffdc_*.mk. Updated three files: mflags.env.mk, common.dir/cflags.env.mk etc. Change-Id: Ifac41276732e1004ac29c058ac610c56354e8d97 CQ: SW508504 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/97448 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com>
1 parent c2ca849 commit 103be55

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

import/chips/p9/procedures/hwp/lib/p9_ppe_commands.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HCODE Project */
77
/* */
8-
/* COPYRIGHT 2016,2017 */
8+
/* COPYRIGHT 2016,2020 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -324,7 +324,7 @@ p9_ppe_commands(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
324324
//Get IAR again
325325
FAPI_TRY(fapi2::getScom(i_target, i_base_address + PPE_XIDBGPRO, l_data64), "Error in GETSCOM");
326326
l_data64.extractToRight(l2_data32, 32, 32);
327-
sprintf(outstr, "IAR after ramming the instruction");
327+
sprintf(outstr, "IAR after ramming instruction");
328328
FAPI_INF("%-9s = 0x%08llX", outstr, l2_data32);
329329

330330
//If IAR is same after Ramming, increment IAR + 4

import/chips/p9/procedures/hwp/lib/p9_stop_util.H

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HCODE Project */
77
/* */
8-
/* COPYRIGHT 2015,2018 */
8+
/* COPYRIGHT 2015,2020 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -69,21 +69,21 @@ namespace stopImageSection
6969

7070
#else
7171
#define SWIZZLE_2_BYTE(WORD) \
72-
( (((WORD) >> 8) & 0x00FF) | (((WORD) << 8) & 0xFF00) )
72+
( ((((uint16_t)(WORD)) >> 8) & 0x00FF) | ((((uint16_t)(WORD)) << 8) & 0xFF00) )
7373

7474
#define SWIZZLE_4_BYTE(WORD) \
75-
( (((WORD) >> 24) & 0x000000FF) | (((WORD) >> 8) & 0x0000FF00) | \
76-
(((WORD) << 8) & 0x00FF0000) | (((WORD) << 24) & 0xFF000000) )
75+
( ((((uint32_t)(WORD)) >> 24) & 0x000000FF) | ((((uint32_t)(WORD)) >> 8) & 0x0000FF00) | \
76+
((((uint32_t)(WORD)) << 8) & 0x00FF0000) | ((((uint32_t)(WORD)) << 24) & 0xFF000000) )
7777

7878
#define SWIZZLE_8_BYTE(WORD) \
79-
( (((WORD) >> 56) & 0x00000000000000FF) | \
80-
(((WORD) >> 40) & 0x000000000000FF00)| \
81-
(((WORD) >> 24) & 0x0000000000FF0000) | \
82-
(((WORD) >> 8) & 0x00000000FF000000) | \
83-
(((WORD) << 8) & 0x000000FF00000000) | \
84-
(((WORD) << 24) & 0x0000FF0000000000) | \
85-
(((WORD) << 40) & 0x00FF000000000000) | \
86-
(((WORD) << 56) & 0xFF00000000000000) )
79+
( ((((uint64_t)(WORD)) >> 56) & 0x00000000000000FF) | \
80+
((((uint64_t)(WORD)) >> 40) & 0x000000000000FF00)| \
81+
((((uint64_t)(WORD)) >> 24) & 0x0000000000FF0000) | \
82+
((((uint64_t)(WORD)) >> 8) & 0x00000000FF000000) | \
83+
((((uint64_t)(WORD)) << 8) & 0x000000FF00000000) | \
84+
((((uint64_t)(WORD)) << 24) & 0x0000FF0000000000) | \
85+
((((uint64_t)(WORD)) << 40) & 0x00FF000000000000) | \
86+
((((uint64_t)(WORD)) << 56) & 0xFF00000000000000) )
8787
#endif
8888

8989
/**

import/chips/p9/xip/p9_xip_tool.C

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HCODE Project */
77
/* */
8-
/* COPYRIGHT 2015,2018 */
8+
/* COPYRIGHT 2015,2020 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -327,7 +327,8 @@ attrListing(const P9XipItem* i_item, const char* prefix)
327327
int rc = 0;
328328
uint64_t data = 0;
329329
uint32_t i;
330-
char name[42];
330+
// array name[] size increased by 1, based on compiler warning/error.
331+
char name [43];
331332

332333
if (i_item->iv_address == 0)
333334
{
@@ -350,7 +351,7 @@ attrListing(const P9XipItem* i_item, const char* prefix)
350351
}
351352
else
352353
{
353-
strncpy(name, i_item->iv_id, sizeof(name));
354+
strncpy(name, i_item->iv_id, (sizeof(name) - 1));
354355
}
355356

356357
printf("%s%-42s | %s | ", prefix, name,

import/tools/imageProcs/cme_image.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# OpenPOWER HCODE Project
77
#
8-
# COPYRIGHT 2016,2018
8+
# COPYRIGHT 2016,2020
99
# [+] International Business Machines Corp.
1010
#
1111
#
@@ -57,8 +57,8 @@ $(eval $(call XIP_TOOL,report,,$$($(IMAGE)_DEPS_REPORT)))
5757
$(eval $(call BUILD_XIPIMAGE))
5858
endef
5959

60-
$(eval CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
60+
$(eval MY_CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
6161

62-
$(foreach chip,$(CHIPS),\
62+
$(foreach chip,$(MY_CHIPS),\
6363
$(foreach chipId, $($(chip)_CHIPID),\
6464
$(eval $(call BUILD_CME_IMAGE,$(chipId)))))

import/tools/imageProcs/pstate_gpe_image.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# OpenPOWER HCODE Project
77
#
8-
# COPYRIGHT 2016,2018
8+
# COPYRIGHT 2016,2020
99
# [+] International Business Machines Corp.
1010
#
1111
#
@@ -82,8 +82,8 @@ $(eval $(call XIP_TOOL,report,,$$($(IMAGE)_DEPS_REPORT)))
8282
$(eval $(call BUILD_XIPIMAGE))
8383
endef
8484

85-
$(eval CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
85+
$(eval MY_CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
8686

87-
$(foreach chip,$(CHIPS),\
87+
$(foreach chip,$(MY_CHIPS),\
8888
$(foreach chipId, $($(chip)_CHIPID),\
8989
$(eval $(call BUILD_PGPE_IMAGE,$(chipId)))))

import/tools/imageProcs/restore_image.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# OpenPOWER HCODE Project
77
#
8-
# COPYRIGHT 2016,2018
8+
# COPYRIGHT 2016,2020
99
# [+] International Business Machines Corp.
1010
#
1111
#
@@ -63,8 +63,8 @@ $(eval $(call XIP_TOOL,report,,$$($(IMAGE)_DEPS_REPORT)))
6363
$(eval $(call BUILD_XIPIMAGE))
6464
endef
6565

66-
$(eval CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
66+
$(eval MY_CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
6767

68-
$(foreach chip,$(CHIPS),\
68+
$(foreach chip,$(MY_CHIPS),\
6969
$(foreach chipId, $($(chip)_CHIPID),\
7070
$(eval $(call BUILD_RESTORE_IMAGE,$(chipId)))))

import/tools/imageProcs/sgpe_image.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# OpenPOWER HCODE Project
77
#
8-
# COPYRIGHT 2016,2018
8+
# COPYRIGHT 2016,2020
99
# [+] International Business Machines Corp.
1010
#
1111
#
@@ -76,8 +76,8 @@ $(eval $(call XIP_TOOL,report,,$$($(IMAGE)_DEPS_REPORT)))
7676
$(eval $(call BUILD_XIPIMAGE))
7777
endef
7878

79-
$(eval CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
79+
$(eval MY_CHIPS := $(filter-out centaur ocmb,$(CHIPS)))
8080

81-
$(foreach chip,$(CHIPS),\
81+
$(foreach chip,$(MY_CHIPS),\
8282
$(foreach chipId, $($(chip)_CHIPID),\
8383
$(eval $(call BUILD_SGPE_IMAGE,$(chipId)))))

0 commit comments

Comments
 (0)