diff options
Diffstat (limited to 'meta-openbmc-mods/meta-wht')
22 files changed, 844 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-wht/conf/bblayers.conf.sample b/meta-openbmc-mods/meta-wht/conf/bblayers.conf.sample new file mode 100644 index 000000000..546cd7b31 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/conf/bblayers.conf.sample @@ -0,0 +1,28 @@ +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "14" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +# meta-intel-openbmc has a config file that needs to be overridden +BBMASK = "/meta-intel-openbmc/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb" + +BBLAYERS ?= " \ + ##OEROOT##/meta \ + ##OEROOT##/meta-poky \ + ##OEROOT##/meta-openembedded/meta-oe \ + ##OEROOT##/meta-openembedded/meta-networking \ + ##OEROOT##/meta-openembedded/meta-perl \ + ##OEROOT##/meta-openembedded/meta-python \ + ##OEROOT##/meta-phosphor \ + ##OEROOT##/meta-aspeed \ + ##OEROOT##/meta-x86 \ + ##OEROOT##/meta-openbmc-mods \ + ##OEROOT##/meta-intel-openbmc \ + ##OEROOT##/meta-openbmc-mods/meta-common \ + ##OEROOT##/meta-openbmc-mods/meta-common-small \ + ##OEROOT##/meta-openbmc-mods/meta-ast2500 \ + ##OEROOT##/meta-openbmc-mods/meta-wht \ + ##OEROOT##/meta-security \ + " diff --git a/meta-openbmc-mods/meta-wht/conf/conf-notes.txt b/meta-openbmc-mods/meta-wht/conf/conf-notes.txt new file mode 100644 index 000000000..91059a72d --- /dev/null +++ b/meta-openbmc-mods/meta-wht/conf/conf-notes.txt @@ -0,0 +1,6 @@ +Common targets are: + intel-platforms + obmc-phosphor-image + qemu-helper-native + virtual/kernel + phosphor-ipmi-host diff --git a/meta-openbmc-mods/meta-wht/conf/layer.conf b/meta-openbmc-mods/meta-wht/conf/layer.conf new file mode 100644 index 000000000..a639b642b --- /dev/null +++ b/meta-openbmc-mods/meta-wht/conf/layer.conf @@ -0,0 +1,14 @@ +LOCALCONF_VERSION = "5" +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "wht" +BBFILE_PATTERN_wht = "^${LAYERDIR}/" +BBFILE_PRIORITY_wht = "11" +LAYERSERIES_COMPAT_wht = "gatesgarth hardknott" + +PRODUCT_GENERATION = "wht" diff --git a/meta-openbmc-mods/meta-wht/conf/local.conf.sample b/meta-openbmc-mods/meta-wht/conf/local.conf.sample new file mode 100644 index 000000000..5a5134be5 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/conf/local.conf.sample @@ -0,0 +1,36 @@ +MACHINE ??= "intel-ast2500" +#DL_DIR ?= "/~YoctoDownloads" +#SSTATE_DIR ?= "/~YoctoSstate-cache" +DISTRO ?= "openbmc-phosphor" +PACKAGE_CLASSES ?= "package_rpm" +SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*" +EXTRA_IMAGE_FEATURES = "validation-unsecure" +# Uncomment the following line to enable debug features / default user account. +#EXTRA_IMAGE_FEATURES += "debug-tweaks" +USER_CLASSES ?= "buildstats image-mklibs image-prelink" +PATCHRESOLVE = "noop" + +# PFR image Build +# Before exporting the conf, please uncomment the below line +# for building Intel PFR compliant images. +#IMAGE_FSTYPES += "intel-pfr" + +BB_DISKMON_DIRS = "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" +CONF_VERSION = "5" +#BB_NUMBER_THREADS = "70" + +FULL_OPTIMIZATION = "-Os -pipe ${DEBUG_FLAGS}" + +# The following class prints the SRC_URI of each recipe in the build +# Once enabled, run 'bitbake intel-platforms --runonly print_src' +# on a clean workspace to get the output +#INHERIT += "print-src" + diff --git a/meta-openbmc-mods/meta-wht/conf/machine/intel-ast2500.conf b/meta-openbmc-mods/meta-wht/conf/machine/intel-ast2500.conf new file mode 100644 index 000000000..907b9f1e1 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/conf/machine/intel-ast2500.conf @@ -0,0 +1 @@ +require conf/machine/include/intel-ast2500.inc diff --git a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Configure-host-error-monitors-for-meta-wht.patch b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Configure-host-error-monitors-for-meta-wht.patch new file mode 100644 index 000000000..17f16cce5 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Configure-host-error-monitors-for-meta-wht.patch @@ -0,0 +1,194 @@ +From 1b2df626b20aa14c0de7f46915758d10394d01b4 Mon Sep 17 00:00:00 2001 +From: "Jason M. Bills" <jason.m.bills@intel.com> +Date: Tue, 15 Dec 2020 10:05:31 -0800 +Subject: [PATCH] Configure host error monitors for meta-wht + +The new host error monitor architecture allows the list of error +monitors to be customized through a platform-specific patch file. + +This patch configures the host error monitors for meta-wht. + +Change-Id: I7070a3409b1471d7f9c93eca3e36b477f484e5d7 +Signed-off-by: Jason M. Bills <jason.m.bills@intel.com> +--- + include/error_monitors.hpp | 137 ++++++++++++++++++++++++++++++++++--- + 1 file changed, 129 insertions(+), 8 deletions(-) + +diff --git a/include/error_monitors.hpp b/include/error_monitors.hpp +index 55b8790d..8d1651d3 100644 +--- a/include/error_monitors.hpp ++++ b/include/error_monitors.hpp +@@ -14,23 +14,88 @@ + // limitations under the License. + */ + #pragma once ++#include <error_monitors/cpu_mismatch_monitor.hpp> ++#include <error_monitors/cpu_thermtrip_monitor.hpp> ++#include <error_monitors/err2_monitor.hpp> ++#include <error_monitors/err_pin_monitor.hpp> ++#include <error_monitors/ierr_monitor.hpp> ++#include <error_monitors/mem_thermtrip_monitor.hpp> ++#include <error_monitors/pch_thermtrip_monitor.hpp> ++#include <error_monitors/smi_monitor.hpp> ++#include <error_monitors/vr_hot_monitor.hpp> + #include <sdbusplus/asio/object_server.hpp> +-// #include <error_monitors/smi_monitor.hpp> + + #include <memory> + + namespace host_error_monitor::error_monitors + { + // Error signals to monitor +-// static std::unique_ptr<host_error_monitor::smi_monitor::SMIMonitor> +-// smiMonitor; ++static std::unique_ptr<host_error_monitor::smi_monitor::SMIMonitor> smiMonitor; ++static std::unique_ptr< ++ host_error_monitor::cpu_mismatch_monitor::CPUMismatchMonitor> ++ cpu1MismatchMonitor; ++static std::unique_ptr< ++ host_error_monitor::cpu_mismatch_monitor::CPUMismatchMonitor> ++ cpu2MismatchMonitor; ++static std::unique_ptr<host_error_monitor::err_pin_monitor::ErrPinMonitor> ++ err0Monitor; ++static std::unique_ptr<host_error_monitor::err_pin_monitor::ErrPinMonitor> ++ err1Monitor; ++static std::unique_ptr<host_error_monitor::err2_monitor::Err2Monitor> ++ err2Monitor; ++static std::unique_ptr<host_error_monitor::ierr_monitor::IERRMonitor> ++ ierrMonitor; ++static std::unique_ptr< ++ host_error_monitor::cpu_thermtrip_monitor::CPUThermtripMonitor> ++ cpu1ThermtripMonitor; ++static std::unique_ptr< ++ host_error_monitor::cpu_thermtrip_monitor::CPUThermtripMonitor> ++ cpu2ThermtripMonitor; ++static std::unique_ptr< ++ host_error_monitor::mem_thermtrip_monitor::MemThermtripMonitor> ++ mem1ThermtripMonitor; ++static std::unique_ptr< ++ host_error_monitor::mem_thermtrip_monitor::MemThermtripMonitor> ++ mem2ThermtripMonitor; ++static std::unique_ptr<host_error_monitor::vr_hot_monitor::VRHotMonitor> ++ cpu1VRHotMonitor; ++static std::unique_ptr<host_error_monitor::vr_hot_monitor::VRHotMonitor> ++ cpu1MemABCDVRHotMonitor; ++static std::unique_ptr<host_error_monitor::vr_hot_monitor::VRHotMonitor> ++ cpu1MemEFGHVRHotMonitor; ++static std::unique_ptr<host_error_monitor::vr_hot_monitor::VRHotMonitor> ++ cpu2VRHotMonitor; ++static std::unique_ptr<host_error_monitor::vr_hot_monitor::VRHotMonitor> ++ cpu2MemABCDVRHotMonitor; ++static std::unique_ptr<host_error_monitor::vr_hot_monitor::VRHotMonitor> ++ cpu2MemEFGHVRHotMonitor; ++static std::unique_ptr< ++ host_error_monitor::pch_thermtrip_monitor::PCHThermtripMonitor> ++ pchThermtripMonitor; + + // Check if all the signal monitors started successfully + bool checkMonitors() + { + bool ret = true; + +- // ret &= smiMonitor->isValid(); ++ ret &= smiMonitor->isValid(); ++ ret &= cpu1MismatchMonitor->isValid(); ++ ret &= cpu2MismatchMonitor->isValid(); ++ ret &= err0Monitor->isValid(); ++ ret &= err1Monitor->isValid(); ++ ret &= err2Monitor->isValid(); ++ ret &= ierrMonitor->isValid(); ++ ret &= cpu1ThermtripMonitor->isValid(); ++ ret &= cpu2ThermtripMonitor->isValid(); ++ ret &= mem1ThermtripMonitor->isValid(); ++ ret &= mem2ThermtripMonitor->isValid(); ++ ret &= cpu1VRHotMonitor->isValid(); ++ ret &= cpu1MemABCDVRHotMonitor->isValid(); ++ ret &= cpu1MemEFGHVRHotMonitor->isValid(); ++ ret &= cpu2VRHotMonitor->isValid(); ++ ret &= cpu2MemABCDVRHotMonitor->isValid(); ++ ret &= cpu2MemEFGHVRHotMonitor->isValid(); ++ ret &= pchThermtripMonitor->isValid(); + + return ret; + } +@@ -39,9 +104,59 @@ bool checkMonitors() + bool startMonitors(boost::asio::io_service& io, + std::shared_ptr<sdbusplus::asio::connection> conn) + { +- // smiMonitor = +- // std::make_unique<host_error_monitor::smi_monitor::SMIMonitor>( +- // io, conn, "SMI"); ++ smiMonitor = std::make_unique<host_error_monitor::smi_monitor::SMIMonitor>( ++ io, conn, "SMI"); ++ cpu1MismatchMonitor = std::make_unique< ++ host_error_monitor::cpu_mismatch_monitor::CPUMismatchMonitor>( ++ io, conn, "CPU1_MISMATCH", 1); ++ cpu2MismatchMonitor = std::make_unique< ++ host_error_monitor::cpu_mismatch_monitor::CPUMismatchMonitor>( ++ io, conn, "CPU2_MISMATCH", 2); ++ err0Monitor = ++ std::make_unique<host_error_monitor::err_pin_monitor::ErrPinMonitor>( ++ io, conn, "CPU_ERR0", 0); ++ err1Monitor = ++ std::make_unique<host_error_monitor::err_pin_monitor::ErrPinMonitor>( ++ io, conn, "CPU_ERR1", 1); ++ err2Monitor = ++ std::make_unique<host_error_monitor::err2_monitor::Err2Monitor>( ++ io, conn, "CPU_ERR2"); ++ ierrMonitor = ++ std::make_unique<host_error_monitor::ierr_monitor::IERRMonitor>( ++ io, conn, "CPU_CATERR"); ++ cpu1ThermtripMonitor = std::make_unique< ++ host_error_monitor::cpu_thermtrip_monitor::CPUThermtripMonitor>( ++ io, conn, "CPU1_THERMTRIP", 1, "CPU1_FIVR_FAULT"); ++ cpu2ThermtripMonitor = std::make_unique< ++ host_error_monitor::cpu_thermtrip_monitor::CPUThermtripMonitor>( ++ io, conn, "CPU2_THERMTRIP", 2, "CPU2_FIVR_FAULT"); ++ mem1ThermtripMonitor = std::make_unique< ++ host_error_monitor::mem_thermtrip_monitor::MemThermtripMonitor>( ++ io, conn, "CPU1_MEM_THERM_EVENT", 1); ++ mem2ThermtripMonitor = std::make_unique< ++ host_error_monitor::mem_thermtrip_monitor::MemThermtripMonitor>( ++ io, conn, "CPU2_MEM_THERM_EVENT", 2); ++ cpu1VRHotMonitor = ++ std::make_unique<host_error_monitor::vr_hot_monitor::VRHotMonitor>( ++ io, conn, "CPU1_VRHOT", "CPU 1"); ++ cpu1MemABCDVRHotMonitor = ++ std::make_unique<host_error_monitor::vr_hot_monitor::VRHotMonitor>( ++ io, conn, "CPU1_MEM_ABCD_VRHOT", "CPU 1 Memory ABCD"); ++ cpu1MemEFGHVRHotMonitor = ++ std::make_unique<host_error_monitor::vr_hot_monitor::VRHotMonitor>( ++ io, conn, "CPU1_MEM_EFGH_VRHOT", "CPU 1 Memory EFGH"); ++ cpu2VRHotMonitor = ++ std::make_unique<host_error_monitor::vr_hot_monitor::VRHotMonitor>( ++ io, conn, "CPU2_VRHOT", "CPU 2"); ++ cpu2MemABCDVRHotMonitor = ++ std::make_unique<host_error_monitor::vr_hot_monitor::VRHotMonitor>( ++ io, conn, "CPU2_MEM_ABCD_VRHOT", "CPU 2 Memory ABCD"); ++ cpu2MemEFGHVRHotMonitor = ++ std::make_unique<host_error_monitor::vr_hot_monitor::VRHotMonitor>( ++ io, conn, "CPU2_MEM_EFGH_VRHOT", "CPU 2 Memory EFGH"); ++ pchThermtripMonitor = std::make_unique< ++ host_error_monitor::pch_thermtrip_monitor::PCHThermtripMonitor>( ++ io, conn, "PCH_BMC_THERMTRIP"); + + return checkMonitors(); + } +@@ -49,7 +164,13 @@ bool startMonitors(boost::asio::io_service& io, + // Notify the signal monitors of host on event + void sendHostOn() + { +- // smiMonitor->hostOn(); ++ smiMonitor->hostOn(); ++ cpu1MismatchMonitor->hostOn(); ++ cpu2MismatchMonitor->hostOn(); ++ err0Monitor->hostOn(); ++ err1Monitor->hostOn(); ++ err2Monitor->hostOn(); ++ ierrMonitor->hostOn(); + } + + } // namespace host_error_monitor::error_monitors +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Filter-memory-thermtrip-events-based-on-DIMM-status.patch b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Filter-memory-thermtrip-events-based-on-DIMM-status.patch new file mode 100644 index 000000000..cf74a4925 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Filter-memory-thermtrip-events-based-on-DIMM-status.patch @@ -0,0 +1,143 @@ +From b8b701fde79e7a8ca7bf5aa6ca6832524c011fa5 Mon Sep 17 00:00:00 2001 +From: "Jason M. Bills" <jason.m.bills@intel.com> +Date: Tue, 15 Dec 2020 16:09:00 -0800 +Subject: [PATCH] Filter memory thermtrip events based on DIMM status + +There is a race-condition on shutdown that makes it difficult to +differentiate between a normal shutdown and a memory thermtrip +shutdown. This race-condition will be resolved in the CPLD for +future platforms but for now it requires a workaround. + +This workaround assumes that a memory thermtrip can only occur +if a DIMM temperature sensor has already reached a critical +threshold. When memory thermtrip asserts on shutdown, it only +logs an error if a DIMM is critical; otherwise it is treated +as a normal shutdown. + +Tested: +Memory thermtrip errors no longer log on each power-off. +Manually set a DIMM temperature above critical and verified +that the memory thermtrip event is logged. + +Change-Id: I9d8cf9b1de688e27babb8004b41f662242c78b3c +Signed-off-by: Jason M. Bills <jason.m.bills@intel.com> +--- + .../error_monitors/mem_thermtrip_monitor.hpp | 81 +++++++++++++++++++ + 1 file changed, 81 insertions(+) + +diff --git a/include/error_monitors/mem_thermtrip_monitor.hpp b/include/error_monitors/mem_thermtrip_monitor.hpp +index d3dff1d3b..0a3f2fc22 100644 +--- a/include/error_monitors/mem_thermtrip_monitor.hpp ++++ b/include/error_monitors/mem_thermtrip_monitor.hpp +@@ -14,6 +14,7 @@ + // limitations under the License. + */ + #pragma once ++#include <boost/container/flat_set.hpp> + #include <error_monitors/base_gpio_monitor.hpp> + #include <host_error_monitor.hpp> + #include <sdbusplus/asio/object_server.hpp> +@@ -28,6 +29,72 @@ class MemThermtripMonitor : + host_error_monitor::base_gpio_monitor::AssertValue::lowAssert; + size_t cpuNum; + ++ std::shared_ptr<sdbusplus::bus::match::match> dimmThresholdEventMonitor; ++ boost::container::flat_set<std::string> criticalDIMMs; ++ ++ std::shared_ptr<sdbusplus::bus::match::match> ++ startDIMMThresholdEventMonitor() ++ { ++ return std::make_shared<sdbusplus::bus::match::match>( ++ *conn, ++ "type='signal',interface='org.freedesktop.DBus.Properties',member='" ++ "PropertiesChanged',arg0namespace='xyz.openbmc_project.Sensor." ++ "Threshold.Critical'", ++ [this](sdbusplus::message::message& msg) { ++ std::string interfaceName; ++ boost::container::flat_map<std::string, std::variant<bool>> ++ propertiesChanged; ++ try ++ { ++ msg.read(interfaceName, propertiesChanged); ++ } ++ catch (std::exception& e) ++ { ++ std::cerr << "Unable to read threshold event\n"; ++ return; ++ } ++ // We only want to check for CriticalAlarmHigh ++ if (propertiesChanged.begin()->first != "CriticalAlarmHigh") ++ { ++ return; ++ } ++ const bool* alarm = ++ std::get_if<bool>(&(propertiesChanged.begin()->second)); ++ if (alarm == nullptr) ++ { ++ std::cerr << propertiesChanged.begin()->first ++ << " property invalid\n"; ++ return; ++ } ++ ++ // Get the sensor path and check if it's a DIMM sensor ++ std::string sensor = msg.get_path(); ++ if (sensor.find("DIMM") == std::string::npos) ++ { ++ // Not a DIMM sensor ++ return; ++ } ++ ++ // Check if the DIMM belongs to this CPU ++ if (sensor.find("CPU" + std::to_string(cpuNum)) == ++ std::string::npos) ++ { ++ return; ++ } ++ ++ if (*alarm) ++ { ++ // DIMM crossed a critical threshold, so store it ++ criticalDIMMs.insert(sensor); ++ } ++ else ++ { ++ // DIMM is no longer critical, so remove it ++ criticalDIMMs.erase(sensor); ++ } ++ }); ++ } ++ + void logEvent() override + { + std::string cpuNumber = "CPU " + std::to_string(cpuNum); +@@ -39,6 +106,17 @@ class MemThermtripMonitor : + "REDFISH_MESSAGE_ARGS=%s", cpuNumber.c_str(), NULL); + } + ++ void assertHandler() override ++ { ++ // Only log a memory thermtrip if a DIMM is critical ++ if (criticalDIMMs.empty()) ++ { ++ return; ++ } ++ ++ host_error_monitor::base_gpio_monitor::BaseGPIOMonitor::assertHandler(); ++ } ++ + public: + MemThermtripMonitor(boost::asio::io_service& io, + std::shared_ptr<sdbusplus::asio::connection> conn, +@@ -46,6 +124,9 @@ class MemThermtripMonitor : + BaseGPIOMonitor(io, conn, signalName, assertValue), + cpuNum(cpuNum) + { ++ // Start tracking critical DIMM status ++ dimmThresholdEventMonitor = startDIMMThresholdEventMonitor(); ++ + if (valid) + { + startMonitoring(); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend new file mode 100644 index 000000000..638d833a8 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-Configure-host-error-monitors-for-meta-wht.patch \ + file://0002-Filter-memory-thermtrip-events-based-on-DIMM-status.patch \ + " diff --git a/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci/99-peci.rules b/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci/99-peci.rules new file mode 100644 index 000000000..b587a3f57 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci/99-peci.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="peci_dev", ATTRS{name}=="*.peci-bus", SYMLINK+="peci-wire" TAG+="peci-wire" +ACTION=="add", SUBSYSTEM=="peci_dev", TAG=="peci-wire", SYMLINK+="peci-default" diff --git a/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend new file mode 100644 index 000000000..575cfea24 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +SRC_URI += "file://99-peci.rules" + +do_install_append() { + install -d ${D}/lib/udev/rules.d + install -m 0644 ${WORKDIR}/99-peci.rules ${D}/lib/udev/rules.d +} diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend new file mode 100644 index 000000000..55cc619ce --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend @@ -0,0 +1,22 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +SRC_URI_append = " \ + file://pfr_manifest.json \ + file://pfm_config.xml \ + file://bmc_config.xml \ + file://csk_prv.pem \ + file://csk_pub.pem \ + file://rk_pub.pem \ + file://rk_prv.pem \ + " + +do_install_append () { + install -m 400 ${WORKDIR}/pfr_manifest.json ${D}/${datadir}/pfrconfig + install -m 400 ${WORKDIR}/pfm_config.xml ${D}/${datadir}/pfrconfig/pfm_config.xml + install -m 400 ${WORKDIR}/bmc_config.xml ${D}/${datadir}/pfrconfig/bmc_config.xml + install -m 400 ${WORKDIR}/csk_prv.pem ${D}/${datadir}/pfrconfig/csk_prv.pem + install -m 400 ${WORKDIR}/csk_pub.pem ${D}/${datadir}/pfrconfig/csk_pub.pem + install -m 400 ${WORKDIR}/rk_pub.pem ${D}/${datadir}/pfrconfig/rk_pub.pem + install -m 400 ${WORKDIR}/rk_prv.pem ${D}/${datadir}/pfrconfig/rk_prv.pem +} + diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml new file mode 100644 index 000000000..9e7d3f82d --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!-- XML file for Block Sign Tool -->
+<blocksign>
+ <version>1</version>
+ <!-- Block 0 -->
+ <block0>
+ <magic>0xB6EAFD19</magic>
+ <pctype>4</pctype>
+ </block0>
+ <!-- Block 1 -->
+ <block1>
+ <magic>0xF27F28D7</magic>
+ <!-- Root key -->
+ <rkey>
+ <magic>0xA757A046</magic>
+ <curvemagic>0xC7B88C74</curvemagic>
+ <permissions>-1</permissions>
+ <keyid>-1</keyid>
+ <pubkey>rk_pub.pem</pubkey>
+ </rkey>
+ <!-- Code signing key -->
+ <cskey>
+ <magic>0x14711C2F</magic>
+ <curvemagic>0xC7B88C74</curvemagic>
+ <permissions>8</permissions>
+ <keyid>1</keyid>
+ <pubkey>csk_pub.pem</pubkey>
+ <sigmagic>0xDE64437D</sigmagic>
+ <hashalg>sha256</hashalg>
+ <signkey>rk_prv.pem</signkey>
+ <!--<script>./sign_external.sh</script>-->
+ </cskey>
+ <!-- Signature over Block 0 -->
+ <b0_sig>
+ <magic>0x15364367</magic>
+ <sigmagic>0xDE64437D</sigmagic>
+ <hashalg>sha256</hashalg>
+ <signkey>csk_prv.pem</signkey>
+ </b0_sig>
+ </block1>
+ <!-- CPLD Bitstream Specific -->
+ <padding>
+ <!-- Pad block1 such that combined block length is 1024b -->
+ <blockpad>1024</blockpad>
+ <!-- Align total package to 128 bytes -->
+ <align>128</align>
+ </padding>
+</blocksign>
diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/csk_prv.pem b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/csk_prv.pem new file mode 100644 index 000000000..a46fa2a2b --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/csk_prv.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIFjPqxcb6tfFWyFVaQCVjeN9MtcISpYIbNlkQoODrHTUoAoGCCqGSM49 +AwEHoUQDQgAERGJveRnhIp7I5cvmjO74MJLbUJjTfvTDKlzK0hJB0WRBEFScpb9d +xWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ== +-----END EC PRIVATE KEY----- diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/csk_pub.pem b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/csk_pub.pem new file mode 100644 index 000000000..cc70d6e28 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/csk_pub.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERGJveRnhIp7I5cvmjO74MJLbUJjT +fvTDKlzK0hJB0WRBEFScpb9dxWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ== +-----END PUBLIC KEY----- diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/pfm_config.xml b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/pfm_config.xml new file mode 100644 index 000000000..19378d1b9 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/pfm_config.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- XML file for Block Sign Tool --> +<blocksign> + <version>1</version> + <!-- Block 0 --> + <block0> + <magic>0xB6EAFD19</magic> + <pctype>3</pctype> + </block0> + <!-- Block 1 --> + <block1> + <magic>0xF27F28D7</magic> + <!-- Root key --> + <rkey> + <magic>0xA757A046</magic> + <curvemagic>0xC7B88C74</curvemagic> + <permissions>-1</permissions> + <keyid>-1</keyid> + <pubkey>rk_pub.pem</pubkey> + </rkey> + <!-- Code signing key --> + <cskey> + <magic>0x14711C2F</magic> + <curvemagic>0xC7B88C74</curvemagic> + <permissions>4</permissions> + <keyid>1</keyid> + <pubkey>csk_pub.pem</pubkey> + <sigmagic>0xDE64437D</sigmagic> + <hashalg>sha256</hashalg> + <signkey>rk_prv.pem</signkey> + <!--<script>./sign_external.sh</script>--> + </cskey> + <!-- Signature over Block 0 --> + <b0_sig> + <magic>0x15364367</magic> + <sigmagic>0xDE64437D</sigmagic> + <hashalg>sha256</hashalg> + <signkey>csk_prv.pem</signkey> + </b0_sig> + </block1> + <!-- CPLD Bitstream Specific --> + <padding> + <!-- Pad block1 such that combined block length is 1024b --> + <blockpad>1024</blockpad> + <!-- Align total package to 128 bytes --> + <align>128</align> + </padding> +</blocksign> diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/pfr_manifest.json b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/pfr_manifest.json new file mode 100644 index 000000000..c79b7f343 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/pfr_manifest.json @@ -0,0 +1,196 @@ +{ + "image-parts": [{ + "name": "u-boot", + "index": 0, + "offset": "0", + "size": "0x80000", + "prot_mask": 29, + "pfm": 1, + "hash": 1, + "compress": 1 + }, + { + "name": "pfm", + "index": 1, + "offset": "0x80000", + "size": "0x20000", + "prot_mask": 0, + "pfm": 1, + "hash": 0, + "compress": 0 + }, + { + "name": "u-boot-env", + "index": 2, + "offset": "0xa0000", + "size": "0x20000", + "prot_mask": 31, + "pfm": 1, + "hash": 0, + "compress": 1 + }, + { + "name": "sofs", + "index": 3, + "offset": "0xc0000", + "size": "0x200000", + "prot_mask": 31, + "pfm": 1, + "hash": 0, + "compress": 1 + }, + { + "name": "rwfs", + "index": 4, + "offset": "0x2c0000", + "size": "0x840000", + "prot_mask": 31, + "pfm": 1, + "hash": 0, + "compress": 1 + }, + { + "name": "fit-image-a", + "index": 5, + "offset": "0xb00000", + "size": "0x1f00000", + "prot_mask": 29, + "pfm": 1, + "hash": 1, + "compress": 1 + }, + { + "name": "rc-image", + "index": 6, + "offset": "0x2a00000", + "size": "0x2000000", + "prot_mask": 0, + "pfm": 1, + "hash": 0, + "compress": 0 + }, + { + "name": "image-stg", + "index": 7, + "offset": "0x4a00000", + "size": "0x3500000", + "prot_mask": 3, + "pfm": 1, + "hash": 0, + "compress": 0 + }, + { + "name": "cpld-rc", + "index": 8, + "offset": "0x7f00000", + "size": "0x100000", + "prot_mask": 0, + "pfm": 1, + "hash": 0, + "compress": 0 + } + ], + "i2c-rules": [{ + "bus-id": 3, + "rule-id": 3, + "address": "0xD0", + "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F", + "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30", + "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"] + }, + { + "bus-id": 3, + "rule-id": 4, + "address": "0xD8", + "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F", + "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30", + "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"] + }, + { + "bus-id": 1, + "rule-id": 6, + "address": "0xB0", + "cmd-whitelist": ["0x00", "0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F", + "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88", + "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", + "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8", + "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"] + }, + { + "bus-id": 1, + "rule-id": 4, + "address": "0xB2", + "cmd-whitelist": ["0x00", "0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F", + "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88", + "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", + "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8", + "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"] + }, + { + "bus-id": 2, + "rule-id": 1, + "address": "0xB4", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 2, + "address": "0xD4", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 3, + "address": "0x4A", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 4, + "address": "0x4C", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 5, + "address": "0xDC", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 6, + "address": "0xEC", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 7, + "address": "0xE0", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 8, + "address": "0xB0", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 9, + "address": "0xC4", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 10, + "address": "0xCC", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 11, + "address": "0xE4", + "cmd-whitelist": ["0x00"] + } + ] +} diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/rk_prv.pem b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/rk_prv.pem new file mode 100644 index 000000000..9e8616795 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/rk_prv.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIHVbq5CmT4Vr4Jb0eJK0+KhUxDOWy1kh9QYAClV5MH1GoAoGCCqGSM49 +AwEHoUQDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E44XiKcqvS6+l2GfSdCLRhXWHw +iV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ== +-----END EC PRIVATE KEY----- diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/rk_pub.pem b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/rk_pub.pem new file mode 100644 index 000000000..117e08bae --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/rk_pub.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E4 +4XiKcqvS6+l2GfSdCLRhXWHwiV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ== +-----END PUBLIC KEY----- diff --git a/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend b/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend new file mode 100644 index 000000000..3251758e9 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = " file://decodeBoardID.sh" diff --git a/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru/decodeBoardID.sh b/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru/decodeBoardID.sh new file mode 100644 index 000000000..ef973548a --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru/decodeBoardID.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# this script uses the BOARD_ID set from checkFru.sh and provides the NAME, +# PRODID, and EEPROM_FRU values for this platform +decode_board_id() { + if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then + # AST2500 + if [ -f $fruFile -a -f $prodIDFile -a $BOARD_ID -ne 0 ]; then + exit 0 + fi + + case $BOARD_ID in + 12) NAME="D50TNP1SB" + PRODID="0x99";; + 40) NAME="CooperCity" + PRODID="0x9d";; + 42) NAME="WilsonCity" + PRODID="0x91";; + 44) NAME="WilsonCityM" + PRODID="0x91";; + 45) NAME="WilsonCity" + PRODID="0x91";; + 60) NAME="M50CYP2SB2U" + PRODID="0x98";; + 62) NAME="WilsonPoint" + PRODID="0x9a";; + 16) EEPROM_FRU=true + PRODID="0xA1";; + 1) EEPROM_FRU=true + PRODID="0xA5";; + 0) EEPROM_FRU=true + PRODID="0xA0";; + esac + fi +} diff --git a/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json b/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json new file mode 100644 index 000000000..ff570c63c --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json @@ -0,0 +1,22 @@ +{ + "channels": [ + { + "type": "me", + "slave-path": "/dev/ipmb-5", + "bmc-addr": 32, + "remote-addr": 44 + }, + { + "type": "ipmb", + "slave-path": "/dev/ipmb-0", + "bmc-addr": 32, + "remote-addr": 88 + }, + { + "type": "slot-ipmb", + "slave-path": "/dev/ipmb-6", + "bmc-addr": 18, + "remote-addr": 176 + } + ] +} diff --git a/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend new file mode 100644 index 000000000..03c685d1d --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = " file://ipmb-channels.json" + +do_install_append(){ + install -m 0644 -D ${WORKDIR}/ipmb-channels.json \ + ${D}/usr/share/ipmbbridge/ +} |