summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2020-08-04 01:40:26 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2020-08-04 23:23:32 +0300
commit40108db4434d8c2e0a1ad2d1dd3f5ae34b17352c (patch)
tree14edb2241a48b600f217aa8ebc03a59ed62ca268 /meta-openbmc-mods/meta-common
parentd071adf43ac87f21dde2f84287120960c723962c (diff)
downloadopenbmc-40108db4434d8c2e0a1ad2d1dd3f5ae34b17352c.tar.xz
Update to internal 0.72
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common')
-rw-r--r--meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass4
-rw-r--r--meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass1
-rw-r--r--meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh27
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/busybox/busybox/enable.cfg1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch30
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0002-Fix-Memory-Leak.patch36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb2
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml48
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml48
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json196
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb14
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch830
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0116-watchdog-aspeed-fix-AST2600-support.patch49
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0117-Copy-raw-PECI-response-to-user-space-on-timeout.patch54
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch17
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console@.service21
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/sol-option-check.sh32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend17
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0001-Add-more-error-types.patch459
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch39
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0010-Add-error-reporting-to-pfr_image_manager.patch187
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch38
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch133
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch19
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Temporarily-disable-EventService-log-support.patch30
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch14
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/service-config-manager/service-config-manager_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch28
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend3
63 files changed, 1722 insertions, 822 deletions
diff --git a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass
index 344dddd3d..e961ae463 100644
--- a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass
@@ -38,6 +38,7 @@ do_image_pfr () {
bbplain "Build Version = ${build_version}"
bbplain "Build Number = ${build_number}"
bbplain "Build Hash = ${build_hash}"
+ bbplain "Build SHA = ${SHA_NAME}"
mkdir -p "${PFR_IMAGES_DIR}"
cd "${PFR_IMAGES_DIR}"
@@ -77,7 +78,9 @@ do_image_pfr () {
# artifacts and that makes fully qualified pathes break. Relative links
# work because of the 'cd "${PFR_IMAGES_DIR}"' at the start of this section.
ln -sf image-mtd-pfr-${DATETIME}.bin ${PFR_IMAGES_DIR}/image-mtd-pfr.bin
+ ln -sf image-mtd-pfr-${DATETIME}.bin ${PFR_IMAGES_DIR}/OBMC-${@ do_get_version(d)}-pfr-full.ROM
ln -sf bmc_signed_cap-${DATETIME}.bin ${PFR_IMAGES_DIR}/bmc_signed_cap.bin
+ ln -sf bmc_signed_cap-${DATETIME}.bin ${PFR_IMAGES_DIR}/OBMC-${@ do_get_version(d)}-pfr-oob.bin
}
do_image_pfr[vardepsexclude] += "DATE DATETIME"
@@ -91,6 +94,7 @@ python() {
product_gen = d.getVar('PRODUCT_GENERATION', True)
if product_gen == "wht":
d.setVar('SHA', "1")# 1- SHA256
+ d.setVar('SHA_NAME', "SHA256")
types = d.getVar('IMAGE_FSTYPES', True).split()
diff --git a/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass b/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass
index f90a19c4b..0c32e0e53 100644
--- a/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass
@@ -60,6 +60,7 @@ do_generate_auto() {
ln ${IMGDEPLOYDIR}/${IMAGE_NAME}.auto.mtd \
${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.auto.mtd
ln -sf ${IMAGE_NAME}.auto.mtd ${DEPLOY_DIR_IMAGE}/image-mtd
+ ln -sf ${IMAGE_NAME}.auto.mtd ${DEPLOY_DIR_IMAGE}/OBMC-${@ do_get_version(d)}.ROM
}
do_generate_auto[dirs] = "${S}/auto"
do_generate_auto[depends] += " \
diff --git a/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass b/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass
index c088fec34..ad49eed82 100644
--- a/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass
@@ -28,6 +28,12 @@ add_watchdog_confs() {
echo "[Service]" >> "${fname}"
echo "StartLimitInterval=${interval}min" >> "${fname}"
echo "StartLimitBurst=${count}" >> "${fname}"
+ echo "RestartSec=60" >> "${fname}"
+
+ if cat $D/lib/systemd/system/${service} | grep Restart > /dev/null; then
+ continue
+ fi
+ echo "Restart=on-failure" >> "${fname}"
done
}
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh
index 38728b512..b9ea1127c 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh
+++ b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh
@@ -1,8 +1,23 @@
#!/bin/sh
-if [[ `cat /proc/cmdline` =~ "resetreason=0x11" ]]
-then
- busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/ac_boot xyz.openbmc_project.Common.ACBoot ACBoot s "True"
-else
- busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/ac_boot xyz.openbmc_project.Common.ACBoot ACBoot s "False"
-fi
+bitWiseAnd() {
+ local IFS='&'
+ printf "%s\n" "$(( $* ))"
+}
+
+ACBOOT="False"
+
+while IFS=' ' read -ra OPTIONS; do
+ for i in "${OPTIONS[@]}"; do
+ while IFS='=' read option param; do
+ if [ "resetreason" == "$option" ]; then
+ if [ $(bitWiseAnd "$param" "0x1") -ne 0 ]; then
+ ACBOOT="True"
+ fi
+ fi
+ done <<< $i
+ done
+done < /proc/cmdline
+
+busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/ac_boot xyz.openbmc_project.Common.ACBoot ACBoot s "$ACBOOT"
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox/enable.cfg b/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox/enable.cfg
new file mode 100644
index 000000000..7e1b90da6
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox/enable.cfg
@@ -0,0 +1 @@
+CONFIG_TRUNCATE=y
diff --git a/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend
index deb9ccbf8..c72975ccc 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend
@@ -1,4 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI += "file://disable.cfg"
+SRC_URI += " \
+ file://disable.cfg \
+ file://enable.cfg \
+ "
SRC_URI += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks','file://dev-only.cfg','',d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
index b4875c332..184f6c0f1 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
@@ -7,7 +7,7 @@ DESCRIPTION = "CPU utilities for dumping CPU Crashdump and registers over PECI"
DEPENDS = "boost cjson sdbusplus safec gtest libpeci"
inherit cmake
-EXTRA_OECMAKE = "-DCRASHDUMP_BUILD_UT=ON"
+EXTRA_OECMAKE = "-DYOCTO_DEPENDENCIES=ON -DCRASHDUMP_BUILD_UT=OFF"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=43c09494f6b77f344027eea0a1c22830"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
index 917e7ab09..96ec876cc 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
+++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
@@ -82,7 +82,7 @@ pfr_active_update() {
systemctl start nv-sync.service || log "failed to start nv-sync"
wait_for_log_sync
fi
- reboot
+ reboot -f
}
pfr_staging_update() {
@@ -268,7 +268,7 @@ ping_pong_update() {
redfish_log_fw_evt success
wait_for_log_sync
# reboot
- reboot
+ reboot -f
}
fetch_fw() {
diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend
index cd42c9933..869cf5f2f 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend
@@ -1,5 +1,5 @@
# Enable downstream autobump
-SRC_URI = "git://github.com/openbmc/host-error-monitor"
-SRCREV = "5287c02c5f96b40f0941c9c72ab29d2c7ac44a96"
+#SRC_URI = "git://github.com/openbmc/host-error-monitor"
+SRCREV = "2fbb9eadeda2ae8a77ac53346b53f2d0a72f3e74"
EXTRA_OECMAKE = "-DYOCTO=1"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch
index 05bd4c055..d537b5db7 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch
+++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch
@@ -1,19 +1,20 @@
-From 1f14ea50ece39c59d23690690dc7c8b1059a35f6 Mon Sep 17 00:00:00 2001
+From 8e3ae96546010c5d4f3fce6df9c32aece1093458 Mon Sep 17 00:00:00 2001
From: Nikhil Potade <nikhil.potade@linux.intel.com>
Date: Tue, 19 Feb 2019 14:16:20 +0800
Subject: [PATCH 1/1] Smbus changes for libmctp
Signed-off-by: James Feist <james.feist@linux.intel.com>
+
---
core.c | 2 ++
libmctp.h | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/core.c b/core.c
-index e7f5689..3732e8a 100644
+index 6e59993..3b11672 100644
--- a/core.c
+++ b/core.c
-@@ -17,6 +17,7 @@
+@@ -19,6 +19,7 @@
/* Internal data structures */
@@ -21,7 +22,7 @@ index e7f5689..3732e8a 100644
struct mctp_bus {
mctp_eid_t eid;
struct mctp_binding *binding;
-@@ -56,6 +57,7 @@ struct mctp {
+@@ -58,6 +59,7 @@ struct mctp {
ROUTE_BRIDGE,
} route_policy;
};
@@ -30,18 +31,18 @@ index e7f5689..3732e8a 100644
#ifndef BUILD_ASSERT
#define BUILD_ASSERT(x) \
diff --git a/libmctp.h b/libmctp.h
-index 69ec46a..b7212be 100644
+index 40e5371..766473b 100644
--- a/libmctp.h
+++ b/libmctp.h
-@@ -15,6 +15,7 @@ extern "C" {
- typedef uint8_t mctp_eid_t;
+@@ -19,6 +19,7 @@ typedef uint8_t mctp_eid_t;
+ #define MCTP_EID_BROADCAST 0xff
/* MCTP packet definitions */
+/* clang-format off */
struct mctp_hdr {
uint8_t ver;
uint8_t dest;
-@@ -30,19 +31,56 @@ struct mctp_hdr {
+@@ -34,20 +35,57 @@ struct mctp_hdr {
#define MCTP_HDR_SEQ_MASK (0x3)
#define MCTP_HDR_TAG_SHIFT (0)
#define MCTP_HDR_TAG_MASK (0x7)
@@ -50,6 +51,7 @@ index 69ec46a..b7212be 100644
/* Baseline Transmission Unit and packet size */
#define MCTP_BTU 64
#define MCTP_PACKET_SIZE(unit) ((unit) + sizeof(struct mctp_hdr))
+ #define MCTP_BODY_SIZE(unit) ((unit) - sizeof(struct mctp_hdr))
+#define MCTP_CONTROL_MESSAGE_TYPE 0x00
+
@@ -98,17 +100,17 @@ index 69ec46a..b7212be 100644
struct mctp_binding;
-@@ -90,6 +128,7 @@ int mctp_message_tx(struct mctp *mctp, mctp_eid_t eid,
+@@ -96,6 +134,7 @@ int mctp_message_tx(struct mctp *mctp, mctp_eid_t eid,
void *msg, size_t msg_len);
/* hardware bindings */
+/* clang-format off */
struct mctp_binding {
- const char *name;
- uint8_t version;
-@@ -101,6 +140,7 @@ struct mctp_binding {
- int (*tx)(struct mctp_binding *binding,
- struct mctp_pktbuf *pkt);
+ const char *name;
+ uint8_t version;
+@@ -108,6 +147,7 @@ struct mctp_binding {
+ mctp_rx_fn control_rx;
+ void *control_rx_data;
};
+/* clang-format on */
diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0002-Fix-Memory-Leak.patch b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0002-Fix-Memory-Leak.patch
new file mode 100644
index 000000000..52acac1ab
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0002-Fix-Memory-Leak.patch
@@ -0,0 +1,36 @@
+From bda505bc62f95ee927b75f87c52e04584dab4d79 Mon Sep 17 00:00:00 2001
+From: James Feist <james.feist@linux.intel.com>
+Date: Fri, 26 Jun 2020 13:50:08 -0700
+Subject: [PATCH 1/1] Fix Memory Leak
+
+In mctp_send_tx_queue if rc is of an error,
+the packet does not get freed, causing a leak.
+
+Change-Id: Ic39b0920b454608841e6e879cc028e455520e67d
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ core.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/core.c b/core.c
+index 6e59993..c251b72 100644
+--- a/core.c
++++ b/core.c
+@@ -543,11 +543,11 @@ static void mctp_send_tx_queue(struct mctp_bus *bus)
+ int rc;
+
+ rc = mctp_packet_tx(bus, pkt);
+- if (rc)
+- break;
+-
+ bus->tx_queue_head = pkt->next;
+ mctp_pktbuf_free(pkt);
++
++ if (rc)
++ break;
+ }
+
+ if (!bus->tx_queue_head)
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
index aa5a8e8b7..170fbdff9 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libmctp"
DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)"
SRC_URI = "git://github.com/openbmc/libmctp.git"
-SRCREV = "8d53b1c368b5d498c4f241b2b492210780010bb9"
+SRCREV = "3ac70d62571953be172a0d16976e383490d25059"
PV = "0.1+git${SRCPV}"
@@ -21,6 +21,7 @@ CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-Smbus-changes-for-libmctp.patch \
+ file://0002-Fix-Memory-Leak.patch \
file://CMakeLists.txt \
file://crc32c.c \
file://crc32c.h \
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
index f49f33873..13171277b 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
@@ -2,4 +2,4 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PF
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
EXTRA_OECMAKE += "-DUSING_ENTITY_MANAGER_DECORATORS=OFF"
SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git"
-SRCREV = "fcd2d3a943c4fb518d399d8a0addd1cc661e5628"
+SRCREV = "2030d7c8ebb6ccdbc300bf4967647a3b496c9726"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend
index ba549b324..2bb0dcd30 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend
@@ -1,3 +1,3 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/libpeci"
-SRCREV = "a2ceec2aa139277cebb62e1eda449ef60fa4c962"
+SRCREV = "c965e72c6765e054531c1ab91e7fa13f04651f21"
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend
new file mode 100644
index 000000000..3c1c501ee
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend
@@ -0,0 +1 @@
+RDEPENDS_${PN}-runtime += "${MLPREFIX}pam-plugin-localuser-${libpam_suffix}"
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
index 2f877ed53..d25bb7753 100644
--- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
@@ -1,5 +1,5 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
# Use the latest to support obmc-ikvm properly
-SRC_URI = "git://github.com/LibVNC/libvncserver;nobranch=1"
-SRCREV = "ce9ae99b370d76521add190a8ca593aa6e3114dd"
+SRC_URI = "git://github.com/LibVNC/libvncserver"
+SRCREV = "38fd347afb6e2b720fdc0dc43bb3e5f179d0ce4e"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
index a83a2c5f9..3a25900d5 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "HSBP Manager"
DESCRIPTION = "HSBP Manager monitors HSBPs through SMBUS"
SRC_URI = "git://github.com/openbmc/s2600wf-misc.git"
-SRCREV = "b688f3f460b78643b95dd80de3100f2373793200"
+SRCREV = "7045b4b283cf1405e832641fb79fcfb2b07c1acb"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py
index 438a3b91f..b69639f32 100755
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py
@@ -44,12 +44,9 @@ EXCLUDE_PAGES =[[0x80, 0x9f],[0x2a00,0x7fff]]
PFM_OFFSET = 0x80000
PFM_SPI = 0x1
PFM_I2C = 0x2
-SHA = 0x1
PFM_DEF_SIZE = 32 # 32 bytes of PFM header
PFM_SPI_SIZE_DEF = 16 # 16 bytes of SPI PFM
-PFM_SPI_SIZE_HASH = 32 # 32 bytes of SPI region HASH
PFM_I2C_SIZE = 40 # 40 bytes of i2c rules region in PFM
-
PAGE_SIZE = 0x1000 # 4KB size of page
def load_manifest(fname):
@@ -64,6 +61,10 @@ class pfm_spi(object):
self.spi_pfm = PFM_SPI
self.spi_prot_mask = prot_mask
self.spi_hash_pres = hash_pres
+ print("hash_pres={}".format(self.spi_hash_pres))
+ print("spi_hash={}".format(hash))
+ print("spi_start_addr={}".format(start_addr))
+ print("spi_end_addr={}".format(end_addr))
if hash_pres != 0:
self.spi_hash = hash
self.spi_pfm_rsvd = 0xffffffff # b'\xff'*4
@@ -92,11 +93,11 @@ class pfr_bmc_image(object):
self.build_hash = build_hash
self.sha = sha
if self.sha == "2":
- SHA = 0x2
- PFM_SPI_SIZE_HASH = 48
+ self.sha_version = 0x2
+ self.pfm_spi_size_hash = 48
if self.sha == "1":
- PFM_SPI_SIZE_HASH = 32
- SHA = 0x1
+ self.pfm_spi_size_hash = 32
+ self.sha_version = 0x1
self.pfr_rom_file = 'image-mtd-pfr'
open(self.pfr_rom_file, 'a').close()
@@ -211,15 +212,14 @@ class pfr_bmc_image(object):
if pfm_flag == 1:
self.pfm_bytes += PFM_SPI_SIZE_DEF
- hash = bytearray(PFM_SPI_SIZE_HASH)
+ hash = bytearray(self.pfm_spi_size_hash)
hash_pres = 0
if hash_flag == 1:
# region's hash
hash = hash_dgst.hexdigest()
- hash_pres = SHA
- self.pfm_bytes += PFM_SPI_SIZE_HASH
-
+ hash_pres = self.sha_version
+ self.pfm_bytes += self.pfm_spi_size_hash
# append to SPI regions in PFM
self.pfm_spi_regions.append(pfm_spi(pfm_prot_mask, start_addr, (start_addr+size), hash, hash_pres))
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml
deleted file mode 100644
index 9e7d3f82d..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem
deleted file mode 100644
index a46fa2a2b..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem
+++ /dev/null
@@ -1,8 +0,0 @@
------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-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem
deleted file mode 100644
index cc70d6e28..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem
+++ /dev/null
@@ -1,4 +0,0 @@
------BEGIN PUBLIC KEY-----
-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERGJveRnhIp7I5cvmjO74MJLbUJjT
-fvTDKlzK0hJB0WRBEFScpb9dxWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ==
------END PUBLIC KEY-----
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml
deleted file mode 100644
index 19378d1b9..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json
deleted file mode 100644
index c79b7f343..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json
+++ /dev/null
@@ -1,196 +0,0 @@
-{
- "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-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem
deleted file mode 100644
index 9e8616795..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem
+++ /dev/null
@@ -1,8 +0,0 @@
------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-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem
deleted file mode 100644
index 117e08bae..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem
+++ /dev/null
@@ -1,4 +0,0 @@
------BEGIN PUBLIC KEY-----
-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E4
-4XiKcqvS6+l2GfSdCLRhXWHwiV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ==
------END PUBLIC KEY-----
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb
index bb8684ac2..bb0f9ba7e 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb
@@ -11,13 +11,6 @@ DEPENDS += " intel-blocksign-native"
SRC_URI = " \
file://pfr_image.py \
- file://${PRODUCT_GENERATION}/pfr_manifest.json \
- file://${PRODUCT_GENERATION}/pfm_config.xml \
- file://${PRODUCT_GENERATION}/bmc_config.xml \
- file://${PRODUCT_GENERATION}/csk_prv.pem \
- file://${PRODUCT_GENERATION}/csk_pub.pem \
- file://${PRODUCT_GENERATION}/rk_pub.pem \
- file://${PRODUCT_GENERATION}/rk_prv.pem \
"
do_install () {
@@ -26,12 +19,5 @@ do_install () {
install -d ${D}${bindir}
install -d ${D}/${datadir}/pfrconfig
install -m 775 ${WORKDIR}/pfr_image.py ${D}${bindir}/pfr_image.py
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/pfr_manifest.json ${D}/${datadir}/pfrconfig
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/pfm_config.xml ${D}/${datadir}/pfrconfig/pfm_config.xml
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/bmc_config.xml ${D}/${datadir}/pfrconfig/bmc_config.xml
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/csk_prv.pem ${D}/${datadir}/pfrconfig/csk_prv.pem
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/csk_pub.pem ${D}/${datadir}/pfrconfig/csk_pub.pem
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/rk_pub.pem ${D}/${datadir}/pfrconfig/rk_pub.pem
- install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/rk_prv.pem ${D}/${datadir}/pfrconfig/rk_prv.pem
}
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch
index 5c4fb8a25..088e1a02b 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch
@@ -1,4 +1,4 @@
-From 2399c5d353e4b8dc55bd7c56bb3f1d01918bccd9 Mon Sep 17 00:00:00 2001
+From 7ad89fd032d56cc20622d34cf9d0d09adacb2796 Mon Sep 17 00:00:00 2001
From: Yuan Li <yuan.li@linux.intel.com>
Date: Tue, 19 Sep 2017 15:55:39 +0800
Subject: [PATCH] arm: dts: add DTS for Intel ast2500 platforms
@@ -24,7 +24,7 @@ Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
new file mode 100644
-index 000000000000..980e2b55a09a
+index 000000000000..7a09ca54f161
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
@@ -0,0 +1,477 @@
@@ -239,8 +239,8 @@ index 000000000000..980e2b55a09a
+ /*IC0-IC7*/ "","","CPU2_MISMATCH","CPU2_MEM_THERM_EVENT","","","","",
+ /*ID0-ID7*/ "","","","","","","","",
+ /*IE0-IE7*/ "","","","","","","","",
-+ /*IF0-IF7*/ "","","","","","","","",
-+ /*IG0-IG7*/ "","","","","","","","",
++ /*IF0-IF7*/ "SGPIO_PLD_MINOR_REV_BIT0","SGPIO_PLD_MINOR_REV_BIT1","SGPIO_PLD_MINOR_REV_BIT2","SGPIO_PLD_MINOR_REV_BIT3","SGPIO_PLD_MAJOR_REV_BIT0","SGPIO_PLD_MAJOR_REV_BIT1","SGPIO_PLD_MAJOR_REV_BIT2","SGPIO_PLD_MAJOR_REV_BIT3",
++ /*IG0-IG7*/ "MAIN_PLD_MINOR_REV_BIT0","MAIN_PLD_MINOR_REV_BIT1","MAIN_PLD_MINOR_REV_BIT2","MAIN_PLD_MINOR_REV_BIT3","MAIN_PLD_MAJOR_REV_BIT0","MAIN_PLD_MAJOR_REV_BIT1","MAIN_PLD_MAJOR_REV_BIT2","MAIN_PLD_MAJOR_REV_BIT3",
+ /*IH0-IH7*/ "","","","","","","","",
+ /*II0-II7*/ "","","","","","","","",
+ /*IJ0-IJ7*/ "","","","","","","","";
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
index a077e7cdb..6e58657ec 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
@@ -1,4 +1,4 @@
-From 20c08d8ba976f43ebb98fbbe8f27dff352d41c40 Mon Sep 17 00:00:00 2001
+From eeecdb993d9e5dbf8cb45eb11ad367e9eb67018d Mon Sep 17 00:00:00 2001
From: Vernon Mauery <vernon.mauery@linux.intel.com>
Date: Tue, 19 Sep 2017 15:55:39 +0800
Subject: [PATCH] arm: dts: add DTS for Intel ast2600 platforms
@@ -14,16 +14,16 @@ Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
---
- arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 530 +++++++++++++++++++++++++
- 1 file changed, 530 insertions(+)
+ .../arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 534 ++++++++++++++++++
+ 1 file changed, 534 insertions(+)
create mode 100644 arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
new file mode 100644
-index 000000000000..b7f47623c021
+index 000000000000..e9cea7b63836
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
-@@ -0,0 +1,530 @@
+@@ -0,0 +1,534 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
@@ -37,7 +37,7 @@ index 000000000000..b7f47623c021
+
+ chosen {
+ stdout-path = &uart5;
-+ bootargs = "console=tty0 console=ttyS4,115200n8 root=/dev/ram rw init=/linuxrc";
++ bootargs = "console=ttyS4,115200n8 root=/dev/ram rw init=/linuxrc earlyprintk";
+ };
+
+ memory@80000000 {
@@ -266,9 +266,9 @@ index 000000000000..b7f47623c021
+ /*IB0-IB7*/ "CPU1_MISMATCH","IRQ_PSYS_CRIT_N","CPU2_PRESENCE","CPU2_THERMTRIP","CPU2_VRHOT","CPU2_FIVR_FAULT","CPU1_MEM_VRHOT","CPU2_MEM_THERM_EVENT",
+ /*IC0-IC7*/ "FM_CPU1_PROC_ID0","FM_CPU1_PROC_ID1","CPU2_MISMATCH","","","","","",
+ /*ID0-ID7*/ "","","","","","","","",
-+ /*IE0-IE7*/ "","","","","","","","",
-+ /*IF0-IF7*/ "FPGA_REV_TEST_0","FPGA_REV_TEST_1","FPGA_REV_TEST_2","FPGA_REV_TEST_3","FPGA_REV_TEST_4","FPGA_REV_TEST_5","FPGA_REV_TEST_6","FPGA_REV_TEST_7",
-+ /*IG0-IG7*/ "FPGA_REV_0","FPGA_REV_1","FPGA_REV_2","FPGA_REV_3","FPGA_REV_4","FPGA_REV_5","FPGA_REV_6","FPGA_REV_7",
++ /*IE0-IE7*/ "","","","","","","","CPU1_CPLD_CRC_ERROR",
++ /*IF0-IF7*/ "CPU2_CPLD_CRC_ERROR","","","","","","","",
++ /*IG0-IG7*/ "MAIN_PLD_MINOR_REV_BIT0","MAIN_PLD_MINOR_REV_BIT1","MAIN_PLD_MINOR_REV_BIT2","MAIN_PLD_MINOR_REV_BIT3","MAIN_PLD_MAJOR_REV_BIT0","MAIN_PLD_MAJOR_REV_BIT1","MAIN_PLD_MAJOR_REV_BIT2","MAIN_PLD_MAJOR_REV_BIT3",
+ /*IH0-IH7*/ "","WMEMX_PWR_FLT","WCPUX_MEM_PWR_FLT","PWRGD_P3V3_FF","WPSU_PWR_FLT","","","WPCH_PWR_FLT",
+ /*II0-II7*/ "FM_CPU0_PKGID0","FM_CPU0_PKGID1","FM_CPU0_PKGID2","H_CPU0_MEMTRIP_LVC1_N","FM_CPU1_PKGID0","FM_CPU1_PKGID1","FM_CPU1_PKGID2","H_CPU1_MEMTRIP_LVC1_N",
+ /*IJ0-IJ7*/ "","","","","","","","";
@@ -554,6 +554,10 @@ index 000000000000..b7f47623c021
+&jtag1 {
+ status = "okay";
+};
++
++&wdt2 {
++ status = "okay";
++};
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch
index b70629f18..d29098459 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch
@@ -1,6 +1,6 @@
From e01c562db28797e3b6be9030f1f52507115c6765 Mon Sep 17 00:00:00 2001
From: "Corona, Ernesto" <ernesto.corona@intel.com>
-Date: Mon, 6 Apr 2020 09:48:32 -0700
+Date: Thu, 9 Jul 2020 12:03:34 -0700
Subject: [PATCH] Add Aspeed SoC 24xx and 25xx families JTAG
Driver adds support of Aspeed 2400-2600 series SOC JTAG master controller.
@@ -38,6 +38,10 @@ Cc: Bryan Hunt <bryan.hunt@intel.com>
v29->v30
Comments pointed by Steven Filary <steven.a.filary@intel.com>
- Add Suport for 26xx series
+ Software mode
+ Hardware mode 1 (disabled by default)
+ Hardware mode 2 (enabled by default) up to 160 bit lenght transfers
+- clang jtag-aspeed.c
v28->v29
Comments pointed by Steven Filary <steven.a.filary@intel.com>
@@ -205,8 +209,8 @@ Comments pointed by kbuild test robot <lkp@intel.com>
---
drivers/jtag/Kconfig | 14 +
drivers/jtag/Makefile | 1 +
- drivers/jtag/jtag-aspeed.c | 1217 ++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 1232 insertions(+)
+ drivers/jtag/jtag-aspeed.c | 1524 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1539 insertions(+)
create mode 100644 drivers/jtag/jtag-aspeed.c
diff --git a/drivers/jtag/Kconfig b/drivers/jtag/Kconfig
@@ -243,7 +247,7 @@ new file mode 100644
index 0000000..1e6ace6
--- /dev/null
+++ b/drivers/jtag/jtag-aspeed.c
-@@ -0,0 +1,1217 @@
+@@ -0,0 +1,1524 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2018 Mellanox Technologies. All rights reserved.
+// Copyright (c) 2018 Oleksandr Shamray <oleksandrs@mellanox.com>
@@ -268,13 +272,14 @@ index 0000000..1e6ace6
+#define ASPEED_JTAG_DATA 0x00
+#define ASPEED_JTAG_INST 0x04
+#define ASPEED_JTAG_CTRL 0x08
-+#define ASPEED_JTAG_ISR 0x0C
++#define ASPEED_JTAG_ISR 0x0C
+#define ASPEED_JTAG_SW 0x10
-+#define ASPEED_JTAG_TCK 0x14
++#define ASPEED_JTAG_TCK 0x14
+#define ASPEED_JTAG_EC 0x18
+
-+#define ASPEED_JTAG_DATA_MSB 0x01
-+#define ASPEED_JTAG_DATA_CHUNK_SIZE 0x20
++#define ASPEED_JTAG_DATA_MSB 0x01
++#define ASPEED_JTAG_DATA_CHUNK_SIZE 0x20
++#define ASPEED_JTAG_HW2_DATA_CHUNK_SIZE 160
+
+/* ASPEED_JTAG_CTRL: Engine Control 24xx and 25xx series*/
+#define ASPEED_JTAG_CTL_ENG_EN BIT(31)
@@ -283,38 +288,39 @@ index 0000000..1e6ace6
+#define ASPEED_JTAG_CTL_IR_UPDATE BIT(26)
+#define ASPEED_JTAG_CTL_INST_LEN(x) ((x) << 20)
+#define ASPEED_JTAG_CTL_LASPEED_INST BIT(17)
-+#define ASPEED_JTAG_CTL_INST_EN BIT(16)
++#define ASPEED_JTAG_CTL_INST_EN BIT(16)
+#define ASPEED_JTAG_CTL_DR_UPDATE BIT(10)
+#define ASPEED_JTAG_CTL_DATA_LEN(x) ((x) << 4)
+#define ASPEED_JTAG_CTL_LASPEED_DATA BIT(1)
-+#define ASPEED_JTAG_CTL_DATA_EN BIT(0)
++#define ASPEED_JTAG_CTL_DATA_EN BIT(0)
+
+/* ASPEED_JTAG_CTRL: Engine Control 26xx series*/
+#define ASPEED_JTAG_CTL_26XX_RESET_FIFO BIT(21)
-+#define ASPEED_JTAG_CTL_26XX_FIFO_MODE_CTRL BIT(20)
-+#define ASPEED_JTAG_CTL_26XX_TRANS_LEN(x) ((x) << 8)
-+#define ASPEED_JTAG_CTL_26XX_MSB_FIRST BIT(6)
++#define ASPEED_JTAG_CTL_26XX_FIFO_MODE_CTRL BIT(20)
++#define ASPEED_JTAG_CTL_26XX_TRANS_LEN(x) ((x) << 8)
++#define ASPEED_JTAG_CTL_26XX_TRANS_MASK GENMASK(17, 8)
++#define ASPEED_JTAG_CTL_26XX_MSB_FIRST BIT(6)
+#define ASPEED_JTAG_CTL_26XX_TERM_TRANS BIT(5)
-+#define ASPEED_JTAG_CTL_26XX_LASPEED_TRANS BIT(4)
-+#define ASPEED_JTAG_CTL_26XX_INST_EN BIT(1)
++#define ASPEED_JTAG_CTL_26XX_LASPEED_TRANS BIT(4)
++#define ASPEED_JTAG_CTL_26XX_INST_EN BIT(1)
+
+/* ASPEED_JTAG_ISR : Interrupt status and enable */
-+#define ASPEED_JTAG_ISR_INST_PAUSE BIT(19)
-+#define ASPEED_JTAG_ISR_INST_COMPLETE BIT(18)
-+#define ASPEED_JTAG_ISR_DATA_PAUSE BIT(17)
-+#define ASPEED_JTAG_ISR_DATA_COMPLETE BIT(16)
-+#define ASPEED_JTAG_ISR_INST_PAUSE_EN BIT(3)
-+#define ASPEED_JTAG_ISR_INST_COMPLETE_EN BIT(2)
-+#define ASPEED_JTAG_ISR_DATA_PAUSE_EN BIT(1)
-+#define ASPEED_JTAG_ISR_DATA_COMPLETE_EN BIT(0)
-+#define ASPEED_JTAG_ISR_INT_EN_MASK GENMASK(3, 0)
-+#define ASPEED_JTAG_ISR_INT_MASK GENMASK(19, 16)
++#define ASPEED_JTAG_ISR_INST_PAUSE BIT(19)
++#define ASPEED_JTAG_ISR_INST_COMPLETE BIT(18)
++#define ASPEED_JTAG_ISR_DATA_PAUSE BIT(17)
++#define ASPEED_JTAG_ISR_DATA_COMPLETE BIT(16)
++#define ASPEED_JTAG_ISR_INST_PAUSE_EN BIT(3)
++#define ASPEED_JTAG_ISR_INST_COMPLETE_EN BIT(2)
++#define ASPEED_JTAG_ISR_DATA_PAUSE_EN BIT(1)
++#define ASPEED_JTAG_ISR_DATA_COMPLETE_EN BIT(0)
++#define ASPEED_JTAG_ISR_INT_EN_MASK GENMASK(3, 0)
++#define ASPEED_JTAG_ISR_INT_MASK GENMASK(19, 16)
+
+/* ASPEED_JTAG_SW : Software Mode and Status */
-+#define ASPEED_JTAG_SW_MODE_EN BIT(19)
++#define ASPEED_JTAG_SW_MODE_EN BIT(19)
+#define ASPEED_JTAG_SW_MODE_TCK BIT(18)
+#define ASPEED_JTAG_SW_MODE_TMS BIT(17)
-+#define ASPEED_JTAG_SW_MODE_TDIO BIT(16)
++#define ASPEED_JTAG_SW_MODE_TDIO BIT(16)
+
+/* ASPEED_JTAG_TCK : TCK Control */
+#define ASPEED_JTAG_TCK_DIVISOR_MASK GENMASK(10, 0)
@@ -347,9 +353,12 @@ index 0000000..1e6ace6
+#define ASPEED_JTAG_RESET_CNTR 10
+#define WAIT_ITERATIONS 75
+
++/* Use this macro to switch between HW mode 1(comment out) and 2(defined) */
++#define ASPEED_JTAG_HW_MODE_2_ENABLE 1
++
+/* ASPEED JTAG HW MODE 2 (Only supported in AST26xx series) */
-+#define ASPEED_JTAG_SHDATA0 0x20
-+#define ASPEED_JTAG_SHDATA1 0x24
++#define ASPEED_JTAG_SHDATA 0x20
++#define ASPEED_JTAG_SHINST 0x24
+#define ASPEED_JTAG_PADCTRL0 0x28
+#define ASPEED_JTAG_PADCTRL1 0x2C
+#define ASPEED_JTAG_SHCTRL 0x30
@@ -374,14 +383,16 @@ index 0000000..1e6ace6
+#define ASPEED_JTAG_SHCTRL_START_SHIFT BIT(7)
+#define ASPEED_JTAG_SHCTRL_LWRDT_SHIFT(x) ((x) & GENMASK(6, 0))
+
++#define ASPEED_JTAG_END_SHIFT_DISABLED 0
++
+/* ASPEED_JTAG_GBLCTRL : Global Control */
+#define ASPEED_JTAG_GBLCTRL_ENG_MODE_EN BIT(31)
+#define ASPEED_JTAG_GBLCTRL_ENG_OUT_EN BIT(30)
+#define ASPEED_JTAG_GBLCTRL_FORCE_TMS BIT(29)
+#define ASPEED_JTAG_GBLCTRL_SHIFT_COMPLETE BIT(28)
+#define ASPEED_JTAG_GBLCTRL_RESET_FIFO BIT(25)
-+#define ASPEED_JTAG_GBLCTRL_FIFO_MODE BIT(24)
-+#define ASPEED_JTAG_GBLCTRL_UPDT_SHIFT(x) (((x) & GENMASK(3, 0)) << 20)
++#define ASPEED_JTAG_GBLCTRL_FIFO_CTRL_MODE BIT(24)
++#define ASPEED_JTAG_GBLCTRL_UPDT_SHIFT(x) (((x) & GENMASK(9, 7)) << 13)
+#define ASPEED_JTAG_GBLCTRL_STSHIFT(x) (((x) & GENMASK(0, 0)) << 16)
+#define ASPEED_JTAG_GBLCTRL_TRST BIT(15)
+#define ASPEED_JTAG_CLK_DIVISOR_MASK GENMASK(11, 0)
@@ -405,8 +416,8 @@ index 0000000..1e6ace6
+ [ASPEED_JTAG_SW] = "ASPEED_JTAG_SW",
+ [ASPEED_JTAG_TCK] = "ASPEED_JTAG_TCK",
+ [ASPEED_JTAG_EC] = "ASPEED_JTAG_EC",
-+ [ASPEED_JTAG_SHDATA0] = "ASPEED_JTAG_SHDATA0",
-+ [ASPEED_JTAG_SHDATA1] = "ASPEED_JTAG_SHDATA1",
++ [ASPEED_JTAG_SHDATA] = "ASPEED_JTAG_SHDATA",
++ [ASPEED_JTAG_SHINST] = "ASPEED_JTAG_SHINST",
+ [ASPEED_JTAG_PADCTRL0] = "ASPEED_JTAG_PADCTRL0",
+ [ASPEED_JTAG_PADCTRL1] = "ASPEED_JTAG_PADCTRL1",
+ [ASPEED_JTAG_SHCTRL] = "ASPEED_JTAG_SHCTRL",
@@ -427,7 +438,7 @@ index 0000000..1e6ace6
+ u32 flag;
+ wait_queue_head_t jtag_wq;
+ u32 mode;
-+ struct jtag_low_level_functions *llops;
++ const struct jtag_low_level_functions *llops;
+};
+
+/* Multi generation support is enabled by fops and low level assped function
@@ -436,15 +447,20 @@ index 0000000..1e6ace6
+
+struct jtag_low_level_functions {
+ void (*output_disable)(struct aspeed_jtag *aspeed_jtag);
++ void (*master_enable)(struct aspeed_jtag *aspeed_jtag);
+ int (*xfer_push_data)(struct aspeed_jtag *aspeed_jtag,
+ enum jtag_xfer_type type, u32 bits_len);
+ int (*xfer_push_data_last)(struct aspeed_jtag *aspeed_jtag,
+ enum jtag_xfer_type type, u32 bits_len);
++ void (*xfer_sw)(struct aspeed_jtag *aspeed_jtag, struct jtag_xfer *xfer,
++ u32 *data);
++ int (*xfer_hw)(struct aspeed_jtag *aspeed_jtag, struct jtag_xfer *xfer,
++ u32 *data);
+};
+
+struct aspeed_jtag_functions {
-+ struct jtag_ops *aspeed_jtag_ops;
-+ struct jtag_low_level_functions *aspeed_jtag_llops;
++ const struct jtag_ops *aspeed_jtag_ops;
++ const struct jtag_low_level_functions *aspeed_jtag_llops;
+};
+
+/*
@@ -453,8 +469,8 @@ index 0000000..1e6ace6
+ * more than 1 byte of TMS cycles)
+ */
+struct tms_cycle {
-+ unsigned char tmsbits;
-+ unsigned char count;
++ unsigned char tmsbits;
++ unsigned char count;
+};
+
+/*
@@ -576,10 +592,10 @@ index 0000000..1e6ace6
+};
+
+#ifdef DEBUG_JTAG
-+static char *end_status_str[] = {
-+ "tlr", "idle", "selDR", "capDR", "sDR", "ex1DR", "pDR", "ex2DR",
-+ "updDR", "selIR", "capIR", "sIR", "ex1IR", "pIR", "ex2IR", "updIR"
-+};
++static char *end_status_str[] = { "tlr", "idle", "selDR", "capDR",
++ "sDR", "ex1DR", "pDR", "ex2DR",
++ "updDR", "selIR", "capIR", "sIR",
++ "ex1IR", "pIR", "ex2IR", "updIR" };
+#endif
+
+static u32 aspeed_jtag_read(struct aspeed_jtag *aspeed_jtag, u32 reg)
@@ -592,12 +608,11 @@ index 0000000..1e6ace6
+ return val;
+}
+
-+static void
-+aspeed_jtag_write(struct aspeed_jtag *aspeed_jtag, u32 val, u32 reg)
++static void aspeed_jtag_write(struct aspeed_jtag *aspeed_jtag, u32 val, u32 reg)
+{
+#ifdef DEBUG_JTAG
-+ dev_dbg(aspeed_jtag->dev, "write:%s val = 0x%08x\n",
-+ regnames[reg], val);
++ dev_dbg(aspeed_jtag->dev, "write:%s val = 0x%08x\n", regnames[reg],
++ val);
+#endif
+ writel(val, aspeed_jtag->reg_base + reg);
+}
@@ -609,6 +624,9 @@ index 0000000..1e6ace6
+ u32 tck_val;
+ u16 div;
+
++ if (!freq)
++ return -EINVAL;
++
+ apb_frq = clk_get_rate(aspeed_jtag->pclk);
+ if (!apb_frq)
+ return -ENOTSUPP;
@@ -621,6 +639,28 @@ index 0000000..1e6ace6
+ return 0;
+}
+
++static int aspeed_jtag_freq_set_26xx(struct jtag *jtag, u32 freq)
++{
++ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
++ unsigned long apb_frq;
++ u32 tck_val;
++ u16 div;
++
++ if (!freq)
++ return -EINVAL;
++
++ apb_frq = clk_get_rate(aspeed_jtag->pclk);
++ if (!apb_frq)
++ return -ENOTSUPP;
++
++ div = (apb_frq - 1) / freq;
++ tck_val = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_GBLCTRL);
++ aspeed_jtag_write(aspeed_jtag,
++ (tck_val & ~ASPEED_JTAG_CLK_DIVISOR_MASK) | div,
++ ASPEED_JTAG_GBLCTRL);
++ return 0;
++}
++
+static int aspeed_jtag_freq_get(struct jtag *jtag, u32 *frq)
+{
+ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
@@ -634,29 +674,87 @@ index 0000000..1e6ace6
+ return 0;
+}
+
++static int aspeed_jtag_freq_get_26xx(struct jtag *jtag, u32 *frq)
++{
++ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
++ u32 pclk;
++ u32 tck;
++
++ pclk = clk_get_rate(aspeed_jtag->pclk);
++ tck = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_GBLCTRL);
++ *frq = pclk / (ASPEED_JTAG_CLK_GET_DIV(tck) + 1);
++
++ return 0;
++}
++
+static inline void aspeed_jtag_output_disable(struct aspeed_jtag *aspeed_jtag)
+{
+ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_CTRL);
+}
+
++static inline void
++aspeed_jtag_output_disable_26xx(struct aspeed_jtag *aspeed_jtag)
++{
++ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_GBLCTRL);
++}
++
+static inline void aspeed_jtag_master(struct aspeed_jtag *aspeed_jtag)
+{
-+ aspeed_jtag_write(aspeed_jtag, (ASPEED_JTAG_CTL_ENG_EN |
-+ ASPEED_JTAG_CTL_ENG_OUT_EN),
-+ ASPEED_JTAG_CTRL);
-+
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_SW_MODE_EN |
-+ ASPEED_JTAG_SW_MODE_TDIO,
-+ ASPEED_JTAG_SW);
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_ISR_INST_PAUSE |
-+ ASPEED_JTAG_ISR_INST_COMPLETE |
-+ ASPEED_JTAG_ISR_DATA_PAUSE |
-+ ASPEED_JTAG_ISR_DATA_COMPLETE |
-+ ASPEED_JTAG_ISR_INST_PAUSE_EN |
-+ ASPEED_JTAG_ISR_INST_COMPLETE_EN |
-+ ASPEED_JTAG_ISR_DATA_PAUSE_EN |
-+ ASPEED_JTAG_ISR_DATA_COMPLETE_EN,
-+ ASPEED_JTAG_ISR); /* Enable Interrupt */
++ aspeed_jtag_write(aspeed_jtag,
++ (ASPEED_JTAG_CTL_ENG_EN | ASPEED_JTAG_CTL_ENG_OUT_EN),
++ ASPEED_JTAG_CTRL);
++
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_SW_MODE_EN | ASPEED_JTAG_SW_MODE_TDIO,
++ ASPEED_JTAG_SW);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_ISR_INST_PAUSE |
++ ASPEED_JTAG_ISR_INST_COMPLETE |
++ ASPEED_JTAG_ISR_DATA_PAUSE |
++ ASPEED_JTAG_ISR_DATA_COMPLETE |
++ ASPEED_JTAG_ISR_INST_PAUSE_EN |
++ ASPEED_JTAG_ISR_INST_COMPLETE_EN |
++ ASPEED_JTAG_ISR_DATA_PAUSE_EN |
++ ASPEED_JTAG_ISR_DATA_COMPLETE_EN,
++ ASPEED_JTAG_ISR); /* Enable Interrupt */
++}
++
++static inline void aspeed_jtag_master_26xx(struct aspeed_jtag *aspeed_jtag)
++{
++ if (aspeed_jtag->mode & JTAG_XFER_HW_MODE) {
++ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_CTRL);
++ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_SW);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_GBLCTRL_ENG_MODE_EN |
++ ASPEED_JTAG_GBLCTRL_ENG_OUT_EN,
++ ASPEED_JTAG_GBLCTRL);
++
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_INTCTRL_SHCPL_IRQ_EN |
++ ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT,
++ ASPEED_JTAG_INTCTRL); /* Enable Interrupt */
++ } else {
++ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_GBLCTRL);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_CTL_ENG_EN |
++ ASPEED_JTAG_CTL_ENG_OUT_EN,
++ ASPEED_JTAG_CTRL);
++
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_SW_MODE_EN |
++ ASPEED_JTAG_SW_MODE_TDIO,
++ ASPEED_JTAG_SW);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_ISR_INST_PAUSE |
++ ASPEED_JTAG_ISR_INST_COMPLETE |
++ ASPEED_JTAG_ISR_DATA_PAUSE |
++ ASPEED_JTAG_ISR_DATA_COMPLETE |
++ ASPEED_JTAG_ISR_INST_PAUSE_EN |
++ ASPEED_JTAG_ISR_INST_COMPLETE_EN |
++ ASPEED_JTAG_ISR_DATA_PAUSE_EN |
++ ASPEED_JTAG_ISR_DATA_COMPLETE_EN,
++ ASPEED_JTAG_ISR); /* Enable Interrupt */
++ }
+}
+
+static int aspeed_jtag_mode_set(struct jtag *jtag, struct jtag_mode *jtag_mode)
@@ -666,12 +764,13 @@ index 0000000..1e6ace6
+ switch (jtag_mode->feature) {
+ case JTAG_XFER_MODE:
+ aspeed_jtag->mode = jtag_mode->mode;
++ aspeed_jtag->llops->master_enable(aspeed_jtag);
+ break;
+ case JTAG_CONTROL_MODE:
+ if (jtag_mode->mode == JTAG_MASTER_OUTPUT_DISABLE)
-+ aspeed_jtag_output_disable(aspeed_jtag);
++ aspeed_jtag->llops->output_disable(aspeed_jtag);
+ else if (jtag_mode->mode == JTAG_MASTER_MODE)
-+ aspeed_jtag_master(aspeed_jtag);
++ aspeed_jtag->llops->master_enable(aspeed_jtag);
+ break;
+ default:
+ return -EINVAL;
@@ -679,23 +778,26 @@ index 0000000..1e6ace6
+ return 0;
+}
+
-+static char aspeed_jtag_tck_cycle(struct aspeed_jtag *aspeed_jtag,
-+ u8 tms, u8 tdi)
++static char aspeed_jtag_tck_cycle(struct aspeed_jtag *aspeed_jtag, u8 tms,
++ u8 tdi)
+{
+ char tdo = 0;
+
+ /* TCK = 0 */
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_SW_MODE_EN |
-+ (tms * ASPEED_JTAG_SW_MODE_TMS) |
-+ (tdi * ASPEED_JTAG_SW_MODE_TDIO), ASPEED_JTAG_SW);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_SW_MODE_EN |
++ (tms * ASPEED_JTAG_SW_MODE_TMS) |
++ (tdi * ASPEED_JTAG_SW_MODE_TDIO),
++ ASPEED_JTAG_SW);
+
+ aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_SW);
+
+ /* TCK = 1 */
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_SW_MODE_EN |
-+ ASPEED_JTAG_SW_MODE_TCK |
-+ (tms * ASPEED_JTAG_SW_MODE_TMS) |
-+ (tdi * ASPEED_JTAG_SW_MODE_TDIO), ASPEED_JTAG_SW);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_SW_MODE_EN | ASPEED_JTAG_SW_MODE_TCK |
++ (tms * ASPEED_JTAG_SW_MODE_TMS) |
++ (tdi * ASPEED_JTAG_SW_MODE_TDIO),
++ ASPEED_JTAG_SW);
+
+ if (aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_SW) &
+ ASPEED_JTAG_SW_MODE_TDIO)
@@ -713,33 +815,33 @@ index 0000000..1e6ace6
+
+ for (i = 0; i < bitbang->length; i++) {
+ bitbang_data[i].tdo =
-+ aspeed_jtag_tck_cycle(aspeed_jtag, bitbang_data[i].tms,
-+ bitbang_data[i].tdi);
++ aspeed_jtag_tck_cycle(aspeed_jtag, bitbang_data[i].tms,
++ bitbang_data[i].tdi);
+ }
+ return 0;
+}
+
-+static int aspeed_jtag_wait_instruction_pause(struct aspeed_jtag *aspeed_jtag)
++static int aspeed_jtag_isr_wait(struct aspeed_jtag *aspeed_jtag, u32 bit)
+{
+ int res = 0;
+#ifdef USE_INTERRUPTS
+ res = wait_event_interruptible(aspeed_jtag->jtag_wq,
-+ aspeed_jtag->flag &
-+ ASPEED_JTAG_ISR_INST_PAUSE);
-+ aspeed_jtag->flag &= ~ASPEED_JTAG_ISR_INST_PAUSE;
++ aspeed_jtag->flag & bit);
++ aspeed_jtag->flag &= ~bit;
+#else
+ u32 status = 0;
+ u32 iterations = 0;
+
-+ while ((status & ASPEED_JTAG_ISR_INST_PAUSE) == 0) {
++ while ((status & bit) == 0) {
+ status = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_ISR);
+#ifdef DEBUG_JTAG
+ dev_dbg(aspeed_jtag->dev, "%s = 0x%08x\n", __func__, status);
+#endif
+ iterations++;
+ if (iterations > WAIT_ITERATIONS) {
-+ dev_err(aspeed_jtag->dev,
-+ "aspeed_jtag driver timed out waiting for instruction pause complete\n");
++ dev_err(aspeed_jtag->dev, "%s %d in ASPEED_JTAG_ISR\n",
++ "aspeed_jtag driver timed out waiting for bit",
++ bit);
+ res = -EFAULT;
+ break;
+ }
@@ -750,124 +852,44 @@ index 0000000..1e6ace6
+ udelay(1);
+ }
+ }
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_ISR_INST_PAUSE |
-+ (status & 0xf),
-+ ASPEED_JTAG_ISR);
++ aspeed_jtag_write(aspeed_jtag, bit | (status & 0xf), ASPEED_JTAG_ISR);
+#endif
+ return res;
+}
+
-+static int
-+aspeed_jtag_wait_instruction_complete(struct aspeed_jtag *aspeed_jtag)
++static int aspeed_jtag_wait_shift_complete(struct aspeed_jtag *aspeed_jtag)
+{
+ int res = 0;
+#ifdef USE_INTERRUPTS
+ res = wait_event_interruptible(aspeed_jtag->jtag_wq,
+ aspeed_jtag->flag &
-+ ASPEED_JTAG_ISR_INST_COMPLETE);
-+ aspeed_jtag->flag &= ~ASPEED_JTAG_ISR_INST_COMPLETE;
++ ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT);
++ aspeed_jtag->flag &= ~ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT;
+#else
+ u32 status = 0;
+ u32 iterations = 0;
+
-+ while ((status & ASPEED_JTAG_ISR_INST_COMPLETE) == 0) {
-+ status = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_ISR);
++ while ((status & ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT) == 0) {
++ status = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_INTCTRL);
+#ifdef DEBUG_JTAG
+ dev_dbg(aspeed_jtag->dev, "%s = 0x%08x\n", __func__, status);
+#endif
+ iterations++;
+ if (iterations > WAIT_ITERATIONS) {
+ dev_err(aspeed_jtag->dev,
-+ "aspeed_jtag driver timed out waiting for instruction complete\n");
++ "aspeed_jtag driver timed out waiting for shift completed\n");
+ res = -EFAULT;
+ break;
+ }
-+ if ((status & ASPEED_JTAG_ISR_DATA_COMPLETE) == 0) {
-+ if (iterations % 25 == 0)
-+ usleep_range(1, 5);
-+ else
-+ udelay(1);
-+ }
-+ }
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_ISR_INST_COMPLETE |
-+ (status & 0xf),
-+ ASPEED_JTAG_ISR);
-+#endif
-+ return res;
-+}
-+
-+static int
-+aspeed_jtag_wait_data_pause_complete(struct aspeed_jtag *aspeed_jtag)
-+{
-+ int res = 0;
-+#ifdef USE_INTERRUPTS
-+ res = wait_event_interruptible(aspeed_jtag->jtag_wq,
-+ aspeed_jtag->flag &
-+ ASPEED_JTAG_ISR_DATA_PAUSE);
-+ aspeed_jtag->flag &= ~ASPEED_JTAG_ISR_DATA_PAUSE;
-+#else
-+ u32 status = 0;
-+ u32 iterations = 0;
-+
-+ while ((status & ASPEED_JTAG_ISR_DATA_PAUSE) == 0) {
-+ status = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_ISR);
-+#ifdef DEBUG_JTAG
-+ dev_dbg(aspeed_jtag->dev, "%s = 0x%08x\n", __func__, status);
-+#endif
-+ iterations++;
-+ if (iterations > WAIT_ITERATIONS) {
-+ dev_err(aspeed_jtag->dev,
-+ "aspeed_jtag driver timed out waiting for data pause complete\n");
-+ res = -EFAULT;
-+ break;
-+ }
-+ if ((status & ASPEED_JTAG_ISR_DATA_COMPLETE) == 0) {
-+ if (iterations % 25 == 0)
-+ usleep_range(1, 5);
-+ else
-+ udelay(1);
-+ }
-+ }
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_ISR_DATA_PAUSE |
-+ (status & 0xf), ASPEED_JTAG_ISR);
-+#endif
-+ return res;
-+}
-+
-+static int aspeed_jtag_wait_data_complete(struct aspeed_jtag *aspeed_jtag)
-+{
-+ int res = 0;
-+#ifdef USE_INTERRUPTS
-+ res = wait_event_interruptible(aspeed_jtag->jtag_wq,
-+ aspeed_jtag->flag &
-+ ASPEED_JTAG_ISR_DATA_COMPLETE);
-+ aspeed_jtag->flag &= ~ASPEED_JTAG_ISR_DATA_COMPLETE;
-+#else
-+ u32 status = 0;
-+ u32 iterations = 0;
-+
-+ while ((status & ASPEED_JTAG_ISR_DATA_COMPLETE) == 0) {
-+ status = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_ISR);
-+#ifdef DEBUG_JTAG
-+ dev_dbg(aspeed_jtag->dev, "%s = 0x%08x\n", __func__, status);
-+#endif
-+ iterations++;
-+ if (iterations > WAIT_ITERATIONS) {
-+ dev_err(aspeed_jtag->dev,
-+ "ast_jtag driver timed out waiting for data complete\n");
-+ res = -EFAULT;
-+ break;
-+ }
-+ if ((status & ASPEED_JTAG_ISR_DATA_COMPLETE) == 0) {
-+ if (iterations % 25 == 0)
-+ usleep_range(1, 5);
-+ else
-+ udelay(1);
-+ }
++ if (iterations % 25 == 0)
++ usleep_range(1, 5);
++ else
++ udelay(1);
+ }
+ aspeed_jtag_write(aspeed_jtag,
-+ ASPEED_JTAG_ISR_DATA_COMPLETE | (status & 0xf),
-+ ASPEED_JTAG_ISR);
++ ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT |
++ ASPEED_JTAG_INTCTRL_SHCPL_IRQ_EN,
++ ASPEED_JTAG_INTCTRL);
+#endif
+ return res;
+}
@@ -887,7 +909,8 @@ index 0000000..1e6ace6
+
+ for (i = 0; i < _tms_cycle_lookup[from][to].count; i++)
+ aspeed_jtag_tck_cycle(aspeed_jtag,
-+ ((_tms_cycle_lookup[from][to].tmsbits >> i) & 0x1), 0);
++ ((_tms_cycle_lookup[from][to].tmsbits
++ >> i) & 0x1), 0);
+ aspeed_jtag->status = end_state;
+}
+
@@ -927,15 +950,99 @@ index 0000000..1e6ace6
+ /* Disable sw mode */
+ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_SW);
+ mdelay(1);
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_CTL_ENG_EN |
-+ ASPEED_JTAG_CTL_ENG_OUT_EN |
-+ ASPEED_JTAG_CTL_FORCE_TMS, ASPEED_JTAG_CTRL);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_CTL_ENG_EN |
++ ASPEED_JTAG_CTL_ENG_OUT_EN |
++ ASPEED_JTAG_CTL_FORCE_TMS,
++ ASPEED_JTAG_CTRL);
++ mdelay(1);
++ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_SW_TDIO,
++ ASPEED_JTAG_SW);
++ aspeed_jtag->status = JTAG_STATE_TLRESET;
++ }
++
++ return 0;
++}
++
++static void aspeed_jtag_shctrl_tms_mask(enum jtag_tapstate from,
++ enum jtag_tapstate to,
++ enum jtag_tapstate there,
++ enum jtag_tapstate endstate,
++ u32 start_shift, u32 end_shift,
++ u32 *tms_mask)
++{
++ u32 pre_tms = start_shift ? _tms_cycle_lookup[from][to].count : 0;
++ u32 post_tms = end_shift ? _tms_cycle_lookup[there][endstate].count : 0;
++ u32 tms_value = start_shift ? _tms_cycle_lookup[from][to].tmsbits : 0;
++
++ tms_value |= end_shift ? _tms_cycle_lookup[there][endstate].tmsbits
++ << pre_tms :
++ 0;
++ *tms_mask = start_shift | ASPEED_JTAG_SHCTRL_PRE_TMS(pre_tms) |
++ end_shift | ASPEED_JTAG_SHCTRL_POST_TMS(post_tms) |
++ ASPEED_JTAG_SHCTRL_TMS(tms_value);
++}
++
++static void aspeed_jtag_set_tap_state_hw2(struct aspeed_jtag *aspeed_jtag,
++ struct jtag_tap_state *tapstate)
++{
++ u32 reg_val;
++ u32 start_shift = ASPEED_JTAG_SHCTRL_START_SHIFT;
++ u32 tms_mask = 0;
++
++ /* x TMS high + 1 TMS low */
++ if (tapstate->reset) {
++ /* Disable sw mode */
++ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_SW);
+ mdelay(1);
++ reg_val = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_GBLCTRL);
+ aspeed_jtag_write(aspeed_jtag,
-+ ASPEED_JTAG_SW_TDIO, ASPEED_JTAG_SW);
++ reg_val | ASPEED_JTAG_GBLCTRL_ENG_MODE_EN |
++ ASPEED_JTAG_GBLCTRL_ENG_OUT_EN |
++ ASPEED_JTAG_GBLCTRL_RESET_FIFO |
++ ASPEED_JTAG_GBLCTRL_FORCE_TMS,
++ ASPEED_JTAG_GBLCTRL);
++ mdelay(1);
+ aspeed_jtag->status = JTAG_STATE_TLRESET;
++ return;
++ }
++
++ if (tapstate->from != tapstate->endstate) {
++ aspeed_jtag_shctrl_tms_mask(tapstate->from, tapstate->endstate,
++ JTAG_STATE_TLRESET,
++ JTAG_STATE_TLRESET, start_shift,
++ ASPEED_JTAG_END_SHIFT_DISABLED,
++ &tms_mask);
++
++ /* Trigger a 0 bit transfer to execute pre tms flow*/
++ aspeed_jtag_write(aspeed_jtag,
++ tms_mask | ASPEED_JTAG_SHCTRL_LWRDT_SHIFT(0),
++ ASPEED_JTAG_SHCTRL);
++ aspeed_jtag_wait_shift_complete(aspeed_jtag);
++ reg_val = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_GBLCTRL);
++ aspeed_jtag_write(aspeed_jtag,
++ reg_val | ASPEED_JTAG_GBLCTRL_RESET_FIFO,
++ ASPEED_JTAG_GBLCTRL);
+ }
++ aspeed_jtag->status = tapstate->endstate;
++}
++
++static int aspeed_jtag_status_set_26xx(struct jtag *jtag,
++ struct jtag_tap_state *tapstate)
++{
++ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
+
++#ifdef DEBUG_JTAG
++ dev_dbg(aspeed_jtag->dev, "Set TAP state: %s\n",
++ end_status_str[tapstate->endstate]);
++#endif
++
++ if (!(aspeed_jtag->mode & JTAG_XFER_HW_MODE)) {
++ aspeed_jtag_set_tap_state_sw(aspeed_jtag, tapstate);
++ return 0;
++ }
++
++ aspeed_jtag_set_tap_state_hw2(aspeed_jtag, tapstate);
+ return 0;
+}
+
@@ -965,8 +1072,8 @@ index 0000000..1e6ace6
+ while (remain_xfer > 1) {
+ tdo = aspeed_jtag_tck_cycle(aspeed_jtag, 0,
+ tdi & ASPEED_JTAG_DATA_MSB);
-+ data[index] |= tdo << (shift_bits %
-+ ASPEED_JTAG_DATA_CHUNK_SIZE);
++ data[index] |= tdo
++ << (shift_bits % ASPEED_JTAG_DATA_CHUNK_SIZE);
+ tdi >>= 1;
+ shift_bits++;
+ remain_xfer--;
@@ -980,41 +1087,49 @@ index 0000000..1e6ace6
+ }
+
+ if ((xfer->endstate == (xfer->type == JTAG_SIR_XFER ?
-+ JTAG_STATE_SHIFTIR : JTAG_STATE_SHIFTDR))) {
++ JTAG_STATE_SHIFTIR :
++ JTAG_STATE_SHIFTDR))) {
+ /* Stay in Shift IR/DR*/
+ tdo = aspeed_jtag_tck_cycle(aspeed_jtag, 0,
+ tdi & ASPEED_JTAG_DATA_MSB);
-+ data[index] |= tdo << (shift_bits %
-+ ASPEED_JTAG_DATA_CHUNK_SIZE);
-+ } else {
++ data[index] |= tdo
++ << (shift_bits % ASPEED_JTAG_DATA_CHUNK_SIZE);
++ } else {
+ /* Goto end state */
+ tdo = aspeed_jtag_tck_cycle(aspeed_jtag, 1,
+ tdi & ASPEED_JTAG_DATA_MSB);
-+ data[index] |= tdo << (shift_bits %
-+ ASPEED_JTAG_DATA_CHUNK_SIZE);
++ data[index] |= tdo
++ << (shift_bits % ASPEED_JTAG_DATA_CHUNK_SIZE);
+ aspeed_jtag->status = (xfer->type == JTAG_SIR_XFER) ?
-+ JTAG_STATE_EXIT1IR : JTAG_STATE_EXIT1DR;
++ JTAG_STATE_EXIT1IR :
++ JTAG_STATE_EXIT1DR;
+ aspeed_jtag_set_tap_state(aspeed_jtag, aspeed_jtag->status,
+ xfer->endstate);
+ }
+}
+
+static int aspeed_jtag_xfer_push_data_26xx(struct aspeed_jtag *aspeed_jtag,
-+ enum jtag_xfer_type type, u32 bits_len)
++ enum jtag_xfer_type type,
++ u32 bits_len)
+{
+ int res = 0;
+
+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(bits_len),
+ ASPEED_JTAG_CTRL);
+ if (type == JTAG_SIR_XFER) {
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(bits_len) |
-+ ASPEED_JTAG_CTL_26XX_INST_EN,
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_TRANS_LEN(bits_len) |
++ ASPEED_JTAG_CTL_26XX_INST_EN,
+ ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_instruction_pause(aspeed_jtag);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_INST_PAUSE);
+ } else {
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(bits_len) |
-+ ASPEED_JTAG_CTL_DATA_EN, ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_data_pause_complete(aspeed_jtag);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_TRANS_LEN(bits_len) |
++ ASPEED_JTAG_CTL_DATA_EN,
++ ASPEED_JTAG_CTRL);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_DATA_PAUSE);
+ }
+ return res;
+}
@@ -1027,41 +1142,51 @@ index 0000000..1e6ace6
+ if (type == JTAG_SIR_XFER) {
+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_IOUT_LEN(bits_len),
+ ASPEED_JTAG_CTRL);
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_IOUT_LEN(bits_len) |
-+ ASPEED_JTAG_CTL_INST_EN, ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_instruction_pause(aspeed_jtag);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_IOUT_LEN(bits_len) |
++ ASPEED_JTAG_CTL_INST_EN,
++ ASPEED_JTAG_CTRL);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_INST_PAUSE);
+ } else {
+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_DOUT_LEN(bits_len),
+ ASPEED_JTAG_CTRL);
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_DOUT_LEN(bits_len) |
-+ ASPEED_JTAG_CTL_DATA_EN, ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_data_pause_complete(aspeed_jtag);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_DOUT_LEN(bits_len) |
++ ASPEED_JTAG_CTL_DATA_EN,
++ ASPEED_JTAG_CTRL);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_DATA_PAUSE);
+ }
+ return res;
+}
+
+static int aspeed_jtag_xfer_push_data_last_26xx(struct aspeed_jtag *aspeed_jtag,
-+ enum jtag_xfer_type type,
-+ u32 shift_bits)
++ enum jtag_xfer_type type,
++ u32 shift_bits)
+{
+ int res = 0;
+
-+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS, ASPEED_JTAG_CTRL);
++ aspeed_jtag_write(aspeed_jtag,
++ ASPEED_JTAG_TRANS_LEN(shift_bits) |
++ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS,
++ ASPEED_JTAG_CTRL);
+ if (type == JTAG_SIR_XFER) {
+ aspeed_jtag_write(aspeed_jtag,
+ ASPEED_JTAG_TRANS_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS |
-+ ASPEED_JTAG_CTL_26XX_INST_EN,
++ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS |
++ ASPEED_JTAG_CTL_26XX_INST_EN,
+ ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_instruction_complete(aspeed_jtag);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_INST_COMPLETE);
+ } else {
+ aspeed_jtag_write(aspeed_jtag,
+ ASPEED_JTAG_TRANS_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS |
-+ ASPEED_JTAG_CTL_DATA_EN,
++ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS |
++ ASPEED_JTAG_CTL_DATA_EN,
+ ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_data_complete(aspeed_jtag);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_DATA_COMPLETE);
+ }
+ return res;
+}
@@ -1075,25 +1200,27 @@ index 0000000..1e6ace6
+ if (type == JTAG_SIR_XFER) {
+ aspeed_jtag_write(aspeed_jtag,
+ ASPEED_JTAG_IOUT_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_LASPEED_INST,
++ ASPEED_JTAG_CTL_LASPEED_INST,
+ ASPEED_JTAG_CTRL);
+ aspeed_jtag_write(aspeed_jtag,
+ ASPEED_JTAG_IOUT_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_LASPEED_INST |
-+ ASPEED_JTAG_CTL_INST_EN,
++ ASPEED_JTAG_CTL_LASPEED_INST |
++ ASPEED_JTAG_CTL_INST_EN,
+ ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_instruction_complete(aspeed_jtag);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_INST_COMPLETE);
+ } else {
+ aspeed_jtag_write(aspeed_jtag,
+ ASPEED_JTAG_DOUT_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_LASPEED_DATA,
++ ASPEED_JTAG_CTL_LASPEED_DATA,
+ ASPEED_JTAG_CTRL);
+ aspeed_jtag_write(aspeed_jtag,
+ ASPEED_JTAG_DOUT_LEN(shift_bits) |
-+ ASPEED_JTAG_CTL_LASPEED_DATA |
-+ ASPEED_JTAG_CTL_DATA_EN,
++ ASPEED_JTAG_CTL_LASPEED_DATA |
++ ASPEED_JTAG_CTL_DATA_EN,
+ ASPEED_JTAG_CTRL);
-+ res = aspeed_jtag_wait_data_complete(aspeed_jtag);
++ res = aspeed_jtag_isr_wait(aspeed_jtag,
++ ASPEED_JTAG_ISR_DATA_COMPLETE);
+ }
+ return res;
+}
@@ -1111,8 +1238,8 @@ index 0000000..1e6ace6
+ dev_dbg(aspeed_jtag->dev, "HW JTAG SHIFT %s, length = %d\n",
+ (xfer->type == JTAG_SIR_XFER) ? "IR" : "DR", xfer->length);
+#endif
-+ data_reg = xfer->type == JTAG_SIR_XFER ?
-+ ASPEED_JTAG_INST : ASPEED_JTAG_DATA;
++ data_reg = xfer->type == JTAG_SIR_XFER ? ASPEED_JTAG_INST :
++ ASPEED_JTAG_DATA;
+ if (xfer->endstate == JTAG_STATE_SHIFTIR ||
+ xfer->endstate == JTAG_STATE_SHIFTDR ||
+ xfer->endstate == JTAG_STATE_PAUSEIR ||
@@ -1142,7 +1269,9 @@ index 0000000..1e6ace6
+ * and after the transfer go to Pause IR/DR.
+ */
+ if (aspeed_jtag->llops->xfer_push_data(aspeed_jtag,
-+ xfer->type, shift_bits) != 0) {
++ xfer->type,
++ shift_bits)
++ != 0) {
+ return -EFAULT;
+ }
+ } else {
@@ -1157,15 +1286,14 @@ index 0000000..1e6ace6
+ */
+#ifdef DEBUG_JTAG
+ dev_dbg(aspeed_jtag->dev,
-+ "Last len=%d chunk_size=%d remain_xfer=%lu\n",
++ "Last len=%d chunk_size=%d remain_xfer=%lu\n",
+ xfer->length,
+ ASPEED_JTAG_DATA_CHUNK_SIZE,
+ remain_xfer);
+#endif
+ if (aspeed_jtag->llops->xfer_push_data_last(
-+ aspeed_jtag,
-+ xfer->type,
-+ shift_bits) != 0) {
++ aspeed_jtag, xfer->type,
++ shift_bits) != 0) {
+ return -EFAULT;
+ }
+ } else {
@@ -1176,16 +1304,14 @@ index 0000000..1e6ace6
+ */
+#ifdef DEBUG_JTAG
+ dev_dbg(aspeed_jtag->dev,
-+ "Tail len=%d chunk_size=%d remain_xfer=%lu\n",
++ "Tail len=%d chunk_size=%d remain_xfer=%lu\n",
+ xfer->length,
+ ASPEED_JTAG_DATA_CHUNK_SIZE,
+ remain_xfer);
+#endif
+ if (aspeed_jtag->llops->xfer_push_data(
-+ aspeed_jtag,
-+ xfer->type,
-+ shift_bits)
-+ != 0) {
++ aspeed_jtag, xfer->type,
++ shift_bits) != 0) {
+ return -EFAULT;
+ }
+ }
@@ -1193,14 +1319,14 @@ index 0000000..1e6ace6
+
+ if (xfer->direction & JTAG_READ_XFER) {
+ if (shift_bits < ASPEED_JTAG_DATA_CHUNK_SIZE) {
-+ data[index] = aspeed_jtag_read(aspeed_jtag,
-+ data_reg);
++ data[index] =
++ aspeed_jtag_read(aspeed_jtag, data_reg);
+
+ data[index] >>= ASPEED_JTAG_DATA_CHUNK_SIZE -
-+ shift_bits;
++ shift_bits;
+ } else {
-+ data[index] = aspeed_jtag_read(aspeed_jtag,
-+ data_reg);
++ data[index] =
++ aspeed_jtag_read(aspeed_jtag, data_reg);
+ }
+ }
+
@@ -1220,12 +1346,13 @@ index 0000000..1e6ace6
+ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_SW_TDIO,
+ ASPEED_JTAG_SW);
+
-+ aspeed_jtag_xfer_sw(aspeed_jtag, xfer, (u32 *)xfer_data);
++ aspeed_jtag->llops->xfer_sw(aspeed_jtag, xfer,
++ (u32 *)xfer_data);
+ } else {
+ /* HW mode */
+ aspeed_jtag_write(aspeed_jtag, 0, ASPEED_JTAG_SW);
-+ if (aspeed_jtag_xfer_hw(aspeed_jtag, xfer,
-+ (u32 *)xfer_data) != 0)
++ if (aspeed_jtag->llops->xfer_hw(aspeed_jtag, xfer,
++ (u32 *)xfer_data) != 0)
+ return -EFAULT;
+ }
+
@@ -1233,6 +1360,160 @@ index 0000000..1e6ace6
+ return 0;
+}
+
++static int aspeed_jtag_xfer_hw2(struct aspeed_jtag *aspeed_jtag,
++ struct jtag_xfer *xfer, u32 *data)
++{
++ unsigned long remain_xfer = xfer->length;
++ unsigned long partial_xfer_size = 0;
++ unsigned long index = 0;
++ u32 shift_bits;
++ u32 data_reg;
++ u32 reg_val;
++ enum jtag_tapstate shift;
++ enum jtag_tapstate exit;
++ u32 start_shift;
++ u32 end_shift;
++ u32 tms_mask;
++
++ if (xfer->type == JTAG_SIR_XFER) {
++ data_reg = ASPEED_JTAG_SHDATA;
++ shift = JTAG_STATE_SHIFTIR;
++ exit = JTAG_STATE_EXIT1IR;
++ } else {
++ data_reg = ASPEED_JTAG_SHDATA;
++ shift = JTAG_STATE_SHIFTDR;
++ exit = JTAG_STATE_EXIT1DR;
++ }
++#ifdef DEBUG_JTAG
++ dev_dbg(aspeed_jtag->dev,
++ "HW2 JTAG SHIFT %s, length %d from %s to %s then %s stat %s\n",
++ (xfer->type == JTAG_SIR_XFER) ? "IR" : "DR", xfer->length,
++ end_status_str[xfer->from], end_status_str[shift],
++ end_status_str[xfer->endstate],
++ end_status_str[aspeed_jtag->status]);
++#endif
++
++ if (xfer->from == shift) {
++ start_shift = 0;
++ } else {
++ reg_val = aspeed_jtag_read(aspeed_jtag, ASPEED_JTAG_GBLCTRL);
++ aspeed_jtag_write(aspeed_jtag,
++ reg_val | ASPEED_JTAG_GBLCTRL_RESET_FIFO,
++ ASPEED_JTAG_GBLCTRL);
++ start_shift = ASPEED_JTAG_SHCTRL_START_SHIFT;
++ }
++
++ if (xfer->endstate == shift)
++ end_shift = 0;
++ else
++ end_shift = ASPEED_JTAG_SHCTRL_END_SHIFT;
++
++ while (remain_xfer) {
++ unsigned long partial_xfer;
++ unsigned long partial_index;
++
++ if (remain_xfer > ASPEED_JTAG_HW2_DATA_CHUNK_SIZE)
++ partial_xfer_size = ASPEED_JTAG_HW2_DATA_CHUNK_SIZE;
++ else
++ partial_xfer_size = remain_xfer;
++
++ partial_index = index;
++ partial_xfer = partial_xfer_size;
++ while (partial_xfer) {
++ if (partial_xfer > ASPEED_JTAG_DATA_CHUNK_SIZE)
++ shift_bits = ASPEED_JTAG_DATA_CHUNK_SIZE;
++ else
++ shift_bits = partial_xfer;
++
++ if (xfer->direction & JTAG_WRITE_XFER)
++ aspeed_jtag_write(aspeed_jtag,
++ data[partial_index++],
++ data_reg);
++ else
++ aspeed_jtag_write(aspeed_jtag, 0, data_reg);
++ partial_xfer = partial_xfer - shift_bits;
++ }
++ if (remain_xfer > ASPEED_JTAG_HW2_DATA_CHUNK_SIZE) {
++ shift_bits = ASPEED_JTAG_HW2_DATA_CHUNK_SIZE;
++
++ /*
++ * Transmit bytes that were not equals to column length
++ * and after the transfer go to Pause IR/DR.
++ */
++
++ aspeed_jtag_shctrl_tms_mask(xfer->from, shift, exit,
++ xfer->endstate, start_shift,
++ 0, &tms_mask);
++
++ reg_val = aspeed_jtag_read(aspeed_jtag,
++ ASPEED_JTAG_GBLCTRL);
++ reg_val = reg_val & ~(GENMASK(22, 20));
++ aspeed_jtag_write(aspeed_jtag, reg_val |
++ ASPEED_JTAG_GBLCTRL_FIFO_CTRL_MODE |
++ ASPEED_JTAG_GBLCTRL_UPDT_SHIFT(
++ shift_bits),
++ ASPEED_JTAG_GBLCTRL);
++
++ aspeed_jtag_write(aspeed_jtag, tms_mask |
++ ASPEED_JTAG_SHCTRL_LWRDT_SHIFT(shift_bits),
++ ASPEED_JTAG_SHCTRL);
++ aspeed_jtag_wait_shift_complete(aspeed_jtag);
++ } else {
++ /*
++ * Read bytes equals to column length
++ */
++ shift_bits = remain_xfer;
++ aspeed_jtag_shctrl_tms_mask(xfer->from, shift, exit,
++ xfer->endstate, start_shift,
++ end_shift, &tms_mask);
++
++ reg_val = aspeed_jtag_read(aspeed_jtag,
++ ASPEED_JTAG_GBLCTRL);
++ reg_val = reg_val & ~(GENMASK(22, 20));
++ aspeed_jtag_write(aspeed_jtag, reg_val |
++ ASPEED_JTAG_GBLCTRL_FIFO_CTRL_MODE |
++ ASPEED_JTAG_GBLCTRL_UPDT_SHIFT(
++ shift_bits),
++ ASPEED_JTAG_GBLCTRL);
++
++ aspeed_jtag_write(aspeed_jtag, tms_mask |
++ ASPEED_JTAG_SHCTRL_LWRDT_SHIFT(
++ shift_bits),
++ ASPEED_JTAG_SHCTRL);
++
++ aspeed_jtag_wait_shift_complete(aspeed_jtag);
++ }
++
++ if (xfer->direction & JTAG_READ_XFER) {
++ partial_index = index;
++ partial_xfer = partial_xfer_size;
++ while (partial_xfer) {
++ if (partial_xfer >
++ ASPEED_JTAG_DATA_CHUNK_SIZE) {
++ shift_bits =
++ ASPEED_JTAG_DATA_CHUNK_SIZE;
++ data[partial_index++] =
++ aspeed_jtag_read(aspeed_jtag,
++ data_reg);
++
++ } else {
++ shift_bits = partial_xfer;
++ data[partial_index++] =
++ aspeed_jtag_read(aspeed_jtag,
++ data_reg);
++ }
++ partial_xfer = partial_xfer - shift_bits;
++ }
++ }
++
++ remain_xfer = remain_xfer - partial_xfer_size;
++ index = partial_index;
++ start_shift = 0;
++ }
++ aspeed_jtag->status = xfer->endstate;
++ return 0;
++}
++
+static int aspeed_jtag_status_get(struct jtag *jtag, u32 *status)
+{
+ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
@@ -1252,8 +1533,9 @@ index 0000000..1e6ace6
+
+ if (status & ASPEED_JTAG_ISR_INT_MASK) {
+ aspeed_jtag_write(aspeed_jtag,
-+ (status & ASPEED_JTAG_ISR_INT_MASK)
-+ | (status & ASPEED_JTAG_ISR_INT_EN_MASK),
++ (status & ASPEED_JTAG_ISR_INT_MASK) |
++ (status &
++ ASPEED_JTAG_ISR_INT_EN_MASK),
+ ASPEED_JTAG_ISR);
+ aspeed_jtag->flag |= status & ASPEED_JTAG_ISR_INT_MASK;
+ }
@@ -1262,8 +1544,7 @@ index 0000000..1e6ace6
+ wake_up_interruptible(&aspeed_jtag->jtag_wq);
+ ret = IRQ_HANDLED;
+ } else {
-+ dev_err(aspeed_jtag->dev, "irq status:%x\n",
-+ status);
++ dev_err(aspeed_jtag->dev, "irq status:%x\n", status);
+ ret = IRQ_NONE;
+ }
+ return ret;
@@ -1274,7 +1555,7 @@ index 0000000..1e6ace6
+{
+ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
+
-+ aspeed_jtag_master(aspeed_jtag);
++ aspeed_jtag->llops->master_enable(aspeed_jtag);
+ return 0;
+}
+
@@ -1282,7 +1563,7 @@ index 0000000..1e6ace6
+{
+ struct aspeed_jtag *aspeed_jtag = jtag_priv(jtag);
+
-+ aspeed_jtag_output_disable(aspeed_jtag);
++ aspeed_jtag->llops->output_disable(aspeed_jtag);
+ return 0;
+}
+
@@ -1328,8 +1609,8 @@ index 0000000..1e6ace6
+
+#ifdef USE_INTERRUPTS
+ err = devm_request_irq(aspeed_jtag->dev, aspeed_jtag->irq,
-+ aspeed_jtag_interrupt, 0,
-+ "aspeed-jtag", aspeed_jtag);
++ aspeed_jtag_interrupt, 0, "aspeed-jtag",
++ aspeed_jtag);
+ if (err) {
+ dev_err(aspeed_jtag->dev, "unable to get IRQ");
+ clk_disable_unprepare(aspeed_jtag->pclk);
@@ -1337,7 +1618,7 @@ index 0000000..1e6ace6
+ }
+#endif
+
-+ aspeed_jtag_output_disable(aspeed_jtag);
++ aspeed_jtag->llops->output_disable(aspeed_jtag);
+
+ aspeed_jtag->flag = 0;
+ aspeed_jtag->mode = 0;
@@ -1368,25 +1649,59 @@ index 0000000..1e6ace6
+ .disable = aspeed_jtag_disable
+};
+
++static const struct jtag_ops aspeed_jtag_ops_26xx = {
++#ifdef ASPEED_JTAG_HW_MODE_2_ENABLE
++ .freq_get = aspeed_jtag_freq_get_26xx,
++ .freq_set = aspeed_jtag_freq_set_26xx,
++ .status_get = aspeed_jtag_status_get,
++ .status_set = aspeed_jtag_status_set_26xx,
++#else
++ .freq_get = aspeed_jtag_freq_get,
++ .freq_set = aspeed_jtag_freq_set,
++ .status_get = aspeed_jtag_status_get,
++ .status_set = aspeed_jtag_status_set,
++#endif
++ .xfer = aspeed_jtag_xfer,
++ .mode_set = aspeed_jtag_mode_set,
++ .bitbang = aspeed_jtag_bitbang,
++ .enable = aspeed_jtag_enable,
++ .disable = aspeed_jtag_disable
++};
++
+static const struct jtag_low_level_functions ast25xx_llops = {
++ .master_enable = aspeed_jtag_master,
+ .output_disable = aspeed_jtag_output_disable,
+ .xfer_push_data = aspeed_jtag_xfer_push_data,
-+ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last
++ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last,
++ .xfer_sw = aspeed_jtag_xfer_sw,
++ .xfer_hw = aspeed_jtag_xfer_hw
+};
+
-+static struct aspeed_jtag_functions ast25xx_functions = {
++static const struct aspeed_jtag_functions ast25xx_functions = {
+ .aspeed_jtag_ops = &aspeed_jtag_ops,
+ .aspeed_jtag_llops = &ast25xx_llops
+};
+
+static const struct jtag_low_level_functions ast26xx_llops = {
++#ifdef ASPEED_JTAG_HW_MODE_2_ENABLE
++ .master_enable = aspeed_jtag_master_26xx,
++ .output_disable = aspeed_jtag_output_disable_26xx,
++ .xfer_push_data = aspeed_jtag_xfer_push_data_26xx,
++ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last_26xx,
++ .xfer_sw = aspeed_jtag_xfer_sw,
++ .xfer_hw = aspeed_jtag_xfer_hw2
++#else
++ .master_enable = aspeed_jtag_master,
+ .output_disable = aspeed_jtag_output_disable,
+ .xfer_push_data = aspeed_jtag_xfer_push_data_26xx,
-+ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last_26xx
++ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last_26xx,
++ .xfer_sw = aspeed_jtag_xfer_sw,
++ .xfer_hw = aspeed_jtag_xfer_hw
++#endif
+};
+
-+static struct aspeed_jtag_functions ast26xx_functions = {
-+ .aspeed_jtag_ops = &aspeed_jtag_ops,
++static const struct aspeed_jtag_functions ast26xx_functions = {
++ .aspeed_jtag_ops = &aspeed_jtag_ops_26xx,
+ .aspeed_jtag_llops = &ast26xx_llops
+};
+
@@ -1402,7 +1717,7 @@ index 0000000..1e6ace6
+ struct aspeed_jtag *aspeed_jtag;
+ struct jtag *jtag;
+ const struct of_device_id *match;
-+ struct aspeed_jtag_functions *jtag_functions;
++ const struct aspeed_jtag_functions *jtag_functions;
+ int err;
+
+ match = of_match_node(aspeed_jtag_of_match, pdev->dev.of_node);
@@ -1462,5 +1777,4 @@ index 0000000..1e6ace6
+MODULE_DESCRIPTION("ASPEED JTAG driver");
+MODULE_LICENSE("GPL v2");
--
-2.7.4
-
+2.7.4 \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0116-watchdog-aspeed-fix-AST2600-support.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0116-watchdog-aspeed-fix-AST2600-support.patch
new file mode 100644
index 000000000..3f71219de
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0116-watchdog-aspeed-fix-AST2600-support.patch
@@ -0,0 +1,49 @@
+From f911c7c994bf57685254f3b92e03e999d9cf058a Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Thu, 25 Jun 2020 23:56:15 -0700
+Subject: [PATCH] watchdog: aspeed: fix AST2600 support
+
+AST2600 provides different function of WDT0C[4] and it doesn't
+provides WDT10[1] so this commit fixes driver to make it don't
+use these register bits in case of AST2600.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/watchdog/aspeed_wdt.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
+index 7e00960651fa..5a74b439e3b1 100644
+--- a/drivers/watchdog/aspeed_wdt.c
++++ b/drivers/watchdog/aspeed_wdt.c
+@@ -279,6 +279,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
+ * - ast2500 only runs at 1MHz, hard coding bit 4 to 1
+ * - ast2600 always runs at 1MHz
+ *
++ * Note: ast2600 uses WDT0C[4] as 'Enable WDT to be reset by SOC reset'
++ *
+ * Set the ast2400 to run at 1MHz as it simplifies the driver.
+ */
+ if (of_device_is_compatible(np, "aspeed,ast2400-wdt"))
+@@ -367,13 +369,12 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
+ writel(duration - 1, wdt->base + WDT_RESET_WIDTH);
+ }
+
+- status = readl(wdt->base + WDT_TIMEOUT_STATUS);
+- if (status & WDT_TIMEOUT_STATUS_BOOT_SECONDARY) {
+- wdt->wdd.bootstatus = WDIOF_CARDRESET;
+-
+- if (of_device_is_compatible(np, "aspeed,ast2400-wdt") ||
+- of_device_is_compatible(np, "aspeed,ast2500-wdt"))
++ if (!of_device_is_compatible(np, "aspeed,ast2600-wdt")) {
++ status = readl(wdt->base + WDT_TIMEOUT_STATUS);
++ if (status & WDT_TIMEOUT_STATUS_BOOT_SECONDARY) {
++ wdt->wdd.bootstatus = WDIOF_CARDRESET;
+ wdt->wdd.groups = bswitch_groups;
++ }
+ }
+
+ dev_set_drvdata(dev, wdt);
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0117-Copy-raw-PECI-response-to-user-space-on-timeout.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0117-Copy-raw-PECI-response-to-user-space-on-timeout.patch
new file mode 100644
index 000000000..f019b43ab
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0117-Copy-raw-PECI-response-to-user-space-on-timeout.patch
@@ -0,0 +1,54 @@
+From c63c2466e3e8f61dd61fd98f4265af2e13ac9bac Mon Sep 17 00:00:00 2001
+From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
+Date: Mon, 6 Jul 2020 13:59:52 -0700
+Subject: [PATCH] Copy raw PECI response to user-space on timeout
+
+When a raw PECI command times out, the response is not copied
+to user-space, so the timeout completion code is lost.
+
+This follows the default flow and also copies the response to
+user-space on timeout to give the user a valid completion code.
+
+Tested:
+Forced PECI timeout and confirmed that the raw PECI command
+returns a valid completion code to the user.
+
+Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
+---
+ drivers/peci/peci-dev.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/peci/peci-dev.c b/drivers/peci/peci-dev.c
+index e0fe09467a80..c574d13213af 100644
+--- a/drivers/peci/peci-dev.c
++++ b/drivers/peci/peci-dev.c
+@@ -138,8 +138,13 @@ static long peci_dev_ioctl(struct file *file, uint iocmd, ulong arg)
+ xmsg->tx_len = uxmsg.tx_len;
+ xmsg->rx_len = uxmsg.rx_len;
+
++ /*
++ * Send the command and copy the results back to user space on
++ * either success or timeout to provide the completion code to
++ * the caller.
++ */
+ ret = peci_command(peci_dev->adapter, cmd, xmsg);
+- if (!ret && xmsg->rx_len &&
++ if ((!ret || ret == -ETIMEDOUT) && xmsg->rx_len &&
+ copy_to_user((__u8 __user *)uxmsg.rx_buf, xmsg->rx_buf,
+ xmsg->rx_len))
+ ret = -EFAULT;
+@@ -153,6 +158,11 @@ static long peci_dev_ioctl(struct file *file, uint iocmd, ulong arg)
+ break;
+ }
+
++ /*
++ * Send the command and copy the results back to user space on
++ * either success or timeout to provide the completion code to
++ * the caller.
++ */
+ ret = peci_command(peci_dev->adapter, cmd, msg);
+ if ((!ret || ret == -ETIMEDOUT) &&
+ copy_to_user(umsg, msg, msg_len))
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
index 1c6a307ff..b176446c3 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -82,6 +82,8 @@ SRC_URI += " \
file://0110-USB-gadget-fix-illegal-array-access-in-binding-with-.patch \
file://0111-Unconditionally-calculate-the-PECI-AW-FCS.patch \
file://0112-AST2600-enable-UART-routing.patch \
+ file://0116-watchdog-aspeed-fix-AST2600-support.patch \
+ file://0117-Copy-raw-PECI-response-to-user-space-on-timeout.patch \
"
SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0005-128MB-flashmap-for-PFR.patch', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
index 05e26bedb..f361c3d07 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
@@ -200,7 +200,7 @@ index 68668d6..058d328 100644
using IP = sdbusplus::xyz::openbmc_project::Network::server::IP;
-@@ -31,10 +35,15 @@ using EthernetInterfaceIntf =
+@@ -31,10 +35,14 @@ using EthernetInterfaceIntf =
sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface;
using MacAddressIntf =
sdbusplus::xyz::openbmc_project::Network::server::MACAddress;
@@ -210,8 +210,7 @@ index 68668d6..058d328 100644
using ServerList = std::vector<std::string>;
using ObjectPath = sdbusplus::message::object_path;
-+using DbusVariant =
-+ sdbusplus::message::variant<std::string, std::vector<std::string>>;
++using DbusVariant = std::variant<std::string, std::vector<std::string>>;
+
namespace fs = std::experimental::filesystem;
@@ -276,7 +275,7 @@ index 043d7a2..75f4e5f 100644
Manager::Manager(sdbusplus::bus::bus& bus, const char* objPath,
const std::string& path) :
details::VLANCreateIface(bus, objPath, true),
-@@ -41,6 +48,103 @@ Manager::Manager(sdbusplus::bus::bus& bus, const char* objPath,
+@@ -41,6 +48,101 @@ Manager::Manager(sdbusplus::bus::bus& bus, const char* objPath,
{
fs::path confDir(path);
setConfDir(confDir);
@@ -345,12 +344,10 @@ index 043d7a2..75f4e5f 100644
+ return;
+ }
+
-+ sdbusplus::message::variant<std::vector<std::string>> result;
++ std::variant<std::vector<std::string>> result;
+ reply.read(result);
+
-+ supportedPrivList =
-+ sdbusplus::message::variant_ns::get<std::vector<std::string>>(
-+ result);
++ supportedPrivList = std::get<std::vector<std::string>>(result);
+ }
+
+ // Resgister the signal
@@ -370,8 +367,8 @@ index 043d7a2..75f4e5f 100644
+ {
+ if (t.first == propNameAllPrivileges)
+ {
-+ supportedPrivList = sdbusplus::message::variant_ns::get<
-+ std::vector<std::string>>(t.second);
++ supportedPrivList =
++ std::get<std::vector<std::string>>(t.second);
+ }
+ }
+ });
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
index 813561384..e76c23fa6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -1,6 +1,6 @@
# this is here just to bump faster than upstream
SRC_URI = "git://github.com/openbmc/entity-manager.git"
-SRCREV = "8c505da0ffd8709f3c799a855ff921cfbd446201"
+SRCREV = "ac09fe44dba113aacee1d2fd995e137c0d5ea18e"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 000000000..1d332e2a2
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1,3 @@
+baud = 921600
+local-tty = ttyS3
+local-tty-baud = 921600
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console@.service b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console@.service
new file mode 100644
index 000000000..7fb8f79d3
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console@.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Phosphor Console Muxer listening on device /dev/%I
+BindsTo=dev-%i.device
+After=dev-%i.device
+
+[Service]
+ExecStartPre=/usr/bin/sol-option-check.sh
+ExecStartPre=/bin/sh -c 'echo -n "uart3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart1'
+ExecStartPre=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart3'
+ExecStartPre=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart4'
+ExecStartPre=/bin/sh -c 'echo -n "uart4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/io1'
+ExecStart=/usr/bin/env obmc-console-server --config {sysconfdir}/obmc-console.conf %i
+ExecStopPost=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart1'
+ExecStopPost=/bin/sh -c 'echo -n "io3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart3'
+ExecStopPost=/bin/sh -c 'echo -n "io4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/uart4'
+ExecStopPost=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/io1'
+SyslogIdentifier=obmc-console-server
+Restart=always
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/sol-option-check.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/sol-option-check.sh
new file mode 100755
index 000000000..19179c497
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/sol-option-check.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Copyright 2017-2020 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+
+CPUPART="CPU part"
+AST2500_ID="0xb76"
+AST2600_ID="0xc07"
+
+if ([ $(grep "$CPUPART" /proc/cpuinfo | grep "$AST2500_ID" | wc -l) != 0 ] && \
+ [ $(grep 192000000 /sys/class/tty/ttyS0/uartclk | wc -l) != 0 ]) || \
+ ([ $(grep "$CPUPART" /proc/cpuinfo | grep "$AST2600_ID" | wc -l) != 0 ] && \
+ [ $(grep 14769216 /sys/class/tty/ttyS0/uartclk | wc -l) != 0 ]); then
+ echo "hs-uart"
+ sed -i -e 's/115200/921600/g' /etc/obmc-console.conf
+else
+ echo "normal uart"
+ sed -i -e 's/921600/115200/g' /etc/obmc-console.conf
+fi
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
new file mode 100644
index 000000000..09510fec8
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
@@ -0,0 +1,17 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+OBMC_CONSOLE_HOST_TTY = "ttyS2"
+SRC_URI += "file://sol-option-check.sh \
+ file://obmc-console@.service \
+ "
+inherit obmc-phosphor-systemd
+
+SYSTEMD_SERVICE_${PN} += " \
+ ${PN}@${OBMC_CONSOLE_HOST_TTY}.service \
+ "
+
+do_install_append() {
+ rm -rf ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules
+ install -m 0644 ${WORKDIR}/${PN}@.service ${D}${systemd_system_unitdir}
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/sol-option-check.sh ${D}${bindir}
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
index e6c993658..5efc383f0 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -5,6 +5,6 @@ SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service"
EXTRA_OECONF = "--enable-configure-dbus=yes"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git"
-SRCREV = "e30916c9ef6d363328b95c9947ac95d94a2b6a24"
+SRCREV = "4b36f265a10048127d93e4b70916c181827c9af2"
FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0001-Add-more-error-types.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0001-Add-more-error-types.patch
new file mode 100644
index 000000000..d43256bf4
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0001-Add-more-error-types.patch
@@ -0,0 +1,459 @@
+From e710df3123c382fc735c451a048f7c51250c1a92 Mon Sep 17 00:00:00 2001
+From: James Feist <james.feist@linux.intel.com>
+Date: Thu, 11 Jun 2020 13:14:11 -0700
+Subject: [PATCH 1/2] Add more error types
+
+This adds ImageFailure and Busy error types
+to updates status in bmcweb.
+
+elog-errors.hpp is a generated file.
+
+Tested: Could create errors
+
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ elog-errors.hpp | 269 ++++++++++++------
+ .../Software/Image.errors.yaml | 5 +
+ .../Software/Image.metadata.yaml | 11 +
+ 3 files changed, 204 insertions(+), 81 deletions(-)
+
+diff --git a/elog-errors.hpp b/elog-errors.hpp
+index 2888f0d..38016e1 100644
+--- a/elog-errors.hpp
++++ b/elog-errors.hpp
+@@ -2,12 +2,12 @@
+ // See elog-gen.py for more details
+ #pragma once
+
+-#include <phosphor-logging/elog.hpp>
+-#include <phosphor-logging/log.hpp>
+-#include <sdbusplus/exception.hpp>
+ #include <string>
+ #include <tuple>
+ #include <type_traits>
++#include <sdbusplus/exception.hpp>
++#include <phosphor-logging/log.hpp>
++#include <phosphor-logging/elog.hpp>
+
+ namespace sdbusplus
+ {
+@@ -21,7 +21,7 @@ namespace Image
+ {
+ namespace Error
+ {
+-struct UnTarFailure;
++ struct InternalFailure;
+ } // namespace Error
+ } // namespace Image
+ } // namespace Software
+@@ -41,7 +41,7 @@ namespace Image
+ {
+ namespace Error
+ {
+-struct InternalFailure;
++ struct UnTarFailure;
+ } // namespace Error
+ } // namespace Image
+ } // namespace Software
+@@ -61,7 +61,7 @@ namespace Image
+ {
+ namespace Error
+ {
+-struct ManifestFileFailure;
++ struct BusyFailure;
+ } // namespace Error
+ } // namespace Image
+ } // namespace Software
+@@ -69,6 +69,47 @@ struct ManifestFileFailure;
+ } // namespace xyz
+ } // namespace sdbusplus
+
++namespace sdbusplus
++{
++namespace xyz
++{
++namespace openbmc_project
++{
++namespace Software
++{
++namespace Image
++{
++namespace Error
++{
++ struct ImageFailure;
++} // namespace Error
++} // namespace Image
++} // namespace Software
++} // namespace openbmc_project
++} // namespace xyz
++} // namespace sdbusplus
++
++namespace sdbusplus
++{
++namespace xyz
++{
++namespace openbmc_project
++{
++namespace Software
++{
++namespace Image
++{
++namespace Error
++{
++ struct ManifestFileFailure;
++} // namespace Error
++} // namespace Image
++} // namespace Software
++} // namespace openbmc_project
++} // namespace xyz
++} // namespace sdbusplus
++
++
+ namespace phosphor
+ {
+
+@@ -88,38 +129,25 @@ namespace _UnTarFailure
+
+ struct PATH
+ {
+- static constexpr auto str = "PATH=%s";
++ /*
++ * We can't use -fsanitize=undefined if we declare a
++ * 'static constexpr auto str' member, so don't. Instead, open-code the
++ * mako template lookups.
++ */
+ static constexpr auto str_short = "PATH";
+- using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+- explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
++ using type = std::tuple<std::decay_t<decltype("PATH=%s")>,const char*>;
++ explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)) {};
+ type _entry;
+ };
+
+-} // namespace _UnTarFailure
++} // namespace _UnTarFailure
+
+-struct UnTarFailure : public sdbusplus::exception_t
++struct UnTarFailure
+ {
+- static constexpr auto errName =
+- "xyz.openbmc_project.Software.Image.UnTarFailure";
+- static constexpr auto errDesc = "An error occurred during untar.";
+ static constexpr auto L = level::ERR;
+ using PATH = _UnTarFailure::PATH;
+ using metadata_types = std::tuple<PATH>;
+
+- const char* name() const noexcept
+- {
+- return errName;
+- }
+-
+- const char* description() const noexcept
+- {
+- return errDesc;
+- }
+-
+- const char* what() const noexcept
+- {
+- return errName;
+- }
+ };
+
+ } // namespace Image
+@@ -127,16 +155,17 @@ struct UnTarFailure : public sdbusplus::exception_t
+ } // namespace openbmc_project
+ } // namespace xyz
+
++
+ namespace details
+ {
+
+ template <>
+-struct map_exception_type<
+- sdbusplus::xyz::openbmc_project::Software::Image::Error::UnTarFailure>
++struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::Error::UnTarFailure>
+ {
+ using type = xyz::openbmc_project::Software::Image::UnTarFailure;
+ };
+-} // namespace details
++
++}
+
+ namespace xyz
+ {
+@@ -151,38 +180,25 @@ namespace _ManifestFileFailure
+
+ struct PATH
+ {
+- static constexpr auto str = "PATH=%s";
++ /*
++ * We can't use -fsanitize=undefined if we declare a
++ * 'static constexpr auto str' member, so don't. Instead, open-code the
++ * mako template lookups.
++ */
+ static constexpr auto str_short = "PATH";
+- using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+- explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
++ using type = std::tuple<std::decay_t<decltype("PATH=%s")>,const char*>;
++ explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)) {};
+ type _entry;
+ };
+
+-} // namespace _ManifestFileFailure
++} // namespace _ManifestFileFailure
+
+-struct ManifestFileFailure : public sdbusplus::exception_t
++struct ManifestFileFailure
+ {
+- static constexpr auto errName =
+- "xyz.openbmc_project.Software.Image.ManifestFileFailure";
+- static constexpr auto errDesc = "An error when reading the Manifest file.";
+ static constexpr auto L = level::ERR;
+ using PATH = _ManifestFileFailure::PATH;
+ using metadata_types = std::tuple<PATH>;
+
+- const char* name() const noexcept
+- {
+- return errName;
+- }
+-
+- const char* description() const noexcept
+- {
+- return errDesc;
+- }
+-
+- const char* what() const noexcept
+- {
+- return errName;
+- }
+ };
+
+ } // namespace Image
+@@ -190,16 +206,17 @@ struct ManifestFileFailure : public sdbusplus::exception_t
+ } // namespace openbmc_project
+ } // namespace xyz
+
++
+ namespace details
+ {
+
+ template <>
+-struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::
+- Error::ManifestFileFailure>
++struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::Error::ManifestFileFailure>
+ {
+ using type = xyz::openbmc_project::Software::Image::ManifestFileFailure;
+ };
+-} // namespace details
++
++}
+
+ namespace xyz
+ {
+@@ -214,39 +231,76 @@ namespace _InternalFailure
+
+ struct FAIL
+ {
+- static constexpr auto str = "FAIL=%s";
++ /*
++ * We can't use -fsanitize=undefined if we declare a
++ * 'static constexpr auto str' member, so don't. Instead, open-code the
++ * mako template lookups.
++ */
+ static constexpr auto str_short = "FAIL";
+- using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+- explicit constexpr FAIL(const char* a) : _entry(entry(str, a)){};
++ using type = std::tuple<std::decay_t<decltype("FAIL=%s")>,const char*>;
++ explicit constexpr FAIL(const char* a) : _entry(entry("FAIL=%s", a)) {};
+ type _entry;
+ };
+
+-} // namespace _InternalFailure
++} // namespace _InternalFailure
+
+-struct InternalFailure : public sdbusplus::exception_t
++struct InternalFailure
+ {
+- static constexpr auto errName =
+- "xyz.openbmc_project.Software.Image.InternalFailure";
+- static constexpr auto errDesc =
+- "The operation failed internally during processing the image.";
+ static constexpr auto L = level::ERR;
+ using FAIL = _InternalFailure::FAIL;
+ using metadata_types = std::tuple<FAIL>;
+
+- const char* name() const noexcept
+- {
+- return errName;
+- }
++};
++
++} // namespace Image
++} // namespace Software
++} // namespace openbmc_project
++} // namespace xyz
++
++
++namespace details
++{
++
++template <>
++struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::Error::InternalFailure>
++{
++ using type = xyz::openbmc_project::Software::Image::InternalFailure;
++};
++
++}
+
+- const char* description() const noexcept
+- {
+- return errDesc;
+- }
++namespace xyz
++{
++namespace openbmc_project
++{
++namespace Software
++{
++namespace Image
++{
++namespace _ImageFailure
++{
++
++struct PATH
++{
++ /*
++ * We can't use -fsanitize=undefined if we declare a
++ * 'static constexpr auto str' member, so don't. Instead, open-code the
++ * mako template lookups.
++ */
++ static constexpr auto str_short = "PATH";
++ using type = std::tuple<std::decay_t<decltype("PATH=%s")>,const char*>;
++ explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)) {};
++ type _entry;
++};
++
++} // namespace _ImageFailure
++
++struct ImageFailure
++{
++ static constexpr auto L = level::ERR;
++ using PATH = _ImageFailure::PATH;
++ using metadata_types = std::tuple<PATH>;
+
+- const char* what() const noexcept
+- {
+- return errName;
+- }
+ };
+
+ } // namespace Image
+@@ -254,16 +308,69 @@ struct InternalFailure : public sdbusplus::exception_t
+ } // namespace openbmc_project
+ } // namespace xyz
+
++
+ namespace details
+ {
+
+ template <>
+-struct map_exception_type<
+- sdbusplus::xyz::openbmc_project::Software::Image::Error::InternalFailure>
++struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::Error::ImageFailure>
+ {
+- using type = xyz::openbmc_project::Software::Image::InternalFailure;
++ using type = xyz::openbmc_project::Software::Image::ImageFailure;
+ };
+-} // namespace details
++
++}
++
++namespace xyz
++{
++namespace openbmc_project
++{
++namespace Software
++{
++namespace Image
++{
++namespace _BusyFailure
++{
++
++struct PATH
++{
++ /*
++ * We can't use -fsanitize=undefined if we declare a
++ * 'static constexpr auto str' member, so don't. Instead, open-code the
++ * mako template lookups.
++ */
++ static constexpr auto str_short = "PATH";
++ using type = std::tuple<std::decay_t<decltype("PATH=%s")>,const char*>;
++ explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)) {};
++ type _entry;
++};
++
++} // namespace _BusyFailure
++
++struct BusyFailure
++{
++ static constexpr auto L = level::ERR;
++ using PATH = _BusyFailure::PATH;
++ using metadata_types = std::tuple<PATH>;
++
++};
++
++} // namespace Image
++} // namespace Software
++} // namespace openbmc_project
++} // namespace xyz
++
++
++namespace details
++{
++
++template <>
++struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::Error::BusyFailure>
++{
++ using type = xyz::openbmc_project::Software::Image::BusyFailure;
++};
++
++}
++
+
+ } // namespace logging
+
+diff --git a/xyz/openbmc_project/Software/Image.errors.yaml b/xyz/openbmc_project/Software/Image.errors.yaml
+index 67d6c20..2b8f7ee 100644
+--- a/xyz/openbmc_project/Software/Image.errors.yaml
++++ b/xyz/openbmc_project/Software/Image.errors.yaml
+@@ -4,3 +4,8 @@
+ description: An error when reading the Manifest file.
+ - name: InternalFailure
+ description: The operation failed internally during processing the image.
++- name: ImageFailure
++ description: An error occured processing the image.
++- name: BusyFailure
++ description: The device is busy during the update.
++
+diff --git a/xyz/openbmc_project/Software/Image.metadata.yaml b/xyz/openbmc_project/Software/Image.metadata.yaml
+index 5e749c9..65d4e1c 100644
+--- a/xyz/openbmc_project/Software/Image.metadata.yaml
++++ b/xyz/openbmc_project/Software/Image.metadata.yaml
+@@ -13,3 +13,14 @@
+ meta:
+ - str: "FAIL=%s"
+ type: string
++- name: ImageFailure
++ level: ERR
++ meta:
++ - str: "PATH=%s"
++ type: string
++- name: BusyFailure
++ level: ERR
++ meta:
++ - str: "PATH=%s"
++ type: string
++
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch
index 31373104f..c65f8318c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch
@@ -8,11 +8,43 @@ firmware updates
Tested: tested firmware update with good and bad HASH images.
+A)
+1. Upload the corrupted image for fw update.
+2. Image present in /tmp/images/
+-rw-r--r-- 1 root root 22969344 Jun 3 09:27
+5dea710b-8b85-4065-8af7-3149ada81edf
+
+3. Journalctl logs during image verification
+Jun 03 09:27:20 intel-obmc phosphor-version-software-manager[4755]:
+Firmware image HASH verification failed
+Jun 03 09:27:20 intel-obmc phosphor-version-software-manager[4755]:
+Error verifying uploaded image
+Jun 03 09:27:20 intel-obmc phosphor-version-software-manager[4755]:
+Error processing image
+
+4. image deleted from /tmp/images/
+
+B)
+1. Upload the correct image.
+POST: https://<BMC_IP>/redfish/v1/UpdateService/
+ with <BMC_signed_cap> binary file
+2. Image verification is success and proceeds with update.
+{
+ "@odata.id": "/redfish/v1/TaskService/Tasks/0",
+ "@odata.type": "#Task.v1_4_3.Task",
+ "Id": "0",
+ "TaskState": "Running",
+ "TaskStatus": "OK"
+}
+
+Change-Id: I9336980bfb74c8136690024782bfef45f6b08d56
+Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
+
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
---
- pfr_image_manager.cpp | 149 ++++++++++++++++++++++++++++++++----------
+ pfr_image_manager.cpp | 150 +++++++++++++++++++++++++++++++++----------
pfr_image_manager.hpp | 112 +++++++++++++++++++++++++++++--
- 2 files changed, 221 insertions(+), 40 deletions(-)
+ 2 files changed, 222 insertions(+), 40 deletions(-)
diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
index 242a6ca..1a41cbe 100644
@@ -168,7 +200,7 @@ index 242a6ca..1a41cbe 100644
}
catch (std::exception& e)
{
-@@ -79,20 +174,20 @@ static int getPFRImgInfo(const std::filesystem::path imgPath, uint8_t& imgType,
+@@ -79,20 +174,21 @@ static int getPFRImgInfo(const std::filesystem::path imgPath, uint8_t& imgType,
int Manager::processImage(const std::string& imgFilePath)
{
@@ -189,6 +221,7 @@ index 242a6ca..1a41cbe 100644
phosphor::logging::log<phosphor::logging::level::ERR>(
- "Error reading uploaded image type and version");
+ "Error verifying uploaded image");
++ std::filesystem::remove_all(imgFilePath);
return -1;
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0010-Add-error-reporting-to-pfr_image_manager.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0010-Add-error-reporting-to-pfr_image_manager.patch
new file mode 100644
index 000000000..9c3ab4dd2
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0010-Add-error-reporting-to-pfr_image_manager.patch
@@ -0,0 +1,187 @@
+From ffa3642e436b559d8062f777f00458cc7b5ecb01 Mon Sep 17 00:00:00 2001
+From: James Feist <james.feist@linux.intel.com>
+Date: Thu, 11 Jun 2020 13:30:02 -0700
+Subject: [PATCH 1/1] Add error reporting to pfr_image_manager
+
+This uses report functionality to update error
+return status for redfish updates.
+
+Tested: Got 400 error with different messages based
+on failure type
+
+{
+ "error": {
+ "@Message.ExtendedInfo": [
+ {
+ "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
+ "Message": "Invalid file uploaded to /redfish/v1/UpdateService: invalid archive.",
+ "MessageArgs": [
+ "/redfish/v1/UpdateService",
+ "invalid archive"
+ ],
+ "MessageId": "OpenBMC.0.1.0.InvalidFile",
+ "Resolution": "None.",
+ "Severity": "Warning"
+ }
+ ],
+ "code": "OpenBMC.0.1.0.InvalidFile",
+ "message": "Invalid file uploaded to /redfish/v1/UpdateService: invalid archive."
+ }
+}
+
+{
+ "error": {
+ "@Message.ExtendedInfo": [
+ {
+ "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
+ "Message": "Invalid file uploaded to /redfish/v1/UpdateService: invalid image format.",
+ "MessageArgs": [
+ "/redfish/v1/UpdateService",
+ "invalid image format"
+ ],
+ "MessageId": "OpenBMC.0.1.0.InvalidFile",
+ "Resolution": "None.",
+ "Severity": "Warning"
+ }
+ ],
+ "code": "OpenBMC.0.1.0.InvalidFile",
+ "message": "Invalid file uploaded to /redfish/v1/UpdateService: invalid image format."
+ }
+}
+
+{
+ "error": {
+ "@Message.ExtendedInfo": [
+ {
+ "@odata.type": "#Message.v1_0_0.Message",
+ "Message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources.",
+ "MessageArgs": [
+ "/redfish/v1/UpdateService"
+ ],
+ "MessageId": "Base.1.4.0.ResourceExhaustion",
+ "Resolution": "Ensure that the resources are available and resubmit the request.",
+ "Severity": "Critical"
+ }
+ ],
+ "code": "Base.1.4.0.ResourceExhaustion",
+ "message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources."
+ }
+}
+
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ dbus_helpers.hpp | 30 ++++++++++++++++++++++++++++++
+ pfr_image_manager.cpp | 18 ++++++++++++++++++
+ 2 files changed, 48 insertions(+)
+ create mode 100644 dbus_helpers.hpp
+
+diff --git a/dbus_helpers.hpp b/dbus_helpers.hpp
+new file mode 100644
+index 0000000..b9ffa36
+--- /dev/null
++++ b/dbus_helpers.hpp
+@@ -0,0 +1,30 @@
++#pragma once
++
++#include "config.h"
++
++#include <sdbusplus/bus.hpp>
++inline bool isFwupdScriptRunning(sdbusplus::bus::bus& bus)
++{
++ using ObjectPath = sdbusplus::message::object_path;
++ // type is ssssssouso
++ using ListUnitsType =
++ std::tuple<std::string, std::string, std::string, std::string,
++ std::string, std::string, ObjectPath, uint32_t, std::string,
++ ObjectPath>;
++ auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
++ SYSTEMD_INTERFACE, "ListUnits");
++
++ auto reply = bus.call(method);
++ std::vector<ListUnitsType> resp;
++ reply.read(resp);
++
++ for (const auto& unit : resp)
++ {
++ if (std::get<0>(unit).find("fwupd@") != std::string::npos &&
++ std::get<3>(unit) != "failed")
++ {
++ return true;
++ }
++ }
++ return false;
++}
+diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
+index 1a41cbe..fe1e6f9 100644
+--- a/pfr_image_manager.cpp
++++ b/pfr_image_manager.cpp
+@@ -2,6 +2,7 @@
+
+ #include "pfr_image_manager.hpp"
+
++#include "dbus_helpers.hpp"
+ #include "version.hpp"
+ #include "watch.hpp"
+
+@@ -33,6 +34,9 @@ namespace manager
+
+ using namespace sdbusplus::xyz::openbmc_project::Software::Image::Error;
+ namespace Software = phosphor::logging::xyz::openbmc_project::Software;
++using UnTarFail = Software::Image::UnTarFailure;
++using ImageFail = Software::Image::ImageFailure;
++using BusyFail = Software::Image::BusyFailure;
+
+ static constexpr const uint32_t pfmPos = 2054;
+ static constexpr const uint32_t block0Magic = 0xB6EAFD19;
+@@ -74,6 +78,8 @@ int Manager::verifyPFRImage(const std::filesystem::path imgPath,
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "Image magic number match failed",
+ phosphor::logging::entry("IMAGEMAGIC=0x%x", imgMagic));
++ phosphor::logging::report<UnTarFailure>(
++ UnTarFail::PATH(imgPath.c_str()));
+ return -1;
+ }
+
+@@ -108,6 +114,8 @@ int Manager::verifyPFRImage(const std::filesystem::path imgPath,
+
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "Unknown image type");
++ phosphor::logging::report<ImageFailure>(
++ ImageFail::PATH(imgPath.c_str()));
+ return -1;
+ }
+
+@@ -151,6 +159,8 @@ int Manager::verifyPFRImage(const std::filesystem::path imgPath,
+ "PRIORITY=%i", LOG_ERR, "REDFISH_MESSAGE_ID=%s",
+ redfishMsgID.c_str(), "REDFISH_MESSAGE_ARGS=%s",
+ "Image HASH check fail", NULL);
++ phosphor::logging::report<ImageFailure>(
++ ImageFail::PATH(imgPath.c_str()));
+ return -1;
+ }
+
+@@ -165,6 +175,8 @@ int Manager::verifyPFRImage(const std::filesystem::path imgPath,
+ catch (std::exception& e)
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
++ phosphor::logging::report<ImageFailure>(
++ ImageFail::PATH(imgPath.c_str()));
+ return -1;
+ }
+ }
+@@ -180,6 +192,12 @@ int Manager::processImage(const std::string& imgFilePath)
+ if (!std::filesystem::exists(imgPath))
+ return -1;
+
++ if (isFwupdScriptRunning(bus))
++ {
++ phosphor::logging::report<BusyFailure>(BusyFail::PATH(imgPath.c_str()));
++ return -1;
++ }
++
+ int retry = 3;
+ std::string ver;
+ std::string purposeString;
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch
new file mode 100644
index 000000000..4c8f82aa3
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch
@@ -0,0 +1,38 @@
+From 0babf82f51561ac92a9b0dd56991d8de01930129 Mon Sep 17 00:00:00 2001
+From: Vikram Bodireddy <vikram.bodireddy@intel.com>
+Date: Sun, 5 Jul 2020 00:54:57 +0530
+Subject: [PATCH] Fix for RedudancyPriority in item_updater
+
+This fixes accessing RedudancyPriority property for the
+activated image in item_updater. The downloaded image object
+is not actually associated with RedudancyPriority before and
+after activation. There exists no RedundancyPriority property
+for downloaded image, accessing it causing a crash in
+item_updater.
+
+Tested: Tested for coredumps during Seamless firmware update.
+
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
+---
+ item_updater.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/item_updater.cpp b/item_updater.cpp
+index af01e39..8d7bb82 100644
+--- a/item_updater.cpp
++++ b/item_updater.cpp
+@@ -655,8 +655,9 @@ void ItemUpdater::freeSpace(Activation& caller)
+ // Failed activations don't have priority, assign them a large value
+ // for sorting purposes.
+ auto priority = 999;
+- if (iter.second.get()->activation() ==
+- server::Activation::Activations::Active)
++ if ((iter.second.get()->activation() ==
++ server::Activation::Activations::Active)&&
++ iter.second->redundancyPriority.get())
+ {
+ priority = iter.second->redundancyPriority.get()->priority();
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
index f72c18cd0..ae108bf70 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
@@ -5,17 +5,20 @@ SYSTEMD_SERVICE_${PN}-updater += "fwupd@.service"
EXTRA_OECONF += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '--enable-pfr_update', '', d)}"
-SRC_URI += "file://0002-Redfish-firmware-activation.patch \
+SRC_URI += "file://0001-Add-more-error-types.patch \
+ file://0002-Redfish-firmware-activation.patch \
file://0004-Changed-the-condition-of-software-version-service-wa.patch \
file://0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch \
file://0006-Modify-the-ID-of-software-image-updater-object-on-DB.patch \
file://0007-Adding-StandBySpare-for-firmware-activation.patch \
file://0008-item_updater-update-the-bmc_active-objectPath.patch \
+ file://0011-Fix-for-RedudancyPriority-in-item_updater.patch \
"
SRC_URI_PFR = "file://0007-PFR-images-support.patch \
file://0008-PFR-image-HASH-verification.patch \
file://0009-Add-ApplyOptions-D-bus-property-under-Software.patch \
+ file://0010-Add-error-reporting-to-pfr_image_manager.patch \
"
SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', SRC_URI_PFR, '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch
index 46e94e339..3895424ac 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch
@@ -1,6 +1,6 @@
-From 461da7ec950704a1f5bcc7f6527ed8ca119cfaf9 Mon Sep 17 00:00:00 2001
+From 98c57392535227f1906fdc2d6f65980267b5d97c Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
-Date: Tue, 24 Mar 2020 16:05:32 +0530
+Date: Tue, 30 Jun 2020 21:47:55 +0530
Subject: [PATCH] Firmware update support for StandBySpare
Firmware update support for StandBySpare. This will
@@ -28,38 +28,38 @@ Tested:
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
---
- redfish-core/lib/update_service.hpp | 274 +++++++++++++++++++++++++++++++-----
- 1 file changed, 241 insertions(+), 33 deletions(-)
+ redfish-core/lib/update_service.hpp | 276 ++++++++++++++++++++++++----
+ 1 file changed, 243 insertions(+), 33 deletions(-)
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
-index e9793eb..a913bac 100644
+index 8dae2fb..86ddd8a 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
-@@ -30,6 +30,17 @@ static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateMatcher;
+@@ -32,6 +32,17 @@ static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateErrorMatcher;
static bool fwUpdateInProgress = false;
// Timer for software available
static std::unique_ptr<boost::asio::steady_timer> fwAvailableTimer;
-+static constexpr const char *versionIntf =
++static constexpr const char* versionIntf =
+ "xyz.openbmc_project.Software.Version";
-+static constexpr const char *activationIntf =
++static constexpr const char* activationIntf =
+ "xyz.openbmc_project.Software.Activation";
-+static constexpr const char *reqActivationPropName = "RequestedActivation";
-+static constexpr const char *reqActivationsActive =
++static constexpr const char* reqActivationPropName = "RequestedActivation";
++static constexpr const char* reqActivationsActive =
+ "xyz.openbmc_project.Software.Activation.RequestedActivations.Active";
-+static constexpr const char *reqActivationsStandBySpare =
++static constexpr const char* reqActivationsStandBySpare =
+ "xyz.openbmc_project.Software.Activation.RequestedActivations.StandbySpare";
-+static constexpr const char *activationsStandBySpare =
++static constexpr const char* activationsStandBySpare =
+ "xyz.openbmc_project.Software.Activation.Activations.StandbySpare";
static void cleanUp()
{
-@@ -37,27 +48,119 @@ static void cleanUp()
- fwUpdateMatcher = nullptr;
+@@ -40,27 +51,119 @@ static void cleanUp()
+ fwUpdateErrorMatcher = nullptr;
}
- static void activateImage(const std::string &objPath,
-- const std::string &service)
-+ const std::string &service,
-+ const std::vector<std::string> &imgUriTargets)
+ static void activateImage(const std::string& objPath,
+- const std::string& service)
++ const std::string& service,
++ const std::vector<std::string>& imgUriTargets)
{
BMCWEB_LOG_DEBUG << "Activate image for " << objPath << " " << service;
+ // If targets is empty, it will apply to the active.
@@ -90,7 +90,7 @@ index e9793eb..a913bac 100644
- if (error_code)
+ [objPath, service, imgTarget{imgUriTargets[0]}](
+ const boost::system::error_code ec,
-+ const crow::openbmc_mapper::GetSubTreeType &subtree) {
++ const crow::openbmc_mapper::GetSubTreeType& subtree) {
+ if (ec || !subtree.size())
{
- BMCWEB_LOG_DEBUG << "error_code = " << error_code;
@@ -98,7 +98,7 @@ index e9793eb..a913bac 100644
+ return;
+ }
+
-+ for (const auto &[invObjPath, invDict] : subtree)
++ for (const auto& [invObjPath, invDict] : subtree)
+ {
+ std::size_t idPos = invObjPath.rfind("/");
+ if ((idPos == std::string::npos) ||
@@ -173,23 +173,23 @@ index e9793eb..a913bac 100644
+ "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/",
-+ static_cast<int32_t>(0), std::array<const char *, 1>{versionIntf});
++ static_cast<int32_t>(0), std::array<const char*, 1>{versionIntf});
}
// Note that asyncResp can be either a valid pointer or nullptr. If nullptr
// then no asyncResp updates will occur
static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+ const std::vector<std::string> imgUriTargets,
- sdbusplus::message::message &m,
- const crow::Request &req)
+ sdbusplus::message::message& m,
+ const crow::Request& req)
{
-@@ -70,25 +173,27 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+@@ -73,25 +176,27 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
m.read(objPath, interfacesProperties);
- BMCWEB_LOG_DEBUG << "obj path = " << objPath.str;
+ BMCWEB_LOG_DEBUG << "Software Interface Added. obj path = " << objPath.str;
- for (auto &interface : interfacesProperties)
+ for (auto& interface : interfacesProperties)
{
BMCWEB_LOG_DEBUG << "interface = " << interface.first;
@@ -205,7 +205,7 @@ index e9793eb..a913bac 100644
+ [objPath, asyncResp, imgTargets{imgUriTargets},
req](const boost::system::error_code error_code,
const std::vector<std::pair<
- std::string, std::vector<std::string>>> &objInfo) {
+ std::string, std::vector<std::string>>>& objInfo) {
if (error_code)
{
- BMCWEB_LOG_DEBUG << "error_code = " << error_code;
@@ -215,7 +215,7 @@ index e9793eb..a913bac 100644
BMCWEB_LOG_DEBUG << "error msg = "
<< error_code.message();
if (asyncResp)
-@@ -115,7 +220,7 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+@@ -118,7 +223,7 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
// is added
fwAvailableTimer = nullptr;
@@ -224,13 +224,13 @@ index e9793eb..a913bac 100644
if (asyncResp)
{
std::shared_ptr<task::TaskData> task =
-@@ -196,17 +301,16 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+@@ -248,18 +353,17 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetObject", objPath.str,
-- std::array<const char *, 1>{
+- std::array<const char*, 1>{
- "xyz.openbmc_project.Software.Activation"});
-+ std::array<const char *, 1>{activationIntf});
++ std::array<const char*, 1>{activationIntf});
}
}
}
@@ -238,28 +238,30 @@ index e9793eb..a913bac 100644
// Note that asyncResp can be either a valid pointer or nullptr. If nullptr
// then no asyncResp updates will occur
-static void monitorForSoftwareAvailable(std::shared_ptr<AsyncResp> asyncResp,
-- const crow::Request &req,
+- const crow::Request& req,
+- const std::string& url,
- int timeoutTimeSeconds = 5)
+static void monitorForSoftwareAvailable(
-+ std::shared_ptr<AsyncResp> asyncResp, const crow::Request &req,
-+ const std::vector<std::string> &imgUriTargets, int timeoutTimeSeconds = 5)
++ std::shared_ptr<AsyncResp> asyncResp, const crow::Request& req,
++ const std::string& url, const std::vector<std::string>& imgUriTargets,
++ int timeoutTimeSeconds = 5)
{
// Only allow one FW update at a time
if (fwUpdateInProgress != false)
-@@ -246,9 +350,10 @@ static void monitorForSoftwareAvailable(std::shared_ptr<AsyncResp> asyncResp,
+@@ -299,9 +403,10 @@ static void monitorForSoftwareAvailable(std::shared_ptr<AsyncResp> asyncResp,
}
});
-- auto callback = [asyncResp, req](sdbusplus::message::message &m) {
+- auto callback = [asyncResp, req](sdbusplus::message::message& m) {
+ auto callback = [asyncResp, imgTargets{imgUriTargets},
-+ req](sdbusplus::message::message &m) {
++ req](sdbusplus::message::message& m) {
BMCWEB_LOG_DEBUG << "Match fired";
- softwareInterfaceAdded(asyncResp, m, req);
+ softwareInterfaceAdded(asyncResp, imgTargets, m, req);
};
fwUpdateInProgress = true;
-@@ -358,9 +463,12 @@ class UpdateServiceActionsSimpleUpdate : public Node
+@@ -467,12 +572,15 @@ class UpdateServiceActionsSimpleUpdate : public Node
std::string fwFile = imageURI.substr(separator + 1);
BMCWEB_LOG_DEBUG << "Server: " << tftpServer + " File: " << fwFile;
@@ -268,32 +270,35 @@ index e9793eb..a913bac 100644
+
// Setup callback for when new software detected
// Give TFTP 2 minutes to complete
-- monitorForSoftwareAvailable(nullptr, req, 120);
-+ monitorForSoftwareAvailable(nullptr, req, httpUriTargets, 120);
+ monitorForSoftwareAvailable(
+ nullptr, req,
+ "/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate",
+- 120);
++ httpUriTargets, 120);
// TFTP can take up to 2 minutes depending on image size and
// connection speed. Return to caller as soon as the TFTP operation
-@@ -394,7 +502,8 @@ class UpdateServiceActionsSimpleUpdate : public Node
+@@ -506,7 +614,8 @@ class UpdateServiceActionsSimpleUpdate : public Node
class UpdateService : public Node
{
public:
-- UpdateService(CrowApp &app) : Node(app, "/redfish/v1/UpdateService/")
-+ UpdateService(CrowApp &app) :
+- UpdateService(CrowApp& app) : Node(app, "/redfish/v1/UpdateService/")
++ UpdateService(CrowApp& app) :
+ Node(app, "/redfish/v1/UpdateService/"), httpPushUriTargetBusy(false)
{
entityPrivileges = {
{boost::beast::http::verb::get, {{"Login"}}},
-@@ -406,6 +515,9 @@ class UpdateService : public Node
+@@ -518,6 +627,9 @@ class UpdateService : public Node
}
private:
+ std::vector<std::string> httpPushUriTargets;
+ bool httpPushUriTargetBusy;
+
- void doGet(crow::Response &res, const crow::Request &req,
- const std::vector<std::string> &params) override
+ void doGet(crow::Response& res, const crow::Request& req,
+ const std::vector<std::string>& params) override
{
-@@ -416,6 +528,8 @@ class UpdateService : public Node
+@@ -528,6 +640,8 @@ class UpdateService : public Node
res.jsonValue["Description"] = "Service for Software Update";
res.jsonValue["Name"] = "Update Service";
res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService";
@@ -302,7 +307,7 @@ index e9793eb..a913bac 100644
// UpdateService cannot be disabled
res.jsonValue["ServiceEnabled"] = true;
res.jsonValue["FirmwareInventory"] = {
-@@ -475,9 +589,14 @@ class UpdateService : public Node
+@@ -587,9 +701,14 @@ class UpdateService : public Node
std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
std::optional<nlohmann::json> pushUriOptions;
@@ -319,7 +324,7 @@ index e9793eb..a913bac 100644
return;
}
-@@ -545,6 +664,98 @@ class UpdateService : public Node
+@@ -657,6 +776,98 @@ class UpdateService : public Node
}
}
}
@@ -370,7 +375,7 @@ index e9793eb..a913bac 100644
+ }
+
+ bool swInvObjFound = false;
-+ for (const std::string &path : swInvPaths)
++ for (const std::string& path : swInvPaths)
+ {
+ std::size_t idPos = path.rfind("/");
+ if ((idPos == std::string::npos) ||
@@ -402,7 +407,7 @@ index e9793eb..a913bac 100644
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths",
+ "/", static_cast<int32_t>(0),
-+ std::array<const char *, 1>{versionIntf});
++ std::array<const char*, 1>{versionIntf});
+ }
+ else
+ {
@@ -417,27 +422,28 @@ index e9793eb..a913bac 100644
+ }
}
- void doPost(crow::Response &res, const crow::Request &req,
-@@ -555,7 +766,7 @@ class UpdateService : public Node
+ void doPost(crow::Response& res, const crow::Request& req,
+@@ -667,8 +878,8 @@ class UpdateService : public Node
std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
// Setup callback for when new software detected
-- monitorForSoftwareAvailable(asyncResp, req);
-+ monitorForSoftwareAvailable(asyncResp, req, httpPushUriTargets);
+- monitorForSoftwareAvailable(asyncResp, req,
+- "/redfish/v1/UpdateService");
++ monitorForSoftwareAvailable(asyncResp, req, "/redfish/v1/UpdateService",
++ httpPushUriTargets);
std::string filepath(
"/tmp/images/" +
-@@ -641,8 +852,7 @@ class SoftwareInventoryCollection : public Node
+@@ -754,7 +965,7 @@ class SoftwareInventoryCollection : public Node
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTree",
"/xyz/openbmc_project/software", static_cast<int32_t>(0),
-- std::array<const char *, 1>{
-- "xyz.openbmc_project.Software.Version"});
-+ std::array<const char *, 1>{versionIntf});
+- std::array<const char*, 1>{"xyz.openbmc_project.Software.Version"});
++ std::array<const char*, 1>{versionIntf});
}
};
-@@ -825,7 +1035,7 @@ class SoftwareInventory : public Node
+@@ -937,7 +1148,7 @@ class SoftwareInventory : public Node
},
obj.second[0].first, obj.first,
"org.freedesktop.DBus.Properties", "GetAll",
@@ -446,17 +452,16 @@ index e9793eb..a913bac 100644
}
if (!found)
{
-@@ -846,9 +1056,7 @@ class SoftwareInventory : public Node
+@@ -958,8 +1169,7 @@ class SoftwareInventory : public Node
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTree", "/",
- static_cast<int32_t>(0),
-- std::array<const char *, 1>{
-- "xyz.openbmc_project.Software.Version"});
-+ static_cast<int32_t>(0), std::array<const char *, 1>{versionIntf});
+- std::array<const char*, 1>{"xyz.openbmc_project.Software.Version"});
++ static_cast<int32_t>(0), std::array<const char*, 1>{versionIntf});
}
};
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch
index 03c27fb43..e963b1423 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch
@@ -1,7 +1,10 @@
-From d629bf86a9ac970d8c0505c0aa2488373c9df102 Mon Sep 17 00:00:00 2001
+From b68d62ddf0a9d77a287a7e9a99762915e31d02b9 Mon Sep 17 00:00:00 2001
From: Wiktor Golgowski <wiktor.golgowski@linux.intel.com>
Date: Thu, 30 Apr 2020 11:09:35 +0200
Subject: [PATCH] Use chip id-based UUID for Service Root.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
If the sysfs-provided chip id is available, it will be used as
payload to generate Service Root UUID from hardcoded namespace.
@@ -12,15 +15,16 @@ If the sysfs node is not available, code falls back to randomly
generated UUID.
Signed-off-by: Wiktor GoĊ‚gowski <wiktor.golgowski@linux.intel.com>
+
---
- include/persistent_data_middleware.hpp | 32 +++++++++++++++++++++++---
+ include/persistent_data_middleware.hpp | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/include/persistent_data_middleware.hpp b/include/persistent_data_middleware.hpp
-index 348079b..925e7b6 100644
+index de3a6ba..a20b213 100644
--- a/include/persistent_data_middleware.hpp
+++ b/include/persistent_data_middleware.hpp
-@@ -30,6 +30,10 @@ class Middleware
+@@ -31,6 +31,10 @@ class Middleware
public:
// todo(ed) should read this from a fixed location somewhere, not CWD
static constexpr const char* filename = "bmcweb_persistent_data.json";
@@ -30,8 +34,8 @@ index 348079b..925e7b6 100644
+ "944847ed76f5}";
struct Context
- {
-@@ -143,9 +147,31 @@ class Middleware
+ {};
+@@ -141,9 +145,31 @@ class Middleware
if (systemUuid.empty())
{
@@ -66,6 +70,3 @@ index 348079b..925e7b6 100644
}
if (fileRevision < jsonRevision)
{
---
-2.20.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Temporarily-disable-EventService-log-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Temporarily-disable-EventService-log-support.patch
deleted file mode 100644
index bfa843e73..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Temporarily-disable-EventService-log-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From cd173b21c42456bde9765e7f6164e495b6c6a303 Mon Sep 17 00:00:00 2001
-From: James Feist <james.feist@linux.intel.com>
-Date: Wed, 3 Jun 2020 10:08:05 -0700
-Subject: [PATCH 1/1] Temporarily disable EventService log support
-
-This is causing bmcweb to crash when there is no
-redfish log.
-
-Change-Id: Id53e57f1ca140ee44f69fec46fd63bec18490c99
-Signed-off-by: James Feist <james.feist@linux.intel.com>
----
- src/webserver_main.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
-index ea32122..421cd1d 100644
---- a/src/webserver_main.cpp
-+++ b/src/webserver_main.cpp
-@@ -116,7 +116,7 @@ int main(int argc, char** argv)
-
- redfish::RedfishService redfish(app);
-
--#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
-+#if 0
- int rc = redfish::EventServiceManager::startEventLogMonitor(*io);
- if (rc)
- {
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch
index 844a65ec9..704031fe1 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch
@@ -1,6 +1,6 @@
-From 4d88fcada1d95f485ea5a1dd418b31c508652712 Mon Sep 17 00:00:00 2001
+From e883ea9d43a84998641428448d7220c0f5be72c0 Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
-Date: Fri, 15 May 2020 21:12:44 +0530
+Date: Tue, 30 Jun 2020 22:09:10 +0530
Subject: [PATCH] bmcweb changes for setting ApplyOptions-ClearCfg
ApplyOptions are used to specify firmware update specific options
@@ -25,10 +25,10 @@ Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
create mode 100644 static/redfish/v1/schema/OemUpdateService_v1.xml
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
-index a913bac..3a64e63 100644
+index 86ddd8a..291acec 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
-@@ -579,6 +579,29 @@ class UpdateService : public Node
+@@ -691,6 +691,29 @@ class UpdateService : public Node
"/xyz/openbmc_project/software/apply_time",
"org.freedesktop.DBus.Properties", "Get",
"xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime");
@@ -44,7 +44,7 @@ index a913bac..3a64e63 100644
+ return;
+ }
+
-+ const bool *b = std::get_if<bool>(&applyOption);
++ const bool* b = std::get_if<bool>(&applyOption);
+
+ if (b)
+ {
@@ -57,8 +57,8 @@ index a913bac..3a64e63 100644
+ "Get", "xyz.openbmc_project.Software.ApplyOptions", "ClearConfig");
}
- void doPatch(crow::Response &res, const crow::Request &req,
-@@ -591,15 +614,59 @@ class UpdateService : public Node
+ void doPatch(crow::Response& res, const crow::Request& req,
+@@ -703,15 +726,59 @@ class UpdateService : public Node
std::optional<nlohmann::json> pushUriOptions;
std::optional<std::vector<std::string>> imgTargets;
std::optional<bool> imgTargetBusy;
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
index a1ce5f99b..5c70f25d7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,6 +1,6 @@
# todo(james) remove nobranch
SRC_URI = "git://github.com/openbmc/bmcweb.git"
-SRCREV = "dc3fbbd0b0021ae888a97bf48a62f30129fc3f4d"
+SRCREV = "a502de3d661acf95613d4e4d27c9611f2c8148ea"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -12,7 +12,6 @@ GROUPADD_PARAM_${PN} = "web; redfish "
SRC_URI += "file://0001-Firmware-update-support-for-StandBySpare.patch \
file://0002-Use-chip-id-based-UUID-for-Service-Root.patch \
- file://0003-Temporarily-disable-EventService-log-support.patch \
file://0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
index b02595e81..656207de6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -45,7 +45,7 @@
},
"4" : {
"name" : "RESERVED",
- "is_valid" : true,
+ "is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
index 97d329498..a3dceb01e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -11,7 +11,7 @@ SMM_DEVICE = "ipmi_kcs4"
SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
SRC_URI = "git://github.com/openbmc/kcsbridge.git"
-SRCREV = "58d596ad9625790b5e06804360aa161579364425"
+SRCREV = "d8594e9a62feb8b2fac789159966b4782b4aa31e"
SRC_URI += "file://99-ipmi-kcs.rules"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
index 0a9a6ba57..10d0d8c94 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -3,7 +3,7 @@ inherit useradd
# TODO: This should be removed, once up-stream bump up
# issue is resolved
SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid"
-SRCREV = "9d9b7638cb1e95989329680730ec272da786615f"
+SRCREV = "ecb32fbc699aaacee4d6a42bb986575c4c5780dc"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb
index 5607ab823..055e9710e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libmctp_intel"
DESCRIPTION = "Implementation of MCTP(DMTF DSP0236)"
SRC_URI = "git://github.com/Intel-BMC/libmctp.git;protocol=ssh"
-SRCREV = "8cf0d4e76516511ec77bda9e3a1ad1e75f801cdd"
+SRCREV = "58581630af62fce296206e9d09da38cf1d6d1a0f"
S = "${WORKDIR}/git/"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb
index ae11b299a..829bc1636 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "31c8b7aa2bf24060fee2954ae1891c3418a3ae46"
+SRCREV = "cd15b3175e2dd8315d1e01634f2c8a24174c9b21"
S = "${WORKDIR}/git/mctp_emulator/"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb
index 764b65c36..f20426ba1 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "31c8b7aa2bf24060fee2954ae1891c3418a3ae46"
+SRCREV = "cd15b3175e2dd8315d1e01634f2c8a24174c9b21"
S = "${WORKDIR}/git/mctpd/"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
index ab36babb3..882547ea7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -1,9 +1,11 @@
-SRCREV = "54ffb271b995db4f0b00f0661baab23763fae5bd"
+SRCREV = "5591cf0860895607bda0b8ae713e6b05ac0623b1"
#SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
DEPENDS_append = " libgpiod libmctp"
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
-EXTRA_OECMAKE += "-DDISABLE_NVME=OFF"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.nvmesensor.service"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'disable-nvme-sensors', d)}"
+PACKAGECONFIG[disable-nvme-sensors] = "-DDISABLE_NVME=ON, -DDISABLE_NVME=OFF"
+
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'disable-nvme-sensors', '', 'xyz.openbmc_project.nvmesensor.service', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/service-config-manager/service-config-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/service-config-manager/service-config-manager_%.bbappend
index 3b4b25021..6d26a95a9 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/service-config-manager/service-config-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/service-config-manager/service-config-manager_%.bbappend
@@ -1,3 +1,5 @@
-# Enable downstream autobump
+inherit meson pkgconfig systemd
SRC_URI = "git://github.com/openbmc/service-config-manager"
-SRCREV = "ee853eb2d865c7da9eec99cdcac04f8aee750e49"
+SRCREV = "1a885d98eea964bd9a3d57152dcaae7d4808211f"
+
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
index e49a410cb..e15525bba 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
@@ -1,7 +1,7 @@
SUMMARY = "Settings"
-SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "bee56d62b209088454d166d1efae4825a2b175df"
+SRC_URI = "git://github.com/Intel-BMC/settings.git;protocol=ssh"
+SRCREV = "cf55f85c9cd676736356f06fc47a7e98abd297f3"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
@@ -13,7 +13,7 @@ DEPENDS = "boost \
nlohmann-json \
sdbusplus"
-S = "${WORKDIR}/git/settings"
+S = "${WORKDIR}/git"
inherit cmake systemd
EXTRA_OECMAKE = "-DYOCTO=1"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
index 6f6bb860d..ea8971eb4 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/special-mode-manager.git;protocol=ssh"
-SRCREV = "cf2ba04cf68d76047211f66d9bb4ae1be1907323"
+SRCREV = "658d313be17b971aedae69e9edbba5f26667dd03"
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp
index 5356e95db..792e564d9 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp
@@ -127,8 +127,7 @@ template <typename T> void setProperty(const std::string &key, const T &val)
boost::system::system_error(err).what()));
}
},
- wdBus, wdPath, propIntf, "Set", wdIntf, key,
- sdbusplus::message::variant_ns::variant<T>(val));
+ wdBus, wdPath, propIntf, "Set", wdIntf, key, std::variant<T>(val));
}
catch (sdbusplus::exception::SdBusError &e)
{
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
index 217eb9ef9..ce46ec5cd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
@@ -1,4 +1,4 @@
SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2"
FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:"
-SRCREV = "190f423c191f1f292d24b55f1310eadd565e5ee9"
+SRCREV = "7d6650577d28a52e7be47dd2106d9e0f3b6e1c59"
diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch b/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch
deleted file mode 100644
index 80dfc2725..000000000
--- a/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 318439af2e77731ae2c3df5e198c1d3e8392d556 Mon Sep 17 00:00:00 2001
-From: Simon Ebner <Simon.Ebner@advertima.com>
-Date: Fri, 22 Mar 2019 15:27:35 +0100
-Subject: [PATCH 1/2] Fix Issue 62
-
-Fixes a leaking pipe. See https://github.com/boostorg/process/issues/62
----
- boost/process/detail/posix/executor.hpp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/boost/process/detail/posix/executor.hpp b/boost/process/detail/posix/executor.hpp
-index 1390a58..8b86ed1 100644
---- a/boost/process/detail/posix/executor.hpp
-+++ b/boost/process/detail/posix/executor.hpp
-@@ -282,7 +282,10 @@ class executor
- set_error(std::error_code(err, std::system_category()), "Error read pipe");
- }
- if (count == 0)
-+ {
-+ ::close(source);
- return ;
-+ }
-
- std::error_code ec(data[0], std::system_category());
- std::string msg(data[1], ' ');
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend
deleted file mode 100644
index f85e30b1f..000000000
--- a/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://0001-Fix-Issue-62.patch"