Skip to content

Commit

Permalink
Merge pull request #218 from open-power/master-next
Browse files Browse the repository at this point in the history
Merge v1.5 content back to master.
  • Loading branch information
williamspatrick committed Aug 1, 2015
2 parents aa3de96 + 3f7166c commit f130a1a
Show file tree
Hide file tree
Showing 23 changed files with 496 additions and 49 deletions.
7 changes: 6 additions & 1 deletion openpower/configs/firestone_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
BR2_powerpc64=y
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_OPENPOWER_PLATFORM=y

BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set

BR2_OPENPOWER_CONFIG_NAME="firestone"
BR2_OPENPOWER_XML_PACKAGE="firestone-xml"
BR2_HOSTBOOT_CONFIG_FILE="firestone.config"
Expand Down
5 changes: 4 additions & 1 deletion openpower/configs/garrison_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
BR2_powerpc64=y
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_OPENPOWER_PLATFORM=y

BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"

BR2_OPENPOWER_CONFIG_NAME="garrison"
BR2_OPENPOWER_XML_PACKAGE="garrison-xml"
BR2_HOSTBOOT_CONFIG_FILE="garrison.config"
Expand Down
7 changes: 6 additions & 1 deletion openpower/configs/habanero_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
BR2_powerpc64=y
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_OPENPOWER_PLATFORM=y

BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set

BR2_OPENPOWER_CONFIG_NAME="habanero"
BR2_OPENPOWER_XML_PACKAGE="habanero-xml"
BR2_HOSTBOOT_CONFIG_FILE="habanero.config"
Expand Down
1 change: 1 addition & 0 deletions openpower/configs/linux/skiroot_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CONFIG_ALTIVEC=y
CONFIG_VSX=y
CONFIG_SMP=y
CONFIG_NR_CPUS=2048
CONFIG_CPU_LITTLE_ENDIAN=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
Expand Down
7 changes: 5 additions & 2 deletions openpower/configs/openpower_mambo_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
BR2_powerpc64=y
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_OPENPOWER_PLATFORM=y

BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"

# No HostBoot for Mambo
BR2_PACKAGE_HOSTBOOT=n
BR2_PACKAGE_HOSTBOOT_BINARIES=n
Expand All @@ -28,7 +31,7 @@ BR2_ROOTFS_OVERLAY="overlay"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="dc97a6e626eaf22c9bd4baec3954fa5501ce1c63"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d0ff068a9962ba96d4e6ddfba2a4e9fd8bc9a763"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
Expand Down
7 changes: 6 additions & 1 deletion openpower/configs/palmetto_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
BR2_powerpc64=y
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_OPENPOWER_PLATFORM=y

BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set

BR2_OPENPOWER_CONFIG_NAME="palmetto"
BR2_OPENPOWER_XML_PACKAGE="palmetto-xml"
BR2_HOSTBOOT_CONFIG_FILE="palmetto.config"
Expand Down
2 changes: 1 addition & 1 deletion openpower/package/firestone-xml/firestone.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

FIRESTONE_XML_VERSION ?= 5123184b9f26bc1068afb9b57e796aecaf61b249
FIRESTONE_XML_VERSION ?= 7ac1ae80d0f965d39bdee944f89ed5a118d2adc2
FIRESTONE_XML_SITE ?= $(call github,open-power,firestone-xml,$(FIRESTONE_XML_VERSION))

FIRESTONE_XML_LICENSE = Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion openpower/package/garrison-xml/garrison.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

GARRISON_XML_VERSION ?= 4f4b2373ff8ef35338c20ab3660a0e4d980aeddd
GARRISON_XML_VERSION ?= 835c3467a37773205960d7b0150a3c360972e178
GARRISON_XML_SITE ?= $(call github,open-power,garrison-xml,$(GARRISON_XML_VERSION))

GARRISON_XML_LICENSE = Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion openpower/package/habanero-xml/habanero-xml.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

HABANERO_XML_VERSION ?= 03d911f12311ba884ec9e08a6c114daabfce545a
HABANERO_XML_VERSION ?= b86989fce1e543a07706206f12ef00b0b6a170c7
HABANERO_XML_SITE ?= $(call github,open-power,habanero-xml,$(HABANERO_XML_VERSION))

HABANERO_XML_LICENSE = Apache-2.0
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
From 7c592db2c42b8dbef0f31a8daebb97ff0ed6a3ac Mon Sep 17 00:00:00 2001
From: Stephen Cprek <[email protected]>
Date: Tue, 30 Jun 2015 16:49:22 -0500
Subject: [PATCH] Shutdown when deconfig outside of reconfig loop on BMC
systems

Change-Id: I1faf0ab0d831a41c332993f555231a8dbecf53ef
CQ:SW312075
---
src/include/usr/initservice/initsvcreasoncodes.H | 4 +-
.../initservice/istepdispatcher/istepdispatcher.C | 120 ++++++++++++++++-----
2 files changed, 98 insertions(+), 26 deletions(-)

diff --git a/src/include/usr/initservice/initsvcreasoncodes.H b/src/include/usr/initservice/initsvcreasoncodes.H
index d11824e..e174564 100644
--- a/src/include/usr/initservice/initsvcreasoncodes.H
+++ b/src/include/usr/initservice/initsvcreasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -74,6 +74,8 @@ enum InitServiceReasonCode
//termination_rc
SBE_EXTRACT_RC_REQUEST_REIPL = INITSVC_COMP_ID | 0x0e,
RECONFIG_LOOP_TEST_RC = INITSVC_COMP_ID | 0x0f,
+ //termination_rc
+ SHUTDOWN_NOT_RECONFIG_LOOP = INITSVC_COMP_ID | 0x10,
};

