Update Hostboot and Habanero XML and some additional IPMI fixes
diff --git a/openpower/configs/hostboot/habanero.config b/openpower/configs/hostboot/habanero.config
index 0f27f58..08caec1 100755
--- a/openpower/configs/hostboot/habanero.config
+++ b/openpower/configs/hostboot/habanero.config
@@ -19,9 +19,12 @@
set GPIODD
set PALMETTO_VDDR
-# disable sbe updates
+# to disable sbe updates
set NO_SBE_UPDATES
+# Enable SBE updates
+#set SBE_UPDATE_INDEPENDENT
+
unset PCIE_HOTPLUG_CONTROLLER
# turn on console output
diff --git a/openpower/configs/hostboot/palmetto.config b/openpower/configs/hostboot/palmetto.config
index 2d7d74d..9d09e68 100755
--- a/openpower/configs/hostboot/palmetto.config
+++ b/openpower/configs/hostboot/palmetto.config
@@ -18,8 +18,11 @@
set GPIODD
set PALMETTO_VDDR
-# disable sbe updates
+# to disable sbe updates
set NO_SBE_UPDATES
+
+# Enable SBE updates
+# set SBE_UPDATE_INDEPENDENT
unset PCIE_HOTPLUG_CONTROLLER
diff --git a/openpower/package/habanero-xml/habanero-xml.mk b/openpower/package/habanero-xml/habanero-xml.mk
index 42f83cc..b2e759b 100644
--- a/openpower/package/habanero-xml/habanero-xml.mk
+++ b/openpower/package/habanero-xml/habanero-xml.mk
@@ -4,7 +4,7 @@
#
################################################################################
-HABANERO_XML_VERSION ?= db10d0022ed1d4d96057ad1fa89bff65f14002bc
+HABANERO_XML_VERSION ?= f98000504ec8fafb4f8547c0427f0a8056e7b8b7
HABANERO_XML_SITE ?= $(call github,open-power,habanero-xml,$(HABANERO_XML_VERSION))
HABANERO_XML_LICENSE = Apache-2.0
diff --git a/openpower/package/hostboot/hostboot-0006-Provide-OCC-Target-with-FRU_ID-attribute.patch b/openpower/package/hostboot/hostboot-0006-Provide-OCC-Target-with-FRU_ID-attribute.patch
new file mode 100644
index 0000000..a459876
--- /dev/null
+++ b/openpower/package/hostboot/hostboot-0006-Provide-OCC-Target-with-FRU_ID-attribute.patch
@@ -0,0 +1,34 @@
+From 27a08856a62b32d028315951da06bf091bd22bf6 Mon Sep 17 00:00:00 2001
+From: Bill Hoffa <wghoffa@us.ibm.com>
+Date: Thu, 26 Feb 2015 12:50:20 -0600
+Subject: [PATCH 1/5] Provide OCC Target with FRU_ID attribute
+
+Required with github commits:
+https://github.com/open-power/habanero-xml/commit/dc738f40fc6e6c63c2bf6e25dca0f85987c870b8
+and
+https://github.com/open-power/palmetto-xml/commit/84f5bf5cc10459a85340cd0cc82a8c65b5bc4c97
+
+Change-Id: I8dd08fe5b4649f1398675c47db3abbdb8a5363b0
+RTC:124817
+(cherry picked from commit 15d270e5f3f7b49fd26e2656b6d5b617aea207d9)
+---
+ src/usr/targeting/common/xmltohb/target_types.xml | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
+index 4dcc796..6dc4e58 100644
+--- a/src/usr/targeting/common/xmltohb/target_types.xml
++++ b/src/usr/targeting/common/xmltohb/target_types.xml
+@@ -1726,6 +1726,9 @@
+ <attribute>
+ <id>OCC_MASTER_CAPABLE</id>
+ </attribute>
++ <attribute>
++ <id>FRU_ID</id>
++ </attribute>
+ </targetType>
+
+ </attributes>
+--
+1.7.4.1
+
diff --git a/openpower/package/hostboot/hostboot-0007-Update-dev-tree-with-additional-sensor-information.patch b/openpower/package/hostboot/hostboot-0007-Update-dev-tree-with-additional-sensor-information.patch
new file mode 100644
index 0000000..c83b019
--- /dev/null
+++ b/openpower/package/hostboot/hostboot-0007-Update-dev-tree-with-additional-sensor-information.patch
@@ -0,0 +1,510 @@
+From d8c341b72aad30bff1417f1a2cec82af9cc14786 Mon Sep 17 00:00:00 2001
+From: Richard J. Knight <rjknight@us.ibm.com>
+Date: Thu, 19 Feb 2015 23:47:03 -0600
+Subject: [PATCH 2/5] Update dev tree with additional sensor information
+
+ -Add sensor type, reading type and specific offsets.
+ -Add IPMI entity ID and instance information for sensors
+ -Include IPMI Enity instance in targets which have ipmi sensors
+ attribute
+
+Change-Id: I02b0a5046c67e2e00af30a0c78cbcc182ae4c0cd
+RTC:123186
+(cherry picked from commit ff8c81ac1ab76d9835165a8dae4a0e3b1e5a0055)
+---
+ src/include/usr/ipmi/ipmisensor.H | 96 ++++++++++++++++++++
+ src/usr/devtree/bld_devtree.C | 89 ++++++++++++++-----
+ src/usr/ipmi/ipmisensor.C | 76 ++++++++++++++++
+ src/usr/targeting/common/Targets.pm | 2 +-
+ .../common/xmltohb/attribute_types_hb.xml | 73 +++++++++++++++
+ .../targeting/common/xmltohb/target_types_hb.xml | 12 ++-
+ 6 files changed, 322 insertions(+), 26 deletions(-)
+
+diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H
+index 7b4e3fa..ef00bfa 100644
+--- a/src/include/usr/ipmi/ipmisensor.H
++++ b/src/include/usr/ipmi/ipmisensor.H
+@@ -48,6 +48,20 @@ namespace SENSOR
+ const uint8_t INVALID_TYPE = 0xFF;
+
+ /**
++ * @enum sensorReadingTypes
++ * Sensor specific completion codes, defined in IPMI Spec.
++ *
++ */
++ enum sensorReadingType
++ {
++ THRESHOLD = 0x01,
++ DIGITAL_ASSERT_DEASSERT = 0x03,
++ DIGITAL_ENABLE_DISABLE = 0x09,
++ SENSOR_SPECIFIC = 0x6f,
++ };
++
++
++ /**
+ * @enum procStatusSensorOffsets
+ * Sensor specific completion codes, defined in IPMI Spec.
+ *
+@@ -90,6 +104,74 @@ namespace SENSOR
+ CRITICAL_OVER_TEMP = 0x0A,
+ };
+
++ /**
++ * @enum firmwareBootProgressSensorOffsets
++ * Boot progress specific offsets defined in IPMI Spec.
++ *
++ */
++ enum firmwareProgressSensorOffsets
++ {
++ // offset 02h
++ SYSTEM_FIRMWARE_PROGRESS = 0x02,
++ };
++
++ /**
++ * @enum discrete09_Offsets
++ *
++ * Offsets specific to IPMI sensor reading type 09
++ * digital discrete senosrs. These offsets result in
++ * Device Enabled or Device Disabled events in the
++ * BMC event log.
++ *
++ */
++ enum discrete09_Offsets
++ {
++ // offset 00h
++ DEVICE_DISABLED = 0x0,
++
++ //offset 01h
++ DEVICE_ENABLED = 0x1,
++ };
++
++ /**
++ * @enum discrete03_Offsets
++ *
++ * Offsets specific to IPMI sensor reading type 03
++ * digital discrete senosrs. These offsets result in generic
++ * State Asserted or State Deasserted events in the
++ * BMC event log.
++ *
++ */
++ enum discrete03_Offsets
++ {
++ // offset 00h
++ DEASSERTED = 0x00,
++
++ //offset 01h
++ ASSERTED = 0x01,
++ };
++
++ /**
++ * @enum acpiPowerState_Offsets
++ *
++ * Offsets specific to IPMI ACPI Power state
++ * senosrs. These offsets result in power
++ * state messages in the BMC event log.
++ *
++ */
++ enum acpiPowerState_Offsets
++ {
++ // offset 0h
++ S0_G0_WORKING = 0x00,
++
++ // offset 05h
++ G5_SOFT_OFF = 0x05,
++
++ //offset 0Bh
++ LEGACY_ON = 0x0B,
++
++ };
++
+ //** Bit definition for set sensor reading cmd operation field
+ // [7:6] 10b - write given values to event data bytes let BMC handle
+ // offset in event data 1 when an external event is
+@@ -827,6 +909,20 @@ namespace SENSOR
+ errlHndl_t getAPSSChannelSensorNumbers(
+ const uint16_t (* &o_sensor_numbers)[16]);
+
++ /**
++ * Helper function to return a mask of the supported masks for the
++ * sensor passed in.
++ *
++ * @param[i] - sensor name to determine the offset for.
++ * @param[o] - sensor reading type, defined in IPMI spec for the
++ * passed in sensor number.
++ *
++ *
++ * @return sensor offsets
++ */
++ uint16_t getSensorOffsets(TARGETING::SENSOR_NAME i_name,
++ sensorReadingType &o_readType );
++
+
+
+ }; // end namespace
+diff --git a/src/usr/devtree/bld_devtree.C b/src/usr/devtree/bld_devtree.C
+index dd81392..f4647a3 100644
+--- a/src/usr/devtree/bld_devtree.C
++++ b/src/usr/devtree/bld_devtree.C
+@@ -1299,17 +1299,40 @@ errlHndl_t bld_fdt_mem(devTree * i_dt, bool i_smallTree)
+ return errhdl;
+ }
+
++
++#ifdef CONFIG_BMC_IPMI
++enum
++{
++ ENTITY_ID_MASK = 0x00FF,
++ SENSOR_TYPE_MASK = 0xFF00,
++};
++
+ /* create a node for each IPMI sensor in the system, the sensor unit number
+ corresponds to the BMC assigned sensor number */
+ uint32_t bld_sensor_node(devTree * i_dt, const dtOffset_t & i_parentNode,
+- const uint16_t sensorData[] )
++ const uint16_t sensorData[],
++ uint32_t instance, uint32_t chipId )
+ {
+
+- const uint32_t sensorNumber = sensorData[
++ SENSOR::sensorReadingType readType;
++
++ // pass in the sensor name to get back the supported offsets and the event
++ // reading type for this sensor.
++ uint32_t offsets = SENSOR::getSensorOffsets(
++ static_cast<TARGETING::SENSOR_NAME>(
++ sensorData[TARGETING::IPMI_SENSOR_ARRAY_NAME_OFFSET]),
++ readType);
++
++ const uint16_t sensorNumber = sensorData[
+ TARGETING::IPMI_SENSOR_ARRAY_NUMBER_OFFSET];
+
+- const uint32_t sensorName =
+- sensorData[TARGETING::IPMI_SENSOR_ARRAY_NAME_OFFSET];
++ // the sensor name is a combination of the sensor type + entity ID
++ const uint16_t sensorType = (
++ sensorData[TARGETING::IPMI_SENSOR_ARRAY_NAME_OFFSET]
++ & SENSOR_TYPE_MASK) >> 8;
++
++ const uint16_t entityId =
++ sensorData[TARGETING::IPMI_SENSOR_ARRAY_NAME_OFFSET] & ENTITY_ID_MASK;
+
+ /* Build sensor node based on sensor number */
+ dtOffset_t sensorNode = i_dt->addNode(i_parentNode, "sensor", sensorNumber);
+@@ -1317,22 +1340,35 @@ uint32_t bld_sensor_node(devTree * i_dt, const dtOffset_t & i_parentNode,
+ i_dt->addPropertyCell32(sensorNode, "reg", sensorNumber);
+
+ // add sensor type
+- i_dt->addPropertyCell32(sensorNode, "ipmi-sensor-type", sensorName);
+-
+- // @TODO RTC:113902
+- // get more info from Ben H. regarding what info he needs
+- // add the name of the sensor
+- //i_dt->addPropertyString(sensorNode, "name", sensorToString( sensorName ));
+- // i_dt->addPropertyCell32(sensorNode, "ipmi-entity-type",
+- // sensorData[ENTITY_TYPE_OFFSET]);
+- // i_dt->addPropertyCell32(sensorNode, "ipmi-reading-type",
+- // sensorData[READING_TYPE_OFFSET]);
+-
+- /* return the phandle for this sensor, might need to add it to the
+- cpus node per Ben H. proposal */
++ i_dt->addPropertyCell32(sensorNode, "ipmi-sensor-type", sensorType);
++ i_dt->addPropertyCell32(sensorNode, "ipmi-entity-id", entityId);
++ i_dt->addPropertyCell32(sensorNode, "ipmi-entity-instance", instance);
++ i_dt->addPropertyCell32(sensorNode, "ipmi-sensor-offsets", offsets);
++ i_dt->addPropertyCell32(sensorNode, "ipmi-sensor-reading-type", readType);
++
++ // currently we only add the chip ID to the OCC sensor
++ if(chipId != 0xFF )
++ {
++ i_dt->addPropertyCell32(sensorNode, "ibm,chip-id", chipId);
++ }
++
++ /* return the phandle for this sensor */
+ return i_dt->getPhandle(sensorNode);
+ }
+
++// return the IPMI entity instance from the SDR for this
++// target.
++uint32_t getInstanceNumber( TARGETING::Target * i_pTarget )
++{
++ AttributeTraits<ATTR_IPMI_INSTANCE>::Type l_instance;
++
++ l_instance = i_pTarget->getAttr<TARGETING::ATTR_IPMI_INSTANCE>();
++
++ return l_instance;
++
++}
++
++// build the sensor node for a given target
+ uint32_t bld_sensor_node(devTree * i_dt, const dtOffset_t & i_sensorNode,
+ TARGETING::Target * i_pTarget )
+ {
+@@ -1344,6 +1380,17 @@ uint32_t bld_sensor_node(devTree * i_dt, const dtOffset_t & i_sensorNode,
+ * for each sensor */
+ if ( i_pTarget->tryGetAttr<ATTR_IPMI_SENSORS>(l_sensors) )
+ {
++ uint32_t chipId = 0xFF;
++
++ // add the chip id to the OCC sensor since OPAL needs it to figure out
++ // which OCC it is.
++ if( TARGETING::TYPE_OCC == i_pTarget->getAttr<TARGETING::ATTR_TYPE>())
++ {
++ ConstTargetHandle_t proc = getParentChip(i_pTarget);
++
++ chipId = getProcChipId( proc );
++ }
++
+ for(uint16_t i=0; i< array_rows; i++)
+ {
+ /* if the sensor number is 0xFF move on */
+@@ -1351,7 +1398,8 @@ uint32_t bld_sensor_node(devTree * i_dt, const dtOffset_t & i_sensorNode,
+ {
+ /* use this row to create the next sensor node - ignoring
+ * return value for now */
+- bld_sensor_node(i_dt, i_sensorNode, l_sensors[i] );
++ bld_sensor_node(i_dt, i_sensorNode, l_sensors[i],
++ getInstanceNumber(i_pTarget) , chipId );
+ }
+ else
+ {
+@@ -1394,10 +1442,6 @@ errlHndl_t bld_fdt_sensors(devTree * i_dt, const dtOffset_t & i_parentNode,
+ i_dt->addPropertyCell32(sensorNode, "#address-cells", 1);
+ i_dt->addPropertyCell32(sensorNode, "#size-cells", 0);
+
+- // pass ALL IPMI_SENSORS to opal
+- // @TODO RTC:113902 - add remaining sensor info and limit sensors
+- // and adjust the sensors passed to opal to match their requirements
+-
+ /* loop through all the targets and get the IPMI sensor data if it
+ exists */
+ for (TargetIterator itr = TARGETING::targetService().begin();
+@@ -1454,6 +1498,7 @@ errlHndl_t bld_fdt_bmc(devTree * i_dt, bool i_smallTree)
+
+ return errhdl;
+ }
++#endif
+
+ errlHndl_t bld_fdt_vpd(devTree * i_dt, bool i_smallTree)
+ {
+diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C
+index 3e15e91..fc7284b 100644
+--- a/src/usr/ipmi/ipmisensor.C
++++ b/src/usr/ipmi/ipmisensor.C
+@@ -1121,4 +1121,80 @@ namespace SENSOR
+ return NULL;
+ }
+
++ uint16_t getSensorOffsets( TARGETING::SENSOR_NAME i_name,
++ sensorReadingType &o_readType )
++ {
++
++ uint16_t offsets = 0;
++
++ // most of our sensors use generic sensor specific reading types
++ // so use that as the default value
++ o_readType = SENSOR_SPECIFIC;
++
++ // sensor type is lower byte of sensor name, if we dont match
++ // based on name, then try the sensor type
++ uint16_t t = ( i_name >> 8 ) & 0x00FF;
++
++ switch( i_name )
++ {
++ case TARGETING::SENSOR_NAME_FW_BOOT_PROGRESS:
++ {
++ offsets = ( 1 << SYSTEM_FIRMWARE_PROGRESS );
++ break;
++ }
++ case TARGETING::SENSOR_NAME_OCC_ACTIVE:
++ {
++ offsets = ( 1 << DEVICE_DISABLED ) |
++ ( 1 << DEVICE_ENABLED );
++ o_readType = DIGITAL_ENABLE_DISABLE;
++ break;
++ }
++ case TARGETING::SENSOR_NAME_HOST_STATUS:
++ {
++ offsets = ( 1 << S0_G0_WORKING ) |
++ ( 1 << G5_SOFT_OFF ) |
++ ( 1 << LEGACY_ON );
++ break;
++ }
++ case TARGETING::SENSOR_NAME_PCI_ACTIVE:
++ case TARGETING::SENSOR_NAME_OS_BOOT:
++ {
++ // default all offsets enabled
++ offsets = 0x7FFF;
++ break;
++ }
++
++ default:
++ {
++ // try sensor type
++ switch (t)
++ {
++ case TARGETING::SENSOR_TYPE_FAULT:
++ offsets = ( 1 << ASSERTED );
++ o_readType = DIGITAL_ASSERT_DEASSERT;
++ break;
++
++ case TARGETING::SENSOR_TYPE_PROCESSOR:
++ offsets = ( 1 << PROC_PRESENCE_DETECTED ) |
++ ( 1 << PROC_DISABLED ) |
++ ( 1 << IERR );
++ break;
++
++ case TARGETING::SENSOR_TYPE_MEMORY:
++ offsets = ( 1 << MEMORY_DEVICE_DISABLED ) |
++ ( 1 << MEM_DEVICE_PRESENCE_DETECTED );
++ break;
++ default:
++ offsets = 0;
++ o_readType = THRESHOLD;
++ break;
++ }
++
++ }
++ }
++
++ return offsets;
++ }
++
++
+ }; // end name space
+diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm
+index eb1ea1f..29f6bcb 100644
+--- a/src/usr/targeting/common/Targets.pm
++++ b/src/usr/targeting/common/Targets.pm
+@@ -195,7 +195,7 @@ sub printAttribute
+ $filter{ENTITY_ID_LOOKUP} = 1;
+ $filter{ENTITY_INSTANCE} = 1;
+ $filter{MBA_NUM} = 1;
+- $filter{IPMI_INSTANCE} = 1;
++ $filter{IPMI_INSTANCE} = 0;
+ $filter{IPMI_NAME} = 1;
+ $filter{INSTANCE_ID} = 1;
+ #$filter{ADC_CHANNEL_SENSOR_NUMBERS} = 1;
+diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
+index 3bb57e6..74fb492 100644
+--- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
++++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
+@@ -822,6 +822,16 @@
+ <writeable/>
+ <hbOnly/>
+ </attribute>
++<attribute>
++ <id>IPMI_INSTANCE</id>
++ <description>Holds the IPMI instance number for this entity.</description>
++ <simpleType>
++ <uint32_t>
++ </uint32_t>
++ </simpleType>
++ <persistency>non-volatile</persistency>
++ <readable/>
++</attribute>
+ <enumerationType>
+ <id>ENTITY_ID</id>
+ <description>Enumeration indicating the IPMI entity ID, these values are
+@@ -1003,6 +1013,69 @@
+ </enumerator>
+ </enumerationType>
+
++<enumerationType>
++ <id>SENSOR_TYPE</id>
++ <description>Enumeration indicating the IPMI sensor type, these values
++ are defined in the IPMI specification. These values will be used when
++ sending sensor reading events to the BMC.</description>
++ <enumerator>
++ <name>NA</name>
++ <value>0</value>
++ </enumerator>
++ <enumerator>
++ <name>TEMPERATURE</name>
++ <value>0x01</value>
++ </enumerator>
++ <enumerator>
++ <name>PROCESSOR</name>
++ <value>0x07</value>
++ </enumerator>
++ <enumerator>
++ <name>MEMORY</name>
++ <value>0x0c</value>
++ </enumerator>
++ <enumerator>
++ <name>SYS_FW_PROGRESS</name>
++ <value>0x0F</value>
++ </enumerator>
++ <enumerator>
++ <name>SYS_EVENT</name>
++ <value>0x12</value>
++ </enumerator>
++ <enumerator>
++ <name>OS_BOOT</name>
++ <value>0x1F</value>
++ </enumerator>
++ <enumerator>
++ <name>APCI_POWER_STATE</name>
++ <value>0x22</value>
++ </enumerator>
++ <enumerator>
++ <name>FREQ</name>
++ <value>0xC1</value>
++ </enumerator>
++ <enumerator>
++ <name>POWER</name>
++ <value>0xC2</value>
++ </enumerator>
++ <enumerator>
++ <name>BOOT_COUNT</name>
++ <value>0xC3</value>
++ </enumerator>
++ <enumerator>
++ <name>PCI_LINK_PRES</name>
++ <value>0xC4</value>
++ </enumerator>
++ <enumerator>
++ <name>PWR_LIMIT_ACTIVE</name>
++ <value>0xC4</value>
++ </enumerator>
++ <enumerator>
++ <name>FAULT</name>
++ <value>0xC7</value>
++ </enumerator>
++</enumerationType>
++
+ <!-- IPMI Sensor numbers are defined in the IPMI spec as 8 bit values. However
+ in the hostboot code they will be defined as a uint16_t to allow us to add
+ additonal information. An example relates to error logs returned by the OCC,
+diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml
+index 8255b70..bd00b87 100644
+--- a/src/usr/targeting/common/xmltohb/target_types_hb.xml
++++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml
+@@ -33,6 +33,14 @@
+ ================================================================= -->
+
+ <targetTypeExtension>
++ <id>base</id>
++ <attribute>
++ <id>IPMI_INSTANCE</id>
++ <default>0</default>
++ </attribute>
++</targetTypeExtension>
++
++<targetTypeExtension>
+ <id>sys-sys-power8</id>
+ <attribute><id>IS_MPIPL_HB</id></attribute>
+ <attribute><id>IBSCOM_ENABLE_OVERRIDE</id></attribute>
+@@ -182,9 +190,7 @@
+ <attribute>
+ <id>PSTATE_TABLE</id>
+ </attribute>
+- <attribute>
+- <id>IPMI_SENSORS</id>
+- </attribute>
++ <attribute><id>IPMI_SENSORS</id></attribute>
+ </targetTypeExtension>
+
+ <targetTypeExtension>
+--
+1.7.4.1
+
diff --git a/openpower/package/hostboot/hostboot-0008-Report-pnor-side-booted-up-on-A-B-to-OPAL.patch b/openpower/package/hostboot/hostboot-0008-Report-pnor-side-booted-up-on-A-B-to-OPAL.patch
new file mode 100644
index 0000000..7abf536
--- /dev/null
+++ b/openpower/package/hostboot/hostboot-0008-Report-pnor-side-booted-up-on-A-B-to-OPAL.patch
@@ -0,0 +1,207 @@
+From 2dd8eb6b90b7dfe63587292e163e27075f652b40 Mon Sep 17 00:00:00 2001
+From: Bill Schwartz <whs@us.ibm.com>
+Date: Wed, 11 Feb 2015 05:17:23 -0600
+Subject: [PATCH 4/5] Report pnor side booted up on A/B to OPAL
+
+This story will use the getPnorInfo and getSideInfo interfaces
+to fill in devtree entries informing Opal about the existence,
+location, and state of PNOR sides that we know about. We will pass up a list
+of TOCs associated with the active side and the inactive side.
+
+RTC: 109703
+Change-Id: I740b086a9e22a0bc167141e3565bf813e50d9a00
+(cherry picked from commit b42f65df9fddb3938c096c23ccdcb2568a727120)
+---
+ src/include/usr/pnor/pnorif.H | 5 ++
+ src/usr/devtree/bld_devtree.C | 110 +++++++++++++++++++++++++++++++++++++++++
+ src/usr/pnor/pnor_common.H | 1 -
+ src/usr/pnor/pnordd.C | 3 +-
+ 4 files changed, 117 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/usr/pnor/pnorif.H b/src/include/usr/pnor/pnorif.H
+index e12ccf1..0fc5a83 100644
+--- a/src/include/usr/pnor/pnorif.H
++++ b/src/include/usr/pnor/pnorif.H
+@@ -120,6 +120,11 @@ struct SideInfo_t
+ uint64_t hbbMmioOffset; /**< HBB MMIO Offset associated with hbbAddress*/
+ };
+
++enum
++{
++ INVALID_OFFSET = 0xFFFFFFF, // Invalid primary or alternate TOC
++};
++
+ /**
+ * @brief Returns information about a given side of pnor
+ *
+diff --git a/src/usr/devtree/bld_devtree.C b/src/usr/devtree/bld_devtree.C
+index f4647a3..d90c1fd 100644
+--- a/src/usr/devtree/bld_devtree.C
++++ b/src/usr/devtree/bld_devtree.C
+@@ -405,6 +405,113 @@ void add_i2c_info( const TARGETING::Target* i_targ,
+
+ }
+
++void bld_getSideInfo(PNOR::SideId i_side,
++ uint32_t o_TOCaddress[2],
++ uint8_t & o_count,
++ bool & o_isGolden)
++{
++ errlHndl_t errhdl = NULL;
++ PNOR::SideInfo_t l_info;
++
++ o_count = 0;
++ o_isGolden = false;
++
++ errhdl = getSideInfo (i_side, l_info);
++ if (!errhdl)
++ {
++ // return the valid TOC offsets & count of valid TOCs
++ if (PNOR::INVALID_OFFSET != l_info.primaryTOC)
++ {
++ o_TOCaddress[o_count++] = l_info.primaryTOC;
++ }
++ if (PNOR::INVALID_OFFSET != l_info.backupTOC)
++ {
++ o_TOCaddress[o_count++] = l_info.backupTOC;
++ }
++ o_isGolden = l_info.isGolden;
++ }
++ else
++ {
++ // commit error and return 0 TOC offsets
++ errlCommit(errhdl, DEVTREE_COMP_ID);
++ }
++
++ return;
++}
++
++void bld_fdt_pnor(devTree * i_dt,
++ dtOffset_t i_parentNode)
++{
++ do
++ {
++ uint32_t l_active[2] = {PNOR::INVALID_OFFSET,PNOR::INVALID_OFFSET};
++ uint32_t l_golden[2] = {PNOR::INVALID_OFFSET,PNOR::INVALID_OFFSET};
++ uint8_t l_count = 0;
++ bool l_isGolden = false;
++ bool l_goldenFound = false;
++ uint8_t l_goldenCount = 0;
++ PNOR::PnorInfo_t l_pnorInfo;
++
++ //Get pnor address and size
++ getPnorInfo (l_pnorInfo);
++
++ dtOffset_t l_pnorNode = i_dt->addNode(i_parentNode,
++ "pnor",
++ l_pnorInfo.mmioOffset);
++
++ const uint8_t l_isaLinkage = 0; // 0==Mem
++ uint32_t pnor_prop[3] = {l_isaLinkage,
++ l_pnorInfo.mmioOffset,
++ l_pnorInfo.flashSize};
++ i_dt->addPropertyCells32(l_pnorNode, "reg", pnor_prop, 3);
++
++ //Add Working/Active parition
++ bld_getSideInfo(PNOR::WORKING,l_active,l_count,l_isGolden);
++ if (l_count) // valid TOCs present
++ {
++ i_dt->addPropertyCells32(l_pnorNode,
++ "active-image-tocs", l_active, l_count);
++ // capture golden
++ if (l_isGolden)
++ {
++ l_golden[0] = l_active[0];
++ l_golden[1] = l_active[1];
++ l_goldenCount = l_count;
++ l_goldenFound = true;
++ }
++ }
++
++#if CONFIG_PNOR_TWO_SIDE_SUPPORT
++ //Add Alternate parition
++ uint32_t l_alternate[2] = {PNOR::INVALID_OFFSET,PNOR::INVALID_OFFSET};
++
++ bld_getSideInfo(PNOR::ALTERNATE,l_alternate,l_count,l_isGolden);
++ if (l_count) // valid TOCs present
++ {
++ i_dt->addPropertyCells32(l_pnorNode,
++ "alternate-image-tocs",l_alternate,l_count);
++ // capture golden
++ if (l_isGolden)
++ {
++ l_golden[0] = l_alternate[0];
++ l_golden[1] = l_alternate[1];
++ l_goldenCount = l_count;
++ l_goldenFound = true;
++ }
++ }
++#endif
++
++ //Include golden if there is one
++ if (l_goldenFound)
++ {
++ i_dt->addPropertyCells32(l_pnorNode,
++ "golden-image-tocs",l_golden,l_goldenCount);
++ }
++
++ } while (0);
++
++ return;
++}
+
+ void bld_xscom_node(devTree * i_dt, dtOffset_t & i_parentNode,
+ const TARGETING::Target * i_pProc, uint32_t i_chipid)
+@@ -488,6 +595,8 @@ void bld_xscom_node(devTree * i_dt, dtOffset_t & i_parentNode,
+ i_dt->addPropertyCell32(lpcNode, "#address-cells", 2);
+ i_dt->addPropertyCell32(lpcNode, "#size-cells", 1);
+
++ bld_fdt_pnor (i_dt, lpcNode);
++
+ }
+
+ /*NX*/
+@@ -908,6 +1017,7 @@ void load_hbrt_image(uint64_t& io_address)
+ }
+ }
+
++
+ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
+ {
+ errlHndl_t errhdl = NULL;
+diff --git a/src/usr/pnor/pnor_common.H b/src/usr/pnor/pnor_common.H
+index dd7ab2e..7213add 100644
+--- a/src/usr/pnor/pnor_common.H
++++ b/src/usr/pnor/pnor_common.H
+@@ -61,7 +61,6 @@ namespace PNOR {
+ SUPPORTED_FFS_VERSION = 0x1, /**< Supported FFS Version */
+ FFS_TABLE_BASE_ADDR = 0x0, /**< Currently only have FFS table */
+ TOC_SIZE = 0x8000,
+- INVALID_OFFSET = 0xFFFFFFF,
+ };
+
+ /**
+diff --git a/src/usr/pnor/pnordd.C b/src/usr/pnor/pnordd.C
+index 13667ce..c0c7b0e 100644
+--- a/src/usr/pnor/pnordd.C
++++ b/src/usr/pnor/pnordd.C
+@@ -46,6 +46,7 @@
+ #include <errl/errludstring.H>
+ #include <targeting/common/targetservice.H>
+ #include "pnordd.H"
++#include "pnor_common.H"
+ #include <pnor/pnorif.H>
+ #include <pnor/pnor_reasoncodes.H>
+ #include <sys/time.h>
+@@ -196,7 +197,7 @@ bool usingL3Cache()
+ */
+ void getPnorInfo( PnorInfo_t& o_pnorInfo )
+ {
+- o_pnorInfo.mmioOffset = 0; //LPC_SFC_MMIO_OFFSET;//@fixme-need Prachi's code for this
++ o_pnorInfo.mmioOffset = LPC_SFC_MMIO_OFFSET|LPC_FW_SPACE;
+ o_pnorInfo.norWorkarounds =
+ Singleton<PnorDD>::instance().getNorWorkarounds();
+ o_pnorInfo.flashSize =
+--
+1.7.4.1
+
diff --git a/openpower/package/hostboot/hostboot-0009-Change-Opal-Devtree-IPMI-FRU_ID-Name.patch b/openpower/package/hostboot/hostboot-0009-Change-Opal-Devtree-IPMI-FRU_ID-Name.patch
new file mode 100644
index 0000000..35944b9
--- /dev/null
+++ b/openpower/package/hostboot/hostboot-0009-Change-Opal-Devtree-IPMI-FRU_ID-Name.patch
@@ -0,0 +1,28 @@
+From 90c6df43a7b7836f973d0fbae5c751742d305e37 Mon Sep 17 00:00:00 2001
+From: Bill Hoffa <wghoffa@us.ibm.com>
+Date: Fri, 27 Feb 2015 11:33:07 -0600
+Subject: [PATCH 4/5] Change Opal Devtree IPMI FRU_ID Name
+
+Change-Id: I95156302b65c1a1be611d081e842eaf2aac5d03a
+RTC:124830
+(cherry picked from commit 3847eee998f35baeee1a3c085042ff0cdb78e5d1)
+---
+ src/usr/devtree/bld_devtree.C | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/usr/devtree/bld_devtree.C b/src/usr/devtree/bld_devtree.C
+index d90c1fd..66b0d6f 100644
+--- a/src/usr/devtree/bld_devtree.C
++++ b/src/usr/devtree/bld_devtree.C
+@@ -1600,7 +1600,7 @@ errlHndl_t bld_fdt_bmc(devTree * i_dt, bool i_smallTree)
+ TARGETING::targetService().getTopLevelTarget(pSys);
+ assert(pSys != NULL,
+ "bld_fdt_bmc - Error: Could not find the top level target.");
+- i_dt->addPropertyCell32(bmcNode, "fruId",
++ i_dt->addPropertyCell32(bmcNode, "firmware-fru-id",
+ pSys->getAttr<TARGETING::ATTR_FRU_ID>());
+
+ /* create a node to hold the sensors */
+--
+1.7.4.1
+
diff --git a/openpower/package/hostboot/hostboot.mk b/openpower/package/hostboot/hostboot.mk
index 99de01f..a415be2 100644
--- a/openpower/package/hostboot/hostboot.mk
+++ b/openpower/package/hostboot/hostboot.mk
@@ -4,7 +4,7 @@
#
################################################################################
-HOSTBOOT_VERSION ?= 84a672bd28630d9998fc2808df3659ddcf5a7eda
+HOSTBOOT_VERSION ?= 6c9eac071a9a79921c4b360af53e023dad19666f
HOSTBOOT_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_VERSION))
HOSTBOOT_LICENSE = Apache-2.0
diff --git a/openpower/package/palmetto-xml/palmetto-xml.mk b/openpower/package/palmetto-xml/palmetto-xml.mk
index 8b005dd..72803ff 100644
--- a/openpower/package/palmetto-xml/palmetto-xml.mk
+++ b/openpower/package/palmetto-xml/palmetto-xml.mk
@@ -4,7 +4,7 @@
#
################################################################################
-PALMETTO_XML_VERSION = d64b97a28bbc905a991a176b53952b469198e74c
+PALMETTO_XML_VERSION = 84f5bf5cc10459a85340cd0cc82a8c65b5bc4c97
PALMETTO_XML_SITE = $(call github,open-power,palmetto-xml,$(PALMETTO_XML_VERSION))
PALMETTO_XML_LICENSE = Apache-2.0