HCODE to hw062917b and patches for OCC on DD2.0
diff --git a/openpower/package/hostboot-binaries/hostboot_binaries.mk b/openpower/package/hostboot-binaries/hostboot_binaries.mk
index ebf63a6..8c0623b 100644
--- a/openpower/package/hostboot-binaries/hostboot_binaries.mk
+++ b/openpower/package/hostboot-binaries/hostboot_binaries.mk
@@ -4,7 +4,7 @@
#
################################################################################
-HOSTBOOT_BINARIES_VERSION ?= 711147ef9f2316ff363b01a787a2bcdf069de590
+HOSTBOOT_BINARIES_VERSION ?= 0e2ad153c4586ffe371920ebc1a2b40e56891980
HOSTBOOT_BINARIES_SITE ?= $(call github,open-power,hostboot-binaries,$(HOSTBOOT_BINARIES_VERSION))
HOSTBOOT_BINARIES_LICENSE = Apache-2.0
diff --git a/openpower/package/hostboot/p9Patches/hostboot-0001-Increase-uart-delay.patch b/openpower/package/hostboot/p9Patches/hostboot-0001-Increase-uart-delay.patch
deleted file mode 120000
index 10137ed..0000000
--- a/openpower/package/hostboot/p9Patches/hostboot-0001-Increase-uart-delay.patch
+++ /dev/null
@@ -1 +0,0 @@
-../p8Patches/hostboot-0001-Increase-uart-delay.patch
\ No newline at end of file
diff --git a/openpower/package/hostboot/p9Patches/hostboot-1001-PM-HOMER-Header-Magic-word-change.patch b/openpower/package/hostboot/p9Patches/hostboot-1001-PM-HOMER-Header-Magic-word-change.patch
new file mode 100644
index 0000000..49e1de3
--- /dev/null
+++ b/openpower/package/hostboot/p9Patches/hostboot-1001-PM-HOMER-Header-Magic-word-change.patch
@@ -0,0 +1,83 @@
+From 6707528059ba2b13b6ab78c1ed12d99ecd3fa69c Mon Sep 17 00:00:00 2001
+From: Prem Shanker Jha <premjha2@in.ibm.com>
+Date: Fri, 23 Jun 2017 10:42:53 -0500
+Subject: [PATCH v1 1001/1002] PM: HOMER Header Magic word change.
+
+Commit restores the magic words of CPMR, QPMR and PPMR region to
+CPMR_1.0, QPMR_1.0 and PPMR_1.0 respectively. It dissociates it
+with EC level.
+
+Change-Id: I4a5a40f0d766eb80eaba09fb216b93ae54d0219e
+Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42366
+Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
+Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
+Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
+Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
+Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
+---
+ .../p9/procedures/hwp/pm/p9_hcode_image_build.C | 32 ++++++++++------------
+ 1 file changed, 14 insertions(+), 18 deletions(-)
+
+diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
+index 8957295..4ddb140 100644
+--- a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
++++ b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
+@@ -134,6 +134,7 @@ enum
+ L3_EPS_DIVIDER = 1,
+ L2_EPS_DIVIDER = 1,
+ MAX_HOMER_HEADER = 6,
++ MAX_PM_REGION_HEADER = 3,
+ };
+
+ /**
+@@ -3789,34 +3790,29 @@ void customizeMagicWord( Homerlayout_t* i_pHomer, uint8_t i_ecLevel )
+ uint64_t magicWordCustom[MAX_HOMER_HEADER];
+ uint64_t * pMagicWord[MAX_HOMER_HEADER];
+ pMagicWord[0] = &pQpmrHdr->magic_number;
+- pMagicWord[1] = &pSgpeImgHdr->g_sgpe_magic_number;
+- pMagicWord[2] = &pCpmrHdr->magic_number;
+- pMagicWord[3] = &pCmeHdr->g_cme_magic_number;
+- pMagicWord[4] = &pPpmrHdr->g_ppmr_magic_number;
++ pMagicWord[1] = &pCpmrHdr->magic_number;
++ pMagicWord[2] = &pPpmrHdr->g_ppmr_magic_number;
++ pMagicWord[3] = &pSgpeImgHdr->g_sgpe_magic_number;
++ pMagicWord[4] = &pCmeHdr->g_cme_magic_number;
+ pMagicWord[5] = &pPgpeHdr->g_pgpe_magic_number;
+
+- magicWordCustom[0] = QPMR_MAGIC_NUMBER_BASE;
+- magicWordCustom[1] = SGPE_MAGIC_NUMBER_BASE;
+- magicWordCustom[2] = CPMR_MAGIC_NUMBER_BASE;
+- magicWordCustom[3] = CME_MAGIC_NUMBER_BASE;
+- magicWordCustom[4] = PPMR_MAGIC_NUMBER_BASE;
+- magicWordCustom[5] = PGPE_MAGIC_NUMBER_BASE;
++ magicWordCustom[0] = QPMR_MAGIC_NUMBER;
++ magicWordCustom[1] = CPMR_MAGIC_NUMBER;
++ magicWordCustom[2] = PPMR_MAGIC_NUMBER;
++ magicWordCustom[3] = SGPE_MAGIC_NUMBER;
++ magicWordCustom[4] = CME_MAGIC_NUMBER;
++ magicWordCustom[5] = PGPE_MAGIC_NUMBER;
+
+- uint32_t ecMajor = (i_ecLevel & 0xf0 );
+- ecMajor = ecMajor << 12;
+- uint8_t ecMinor = (i_ecLevel & 0x0f);
+
+ FAPI_INF("=========== Header Magic Words Info ===========");
+
+ for( uint32_t i = 0; i < MAX_HOMER_HEADER; i++ )
+ {
+- char magicWord[MAX_HOMER_HEADER][20] = { "QPMR Magic Word ", "SGPE Magic Word ", "CPMR Magic Word ",
+- "CME Magic Word ", "PPMR Magic Word ", "PGPE Magic Word " };
++ char magicWord[MAX_HOMER_HEADER][20] = { "QPMR Magic Word ", "CPMR Magic Word ", "PPMR Magic Word ",
++ "SGPE Magic Word ", "CME Magic Word ", "PGPE Magic Word " };
+ char tempBuf[10] ;
+ memset( tempBuf, 0x00, 10 );
+- magicWordCustom[i] += ecMinor;
+- magicWordCustom[i] += ecMajor;
+- *pMagicWord[i] = SWIZZLE_8_BYTE( magicWordCustom[i]);
++ *pMagicWord[i] = SWIZZLE_8_BYTE( magicWordCustom[i] );
+ memcpy( tempBuf, pMagicWord[i], sizeof(uint64_t) );
+ FAPI_INF("%s\t\t:\t\t %s ( 0x%016lx ) ", &magicWord[i], tempBuf, SWIZZLE_8_BYTE(*pMagicWord[i]) );
+ }
+--
+1.8.2.2
+
diff --git a/openpower/package/hostboot/p9Patches/hostboot-1002-PM-set-PGPE-and-SGPE-Timer-Select.patch b/openpower/package/hostboot/p9Patches/hostboot-1002-PM-set-PGPE-and-SGPE-Timer-Select.patch
new file mode 100644
index 0000000..8cedc71
--- /dev/null
+++ b/openpower/package/hostboot/p9Patches/hostboot-1002-PM-set-PGPE-and-SGPE-Timer-Select.patch
@@ -0,0 +1,67 @@
+From 72976d2d7f3a303830a41cf282260be09260bcfc Mon Sep 17 00:00:00 2001
+From: Greg Still <stillgs@us.ibm.com>
+Date: Tue, 27 Jun 2017 09:26:41 -0500
+Subject: [PATCH v1 1002/1002] PM: set PGPE and SGPE Timer Select
+
+- Writes fixed values for FIT and watchdog timers on both engines
+- Needed for DD2 as DD1 was done with initfile settings
+- Will work for either DD level
+
+Change-Id: I8fa0a5a20091016e4210b7c81b0297bded7ade62
+Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42496
+Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
+Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
+Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com>
+Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
+Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
+
+Conflicts:
+ src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C
+---
+ src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C | 10 ++++++++++
+ src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C | 8 ++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C
+index bdf8f74..1ca2772 100644
+--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C
++++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C
+@@ -113,6 +113,16 @@ fapi2::ReturnCode pstate_gpe_init(
+
+ FAPI_TRY(putScom(i_target, PU_OCB_OCI_OCCS2_SCOM, l_occ_scratch2));
+
++ // Setup the PGPE Timer Selects
++ // These hardcoded values are assumed by the PGPE Hcode for setting up
++ // the FIT and Watchdog values a based on the nest frequency that is
++ // passed to it via the PGPE header.
++ l_data64.flush<0>()
++ .insertFromRight<0, 4>(0x1) // Watchdog
++ .insertFromRight<4, 4>(0xA); // FIT
++ FAPI_TRY(fapi2::putScom(i_target, PU_GPE2_GPETSEL_SCOM, l_data64));
++
++
+ // Program XCR to ACTIVATE PGPE
+ // @todo RTC 146665 Operations to PPEs should use a p9ppe namespace
+ FAPI_INF(" Starting the PGPE...");
+diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C
+index 5e05fcb..0829556 100644
+--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C
++++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C
+@@ -282,6 +282,14 @@ fapi2::ReturnCode p9_pm_stop_gpe_init(
+ }
+ }
+
++ // Setup the SGPE Timer Selects
++ // These hardcoded values are assumed by the SGPE Hcode for setting up
++ // the FIT and Watchdog values.
++ l_data64.flush<0>()
++ .insertFromRight<0, 4>(0x1) // Watchdog
++ .insertFromRight<4, 4>(0xA); // FIT
++ FAPI_TRY(fapi2::putScom(i_target, PU_GPE3_GPETSEL_SCOM, l_data64));
++
+ // Boot the STOP GPE
+ FAPI_TRY(stop_gpe_init(i_target), "ERROR: failed to initialize Stop GPE");
+
+--
+1.8.2.2
+