enum InitServiceUserDetailDataSubSection
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index d3581e9..7f3c0b7 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -96,6 +96,10 @@ const uint8_t OUTER_STOP_STEP = 14;
const uint8_t OUTER_STOP_SUBSTEP = 5;
const uint8_t HB_START_ISTEP = 6;

+// @todo RTC 124679 - Remove Once BMC Monitors Shutdown Attention
+// Set Watchdog Timer To 15 seconds before calling doShutdown()
+const uint16_t SET_WD_TIMER_IN_SECS = 15;
+
/**
* _start() task entry procedure using the macro in taskargs.H
*/
@@ -506,14 +510,58 @@ errlHndl_t IStepDispatcher::executeAllISteps()
}
else
{
- // Reconfig loop required, but the istep is either outside
- // of the reconfig loop, too many reconfigs have been
- // attempted, in manufacturing mode, or in MPIPL.
- // Return an error to cause termination
+
if (!err)
{
- err = failedDueToDeconfig(istep, substep,
- newIstep, newSubstep);
+ // Reconfig loop required, but the istep is either outside
+ // of the reconfig loop, too many reconfigs have been
+ // attempted, in manufacturing mode, or in MPIPL.
+ // Return an error to cause termination on FSP systems
+ if (iv_spBaseServicesEnabled)
+ {
+ err = failedDueToDeconfig(istep, substep,
+ newIstep, newSubstep);
+ }
+ // Otherwise increment the reboot count and shutdown
+ #ifdef CONFIG_BMC_IPMI
+ else
+ {
+ uint16_t l_count = 0;
+ SENSOR::RebootCountSensor l_sensor;
+
+ // Read reboot count sensor
+ err = l_sensor.getRebootCount(l_count);
+ if (err)
+ {
+ TRACFCOMP(g_trac_initsvc, ERR_MRK"executeAllISteps: getRebootCount failed");
+ break;
+ }
+ // Increment reboot count
+ l_count++;
+ err = l_sensor.setRebootCount(l_count);
+ if (err)
+ {
+ TRACFCOMP(g_trac_initsvc, ERR_MRK"executeAllISteps: setRebootCount to %d failed", l_count);
+ break;
+ }
+
+ // @TODO RTC:124679 - Remove Once BMC Monitors
+ // Shutdown Attention
+ // Set Watchdog Timer before calling doShutdown()
+ TRACFCOMP( g_trac_initsvc,"executeAllISteps: "
+ "Set Watch Dog Timer To %d Seconds",
+ SET_WD_TIMER_IN_SECS);
+
+ err = IPMIWATCHDOG::setWatchDogTimer(
+ SET_WD_TIMER_IN_SECS, // new time
+ static_cast<uint8_t>
+ (IPMIWATCHDOG::DO_NOT_STOP |
+ IPMIWATCHDOG::BIOS_FRB2), // default
+ IPMIWATCHDOG::TIMEOUT_HARD_RESET);
+
+ shutdownDuringIpl();
+ }
+ #endif
}
// else return the error from doIstep
}
@@ -1260,27 +1308,49 @@ void IStepDispatcher::shutdownDuringIpl()
{
TRACFCOMP(g_trac_initsvc, ENTER_MRK"IStepDispatcher::shutdownDuringIpl");

- // Create and commit error log for FFDC
-
- /*@
- * @errortype
- * @reasoncode SHUTDOWN_REQUESTED_BY_FSP
- * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
- * @moduleid ISTEP_INITSVC_MOD_ID
- * @userdata1 Current IStep
- * @userdata2 Current SubStep
- * @devdesc Received shutdown request from FSP
- */
- errlHndl_t err = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ISTEP_INITSVC_MOD_ID,
- SHUTDOWN_REQUESTED_BY_FSP,
- this->iv_curIStep, this->iv_curSubStep);
+ // Create and commit error log for FFDC and call doShutdown with the RC
+ // to initiate a TI
+ if (iv_spBaseServicesEnabled)
+ {
+ /*@
+ * @errortype
+ * @reasoncode SHUTDOWN_REQUESTED_BY_FSP
+ * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
+ * @moduleid ISTEP_INITSVC_MOD_ID
+ * @userdata1 Current IStep
+ * @userdata2 Current SubStep
+ * @devdesc Received shutdown request from FSP
+ */
+ errlHndl_t err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ISTEP_INITSVC_MOD_ID,
+ SHUTDOWN_REQUESTED_BY_FSP,
+ this->iv_curIStep, this->iv_curSubStep);

- errlCommit(err, INITSVC_COMP_ID);
+ errlCommit(err, INITSVC_COMP_ID);
+ INITSERVICE::doShutdown(SHUTDOWN_REQUESTED_BY_FSP);
+ }
+ else
+ {
+ /*@
+ * @errortype
+ * @reasoncode SHUTDOWN_NOT_RECONFIG_LOOP
+ * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
+ * @moduleid ISTEP_INITSVC_MOD_ID
+ * @userdata1 Current IStep
+ * @userdata2 Current SubStep
+ * @devdesc Received shutdown request due to deconfigure
+ * outside of reconfig loop
+ */
+ errlHndl_t err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ISTEP_INITSVC_MOD_ID,
+ SHUTDOWN_NOT_RECONFIG_LOOP,
+ this->iv_curIStep, this->iv_curSubStep);

- // Call doShutdown with the RC to initiate a TI
- INITSERVICE::doShutdown(SHUTDOWN_REQUESTED_BY_FSP);
+ errlCommit(err, INITSVC_COMP_ID);
+ INITSERVICE::doShutdown(SHUTDOWN_NOT_RECONFIG_LOOP);
+ }

}

--
1.8.2.2

Loading

0 comments on commit f130a1a

Please sign in to comment.