summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-05-24 22:54:37 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2021-05-24 23:12:35 +0300
commit2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50 (patch)
tree704eb802dc7b987411a0e44d128bdd8978745d8c /meta-openbmc-mods
parent0e0df451ae365f09d5c0c766b253f23de26901f2 (diff)
downloadopenbmc-2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50.tar.xz
Update to internal 0.52
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods')
-rw-r--r--meta-openbmc-mods/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-ast2500/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch89
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch14
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch50
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch2
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch14
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch43
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-ast2600/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch38
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-LED-control-support.patch457
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch118
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0020-Add-BMC-running-indicator-LED-control.patch62
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch53
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch343
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0027-ast2600-Add-Mailbox-init-function.patch24
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0029-Set-UART-routing-in-lowlevel_init.patch43
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11059/0001-Fix-ext4-block-group-descriptor-sizing.patch62
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11690/0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch95
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13104/0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch41
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0001-fs-ext4-cache-extent-data.patch409
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch30
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13106/0001-CVE-2019-13106-ext4-fix-out-of-bounds-memset.patch49
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0001-image-Adjust-the-workings-of-fit_check_format.patch397
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0002-image-Add-an-option-to-do-a-full-check-of-the-FIT.patch212
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27138/0001-image-Check-for-unit-addresses-in-FITs.patch106
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend49
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0001-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch126
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console@.service21
-rw-r--r--meta-openbmc-mods/meta-common-small/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/classes/obmc-phosphor-full-fitimage.bbclass32
-rw-r--r--meta-openbmc-mods/meta-common/classes/print-src.bbclass7
-rw-r--r--meta-openbmc-mods/meta-common/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb (renamed from meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1j.bb)2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0034-Fix-double-free-in-netgroupcache-BZ-27462.patch44
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend1
-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-core/safec/safec_3.4.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb2
-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.patch31
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch127
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch226
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0003-Add-logs-to-fwVersionIsSame.patch56
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/obmc-console@.service9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend2
-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/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0015-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch)98
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd_git.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch30
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch182
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch44
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch135
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0012-Log-RedFish-event-for-Invalid-login-attempt.patch67
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Add-UART-routing-logic-into-host-console-connection-.patch59
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch44
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch51
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0003-Move-EventService-init-to-later-stage.patch50
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Sync_ReadingUnit_with_Redfish_Sensor_Schema.patch227
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch671
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend19
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch120
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend1
-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/0009-Add-dbus-interface-for-sol-commands.patch317
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb2
-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/libpldm-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/mctp-wrapper.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb2
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch38
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb (renamed from meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb)4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch45
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/dlopen-test.patch29
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/run-ptest36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb57
-rw-r--r--meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control/0001-Extend-VR-Watchdog-timeout.patch34
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-wht/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-wht/conf/local.conf.sample6
-rw-r--r--meta-openbmc-mods/meta-wolfpass/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample1
115 files changed, 3790 insertions, 2299 deletions
diff --git a/meta-openbmc-mods/conf/layer.conf b/meta-openbmc-mods/conf/layer.conf
index fc30a04ef..62442c850 100644
--- a/meta-openbmc-mods/conf/layer.conf
+++ b/meta-openbmc-mods/conf/layer.conf
@@ -8,7 +8,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "intel-openbmc"
BBFILE_PATTERN_intel-openbmc = "^${LAYERDIR}/"
BBFILE_PRIORITY_intel-openbmc = "5"
-LAYERSERIES_COMPAT_intel-openbmc = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_intel-openbmc = "gatesgarth hardknott"
IMAGE_FEATURES[validitems] += "tools-sdk tools-debug validation-unsecure"
diff --git a/meta-openbmc-mods/meta-ast2500/conf/layer.conf b/meta-openbmc-mods/meta-ast2500/conf/layer.conf
index 8575749fd..1d1a92521 100644
--- a/meta-openbmc-mods/meta-ast2500/conf/layer.conf
+++ b/meta-openbmc-mods/meta-ast2500/conf/layer.conf
@@ -9,7 +9,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "ast2500"
BBFILE_PATTERN_ast2500 = "^${LAYERDIR}/"
BBFILE_PRIORITY_ast2500 = "10"
-LAYERSERIES_COMPAT_ast2500 = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_ast2500 = "gatesgarth hardknott"
INHERIT += "extrausers"
#INHERIT += " cve-check"
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
index 6932aebf0..76606db0a 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
@@ -1,4 +1,4 @@
-From 008edb2487358bb3f0f0ec1d753cc5bff7b08182 Mon Sep 17 00:00:00 2001
+From 3ed477feebb959749bd20a22e3acd8b39e22c193 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Thu, 20 Jun 2019 18:11:43 +0530
Subject: [PATCH] Manufacturing mode physical presence detection
@@ -22,15 +22,15 @@ and no physical indication has been provided
Change-Id: Id7e7c7e7860c7ef3ae8e3a7a7cfda7ff506c0f2b
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
-
-
---
board/aspeed/ast-g5/ast-g5-gpio.h | 2 +-
- board/aspeed/ast-g5/ast-g5-intel.c | 35 ++++++++++++++++++++++++++++++
- 2 files changed, 36 insertions(+), 1 deletion(-)
+ board/aspeed/ast-g5/ast-g5-intel.c | 42 ++++++++++++++++++++++++++++++
+ board/aspeed/ast-g5/ast-g5.c | 2 --
+ common/autoboot.c | 16 ++++++++++--
+ 4 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/board/aspeed/ast-g5/ast-g5-gpio.h b/board/aspeed/ast-g5/ast-g5-gpio.h
-index 54b7388a22..8ccf437346 100644
+index 54b7388a22f5..8ccf4373460b 100644
--- a/board/aspeed/ast-g5/ast-g5-gpio.h
+++ b/board/aspeed/ast-g5/ast-g5-gpio.h
@@ -73,7 +73,7 @@
@@ -43,7 +43,7 @@ index 54b7388a22..8ccf437346 100644
// GPIO Configuration Register bits
#define GPCFG_EVENT_TO_SMI (1 << 7) // 1 == enabled
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
-index 45ecd83fd3..efc3315caf 100644
+index 45ecd83fd3f0..79de13caa0af 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
@@ -24,6 +24,7 @@ enum gpio_names {
@@ -65,7 +65,16 @@ index 45ecd83fd3..efc3315caf 100644
};
#define LPC_SNOOP_ADDR 0x80
-@@ -403,6 +408,30 @@ static void update_bootargs_cmd(const char *key, const char *value)
+@@ -109,6 +114,8 @@ static const GPIOValue gpio_table[] = {
+ #define HOST_SERIAL_A_HIGH_SPEED (1 << 0)
+ #define HOST_SERIAL_B_HIGH_SPEED (1 << 1)
+
++#define POWERON_RESET_BIT BIT(0)
++
+ static void sgpio_init(void)
+ {
+ uint32_t value;
+@@ -403,6 +410,30 @@ static void update_bootargs_cmd(const char *key, const char *value)
free(buf);
}
@@ -96,16 +105,76 @@ index 45ecd83fd3..efc3315caf 100644
void ast_g5_intel_late_init(void)
{
char value[32];
-@@ -450,6 +479,12 @@ void ast_g5_intel_late_init(void)
+@@ -450,6 +481,17 @@ void ast_g5_intel_late_init(void)
ast_scu_write(0, AST_SCU_SYS_CTRL);
update_bootargs_cmd("resetreason", value);
+
+ /* Update the special mode in bootargs */
-+ if (is_mfg_mode_phy_req())
++ if (reset_reason & POWERON_RESET_BIT && is_mfg_mode_phy_req())
+ update_bootargs_cmd("special", "mfg");
+ else
+ update_bootargs_cmd("special", NULL);
++}
++
++void board_pre_abort_autoboot(void)
++{
++ ast_enable_pass_through();
}
static void pwm_init(void)
+diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c
+index d89a2b799a05..a4f3681c0602 100644
+--- a/board/aspeed/ast-g5/ast-g5.c
++++ b/board/aspeed/ast-g5/ast-g5.c
+@@ -28,8 +28,6 @@ int board_early_init_f(void)
+ {
+ /* make sure uart5 is using 24MHz clock */
+ ast_config_uart5_clk();
+- /*enable pass through*/
+- ast_enable_pass_through();
+ arch_interrupt_init_early();
+
+ return 0;
+diff --git a/common/autoboot.c b/common/autoboot.c
+index d66c0fa63a3e..570d8956988c 100644
+--- a/common/autoboot.c
++++ b/common/autoboot.c
+@@ -256,13 +256,21 @@ static int __abortboot(int bootdelay)
+ }
+ # endif /* CONFIG_AUTOBOOT_KEYED */
+
++/* Allow for board specific config when we check abort condition */
++__weak void board_pre_abort_autoboot(void)
++{
++ /* please define board specific board_pre_abort_autoboot() */
++}
++
+ static int abortboot(int bootdelay)
+ {
+ int abort = 0;
+
+ # ifdef AST_G5_INTEL
+- if (intel_force_firmware_jumper_enabled())
+- return 1;
++ if (intel_force_firmware_jumper_enabled()) {
++ abort = 1;
++ goto exit;
++ }
+ # endif
+
+ if (bootdelay >= 0)
+@@ -273,6 +281,10 @@ static int abortboot(int bootdelay)
+ gd->flags &= ~GD_FLG_SILENT;
+ #endif
+
++exit:
++ if (abort)
++ board_pre_abort_autoboot();
++
+ return abort;
+ }
+
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch
index e3864db6e..fe95ef466 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch
@@ -1,4 +1,4 @@
-From f387e9be00ccaa49d77c82d4340dff6f84bb4bb3 Mon Sep 17 00:00:00 2001
+From 777d3db853a7a9e6ec6e19d97ed12db689faa051 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Mon, 13 May 2019 23:49:02 +0530
Subject: [PATCH] Enabling uart1&uart2 in u-boot for BIOS messages
@@ -13,17 +13,16 @@ to uefi, checked bios serial logs working fine and accessed
keyboard in uefi without any issues.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
-
---
board/aspeed/ast-g5/ast-g5-intel.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
-index efc3315caf..a8b65658b3 100644
+index 4eaed429e327..4190fb05acbe 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
-@@ -487,6 +487,26 @@ void ast_g5_intel_late_init(void)
- update_bootargs_cmd("special", NULL);
+@@ -492,6 +492,26 @@ void board_pre_abort_autoboot(void)
+ ast_enable_pass_through();
}
+static void uart_init(void)
@@ -49,7 +48,7 @@ index efc3315caf..a8b65658b3 100644
static void pwm_init(void)
{
uint32_t val;
-@@ -538,6 +558,7 @@ extern void espi_init(void);
+@@ -543,6 +563,7 @@ extern void espi_init(void);
extern void kcs_init(void);
void ast_g5_intel(void)
{
@@ -57,3 +56,6 @@ index efc3315caf..a8b65658b3 100644
pwm_init();
gpio_init(gpio_table, ARRAY_SIZE(gpio_table));
espi_init();
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch
index 8a00ccc3d..3e7727c32 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch
@@ -1,4 +1,4 @@
-From a4ba855a0dfac7af9720e94d82720d1fd916cb4b Mon Sep 17 00:00:00 2001
+From 655a30e879704b72e1934bdc8e47d93166978c38 Mon Sep 17 00:00:00 2001
From: James Feist <james.feist@linux.intel.com>
Date: Wed, 31 Jul 2019 16:01:49 -0700
Subject: [PATCH] Reboot into UBOOT on Watchdog Failures
@@ -11,15 +11,14 @@ Tested: watchdog -T 0 -F /dev/watchdog1 reboots into
uboot after 3 times
Signed-off-by: James Feist <james.feist@linux.intel.com>
-
---
.../include/asm/arch-aspeed/ast-g5-intel.h | 1 +
- board/aspeed/ast-g5/ast-g5-intel.c | 31 +++++++++++++++++++
- common/autoboot.c | 2 ++
- 3 files changed, 34 insertions(+)
+ board/aspeed/ast-g5/ast-g5-intel.c | 29 +++++++++++++++++++
+ common/autoboot.c | 5 ++++
+ 3 files changed, 35 insertions(+)
diff --git a/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h b/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h
-index a88521a1b3..64f4ed17bf 100644
+index a88521a1b3c7..64f4ed17bfd5 100644
--- a/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h
+++ b/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h
@@ -14,6 +14,7 @@
@@ -31,14 +30,15 @@ index a88521a1b3..64f4ed17bf 100644
#endif
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
-index a8b65658b3..12216922ac 100644
+index d05de5c4a274..9b546cffee77 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
-@@ -114,6 +114,24 @@ static const GPIOValue gpio_table[] = {
+@@ -114,7 +114,23 @@ static const GPIOValue gpio_table[] = {
#define HOST_SERIAL_A_HIGH_SPEED (1 << 0)
#define HOST_SERIAL_B_HIGH_SPEED (1 << 1)
-+#define WATCHDOG_RESET_BIT 0x8
++#define WATCHDOG_RESET_BIT BIT(3)
+ #define POWERON_RESET_BIT BIT(0)
+#define BOOT_FAILURE_LIMIT 0x3
+
+static int get_boot_failures(void)
@@ -54,12 +54,10 @@ index a8b65658b3..12216922ac 100644
+ setenv_ulong("bootfailures", count);
+ saveenv();
+}
-+
-+
+
static void sgpio_init(void)
{
- uint32_t value;
-@@ -275,6 +293,11 @@ int intel_force_firmware_jumper_enabled(void)
+@@ -277,6 +293,11 @@ int intel_force_firmware_jumper_enabled(void)
return gpio_get_value(GPIO_FF_UPD_JUMPER);
}
@@ -71,7 +69,7 @@ index a8b65658b3..12216922ac 100644
void arch_preboot_os(void)
{
// last second before booting... set the LEDs
-@@ -436,6 +459,7 @@ void ast_g5_intel_late_init(void)
+@@ -438,6 +459,7 @@ void ast_g5_intel_late_init(void)
{
char value[32];
u32 reset_reason = 0;
@@ -79,7 +77,7 @@ index a8b65658b3..12216922ac 100644
/* By default host serail A and B use normal speed */
uint32_t host_serial_cfg = 0;
-@@ -480,6 +504,13 @@ void ast_g5_intel_late_init(void)
+@@ -482,6 +504,13 @@ void ast_g5_intel_late_init(void)
update_bootargs_cmd("resetreason", value);
@@ -91,18 +89,24 @@ index a8b65658b3..12216922ac 100644
+ set_boot_failures(0);
+
/* Update the special mode in bootargs */
- if (is_mfg_mode_phy_req())
+ if (reset_reason & POWERON_RESET_BIT && is_mfg_mode_phy_req())
update_bootargs_cmd("special", "mfg");
diff --git a/common/autoboot.c b/common/autoboot.c
-index 3647d5fb21..0e7f7b0965 100644
+index 393738ce0f4c..35dad222ff7c 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
-@@ -263,6 +263,8 @@ static int abortboot(int bootdelay)
- # ifdef AST_G5_INTEL
- if (intel_force_firmware_jumper_enabled())
- return 1;
-+ if (intel_failed_boot())
-+ return 1;
+@@ -271,6 +271,11 @@ static int abortboot(int bootdelay)
+ abort = 1;
+ goto exit;
+ }
++
++ if (intel_failed_boot()) {
++ abort = 1;
++ goto exit;
++ }
# endif
if (bootdelay >= 0)
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch
index 96172cbac..456763398 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch
@@ -75,7 +75,7 @@ index e05a6da468..4b017269f9 100644
#define LPC_SNOOP_ADDR 0x80
@@ -117,6 +138,8 @@ static const GPIOValue gpio_table[] = {
- #define WATCHDOG_RESET_BIT 0x8
+ #define POWERON_RESET_BIT BIT(0)
#define BOOT_FAILURE_LIMIT 0x3
+#define COOPER_CITY_BOARD_ID 40
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch
index bbab94421..ad99773d1 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch
@@ -1,4 +1,4 @@
-From 0bae11a932e57c968394dd533bbd853ee2e9493f Mon Sep 17 00:00:00 2001
+From 94cecaf3d944ee0b2a24b5628131db92de7cbaf3 Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
Date: Wed, 18 Mar 2020 21:47:11 +0530
Subject: [PATCH] PFR- Skip counting WDT2 event when EXTRST# is set
@@ -14,23 +14,22 @@ Tested: Verified BMC updates 4 times and checked that
the boot is not aborted at u-boot.
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
-
---
board/aspeed/ast-g5/ast-g5-intel.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
-index 2d260a7759..1d426db659 100644
+index 511bf32f94ac..66423d9b55a8 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
@@ -137,6 +137,7 @@ static const GPIOValue gpio_table[] = {
#define HOST_SERIAL_B_HIGH_SPEED (1 << 1)
- #define WATCHDOG_RESET_BIT 0x8
-+#define EXTRST_RESET_BIT 0x2
+ #define WATCHDOG_RESET_BIT BIT(3)
++#define EXTRST_RESET_BIT BIT(1)
+ #define POWERON_RESET_BIT BIT(0)
#define BOOT_FAILURE_LIMIT 0x3
- #define COOPER_CITY_BOARD_ID 40
@@ -551,7 +552,8 @@ void ast_g5_intel_late_init(void)
boot_failures = get_boot_failures();
@@ -41,3 +40,6 @@ index 2d260a7759..1d426db659 100644
set_boot_failures(boot_failures + 1);
else
set_boot_failures(0);
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch
new file mode 100644
index 000000000..5a83ee467
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch
@@ -0,0 +1,43 @@
+From 03487b1de06f1caa4e0bb0597da21f0690125bac Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Mon, 26 Apr 2021 13:32:29 -0700
+Subject: [PATCH] Set UART routing in lowlevel_init
+
+This commit sets the UART routing back to default in lowlevel_init
+to prevent any data dropping from the physical host serial until
+SOL service is activated.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/mach-aspeed/platform_g5.S | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S
+index 2c8bf03b0eff..7c4722688f90 100644
+--- a/arch/arm/mach-aspeed/platform_g5.S
++++ b/arch/arm/mach-aspeed/platform_g5.S
+@@ -111,6 +111,9 @@
+ #include <config.h>
+ #include <version.h>
+
++#define AST_LPC_BASE 0x1E789000
++#define AST_LPC_HICRA (AST_LPC_BASE + 0x09C)
++
+ /******************************************************************************
+ r4 : return program counter
+ r5 : DDR speed timing table base address
+@@ -2445,6 +2448,11 @@ spi_cbr_end:
+ orr r1, r1, r2
+ str r1, [r0]
+
++ /* set UART routing back to default */
++ ldr r0, =AST_LPC_HICRA
++ ldr r1, =0x0
++ str r1, [r0]
++
+ ldr r0, =0x1e6e2008 @ Set Video ECLK phase
+ ldr r1, [r0]
+ ldr r2, =0x0ffffff3
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
index a3bce3262..5b36974bb 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
+++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
@@ -48,6 +48,7 @@ SRC_URI_append_intel-ast2500 = " \
file://0047-ast2500-parse-reset-reason.patch \
file://0048-Add-WDT-to-u-boot-to-cover-booting-failures.patch \
file://0049-Fix-issue-on-host-console-is-broken-due-to-BMC-reset.patch \
+ file://0050-Set-UART-routing-in-lowlevel_init.patch \
"
# CVE-2020-10648 vulnerability fix
SRC_URI_append_intel-ast2500 = " \
diff --git a/meta-openbmc-mods/meta-ast2600/conf/layer.conf b/meta-openbmc-mods/meta-ast2600/conf/layer.conf
index de7653037..e60de28cc 100644
--- a/meta-openbmc-mods/meta-ast2600/conf/layer.conf
+++ b/meta-openbmc-mods/meta-ast2600/conf/layer.conf
@@ -9,7 +9,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "ast2600"
BBFILE_PATTERN_ast2600 = "^${LAYERDIR}/"
BBFILE_PRIORITY_ast2600 = "10"
-LAYERSERIES_COMPAT_ast2600 = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_ast2600 = "gatesgarth hardknott"
INHERIT += "extrausers"
#INHERIT += " cve-check"
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
index 1fbb464b8..dfb11d89a 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
@@ -1,4 +1,4 @@
-From 2cec5042f3b33c6762073deb9275a66875538d82 Mon Sep 17 00:00:00 2001
+From ada80beb48d974f101201745657d10e72fe30b9c Mon Sep 17 00:00:00 2001
From: Vernon Mauery <vernon.mauery@intel.com>
Date: Thu, 24 Oct 2019 14:06:33 -0700
Subject: [PATCH] Add ast2600-intel as a new board
@@ -8,20 +8,21 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
arch/arm/dts/Makefile | 3 +-
- arch/arm/dts/ast2600-intel.dts | 197 ++++++++++++++++
+ arch/arm/dts/ast2600-intel.dts | 197 ++++++++++++
arch/arm/lib/interrupts.c | 5 +
arch/arm/mach-aspeed/ast2600/Kconfig | 8 +
- board/aspeed/ast2600_intel/Kconfig | 13 ++
+ board/aspeed/ast2600_intel/Kconfig | 13 +
board/aspeed/ast2600_intel/Makefile | 4 +
- board/aspeed/ast2600_intel/ast-espi.c | 292 ++++++++++++++++++++++++
- board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++++++++++
+ board/aspeed/ast2600_intel/ast-espi.c | 292 ++++++++++++++++++
+ board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++
board/aspeed/ast2600_intel/ast-irq.h | 8 +
- board/aspeed/ast2600_intel/ast-timer.c | 59 +++++
- board/aspeed/ast2600_intel/intel.c | 192 ++++++++++++++++
+ board/aspeed/ast2600_intel/ast-timer.c | 59 ++++
+ board/aspeed/ast2600_intel/intel.c | 192 ++++++++++++
cmd/Kconfig | 2 +-
common/autoboot.c | 10 +
configs/ast2600_openbmc_defconfig | 2 +-
14 files changed, 1191 insertions(+), 3 deletions(-)
+ mode change 100755 => 100644 arch/arm/dts/Makefile
create mode 100644 arch/arm/dts/ast2600-intel.dts
create mode 100644 board/aspeed/ast2600_intel/Kconfig
create mode 100644 board/aspeed/ast2600_intel/Makefile
@@ -30,12 +31,15 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
create mode 100644 board/aspeed/ast2600_intel/ast-irq.h
create mode 100644 board/aspeed/ast2600_intel/ast-timer.c
create mode 100644 board/aspeed/ast2600_intel/intel.c
+ mode change 100755 => 100644 configs/ast2600_openbmc_defconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
-index e4dae2937968..da8903123999 100644
+old mode 100755
+new mode 100644
+index e9d994737949..d2ad5968775e
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -683,7 +683,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
+@@ -684,7 +684,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
ast2600-fpga.dtb \
ast2600-rainier.dtb \
ast2600-slt.dtb \
@@ -284,7 +288,7 @@ index ee775ce5d264..8c985532afb4 100644
{
efi_restore_gd();
diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
-index dd991e87c795..7ccbb0b5e0ea 100644
+index 518f41b558d3..8023397cff58 100644
--- a/arch/arm/mach-aspeed/ast2600/Kconfig
+++ b/arch/arm/mach-aspeed/ast2600/Kconfig
@@ -51,6 +51,13 @@ config TARGET_SLT_AST2600
@@ -300,8 +304,8 @@ index dd991e87c795..7ccbb0b5e0ea 100644
+
endchoice
- source "board/aspeed/evb_ast2600a0/Kconfig"
-@@ -59,5 +66,6 @@ source "board/aspeed/ncsi_ast2600a0/Kconfig"
+ config ASPEED_SECBOOT_BL2
+@@ -71,5 +78,6 @@ source "board/aspeed/ncsi_ast2600a0/Kconfig"
source "board/aspeed/ncsi_ast2600a1/Kconfig"
source "board/aspeed/fpga_ast2600/Kconfig"
source "board/aspeed/slt_ast2600/Kconfig"
@@ -1318,10 +1322,10 @@ index 000000000000..4a40a050c3da
+}
+#endif
diff --git a/cmd/Kconfig b/cmd/Kconfig
-index d5aa204290bd..89f6668b788e 100644
+index 1d2aa3a179a7..7599dd052df2 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
-@@ -1876,7 +1876,7 @@ config CMD_DIAG
+@@ -1888,7 +1888,7 @@ config CMD_DIAG
config CMD_IRQ
bool "irq - Show information about interrupts"
@@ -1356,7 +1360,9 @@ index 94133eaeda78..5e69000b848b 100644
abort = __abortboot(bootdelay);
diff --git a/configs/ast2600_openbmc_defconfig b/configs/ast2600_openbmc_defconfig
-index 2e2df2e3a235..77c39d848312 100644
+old mode 100755
+new mode 100644
+index 2e2df2e3a235..77c39d848312
--- a/configs/ast2600_openbmc_defconfig
+++ b/configs/ast2600_openbmc_defconfig
@@ -13,7 +13,7 @@ CONFIG_FIT=y
@@ -1369,5 +1375,5 @@ index 2e2df2e3a235..77c39d848312 100644
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_ARCH_EARLY_INIT_R=y
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-LED-control-support.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-LED-control-support.patch
new file mode 100644
index 000000000..bc2007288
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-LED-control-support.patch
@@ -0,0 +1,457 @@
+From d7befc37ba40a248899b5dc8e99bef2746a957d2 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Fri, 2 Apr 2021 09:48:38 -0700
+Subject: [PATCH] Add LED control support
+
+This commit adds LED control support including customization and improvement
+on led-gpio and led-uclass driver to support 'blink' mode. LEDs will behave
+like below.
+
+Normal u-boot : Green LED blinks at 1Hz + ID LED blinks at 3Hz
+FFU u-boot : Amber LED solid on + ID LED solid on
+MFG detected : Green LED blinks at 3Hz + ID LED blinks at 3Hz
+Failure Recovery : Amber LED blinks at 3Hz + ID LED solid on
+Jumping to Kernel : Green LED solid on + ID LED solid on
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/dts/ast2600-intel.dts | 4 +-
+ board/aspeed/ast2600_intel/intel.c | 66 +++++++++++++++++++++++++++++-
+ cmd/net.c | 23 +++++++++--
+ drivers/led/led-uclass.c | 37 +++++++++++++++++
+ drivers/led/led_gpio.c | 62 ++++++++++++++++++++++++++++
+ include/led.h | 42 ++++++++++++++++++-
+ 6 files changed, 226 insertions(+), 8 deletions(-)
+
+diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts
+index 1f14753056ee..5243d1a0afc3 100644
+--- a/arch/arm/dts/ast2600-intel.dts
++++ b/arch/arm/dts/ast2600-intel.dts
+@@ -47,8 +47,8 @@
+ };
+ hb-led {
+ label = "hb";
+- gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+- linux,default-trigger = "heartbeat";
++ gpios = <&gpio0 173 GPIO_ACTIVE_LOW>;
++ default-state = "on";
+ };
+ };
+ };
+diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
+index 849e81ff3fef..fb9075f93945 100644
+--- a/board/aspeed/ast2600_intel/intel.c
++++ b/board/aspeed/ast2600_intel/intel.c
+@@ -5,6 +5,7 @@
+ #include <common.h>
+ #include <asm/gpio.h>
+ #include <asm/io.h>
++#include <led.h>
+ #include <malloc.h>
+
+ /* use GPIOC0 on intel boards */
+@@ -26,7 +27,27 @@ int read_ffuj(void)
+ return ret;
+ ret = dm_gpio_get_value(&desc);
+ dm_gpio_free(desc.dev, &desc);
+- return ret;
++
++ if (ret) {
++ struct udevice *dev;
++
++ /* FFU mode: ChassisID - Solid Blue, StatusLED - Solid Amber */
++ ret = led_get_by_label("green", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_OFF);
++
++ ret = led_get_by_label("amber", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_ON);
++
++ ret = led_get_by_label("id", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_ON);
++
++ return 1;
++ }
++
++ return 0;
+ }
+
+ /* gpio_abort is a weak symbol in common/autoboot.c */
+@@ -264,6 +285,11 @@ static void timer_callback(void *cookie)
+ dummy = readl(0x1e78e07c);
+ dummy = readl(0x1e78f07c);
+ break;
++#ifdef CONFIG_LED_BLINK
++ case 1:
++ led_blink_update();
++ break;
++#endif
+ }
+ }
+
+@@ -286,10 +312,20 @@ int board_early_init_f(void)
+
+ int board_early_init_r(void)
+ {
++ struct udevice *dev;
++ int ret;
++
+ debug("board_early_init_r\n");
+
+ enable_onboard_tpm();
+
++ led_default_state();
++#ifdef CONFIG_LED_BLINK
++ ret = led_get_by_label("id", &dev);
++ if (!ret)
++ led_set_period(dev, 160);
++#endif
++
+ return 0;
+ }
+
+@@ -366,6 +402,11 @@ int board_late_init(void)
+ if (readl(SCU_BASE | SCU_014) == REV_ID_AST2600A0)
+ timer_enable(0, ONE_MSEC_IN_USEC, timer_callback, (void *)0);
+
++#ifdef CONFIG_LED_BLINK
++ timer_enable(1, LED_BLINK_UPDATE_TICK_MS * ONE_MSEC_IN_USEC,
++ timer_callback, (void *)1);
++#endif
++
+ espi_init();
+
+ /* Add reset reason to bootargs */
+@@ -391,6 +432,29 @@ void board_init(void)
+ }
+ */
+
++void board_preboot_os(void)
++{
++ struct udevice *dev;
++ int ret;
++
++ /*
++ * last second before OS booting
++ * ChassisID - Solid Blue, StatusLED - Solid Green
++ */
++
++ ret = led_get_by_label("green", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_ON);
++
++ ret = led_get_by_label("amber", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_OFF);
++
++ ret = led_get_by_label("id", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_ON);
++}
++
+ #ifdef CONFIG_WATCHDOG
+ /* watchdog stuff */
+ void watchdog_init(void)
+diff --git a/cmd/net.c b/cmd/net.c
+index 7d2c21ba4d22..a6b03654cdbf 100644
+--- a/cmd/net.c
++++ b/cmd/net.c
+@@ -10,6 +10,7 @@
+ #include <common.h>
+ #include <command.h>
+ #include <net.h>
++#include <led.h>
+
+ static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []);
+
+@@ -183,6 +184,10 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
+ int size;
+ ulong addr;
+
++#ifdef CONFIG_LED_BLINK
++ led_blink_disable();
++#endif
++
+ net_boot_file_name_explicit = false;
+
+ /* pre-set load_addr */
+@@ -229,7 +234,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
+ if (strict_strtoul(argv[1], 16, &save_addr) < 0 ||
+ strict_strtoul(argv[2], 16, &save_size) < 0) {
+ printf("Invalid address/size\n");
+- return CMD_RET_USAGE;
++ rcode = CMD_RET_USAGE;
++ goto exit;
+ }
+ net_boot_file_name_explicit = true;
+ copy_filename(net_boot_file_name, argv[3],
+@@ -238,14 +244,16 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
+ #endif
+ default:
+ bootstage_error(BOOTSTAGE_ID_NET_START);
+- return CMD_RET_USAGE;
++ rcode = CMD_RET_USAGE;
++ goto exit;
+ }
+ bootstage_mark(BOOTSTAGE_ID_NET_START);
+
+ size = net_loop(proto);
+ if (size < 0) {
+ bootstage_error(BOOTSTAGE_ID_NET_NETLOOP_OK);
+- return CMD_RET_FAILURE;
++ rcode = CMD_RET_FAILURE;
++ goto exit;
+ }
+ bootstage_mark(BOOTSTAGE_ID_NET_NETLOOP_OK);
+
+@@ -255,7 +263,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
+ /* done if no file was loaded (no errors though) */
+ if (size == 0) {
+ bootstage_error(BOOTSTAGE_ID_NET_LOADED);
+- return CMD_RET_SUCCESS;
++ rcode = CMD_RET_SUCCESS;
++ goto exit;
+ }
+
+ bootstage_mark(BOOTSTAGE_ID_NET_LOADED);
+@@ -266,6 +275,12 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
+ bootstage_mark(BOOTSTAGE_ID_NET_DONE);
+ else
+ bootstage_error(BOOTSTAGE_ID_NET_DONE_ERR);
++
++exit:
++#ifdef CONFIG_LED_BLINK
++ led_blink_enable();
++#endif
++
+ return rcode;
+ }
+
+diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c
+index 2859475a6b8e..264e0735c815 100644
+--- a/drivers/led/led-uclass.c
++++ b/drivers/led/led-uclass.c
+@@ -62,6 +62,39 @@ int led_set_period(struct udevice *dev, int period_ms)
+
+ return ops->set_period(dev, period_ms);
+ }
++
++static bool blink_enable = true;
++
++void led_blink_enable(void)
++{
++ blink_enable = true;
++}
++
++void led_blink_disable(void)
++{
++ blink_enable = false;
++}
++
++int led_blink_update(void)
++{
++ struct udevice *dev;
++
++ if (!blink_enable)
++ return 0;
++
++ for (uclass_find_first_device(UCLASS_LED, &dev);
++ dev;
++ uclass_find_next_device(&dev)) {
++ if (device_active(dev) && led_get_state(dev) == LEDST_BLINK) {
++ struct led_ops *ops = led_get_ops(dev);
++
++ if (ops && ops->update_blink)
++ ops->update_blink(dev);
++ }
++ }
++
++ return 0;
++}
+ #endif
+
+ int led_default_state(void)
+@@ -87,6 +120,10 @@ int led_default_state(void)
+ led_set_state(dev, LEDST_ON);
+ else if (!strncmp(default_state, "off", 3))
+ led_set_state(dev, LEDST_OFF);
++#ifdef CONFIG_LED_BLINK
++ else if (!strncmp(default_state, "blink", 5))
++ led_set_state(dev, LEDST_BLINK);
++#endif
+ /* default-state = "keep" : device is only probed */
+ }
+
+diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
+index 93f6b913c647..a88efde71a69 100644
+--- a/drivers/led/led_gpio.c
++++ b/drivers/led/led_gpio.c
+@@ -13,8 +13,45 @@
+
+ struct led_gpio_priv {
+ struct gpio_desc gpio;
++#ifdef CONFIG_LED_BLINK
++ int period;
++ int period_tick_count;
++ enum led_state_t state;
++#endif
+ };
+
++#ifdef CONFIG_LED_BLINK
++static int gpio_led_set_period(struct udevice *dev, int period_ms)
++{
++ struct led_gpio_priv *priv = dev_get_priv(dev);
++
++ if (period_ms < LED_BLINK_UPDATE_TICK_MS)
++ period_ms = LED_BLINK_PERIOD_DEFAULT_MS;
++
++ priv->period = period_ms / LED_BLINK_UPDATE_TICK_MS;
++ priv->period_tick_count = priv->period;
++
++ return 0;
++}
++
++static int gpio_led_update_blink(struct udevice *dev)
++{
++ struct led_gpio_priv *priv = dev_get_priv(dev);
++ int ret;
++
++ if (priv->period_tick_count) {
++ priv->period_tick_count--;
++ } else {
++ ret = dm_gpio_get_value(&priv->gpio);
++ if (ret >= 0)
++ dm_gpio_set_value(&priv->gpio, !ret);
++ priv->period_tick_count = priv->period;
++ }
++
++ return 0;
++}
++#endif
++
+ static int gpio_led_set_state(struct udevice *dev, enum led_state_t state)
+ {
+ struct led_gpio_priv *priv = dev_get_priv(dev);
+@@ -25,6 +62,9 @@ static int gpio_led_set_state(struct udevice *dev, enum led_state_t state)
+ switch (state) {
+ case LEDST_OFF:
+ case LEDST_ON:
++#ifdef CONFIG_LED_BLINK
++ case LEDST_BLINK:
++#endif
+ break;
+ case LEDST_TOGGLE:
+ ret = dm_gpio_get_value(&priv->gpio);
+@@ -36,6 +76,20 @@ static int gpio_led_set_state(struct udevice *dev, enum led_state_t state)
+ return -ENOSYS;
+ }
+
++#ifdef CONFIG_LED_BLINK
++ priv->state = state;
++
++ if (priv->state == LEDST_BLINK) {
++ if (priv->period < LED_BLINK_UPDATE_TICK_MS) {
++ priv->period = LED_BLINK_PERIOD_DEFAULT_MS /
++ LED_BLINK_UPDATE_TICK_MS;
++ priv->period_tick_count = priv->period;
++ }
++
++ return dm_gpio_set_value(&priv->gpio, LEDST_ON);
++ }
++#endif
++
+ return dm_gpio_set_value(&priv->gpio, state);
+ }
+
+@@ -46,6 +100,10 @@ static enum led_state_t gpio_led_get_state(struct udevice *dev)
+
+ if (!dm_gpio_is_valid(&priv->gpio))
+ return -EREMOTEIO;
++#ifdef CONFIG_LED_BLINK
++ if (priv->state == LEDST_BLINK)
++ return LEDST_BLINK;
++#endif
+ ret = dm_gpio_get_value(&priv->gpio);
+ if (ret < 0)
+ return ret;
+@@ -117,6 +175,10 @@ static int led_gpio_bind(struct udevice *parent)
+ static const struct led_ops gpio_led_ops = {
+ .set_state = gpio_led_set_state,
+ .get_state = gpio_led_get_state,
++#ifdef CONFIG_LED_BLINK
++ .set_period = gpio_led_set_period,
++ .update_blink = gpio_led_update_blink,
++#endif
+ };
+
+ static const struct udevice_id led_gpio_ids[] = {
+diff --git a/include/led.h b/include/led.h
+index 7bfdddfd6fab..fb072c8b9f1a 100644
+--- a/include/led.h
++++ b/include/led.h
+@@ -32,7 +32,6 @@ enum led_state_t {
+ #ifdef CONFIG_LED_BLINK
+ LEDST_BLINK,
+ #endif
+-
+ LEDST_COUNT,
+ };
+
+@@ -66,6 +65,17 @@ struct led_ops {
+ * @return 0 if OK, -ve on error
+ */
+ int (*set_period)(struct udevice *dev, int period_ms);
++
++ /**
++ * update_blink() - update blink output of an LED
++ *
++ * This should be called in every tick for updating blink behavior of an
++ * LED.
++ *
++ * @dev: LED device to change
++ * @return 0 if OK, -ve on error
++ */
++ int (*update_blink)(struct udevice *dev);
+ #endif
+ };
+
+@@ -115,4 +125,34 @@ int led_set_period(struct udevice *dev, int period_ms);
+ */
+ int led_default_state(void);
+
++#ifdef CONFIG_LED_BLINK
++#define LED_BLINK_UPDATE_TICK_MS 10
++#define LED_BLINK_PERIOD_DEFAULT_MS 500
++
++/**
++ * led_blink_enable() - enable blinking for all LEDs that have the blink state
++ *
++ * This enables blinking for all LEDs that have the blink state.
++ *
++ */
++void led_blink_enable(void);
++
++/**
++ * led_blink_disable() - disable blinking for all LEDs that have the blink state
++ *
++ * This disables blinking for all LEDs that have the blink state.
++ *
++ */
++void led_blink_disable(void);
++
++/**
++ * led_blink_update() - timer tick callback for updating blink behavior
++ *
++ * This should be called on every LED_BLINK_UPDATE_TICK_MS for updating blink
++ * behavior of all LEDs that have the blink state.
++ *
++ */
++int led_blink_update(void);
++#endif
++
+ #endif
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch
index 0b0fb466d..c0d409592 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch
@@ -1,4 +1,4 @@
-From 8bfaae756740589ec9644a5ddcd8b19d7d7b9b73 Mon Sep 17 00:00:00 2001
+From 5d3f9d42ba9b1f634a65ae52f6263b1c4a95b947 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Thu, 20 Jun 2019 18:11:43 +0530
Subject: [PATCH] Manufacturing mode physical presence detection
@@ -6,11 +6,9 @@ Subject: [PATCH] Manufacturing mode physical presence detection
Support for physical presence of manufacturing mode added.
Front panel power button press for 15 seconds will be detected
and marked as special mode for manufacturing request.
-//TODO:
-//There will be 10 second Status LED blink for 10 seconds to
-//do the physical indication to the user. This indicates the
-//user that he has pressed power button long enough for
-//manufacturing mode detection.
+There will be Status LED blink for 10 seconds to do the physical
+indication to the user. This indicates the user that he has
+pressed power button long enough for manufacturing mode detection.
Tested:
1. Verified by holding the power button when u-boot boots for
@@ -24,14 +22,24 @@ Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.co
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- board/aspeed/ast2600_intel/intel.c | 49 ++++++++++++++++++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
+ board/aspeed/ast2600_intel/intel.c | 74 ++++++++++++++++++++++++++++--
+ common/autoboot.c | 12 ++++-
+ 2 files changed, 82 insertions(+), 4 deletions(-)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 95e5492009d7..367657df56d1 100644
+index fb9075f93945..a644010dd339 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -39,6 +39,26 @@ int gpio_abort(void)
+@@ -8,6 +8,8 @@
+ #include <led.h>
+ #include <malloc.h>
+
++#define SYS_PWR_RESET_FLAG BIT(0) /* from scu_info.c */
++
+ /* use GPIOC0 on intel boards */
+ #define FFUJ_GPIO "gpio@1e78000016"
+
+@@ -60,6 +62,26 @@ int gpio_abort(void)
return value <= 0 ? 0 : 1;
}
@@ -58,7 +66,28 @@ index 95e5492009d7..367657df56d1 100644
#define SCU_BASE 0x1E6E2000
#define SCU_338 0x338 //Generate UART 24 MHz Reference from UXCLK
#define SCU_33C 0x33c //Generate UART 24 MHz Reference from HUXCLK
-@@ -334,6 +354,31 @@ static void update_bootargs_cmd(const char *key, const char *value)
+@@ -119,6 +141,11 @@ static void gpio_passthru_init(void)
+ SCU_BASE | SCU_418);
+ }
+
++void board_pre_abort_autoboot(void)
++{
++ gpio_passthru_init();
++}
++
+ #define AST_LPC_BASE 0x1e789000
+ #define LPC_SNOOP_ADDR 0x80
+ #define HICR5 0x080 /* Host Interface Control Register 5 */
+@@ -300,8 +327,6 @@ int board_early_init_f(void)
+
+ set_gpio_default_state();
+
+- gpio_passthru_init();
+-
+ port80h_snoop_init();
+
+ sgpio_init();
+@@ -388,6 +413,43 @@ static void update_bootargs_cmd(const char *key, const char *value)
free(buf);
}
@@ -72,15 +101,27 @@ index 95e5492009d7..367657df56d1 100644
+ const uint32_t delay_in_ms = 100;
+ const uint32_t read_count = ((15 * 1000) / delay_in_ms);
+ const uint32_t delay_for_indication = 10 * 1000;
++#ifdef CONFIG_LED_BLINK
++ struct udevice *dev;
++ int ret;
++#endif
++
+ for (uint32_t count = 0; count < read_count; ++count) {
+ if (read_frontpanel_power_button() != 1)
+ return false;
+
+ mdelay(delay_in_ms);
+ }
-+ debug("is_mfg_mode_phy_req : detected mfg mode request\n");
-+ // TODO: enable id led control
-+ //id_led_control(GPIO_GREEN_LED, EIDLED_Blink_3HZ);
++
++ printf("MFG mode is requested.\n");
++
++#ifdef CONFIG_LED_BLINK
++ ret = led_get_by_label("green", &dev);
++ if (!ret) {
++ led_set_period(dev, 160);
++ }
++#endif
++
+ /* Delay the boot to do physical indication for mfg mode */
+ mdelay(delay_for_indication);
+
@@ -90,17 +131,58 @@ index 95e5492009d7..367657df56d1 100644
extern void espi_init(void);
extern void kcs_init(void);
extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
-@@ -354,6 +399,10 @@ int board_late_init(void)
+@@ -413,8 +475,14 @@ int board_late_init(void)
snprintf(value, sizeof(value), "0x%x", gd->reset_reason);
update_bootargs_cmd("resetreason", value);
+- if (read_ffuj())
+ /* Update the special mode in bootargs */
-+ if (is_mfg_mode_phy_req())
++ if (gd->reset_reason & SYS_PWR_RESET_FLAG && is_mfg_mode_phy_req())
+ update_bootargs_cmd("special", "mfg");
+
- if (read_ffuj())
++ if (read_ffuj()) {
++ gpio_passthru_init();
kcs_init();
++ }
+
+ return 0;
+ }
+diff --git a/common/autoboot.c b/common/autoboot.c
+index 5e69000b848b..8a9978042386 100644
+--- a/common/autoboot.c
++++ b/common/autoboot.c
+@@ -261,13 +261,19 @@ int gpio_abort(void)
+ return 0;
+ }
+
++/* Allow for board specific config when we check abort condition */
++__weak void board_pre_abort_autoboot(void)
++{
++ /* please define board specific board_pre_abort_autoboot() */
++}
++
+ static int abortboot(int bootdelay)
+ {
+ int abort = 0;
+
+ abort = gpio_abort();
+ if (abort)
+- return abort;
++ goto exit;
+
+ if (bootdelay >= 0)
+ abort = __abortboot(bootdelay);
+@@ -277,6 +283,10 @@ static int abortboot(int bootdelay)
+ gd->flags &= ~GD_FLG_SILENT;
+ #endif
+
++exit:
++ if (abort)
++ board_pre_abort_autoboot();
++
+ return abort;
+ }
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0020-Add-BMC-running-indicator-LED-control.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0020-Add-BMC-running-indicator-LED-control.patch
deleted file mode 100644
index 768f3adaa..000000000
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0020-Add-BMC-running-indicator-LED-control.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From a5e31f9ef7622b001c55f96a98dd18b19976c90c Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Fri, 26 Jun 2020 14:35:47 -0700
-Subject: [PATCH] Add BMC running indicator LED control
-
-HBLED cannot be enabled due to a conflict with PWM15 pin and H/W
-team is not going to change board layout for supporting HBLED to
-keep compatibility between board revisions. Instead, we are going
-to use the LED connected to GPIO V5 as BMC running indicator LED.
-This commit adds the LED control.
-
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- board/aspeed/ast2600_intel/intel.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 1d650ff959f6..95a90474cbd3 100644
---- a/board/aspeed/ast2600_intel/intel.c
-+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -194,6 +194,8 @@ static void sgpio_init(void)
- #define GPIO_074 0x074 /* GPIO I/J/K/L Direction */
- #define GPIO_080 0x080 /* GPIO Q/R/S/T Value */
- #define GPIO_084 0x084 /* GPIO Q/R/S/T Direction */
-+#define GPIO_088 0x088 /* GPIO U/V/W/X Value */
-+#define GPIO_08C 0x08C /* GPIO U/V/W/X Direction */
-
- static void set_gpio_default_state(void)
- {
-@@ -270,6 +272,20 @@ void enable_onboard_tpm(void)
- AST_GPIO_BASE | GPIO_000);
- }
-
-+void bmc_running_indicator(bool on)
-+{
-+#define GPIO_V5 BIT(13)
-+
-+ writel(readl(AST_GPIO_BASE | GPIO_08C) | GPIO_V5,
-+ AST_GPIO_BASE | GPIO_08C);
-+ if (on)
-+ writel(readl(AST_GPIO_BASE | GPIO_088) & ~GPIO_V5,
-+ AST_GPIO_BASE | GPIO_088);
-+ else
-+ writel(readl(AST_GPIO_BASE | GPIO_088) | GPIO_V5,
-+ AST_GPIO_BASE | GPIO_088);
-+}
-+
- static void timer_callback(void *cookie)
- {
- uint timer_nr = (uint)cookie;
-@@ -310,6 +326,8 @@ int board_early_init_r(void)
-
- enable_onboard_tpm();
-
-+ bmc_running_indicator(true);
-+
- return 0;
- }
-
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch
index d5ccddf27..d1cb523e5 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch
@@ -1,4 +1,4 @@
-From b81b62f2ca4d4e434f2fec090725e99f198f64ef Mon Sep 17 00:00:00 2001
+From 56a1cafcf68c624ca9ea9de6c38080603e80ea0d Mon Sep 17 00:00:00 2001
From: James Feist <james.feist@linux.intel.com>
Date: Wed, 31 Jul 2019 16:01:49 -0700
Subject: [PATCH] Reboot into UBOOT on Watchdog Failures
@@ -13,17 +13,17 @@ uboot after 3 times
Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- board/aspeed/ast2600_intel/intel.c | 34 ++++++++++++++++++++++++++++++
- 1 file changed, 34 insertions(+)
+ board/aspeed/ast2600_intel/intel.c | 61 ++++++++++++++++++++++++++++++
+ 1 file changed, 61 insertions(+)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 565893777ffc..2fb84e880e5c 100644
+index a644010dd339..2db162bc9d4c 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -7,6 +7,28 @@
- #include <asm/io.h>
+@@ -9,6 +9,55 @@
#include <malloc.h>
+ #define SYS_PWR_RESET_FLAG BIT(0) /* from scu_info.c */
+#define WATCHDOG_RESET_BIT BIT(20)
+#define BOOT_FAILURE_LIMIT 3
+
@@ -43,13 +43,40 @@ index 565893777ffc..2fb84e880e5c 100644
+
+int intel_failed_boot(void)
+{
-+ return get_boot_failures() >= BOOT_FAILURE_LIMIT;
-+}
++ struct udevice *dev;
++ int ret;
++
++ ret = get_boot_failures() >= BOOT_FAILURE_LIMIT;
++ if (ret) {
++ /*
++ * Failure Recovery state:
++ * ChassisID - Solid Blue, StatusLED - Blinking Amber at 3Hz
++ */
++ ret = led_get_by_label("green", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_OFF);
++
++#ifdef CONFIG_LED_BLINK
++ ret = led_get_by_label("amber", &dev);
++ if (!ret) {
++ led_set_period(dev, 160);
++ led_set_state(dev, LEDST_BLINK);
++ }
++#endif
+
++ ret = led_get_by_label("id", &dev);
++ if (!ret)
++ led_set_state(dev, LEDST_ON);
++
++ return 1;
++ }
++
++ return 0;
++}
+
/* use GPIOC0 on intel boards */
#define FFUJ_GPIO "gpio@1e78000016"
-
-@@ -33,6 +55,10 @@ int read_ffuj(void)
+@@ -56,6 +105,10 @@ int read_ffuj(void)
int gpio_abort(void)
{
int value;
@@ -60,7 +87,7 @@ index 565893777ffc..2fb84e880e5c 100644
/* check ffuj to abort the autoboot */
value = read_ffuj();
printf("FFUJ: %d\n", value);
-@@ -407,6 +433,7 @@ int board_late_init(void)
+@@ -460,6 +513,7 @@ int board_late_init(void)
#define REV_ID_AST2600A0 0x05000303 /* AST2600 A0 */
#define ONE_MSEC_IN_USEC 1000
char value[11];
@@ -68,7 +95,7 @@ index 565893777ffc..2fb84e880e5c 100644
if (readl(SCU_BASE | SCU_014) == REV_ID_AST2600A0)
timer_enable(0, ONE_MSEC_IN_USEC, timer_callback, (void *)0);
-@@ -417,6 +444,13 @@ int board_late_init(void)
+@@ -475,6 +529,13 @@ int board_late_init(void)
snprintf(value, sizeof(value), "0x%x", gd->reset_reason);
update_bootargs_cmd("resetreason", value);
@@ -80,7 +107,7 @@ index 565893777ffc..2fb84e880e5c 100644
+ set_boot_failures(0);
+
/* Update the special mode in bootargs */
- if (is_mfg_mode_phy_req())
+ if (gd->reset_reason & SYS_PWR_RESET_FLAG && is_mfg_mode_phy_req())
update_bootargs_cmd("special", "mfg");
--
2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch
index d5093bba6..da7889be6 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch
@@ -1,88 +1,317 @@
-From c4aebdd00365539dc155e88ee4f6b88cccdccd8f Mon Sep 17 00:00:00 2001
+From 473b1990ecb578b6dc5d3347dc0ab8f7d5609137 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 16 Sep 2020 13:25:36 -0700
Subject: [PATCH] Add WDT to u-boot to cover booting failures
-This commit enables WDT2 before loading kernel image to make BMC
-reset to cover booting failures. If BMC meet any failure or if
-systemd can't initiate watchdog timer service properly, BMC will
-be reset by this watchdog. In case if u-boot meets a kernel image
-decoding issue, this watchdog will be immediately disabled and BMC
-will stay in u-boot console.
+This commit enables WDT1 in early u-boot and before loading kernel
+image to make BMC reset to cover booting failures. If BMC meets any
+failure or if kernel can't initiate watchdog timer properly, BMC will
+be reset by this watchdog.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- board/aspeed/ast2600_intel/intel.c | 23 ++++++++++++++++++++++-
- common/bootm_os.c | 11 +++++++++++
- 2 files changed, 33 insertions(+), 1 deletion(-)
+ arch/arm/mach-aspeed/ast2600/platform.S | 15 +++++
+ board/aspeed/ast2600_intel/intel.c | 50 ++++++++++++++--
+ common/board_f.c | 1 +
+ common/image.c | 3 +-
+ drivers/mtd/spi/spi-nor-core.c | 5 ++
+ drivers/watchdog/ast_wdt.c | 78 ++++++++++++++-----------
+ include/configs/aspeed-common.h | 2 +
+ 7 files changed, 116 insertions(+), 38 deletions(-)
+diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
+index cd8a57edd76b..08f33a9f1a17 100644
+--- a/arch/arm/mach-aspeed/ast2600/platform.S
++++ b/arch/arm/mach-aspeed/ast2600/platform.S
+@@ -64,6 +64,9 @@
+ #define AST_MAC2_CTRL2 (AST_MAC2_BASE + 0x058)
+
+ #define AST_WDT1_BASE 0x1E785000
++#define AST_WDT1_RELOAD_VAL (AST_WDT1_BASE + 0x004)
++#define AST_WDT1_RESTART_CTRL (AST_WDT1_BASE + 0x008)
++#define AST_WDT1_CTRL (AST_WDT1_BASE + 0x00C)
+ #define AST_WDT1_RESET_MASK1 (AST_WDT1_BASE + 0x01C)
+ #define AST_WDT1_RESET_MASK2 (AST_WDT1_BASE + 0x020)
+
+@@ -313,6 +316,18 @@ wait_lock:
+ ldr r1, =AST_SCU_CA7_PARITY_CHK
+ str r0, [r1]
+
++#ifdef CONFIG_HW_WATCHDOG
++ /* Enable WDT1 to recover u-boot hang */
++ ldr r0, =AST_WDT1_RELOAD_VAL
++ ldr r1, =0x00500000 @ ~5 seconds
++ str r1, [r0]
++ ldr r0, =AST_WDT1_RESTART_CTRL
++ ldr r1, =0x00004755
++ str r1, [r0]
++ ldr r0, =AST_WDT1_CTRL
++ ldr r1, =0x00000013
++ str r1, [r0]
++#endif
+ #if 0
+ ldr r1, =AST_FMC_WDT2_CTRL_MODE
+ str r0, [r1]
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 807202295757..af2af9786926 100644
+index 948f8a01f868..1a95893631c8 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -474,12 +474,33 @@ void board_init(void)
- */
+@@ -7,6 +7,7 @@
+ #include <asm/io.h>
+ #include <led.h>
+ #include <malloc.h>
++#include <wdt.h>
+
+ #define SYS_PWR_RESET_FLAG BIT(0) /* from scu_info.c */
+ #define WATCHDOG_RESET_BIT BIT(20)
+@@ -584,13 +585,54 @@ void board_preboot_os(void)
+ led_set_state(dev, LEDST_ON);
+ }
- #ifdef CONFIG_WATCHDOG
+-#ifdef CONFIG_WATCHDOG
-/* watchdog stuff */
-+#define WDT2_BASE 0x1e785040
-+#define WDT_COUNTER_STATUS 0x00
-+#define WDT_COUNTER_RELOAD_VALUE 0x04
-+#define WDT_COUNTER_RESTART_CTRL 0x08
-+#define WDT_RESTART_VALUE 0x4755
-+#define WDT_CTRL 0x0c
-+#define WDT_RST_BY_SOC_RST BIT(4)
-+#define WDT_SYS_RESET BIT(1)
-+#define WDT_ENABLE BIT(0)
-+#define WDT_TIMEOUT_DEFAULT 0x6000000 /* ~100 seconds */
+-void watchdog_init(void)
++#ifdef CONFIG_HW_WATCHDOG
++#define WDT_TIMEOUT_DEFAULT 0x6000000 /* ~100 seconds */
++
++void hw_watchdog_init(void)
++{
++ struct udevice *dev;
++ int ret;
++
++ ret = uclass_first_device(UCLASS_WDT, &dev);
++ if (ret) {
++ debug("Can't find a WDT: %d\n", ret);
++ return;
++ }
++
++ ret = wdt_start(dev, WDT_TIMEOUT_DEFAULT, 0);
++ if (ret)
++ debug("WDT start failed: %d\n", ret);
++}
+
- void watchdog_init(void)
++void hw_watchdog_reset(void)
{
-+ writel(0, WDT2_BASE + WDT_CTRL);
-+ writel(WDT_TIMEOUT_DEFAULT, WDT2_BASE + WDT_COUNTER_RELOAD_VALUE);
-+ writel(WDT_RESTART_VALUE, WDT2_BASE + WDT_COUNTER_RESTART_CTRL);
-+ writel(WDT_RST_BY_SOC_RST | WDT_SYS_RESET | WDT_ENABLE,
-+ WDT2_BASE + WDT_CTRL);
++ struct udevice *dev;
++ int ret;
++
++ ret = uclass_first_device(UCLASS_WDT, &dev);
++ if (ret) {
++ debug("Can't find a WDT: %d\n", ret);
++ return;
++ }
++
++ ret = wdt_reset(dev);
++ if (ret)
++ debug("WDT reset failed: %d\n", ret);
}
- void watchdog_reset(void)
+-void watchdog_reset(void)
++void hw_watchdog_disable(void)
{
-+ writel(WDT_RESTART_VALUE, WDT2_BASE + WDT_COUNTER_RESTART_CTRL);
-+}
++ struct udevice *dev;
++ int ret;
+
-+void watchdog_disable(void)
-+{
-+ writel(0, WDT2_BASE + WDT_CTRL);
++ ret = uclass_first_device(UCLASS_WDT, &dev);
++ if (ret) {
++ debug("Can't find a WDT: %d\n", ret);
++ return;
++ }
++
++ ret = wdt_stop(dev);
++ if (ret)
++ debug("WDT stop failed: %d\n", ret);
}
#endif
-diff --git a/common/bootm_os.c b/common/bootm_os.c
-index 855c471c28e6..05836e76c8e8 100644
---- a/common/bootm_os.c
-+++ b/common/bootm_os.c
-@@ -511,12 +511,23 @@ __weak void board_preboot_os(void)
- /* please define board specific board_preboot_os() */
- }
+diff --git a/common/board_f.c b/common/board_f.c
+index 149a7229e8fa..fe3e8e59d93e 100644
+--- a/common/board_f.c
++++ b/common/board_f.c
+@@ -94,6 +94,7 @@ static int init_func_watchdog_init(void)
+ {
+ # if defined(CONFIG_HW_WATCHDOG) && \
+ (defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \
++ defined(CONFIG_ASPEED_AST2600) || \
+ defined(CONFIG_SH) || \
+ defined(CONFIG_DESIGNWARE_WATCHDOG) || \
+ defined(CONFIG_IMX_WATCHDOG))
+diff --git a/common/image.c b/common/image.c
+index 4d4248f234fb..90687092e1ae 100644
+--- a/common/image.c
++++ b/common/image.c
+@@ -528,7 +528,8 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz)
+ if (to == from)
+ return;
+
+-#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
++#if !defined(CONFIG_ASPEED_SPI_DMA) && \
++ (defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG))
+ if (to > from) {
+ from += len;
+ to += len;
+diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
+index 1793a9e1f560..2ba5e5d65f4a 100644
+--- a/drivers/mtd/spi/spi-nor-core.c
++++ b/drivers/mtd/spi/spi-nor-core.c
+@@ -20,6 +20,7 @@
+ #include <linux/mtd/spi-nor.h>
+ #include <spi-mem.h>
+ #include <spi.h>
++#include <watchdog.h>
+
+ #include "sf_internal.h"
-+#ifdef CONFIG_WATCHDOG
-+extern void watchdog_init(void);
-+extern void watchdog_disable(void);
+@@ -425,6 +426,10 @@ static int spi_nor_wait_till_ready_with_timeout(struct spi_nor *nor,
+ unsigned long timebase;
+ int ret;
+
++#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
++ WATCHDOG_RESET();
+#endif
+
- int boot_selected_os(int argc, char * const argv[], int state,
- bootm_headers_t *images, boot_os_fn *boot_fn)
+ timebase = get_timer(0);
+
+ while (get_timer(timebase) < timeout) {
+diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
+index c2dc3cf548d2..811ead41bb95 100644
+--- a/drivers/watchdog/ast_wdt.c
++++ b/drivers/watchdog/ast_wdt.c
+@@ -19,10 +19,11 @@
+ #define WDT_CTRL_RESET_MODE_SHIFT 5
+ #define WDT_CTRL_RESET_MODE_MASK 3
+
+-#define WDT_CTRL_EN (1 << 0)
+-#define WDT_CTRL_RESET (1 << 1)
+-#define WDT_CTRL_CLK1MHZ (1 << 4)
+-#define WDT_CTRL_2ND_BOOT (1 << 7)
++#define WDT_CTRL_EN BIT(0)
++#define WDT_CTRL_RESET BIT(1)
++#define WDT_CTRL_CLK1MHZ BIT(4) /* AST2400/2500 */
++#define WDT_CTRL_WDT_RST_BY_SOC_RST BIT(4) /* AST2600 */
++#define WDT_CTRL_2ND_BOOT BIT(7)
+
+ /* Values for Reset Mode */
+ #define WDT_CTRL_RESET_SOC 0
+@@ -31,32 +32,32 @@
+ #define WDT_CTRL_RESET_MASK 3
+
+ /* Reset Mask register */
+-#define WDT_RESET_ARM (1 << 0)
+-#define WDT_RESET_COPROC (1 << 1)
+-#define WDT_RESET_SDRAM (1 << 2)
+-#define WDT_RESET_AHB (1 << 3)
+-#define WDT_RESET_I2C (1 << 4)
+-#define WDT_RESET_MAC1 (1 << 5)
+-#define WDT_RESET_MAC2 (1 << 6)
+-#define WDT_RESET_GCRT (1 << 7)
+-#define WDT_RESET_USB20 (1 << 8)
+-#define WDT_RESET_USB11_HOST (1 << 9)
+-#define WDT_RESET_USB11_EHCI2 (1 << 10)
+-#define WDT_RESET_VIDEO (1 << 11)
+-#define WDT_RESET_HAC (1 << 12)
+-#define WDT_RESET_LPC (1 << 13)
+-#define WDT_RESET_SDSDIO (1 << 14)
+-#define WDT_RESET_MIC (1 << 15)
+-#define WDT_RESET_CRT2C (1 << 16)
+-#define WDT_RESET_PWM (1 << 17)
+-#define WDT_RESET_PECI (1 << 18)
+-#define WDT_RESET_JTAG (1 << 19)
+-#define WDT_RESET_ADC (1 << 20)
+-#define WDT_RESET_GPIO (1 << 21)
+-#define WDT_RESET_MCTP (1 << 22)
+-#define WDT_RESET_XDMA (1 << 23)
+-#define WDT_RESET_SPI (1 << 24)
+-#define WDT_RESET_MISC (1 << 25)
++#define WDT_RESET_ARM BIT(0)
++#define WDT_RESET_COPROC BIT(1)
++#define WDT_RESET_SDRAM BIT(2)
++#define WDT_RESET_AHB BIT(3)
++#define WDT_RESET_I2C BIT(4)
++#define WDT_RESET_MAC1 BIT(5)
++#define WDT_RESET_MAC2 BIT(6)
++#define WDT_RESET_GCRT BIT(7)
++#define WDT_RESET_USB20 BIT(8)
++#define WDT_RESET_USB11_HOST BIT(9)
++#define WDT_RESET_USB11_EHCI2 BIT(10)
++#define WDT_RESET_VIDEO BIT(11)
++#define WDT_RESET_HAC BIT(12)
++#define WDT_RESET_LPC BIT(13)
++#define WDT_RESET_SDSDIO BIT(14)
++#define WDT_RESET_MIC BIT(15)
++#define WDT_RESET_CRT2C BIT(16)
++#define WDT_RESET_PWM BIT(17)
++#define WDT_RESET_PECI BIT(18)
++#define WDT_RESET_JTAG BIT(19)
++#define WDT_RESET_ADC BIT(20)
++#define WDT_RESET_GPIO BIT(21)
++#define WDT_RESET_MCTP BIT(22)
++#define WDT_RESET_XDMA BIT(23)
++#define WDT_RESET_SPI BIT(24)
++#define WDT_RESET_MISC BIT(25)
+
+ #define WDT_RESET_DEFAULT \
+ (WDT_RESET_ARM | WDT_RESET_COPROC | WDT_RESET_I2C | \
+@@ -98,12 +99,18 @@ struct ast_wdt_priv {
+ static int ast_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
{
- arch_preboot_os();
- board_preboot_os();
-+#ifdef CONFIG_WATCHDOG
-+ watchdog_init();
+ struct ast_wdt_priv *priv = dev_get_priv(dev);
++ ulong driver_data = dev_get_driver_data(dev);
+
+ writel((u32) timeout, &priv->regs->counter_reload_val);
+
+ writel(WDT_COUNTER_RESTART_VAL, &priv->regs->counter_restart);
+
+- writel(WDT_CTRL_EN | WDT_CTRL_RESET, &priv->regs->ctrl);
++ if (driver_data == WDT_AST2600) {
++ writel(WDT_CTRL_EN | WDT_CTRL_RESET |
++ WDT_CTRL_WDT_RST_BY_SOC_RST, &priv->regs->ctrl);
++ } else {
++ writel(WDT_CTRL_EN | WDT_CTRL_RESET, &priv->regs->ctrl);
++ }
+
+ return 0;
+ }
+@@ -115,12 +122,15 @@ static int ast_wdt_stop(struct udevice *dev)
+
+ clrbits_le32(&priv->regs->ctrl, WDT_CTRL_EN);
+
++#if !defined(CONFIG_TARGET_AST2600_INTEL)
+ if(driver_data == WDT_AST2600) {
+ writel(0x030f1ff1, &priv->regs->reset_mask1);
+ writel(0x3fffff1, &priv->regs->reset_mask2);
+- } else
++ } else {
+ writel(WDT_RESET_DEFAULT, &priv->regs->reset_mask1);
+-
++ }
+#endif
- boot_fn(state, argc, argv, images);
-+#ifdef CONFIG_WATCHDOG
-+ watchdog_disable();
++
+ return 0;
+ }
+
+@@ -168,7 +178,9 @@ static const struct wdt_ops ast_wdt_ops = {
+ static int ast_wdt_probe(struct udevice *dev)
+ {
+ debug("%s() wdt%u\n", __func__, dev->seq);
++#if !defined(CONFIG_TARGET_AST2600_INTEL)
+ ast_wdt_stop(dev);
+#endif
- /* Stand-alone may return when 'autostart' is 'no' */
- if (images->os.type == IH_TYPE_STANDALONE ||
+ return 0;
+ }
+diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
+index 255901ff0ea8..0797cd4febed 100755
+--- a/include/configs/aspeed-common.h
++++ b/include/configs/aspeed-common.h
+@@ -18,6 +18,8 @@
+ #define CONFIG_IPADDR 192.168.0.45
+ #define CONFIG_SERVERIP 192.168.0.81
+
++#define CONFIG_HW_WATCHDOG
++
+ /* Misc CPU related */
+ #define CONFIG_CMDLINE_TAG
+ #define CONFIG_SETUP_MEMORY_TAGS
--
2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0027-ast2600-Add-Mailbox-init-function.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0027-ast2600-Add-Mailbox-init-function.patch
index 0933d913c..8e3a17107 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0027-ast2600-Add-Mailbox-init-function.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0027-ast2600-Add-Mailbox-init-function.patch
@@ -1,4 +1,4 @@
-From 615d57c7c2a86df3ba19e0c1a201aa0d8042e38d Mon Sep 17 00:00:00 2001
+From b41a5d9eb94bcaf40bc960d82f13cf41cb83c34e Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Thu, 25 Feb 2021 14:45:12 +0800
Subject: [PATCH] ast2600: Add Mailbox init function.
@@ -31,18 +31,14 @@ Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- board/aspeed/ast2600_intel/intel.c | 26 ++++++++++++++++++++++++--
- 1 file changed, 24 insertions(+), 2 deletions(-)
+ board/aspeed/ast2600_intel/intel.c | 56 ++++++++++++++++++++++++++++--
+ 1 file changed, 54 insertions(+), 2 deletions(-)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 4a5ff0bdac..fbc3215138 100644
+index 17f9d6c8fbf6..c8b3cef70dd7 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -7,9 +7,13 @@
- #include <asm/io.h>
- #include <malloc.h>
-
-+#define SYS_PWR_RESET_FLAG BIT(0) /* from scu_info.c */
+@@ -13,6 +13,9 @@
#define WATCHDOG_RESET_BIT BIT(20)
#define BOOT_FAILURE_LIMIT 3
@@ -52,7 +48,7 @@ index 4a5ff0bdac..fbc3215138 100644
static int get_boot_failures(void)
{
return env_get_ulong("bootfailures", 10, 0);
-@@ -329,6 +333,55 @@ static void timer_callback(void *cookie)
+@@ -374,6 +377,55 @@ static void timer_callback(void *cookie)
}
}
@@ -108,16 +104,16 @@ index 4a5ff0bdac..fbc3215138 100644
int board_early_init_f(void)
{
/* This is called before relocation; beware! */
-@@ -350,6 +405,8 @@ int board_early_init_r(void)
- {
+@@ -396,6 +448,8 @@ int board_early_init_r(void)
+
debug("board_early_init_r\n");
+ mailbox_init();
+
enable_onboard_tpm();
- bmc_running_indicator(true);
-@@ -447,8 +504,6 @@ extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
+ led_default_state();
+@@ -510,8 +564,6 @@ extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
void *cookie);
int board_late_init(void)
{
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0029-Set-UART-routing-in-lowlevel_init.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0029-Set-UART-routing-in-lowlevel_init.patch
new file mode 100644
index 000000000..4d8d97d10
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0029-Set-UART-routing-in-lowlevel_init.patch
@@ -0,0 +1,43 @@
+From b6f6c6fe9b92e3b1bbed12e27a65e822a44da528 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Mon, 26 Apr 2021 13:20:21 -0700
+Subject: [PATCH] Set UART routing in lowlevel_init
+
+This commit sets the UART routing back to default in lowlevel_init
+to prevent any data dropping from the physical host serial until
+SOL service is activated.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/mach-aspeed/ast2600/platform.S | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
+index 0d038920b150..dce15c83a093 100644
+--- a/arch/arm/mach-aspeed/ast2600/platform.S
++++ b/arch/arm/mach-aspeed/ast2600/platform.S
+@@ -79,6 +79,9 @@
+ #define AST_GPIO_BASE (0x1E780000)
+ #define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
+
++#define AST_LPC_BASE 0x1E789000
++#define AST_LPC_HICRA (AST_LPC_BASE + 0x09C)
++
+ /* Revision ID */
+ #define REV_ID_AST2600A0 0x05000303
+ #define REV_ID_AST2600A1 0x05010303
+@@ -409,6 +412,11 @@ skip_fill_wip_bit:
+ orr r1, #0x0A
+ str r1, [r0]
+
++ /* set UART routing back to default */
++ ldr r0, =AST_LPC_HICRA
++ ldr r1, =0x0
++ str r1, [r0]
++
+ /* relocate mailbox insn. for cpuN polling SMP go signal */
+ adrl r0, mailbox_insn
+ adrl r1, mailbox_insn_end
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11059/0001-Fix-ext4-block-group-descriptor-sizing.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11059/0001-Fix-ext4-block-group-descriptor-sizing.patch
new file mode 100644
index 000000000..d35ee0ac1
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11059/0001-Fix-ext4-block-group-descriptor-sizing.patch
@@ -0,0 +1,62 @@
+From febbc583319b567fe3d83e521cc2ace9be8d1501 Mon Sep 17 00:00:00 2001
+From: Benjamin Lim <jarsp.ctf@gmail.com>
+Date: Fri, 29 Mar 2019 07:29:45 -0400
+Subject: [PATCH] Fix ext4 block group descriptor sizing
+
+Ext4 allows for arbitrarily sized block group descriptors when 64-bit
+addressing is enabled, which was previously not properly supported. This
+patch dynamically allocates a chunk of memory of the correct size.
+
+Signed-off-by: Benjamin Lim <jarsp.ctf@gmail.com>
+---
+ fs/ext4/ext4_common.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
+index feffbfa9a9eb..464c33d0d74c 100644
+--- a/fs/ext4/ext4_common.c
++++ b/fs/ext4/ext4_common.c
+@@ -1587,7 +1587,7 @@ static int ext4fs_blockgroup
+
+ int ext4fs_read_inode(struct ext2_data *data, int ino, struct ext2_inode *inode)
+ {
+- struct ext2_block_group blkgrp;
++ struct ext2_block_group *blkgrp;
+ struct ext2_sblock *sblock = &data->sblock;
+ struct ext_filesystem *fs = get_fs();
+ int log2blksz = get_fs()->dev_desc->log2blksz;
+@@ -1595,17 +1595,28 @@ int ext4fs_read_inode(struct ext2_data *data, int ino, struct ext2_inode *inode)
+ long int blkno;
+ unsigned int blkoff;
+
++ /* Allocate blkgrp based on gdsize (for 64-bit support). */
++ blkgrp = zalloc(get_fs()->gdsize);
++ if (!blkgrp)
++ return 0;
++
+ /* It is easier to calculate if the first inode is 0. */
+ ino--;
+ status = ext4fs_blockgroup(data, ino / le32_to_cpu
+- (sblock->inodes_per_group), &blkgrp);
+- if (status == 0)
++ (sblock->inodes_per_group), blkgrp);
++ if (status == 0) {
++ free(blkgrp);
+ return 0;
++ }
+
+ inodes_per_block = EXT2_BLOCK_SIZE(data) / fs->inodesz;
+- blkno = ext4fs_bg_get_inode_table_id(&blkgrp, fs) +
++ blkno = ext4fs_bg_get_inode_table_id(blkgrp, fs) +
+ (ino % le32_to_cpu(sblock->inodes_per_group)) / inodes_per_block;
+ blkoff = (ino % inodes_per_block) * fs->inodesz;
++
++ /* Free blkgrp as it is no longer required. */
++ free(blkgrp);
++
+ /* Read the inode. */
+ status = ext4fs_devread((lbaint_t)blkno << (LOG2_BLOCK_SIZE(data) -
+ log2blksz), blkoff,
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11690/0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11690/0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch
new file mode 100644
index 000000000..c793df2f4
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-11690/0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch
@@ -0,0 +1,95 @@
+From 4ccf678f37731d8ec09eae8dca5f4cbe84132a52 Mon Sep 17 00:00:00 2001
+From: Eugeniu Rosca <erosca@de.adit-jv.com>
+Date: Thu, 2 May 2019 14:27:06 +0200
+Subject: [PATCH] lib: uuid: Fix unseeded PRNG on RANDOM_UUID=y
+
+The random uuid values (enabled via CONFIG_RANDOM_UUID=y) on our
+platform are always the same. Below is consistent on each cold boot:
+
+ => ### interrupt autoboot
+ => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
+ ...
+ uuid_gpt_misc=d117f98e-6f2c-d04b-a5b2-331a19f91cb2
+ => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
+ ...
+ uuid_gpt_misc=ad5ec4b6-2d9f-8544-9417-fe3bd1c9b1b3
+ => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
+ ...
+ uuid_gpt_misc=cceb0b18-39cb-d547-9db7-03b405fa77d4
+ => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
+ ...
+ uuid_gpt_misc=d4981a2b-0478-544e-9607-7fd3c651068d
+ => env default -a; gpt write mmc 1 $partitions; print uuid_gpt_misc
+ ...
+ uuid_gpt_misc=6d6c9a36-e919-264d-a9ee-bd00379686c7
+
+While the uuids do change on every 'gpt write' command, the values
+appear to be taken from the same pool, in the same order.
+
+Assuming U-Boot with RANDOM_UUID=y is deployed on a large number of
+devices, all those devices would essentially expose the same UUID,
+breaking the assumption of system/RFS/application designers who rely
+on UUID as being globally unique (e.g. a database using UUID as key
+would alias/mix up entries/records due to duplicated UUID).
+
+The root cause seems to be simply _not_ seeding PRNG before generating
+a random value. It turns out this belongs to an established class of
+PRNG-specific problems, commonly known as "unseeded randomness", for
+which I am able to find below bugs/CVE/CWE:
+ - https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-0285
+ ("CVE-2015-0285 openssl: handshake with unseeded PRNG")
+ - https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-9019
+ ("CVE-2015-9019 libxslt: math.random() in xslt uses unseeded
+ randomness")
+ - https://cwe.mitre.org/data/definitions/336.html
+ ("CWE-336: Same Seed in Pseudo-Random Number Generator (PRNG)")
+
+The first revision [1] of this patch updated the seed based on the
+output of get_timer(), similar to [4].
+
+There are two problems with this approach:
+ - get_timer() has a poor _ms_ resolution
+ - when gen_rand_uuid() is called in a loop, get_timer() returns the
+ same result, leading to the same seed being passed to srand(),
+ leading to the same uuid being generated for several partitions
+ with different names
+
+The above drawbacks have been addressed in the second version [2].
+In its third revision (current), the patch reworded the description
+and summary line to emphasize it is a *fix* rather than an improvement.
+
+Testing [3] consisted of running 'gpt write mmc 1 $partitions' in a
+loop on R-Car3 for several minutes, collecting 8844 randomly generated
+UUIDS. Two consecutive cold boots are concatenated in the log.
+As a result, all uuid values are unique (scripted check).
+
+Thanks to Roman, who reported the issue and provided support in fixing.
+
+[1] https://patchwork.ozlabs.org/patch/1091802/
+[2] https://patchwork.ozlabs.org/patch/1092945/
+[3] https://gist.github.com/erosca/2820be9d554f76b982edd48474d0e7ca
+[4] commit da384a9d7628 ("net: rename and refactor eth_rand_ethaddr() function")
+
+Reported-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
+Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
+Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
+---
+ lib/uuid.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/uuid.c b/lib/uuid.c
+index fa20ee39fc32..2d4d6ef7e461 100644
+--- a/lib/uuid.c
++++ b/lib/uuid.c
+@@ -238,6 +238,8 @@ void gen_rand_uuid(unsigned char *uuid_bin)
+ unsigned int *ptr = (unsigned int *)&uuid;
+ int i;
+
++ srand(get_ticks() + rand());
++
+ /* Set all fields randomly */
+ for (i = 0; i < sizeof(struct uuid) / sizeof(*ptr); i++)
+ *(ptr + i) = cpu_to_be32(rand());
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13104/0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13104/0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch
new file mode 100644
index 000000000..fbb9098fe
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13104/0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch
@@ -0,0 +1,41 @@
+From 878269dbe74229005dd7f27aca66c554e31dad8e Mon Sep 17 00:00:00 2001
+From: Paul Emge <paulemge@forallsecure.com>
+Date: Mon, 8 Jul 2019 16:37:05 -0700
+Subject: [PATCH] CVE-2019-13104: ext4: check for underflow in ext4fs_read_file
+
+in ext4fs_read_file, it is possible for a broken/malicious file
+system to cause a memcpy of a negative number of bytes, which
+overflows all memory. This patch fixes the issue by checking for
+a negative length.
+
+Signed-off-by: Paul Emge <paulemge@forallsecure.com>
+---
+ fs/ext4/ext4fs.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
+index 85dc122f3003..e2b740cac405 100644
+--- a/fs/ext4/ext4fs.c
++++ b/fs/ext4/ext4fs.c
+@@ -66,13 +66,15 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+
+ ext_cache_init(&cache);
+
+- if (blocksize <= 0)
+- return -1;
+-
+ /* Adjust len so it we can't read past the end of the file. */
+ if (len + pos > filesize)
+ len = (filesize - pos);
+
++ if (blocksize <= 0 || len <= 0) {
++ ext_cache_fini(&cache);
++ return -1;
++ }
++
+ blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize);
+
+ for (i = lldiv(pos, blocksize); i < blockcnt; i++) {
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0001-fs-ext4-cache-extent-data.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0001-fs-ext4-cache-extent-data.patch
new file mode 100644
index 000000000..4daf1649e
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0001-fs-ext4-cache-extent-data.patch
@@ -0,0 +1,409 @@
+From c7422737dc7c2ecd7c2118540fbc0dad48affaf5 Mon Sep 17 00:00:00 2001
+From: Stephen Warren <swarren@nvidia.com>
+Date: Wed, 30 Jan 2019 12:58:05 -0700
+Subject: [PATCH] fs: ext4: cache extent data
+
+When a file contains extents, U-Boot currently reads extent-related data
+for each block in the file, even if that data is located in the same
+block each time. This significantly slows down loading of files that use
+extents. Implement a very dumb cache to prevent repeatedly reading the
+same block. Files with extents now load as fast as files without.
+
+Note: There are many cases where read_allocated_block() is called. This
+patch only addresses one of those places; all others still read redundant
+data in any case they did before. This is a minimal patch to fix the
+load command; other cases aren't fixed.
+
+Signed-off-by: Stephen Warren <swarren@nvidia.com>
+---
+ fs/ext4/ext4_common.c | 45 ++++++++++++++++++++++---------------
+ fs/ext4/ext4_journal.c | 22 +++++++++---------
+ fs/ext4/ext4_write.c | 6 ++---
+ fs/ext4/ext4fs.c | 51 +++++++++++++++++++++++++++++++++++++-----
+ include/ext4fs.h | 12 +++++++++-
+ 5 files changed, 99 insertions(+), 37 deletions(-)
+
+diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
+index 67e2471bd388..29308e3b4474 100644
+--- a/fs/ext4/ext4_common.c
++++ b/fs/ext4/ext4_common.c
+@@ -510,7 +510,8 @@ restart:
+
+ restart_read:
+ /* read the block no allocated to a file */
+- first_block_no_of_root = read_allocated_block(g_parent_inode, blk_idx);
++ first_block_no_of_root = read_allocated_block(g_parent_inode, blk_idx,
++ NULL);
+ if (first_block_no_of_root <= 0)
+ goto fail;
+
+@@ -646,7 +647,7 @@ static int search_dir(struct ext2_inode *parent_inode, char *dirname)
+
+ /* get the block no allocated to a file */
+ for (blk_idx = 0; blk_idx < directory_blocks; blk_idx++) {
+- blknr = read_allocated_block(parent_inode, blk_idx);
++ blknr = read_allocated_block(parent_inode, blk_idx, NULL);
+ if (blknr <= 0)
+ goto fail;
+
+@@ -943,7 +944,7 @@ int ext4fs_filename_unlink(char *filename)
+
+ /* read the block no allocated to a file */
+ for (blk_idx = 0; blk_idx < directory_blocks; blk_idx++) {
+- blknr = read_allocated_block(g_parent_inode, blk_idx);
++ blknr = read_allocated_block(g_parent_inode, blk_idx, NULL);
+ if (blknr <= 0)
+ break;
+ inodeno = unlink_filename(filename, blknr);
+@@ -1522,7 +1523,7 @@ void ext4fs_allocate_blocks(struct ext2_inode *file_inode,
+ #endif
+
+ static struct ext4_extent_header *ext4fs_get_extent_block
+- (struct ext2_data *data, char *buf,
++ (struct ext2_data *data, struct ext_block_cache *cache,
+ struct ext4_extent_header *ext_block,
+ uint32_t fileblock, int log2_blksz)
+ {
+@@ -1551,12 +1552,10 @@ static struct ext4_extent_header *ext4fs_get_extent_block
+
+ block = le16_to_cpu(index[i].ei_leaf_hi);
+ block = (block << 32) + le32_to_cpu(index[i].ei_leaf_lo);
+-
+- if (ext4fs_devread((lbaint_t)block << log2_blksz, 0, blksz,
+- buf))
+- ext_block = (struct ext4_extent_header *)buf;
+- else
++ block <<= log2_blksz;
++ if (!ext_cache_read(cache, (lbaint_t)block, blksz))
+ return NULL;
++ ext_block = (struct ext4_extent_header *)cache->buf;
+ }
+ }
+
+@@ -1613,7 +1612,8 @@ int ext4fs_read_inode(struct ext2_data *data, int ino, struct ext2_inode *inode)
+ return 1;
+ }
+
+-long int read_allocated_block(struct ext2_inode *inode, int fileblock)
++long int read_allocated_block(struct ext2_inode *inode, int fileblock,
++ struct ext_block_cache *cache)
+ {
+ long int blknr;
+ int blksz;
+@@ -1630,20 +1630,26 @@ long int read_allocated_block(struct ext2_inode *inode, int fileblock)
+
+ if (le32_to_cpu(inode->flags) & EXT4_EXTENTS_FL) {
+ long int startblock, endblock;
+- char *buf = zalloc(blksz);
+- if (!buf)
+- return -ENOMEM;
++ struct ext_block_cache *c, cd;
+ struct ext4_extent_header *ext_block;
+ struct ext4_extent *extent;
+ int i;
++
++ if (cache) {
++ c = cache;
++ } else {
++ c = &cd;
++ ext_cache_init(c);
++ }
+ ext_block =
+- ext4fs_get_extent_block(ext4fs_root, buf,
++ ext4fs_get_extent_block(ext4fs_root, c,
+ (struct ext4_extent_header *)
+ inode->b.blocks.dir_blocks,
+ fileblock, log2_blksz);
+ if (!ext_block) {
+ printf("invalid extent block\n");
+- free(buf);
++ if (!cache)
++ ext_cache_fini(c);
+ return -EINVAL;
+ }
+
+@@ -1655,19 +1661,22 @@ long int read_allocated_block(struct ext2_inode *inode, int fileblock)
+
+ if (startblock > fileblock) {
+ /* Sparse file */
+- free(buf);
++ if (!cache)
++ ext_cache_fini(c);
+ return 0;
+
+ } else if (fileblock < endblock) {
+ start = le16_to_cpu(extent[i].ee_start_hi);
+ start = (start << 32) +
+ le32_to_cpu(extent[i].ee_start_lo);
+- free(buf);
++ if (!cache)
++ ext_cache_fini(c);
+ return (fileblock - startblock) + start;
+ }
+ }
+
+- free(buf);
++ if (!cache)
++ ext_cache_fini(c);
+ return 0;
+ }
+
+diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
+index 148593da7fef..6adbab93a68f 100644
+--- a/fs/ext4/ext4_journal.c
++++ b/fs/ext4/ext4_journal.c
+@@ -347,7 +347,7 @@ void recover_transaction(int prev_desc_logical_no)
+ ext4fs_read_inode(ext4fs_root, EXT2_JOURNAL_INO,
+ (struct ext2_inode *)&inode_journal);
+ blknr = read_allocated_block((struct ext2_inode *)
+- &inode_journal, i);
++ &inode_journal, i, NULL);
+ ext4fs_devread((lbaint_t)blknr * fs->sect_perblk, 0, fs->blksz,
+ temp_buff);
+ p_jdb = (char *)temp_buff;
+@@ -372,7 +372,7 @@ void recover_transaction(int prev_desc_logical_no)
+ be32_to_cpu(jdb->h_sequence)) == 0)
+ continue;
+ }
+- blknr = read_allocated_block(&inode_journal, i);
++ blknr = read_allocated_block(&inode_journal, i, NULL);
+ ext4fs_devread((lbaint_t)blknr * fs->sect_perblk, 0,
+ fs->blksz, metadata_buff);
+ put_ext4((uint64_t)((uint64_t)be32_to_cpu(tag->block) * (uint64_t)fs->blksz),
+@@ -419,7 +419,8 @@ int ext4fs_check_journal_state(int recovery_flag)
+ }
+
+ ext4fs_read_inode(ext4fs_root, EXT2_JOURNAL_INO, &inode_journal);
+- blknr = read_allocated_block(&inode_journal, EXT2_JOURNAL_SUPERBLOCK);
++ blknr = read_allocated_block(&inode_journal, EXT2_JOURNAL_SUPERBLOCK,
++ NULL);
+ ext4fs_devread((lbaint_t)blknr * fs->sect_perblk, 0, fs->blksz,
+ temp_buff);
+ jsb = (struct journal_superblock_t *) temp_buff;
+@@ -443,7 +444,7 @@ int ext4fs_check_journal_state(int recovery_flag)
+
+ i = be32_to_cpu(jsb->s_first);
+ while (1) {
+- blknr = read_allocated_block(&inode_journal, i);
++ blknr = read_allocated_block(&inode_journal, i, NULL);
+ memset(temp_buff1, '\0', fs->blksz);
+ ext4fs_devread((lbaint_t)blknr * fs->sect_perblk,
+ 0, fs->blksz, temp_buff1);
+@@ -537,7 +538,7 @@ end:
+ ext4_read_superblock((char *)fs->sb);
+
+ blknr = read_allocated_block(&inode_journal,
+- EXT2_JOURNAL_SUPERBLOCK);
++ EXT2_JOURNAL_SUPERBLOCK, NULL);
+ put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz),
+ (struct journal_superblock_t *)temp_buff,
+ (uint32_t) fs->blksz);
+@@ -566,7 +567,7 @@ static void update_descriptor_block(long int blknr)
+
+ ext4fs_read_inode(ext4fs_root, EXT2_JOURNAL_INO, &inode_journal);
+ jsb_blknr = read_allocated_block(&inode_journal,
+- EXT2_JOURNAL_SUPERBLOCK);
++ EXT2_JOURNAL_SUPERBLOCK, NULL);
+ ext4fs_devread((lbaint_t)jsb_blknr * fs->sect_perblk, 0, fs->blksz,
+ temp_buff);
+ jsb = (struct journal_superblock_t *) temp_buff;
+@@ -618,7 +619,7 @@ static void update_commit_block(long int blknr)
+ ext4fs_read_inode(ext4fs_root, EXT2_JOURNAL_INO,
+ &inode_journal);
+ jsb_blknr = read_allocated_block(&inode_journal,
+- EXT2_JOURNAL_SUPERBLOCK);
++ EXT2_JOURNAL_SUPERBLOCK, NULL);
+ ext4fs_devread((lbaint_t)jsb_blknr * fs->sect_perblk, 0, fs->blksz,
+ temp_buff);
+ jsb = (struct journal_superblock_t *) temp_buff;
+@@ -645,16 +646,17 @@ void ext4fs_update_journal(void)
+ long int blknr;
+ int i;
+ ext4fs_read_inode(ext4fs_root, EXT2_JOURNAL_INO, &inode_journal);
+- blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++);
++ blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++, NULL);
+ update_descriptor_block(blknr);
+ for (i = 0; i < MAX_JOURNAL_ENTRIES; i++) {
+ if (journal_ptr[i]->blknr == -1)
+ break;
+- blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++);
++ blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++,
++ NULL);
+ put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz),
+ journal_ptr[i]->buf, fs->blksz);
+ }
+- blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++);
++ blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++, NULL);
+ update_commit_block(blknr);
+ printf("update journal finished\n");
+ }
+diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
+index 4eb77c327ef3..95ffa3dfad51 100644
+--- a/fs/ext4/ext4_write.c
++++ b/fs/ext4/ext4_write.c
+@@ -479,7 +479,7 @@ static int ext4fs_delete_file(int inodeno)
+
+ /* release data blocks */
+ for (i = 0; i < no_blocks; i++) {
+- blknr = read_allocated_block(&inode, i);
++ blknr = read_allocated_block(&inode, i, NULL);
+ if (blknr == 0)
+ continue;
+ if (blknr < 0)
+@@ -695,7 +695,7 @@ void ext4fs_deinit(void)
+ ext4fs_read_inode(ext4fs_root, EXT2_JOURNAL_INO,
+ &inode_journal);
+ blknr = read_allocated_block(&inode_journal,
+- EXT2_JOURNAL_SUPERBLOCK);
++ EXT2_JOURNAL_SUPERBLOCK, NULL);
+ ext4fs_devread((lbaint_t)blknr * fs->sect_perblk, 0, fs->blksz,
+ temp_buff);
+ jsb = (struct journal_superblock_t *)temp_buff;
+@@ -776,7 +776,7 @@ static int ext4fs_write_file(struct ext2_inode *file_inode,
+ long int blknr;
+ int blockend = fs->blksz;
+ int skipfirst = 0;
+- blknr = read_allocated_block(file_inode, i);
++ blknr = read_allocated_block(file_inode, i, NULL);
+ if (blknr <= 0)
+ return -1;
+
+diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
+index 2a28031d14ca..26db677a1f17 100644
+--- a/fs/ext4/ext4fs.c
++++ b/fs/ext4/ext4fs.c
+@@ -62,6 +62,9 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ lbaint_t delayed_next = 0;
+ char *delayed_buf = NULL;
+ short status;
++ struct ext_block_cache cache;
++
++ ext_cache_init(&cache);
+
+ if (blocksize <= 0)
+ return -1;
+@@ -77,9 +80,11 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ int blockoff = pos - (blocksize * i);
+ int blockend = blocksize;
+ int skipfirst = 0;
+- blknr = read_allocated_block(&(node->inode), i);
+- if (blknr < 0)
++ blknr = read_allocated_block(&node->inode, i, &cache);
++ if (blknr < 0) {
++ ext_cache_fini(&cache);
+ return -1;
++ }
+
+ blknr = blknr << log2_fs_blocksize;
+
+@@ -109,8 +114,10 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ delayed_skipfirst,
+ delayed_extent,
+ delayed_buf);
+- if (status == 0)
++ if (status == 0) {
++ ext_cache_fini(&cache);
+ return -1;
++ }
+ previous_block_number = blknr;
+ delayed_start = blknr;
+ delayed_extent = blockend;
+@@ -136,8 +143,10 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ delayed_skipfirst,
+ delayed_extent,
+ delayed_buf);
+- if (status == 0)
++ if (status == 0) {
++ ext_cache_fini(&cache);
+ return -1;
++ }
+ previous_block_number = -1;
+ }
+ /* Zero no more than `len' bytes. */
+@@ -153,12 +162,15 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ status = ext4fs_devread(delayed_start,
+ delayed_skipfirst, delayed_extent,
+ delayed_buf);
+- if (status == 0)
++ if (status == 0) {
++ ext_cache_fini(&cache);
+ return -1;
++ }
+ previous_block_number = -1;
+ }
+
+ *actread = len;
++ ext_cache_fini(&cache);
+ return 0;
+ }
+
+@@ -252,3 +264,32 @@ int ext4fs_uuid(char *uuid_str)
+ return -ENOSYS;
+ #endif
+ }
++
++void ext_cache_init(struct ext_block_cache *cache)
++{
++ memset(cache, 0, sizeof(*cache));
++}
++
++void ext_cache_fini(struct ext_block_cache *cache)
++{
++ free(cache->buf);
++ ext_cache_init(cache);
++}
++
++int ext_cache_read(struct ext_block_cache *cache, lbaint_t block, int size)
++{
++ /* This could be more lenient, but this is simple and enough for now */
++ if (cache->buf && cache->block == block && cache->size == size)
++ return 1;
++ ext_cache_fini(cache);
++ cache->buf = malloc(size);
++ if (!cache->buf)
++ return 0;
++ if (!ext4fs_devread(block, 0, size, cache->buf)) {
++ free(cache->buf);
++ return 0;
++ }
++ cache->block = block;
++ cache->size = size;
++ return 1;
++}
+diff --git a/include/ext4fs.h b/include/ext4fs.h
+index 24210113411a..4b5de6e7b636 100644
+--- a/include/ext4fs.h
++++ b/include/ext4fs.h
+@@ -117,6 +117,12 @@ struct ext_filesystem {
+ struct blk_desc *dev_desc;
+ };
+
++struct ext_block_cache {
++ char *buf;
++ lbaint_t block;
++ int size;
++};
++
+ extern struct ext2_data *ext4fs_root;
+ extern struct ext2fs_node *ext4fs_file;
+
+@@ -146,11 +152,15 @@ int ext4fs_size(const char *filename, loff_t *size);
+ void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot);
+ int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf);
+ void ext4fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+-long int read_allocated_block(struct ext2_inode *inode, int fileblock);
++long int read_allocated_block(struct ext2_inode *inode, int fileblock,
++ struct ext_block_cache *cache);
+ int ext4fs_probe(struct blk_desc *fs_dev_desc,
+ disk_partition_t *fs_partition);
+ int ext4_read_file(const char *filename, void *buf, loff_t offset, loff_t len,
+ loff_t *actread);
+ int ext4_read_superblock(char *buffer);
+ int ext4fs_uuid(char *uuid_str);
++void ext_cache_init(struct ext_block_cache *cache);
++void ext_cache_fini(struct ext_block_cache *cache);
++int ext_cache_read(struct ext_block_cache *cache, lbaint_t block, int size);
+ #endif
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch
new file mode 100644
index 000000000..f7ccb41f4
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13105/0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch
@@ -0,0 +1,30 @@
+From 6e5a79de658cb1c8012c86e0837379aa6eabd024 Mon Sep 17 00:00:00 2001
+From: Paul Emge <paulemge@forallsecure.com>
+Date: Mon, 8 Jul 2019 16:37:04 -0700
+Subject: [PATCH] CVE-2019-13105: ext4: fix double-free in ext4_cache_read
+
+ext_cache_read doesn't null cache->buf, after freeing, which results
+in a later function double-freeing it. This patch fixes
+ext_cache_read to call ext_cache_fini instead of free.
+
+Signed-off-by: Paul Emge <paulemge@forallsecure.com>
+---
+ fs/ext4/ext4fs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
+index 26db677a1f17..85dc122f3003 100644
+--- a/fs/ext4/ext4fs.c
++++ b/fs/ext4/ext4fs.c
+@@ -286,7 +286,7 @@ int ext_cache_read(struct ext_block_cache *cache, lbaint_t block, int size)
+ if (!cache->buf)
+ return 0;
+ if (!ext4fs_devread(block, 0, size, cache->buf)) {
+- free(cache->buf);
++ ext_cache_fini(cache);
+ return 0;
+ }
+ cache->block = block;
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13106/0001-CVE-2019-13106-ext4-fix-out-of-bounds-memset.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13106/0001-CVE-2019-13106-ext4-fix-out-of-bounds-memset.patch
new file mode 100644
index 000000000..9bd0b27a8
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2019-13106/0001-CVE-2019-13106-ext4-fix-out-of-bounds-memset.patch
@@ -0,0 +1,49 @@
+From e205896c5383c938274262524adceb2775fb03ba Mon Sep 17 00:00:00 2001
+From: Paul Emge <paulemge@forallsecure.com>
+Date: Mon, 8 Jul 2019 16:37:07 -0700
+Subject: [PATCH] CVE-2019-13106: ext4: fix out-of-bounds memset
+
+In ext4fs_read_file in ext4fs.c, a memset can overwrite the bounds of
+the destination memory region. This patch adds a check to disallow
+this.
+
+Signed-off-by: Paul Emge <paulemge@forallsecure.com>
+---
+ fs/ext4/ext4fs.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
+index e2b740cac405..37b31d9f0fcc 100644
+--- a/fs/ext4/ext4fs.c
++++ b/fs/ext4/ext4fs.c
+@@ -61,6 +61,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ lbaint_t delayed_skipfirst = 0;
+ lbaint_t delayed_next = 0;
+ char *delayed_buf = NULL;
++ char *start_buf = buf;
+ short status;
+ struct ext_block_cache cache;
+
+@@ -139,6 +140,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ }
+ } else {
+ int n;
++ int n_left;
+ if (previous_block_number != -1) {
+ /* spill */
+ status = ext4fs_devread(delayed_start,
+@@ -153,8 +155,9 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
+ }
+ /* Zero no more than `len' bytes. */
+ n = blocksize - skipfirst;
+- if (n > len)
+- n = len;
++ n_left = len - ( buf - start_buf );
++ if (n > n_left)
++ n = n_left;
+ memset(buf, 0, n);
+ }
+ buf += blocksize - skipfirst;
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0001-image-Adjust-the-workings-of-fit_check_format.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0001-image-Adjust-the-workings-of-fit_check_format.patch
new file mode 100644
index 000000000..97814024f
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0001-image-Adjust-the-workings-of-fit_check_format.patch
@@ -0,0 +1,397 @@
+From d676a491fb465f11271c47185f1eb3e479c5c738 Mon Sep 17 00:00:00 2001
+From: Simon Glass <sjg@chromium.org>
+Date: Mon, 15 Feb 2021 17:08:09 -0700
+Subject: [PATCH] image: Adjust the workings of fit_check_format()
+
+At present this function does not accept a size for the FIT. This means
+that it must be read from the FIT itself, introducing potential security
+risk. Update the function to include a size parameter, which can be
+invalid, in which case fit_check_format() calculates it.
+
+For now no callers pass the size, but this can be updated later.
+
+Also adjust the return value to an error code so that all the different
+types of problems can be distinguished by the user.
+
+Signed-off-by: Simon Glass <sjg@chromium.org>
+Reported-by: Bruce Monroe <bruce.monroe@intel.com>
+Reported-by: Arie Haenel <arie.haenel@intel.com>
+Reported-by: Julien Lenoir <julien.lenoir@intel.com>
+---
+ arch/arm/cpu/armv8/sec_firmware.c | 2 +-
+ cmd/bootm.c | 6 ++--
+ cmd/disk.c | 2 +-
+ cmd/fdc.c | 2 +-
+ cmd/fpga.c | 2 +-
+ cmd/nand.c | 2 +-
+ cmd/source.c | 2 +-
+ cmd/ximg.c | 2 +-
+ common/image-fdt.c | 2 +-
+ common/image-fit.c | 45 +++++++++++++-----------------
+ common/splash_source.c | 4 +--
+ common/update.c | 2 +-
+ drivers/net/fsl-mc/mc.c | 2 +-
+ drivers/net/pfe_eth/pfe_firmware.c | 2 +-
+ include/image.h | 21 +++++++++++++-
+ tools/fit_common.c | 3 +-
+ tools/fit_image.c | 2 +-
+ tools/mkimage.h | 2 ++
+ 18 files changed, 61 insertions(+), 44 deletions(-)
+
+diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
+index 8dc0ac92668f..3c5249541222 100644
+--- a/arch/arm/cpu/armv8/sec_firmware.c
++++ b/arch/arm/cpu/armv8/sec_firmware.c
+@@ -310,7 +310,7 @@ __weak bool sec_firmware_is_valid(const void *sec_firmware_img)
+ return false;
+ }
+
+- if (!fit_check_format(sec_firmware_img)) {
++ if (fit_check_format(sec_firmware_img, IMAGE_SIZE_INVAL)) {
+ printf("SEC Firmware: Bad firmware image (bad FIT header)\n");
+ return false;
+ }
+diff --git a/cmd/bootm.c b/cmd/bootm.c
+index c3a063474ac6..1d6ec0d4cacc 100644
+--- a/cmd/bootm.c
++++ b/cmd/bootm.c
+@@ -282,7 +282,7 @@ static int image_info(ulong addr)
+ case IMAGE_FORMAT_FIT:
+ puts(" FIT image found\n");
+
+- if (!fit_check_format(hdr)) {
++ if (fit_check_format(hdr, IMAGE_SIZE_INVAL)) {
+ puts("Bad FIT image format!\n");
+ return 1;
+ }
+@@ -355,7 +355,7 @@ static int do_imls_nor(void)
+ #endif
+ #if defined(CONFIG_FIT)
+ case IMAGE_FORMAT_FIT:
+- if (!fit_check_format(hdr))
++ if (fit_check_format(hdr), IMAGE_SIZE_INVAL)
+ goto next_sector;
+
+ printf("FIT Image at %08lX:\n", (ulong)hdr);
+@@ -435,7 +435,7 @@ static int nand_imls_fitimage(struct mtd_info *mtd, int nand_dev, loff_t off,
+ return ret;
+ }
+
+- if (!fit_check_format(imgdata)) {
++ if (fit_check_format(imgdata), IMAGE_SIZE_INVAL) {
+ free(imgdata);
+ return 0;
+ }
+diff --git a/cmd/disk.c b/cmd/disk.c
+index dcc36a6c2cb7..294fc111023a 100644
+--- a/cmd/disk.c
++++ b/cmd/disk.c
+@@ -110,7 +110,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
+ /* This cannot be done earlier,
+ * we need complete FIT image in RAM first */
+ if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) {
+- if (!fit_check_format(fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ bootstage_error(BOOTSTAGE_ID_IDE_FIT_READ);
+ puts("** Bad FIT image format\n");
+ return 1;
+diff --git a/cmd/fdc.c b/cmd/fdc.c
+index 906845d4049b..37e557a1e7d7 100644
+--- a/cmd/fdc.c
++++ b/cmd/fdc.c
+@@ -730,7 +730,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+ #if defined(CONFIG_FIT)
+ /* This cannot be done earlier, we need complete FIT image in RAM first */
+ if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) {
+- if (!fit_check_format (fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ puts ("** Bad FIT image format\n");
+ return 1;
+ }
+diff --git a/cmd/fpga.c b/cmd/fpga.c
+index 88a8e3f3186b..9093026ff6ce 100644
+--- a/cmd/fpga.c
++++ b/cmd/fpga.c
+@@ -325,7 +325,7 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int argc,
+ return CMD_RET_FAILURE;
+ }
+
+- if (!fit_check_format(fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ puts("Bad FIT image format\n");
+ return CMD_RET_FAILURE;
+ }
+diff --git a/cmd/nand.c b/cmd/nand.c
+index a22945d144b3..536a11be9605 100644
+--- a/cmd/nand.c
++++ b/cmd/nand.c
+@@ -911,7 +911,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd,
+ #if defined(CONFIG_FIT)
+ /* This cannot be done earlier, we need complete FIT image in RAM first */
+ if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) {
+- if (!fit_check_format (fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ bootstage_error(BOOTSTAGE_ID_NAND_FIT_READ);
+ puts ("** Bad FIT image format\n");
+ return 1;
+diff --git a/cmd/source.c b/cmd/source.c
+index 6d98a1cfd32b..897b97057d85 100644
+--- a/cmd/source.c
++++ b/cmd/source.c
+@@ -106,7 +106,7 @@ source (ulong addr, const char *fit_uname)
+ #if defined(CONFIG_FIT)
+ case IMAGE_FORMAT_FIT:
+ fit_hdr = buf;
+- if (!fit_check_format (fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ puts ("Bad FIT image format\n");
+ return 1;
+ }
+diff --git a/cmd/ximg.c b/cmd/ximg.c
+index 8572a67a0063..51af741c827b 100644
+--- a/cmd/ximg.c
++++ b/cmd/ximg.c
+@@ -131,7 +131,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+ "at %08lx ...\n", uname, addr);
+
+ fit_hdr = (const void *)addr;
+- if (!fit_check_format(fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ puts("Bad FIT image format\n");
+ return 1;
+ }
+diff --git a/common/image-fdt.c b/common/image-fdt.c
+index 52ada56fc17b..3aa6c427362c 100644
+--- a/common/image-fdt.c
++++ b/common/image-fdt.c
+@@ -394,7 +394,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
+ */
+ #if CONFIG_IS_ENABLED(FIT)
+ /* check FDT blob vs FIT blob */
+- if (fit_check_format(buf)) {
++ if (!fit_check_format(buf, IMAGE_SIZE_INVAL)) {
+ ulong load, len;
+
+ fdt_noffset = boot_get_fdt_fit(images,
+diff --git a/common/image-fit.c b/common/image-fit.c
+index 6894384b47b9..124d8895cffd 100644
+--- a/common/image-fit.c
++++ b/common/image-fit.c
+@@ -8,6 +8,8 @@
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ */
+
++#define LOG_CATEGORY LOGC_BOOT
++
+ #ifdef USE_HOSTCC
+ #include "mkimage.h"
+ #include <time.h>
+@@ -1460,46 +1462,39 @@ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp)
+ return (comp == image_comp);
+ }
+
+-/**
+- * fit_check_format - sanity check FIT image format
+- * @fit: pointer to the FIT format image header
+- *
+- * fit_check_format() runs a basic sanity FIT image verification.
+- * Routine checks for mandatory properties, nodes, etc.
+- *
+- * returns:
+- * 1, on success
+- * 0, on failure
+- */
+-int fit_check_format(const void *fit)
++int fit_check_format(const void *fit, ulong size)
+ {
++ int ret;
++
+ /* A FIT image must be a valid FDT */
+- if (fdt_check_header(fit)) {
+- debug("Wrong FIT format: not a flattened device tree\n");
+- return 0;
++ ret = fdt_check_header(fit);
++ if (ret) {
++ log_debug("Wrong FIT format: not a flattened device tree (err=%d)\n",
++ ret);
++ return -ENOEXEC;
+ }
+
+ /* mandatory / node 'description' property */
+- if (fdt_getprop(fit, 0, FIT_DESC_PROP, NULL) == NULL) {
+- debug("Wrong FIT format: no description\n");
+- return 0;
++ if (!fdt_getprop(fit, 0, FIT_DESC_PROP, NULL)) {
++ log_debug("Wrong FIT format: no description\n");
++ return -ENOMSG;
+ }
+
+ if (IMAGE_ENABLE_TIMESTAMP) {
+ /* mandatory / node 'timestamp' property */
+- if (fdt_getprop(fit, 0, FIT_TIMESTAMP_PROP, NULL) == NULL) {
+- debug("Wrong FIT format: no timestamp\n");
+- return 0;
++ if (!fdt_getprop(fit, 0, FIT_TIMESTAMP_PROP, NULL)) {
++ log_debug("Wrong FIT format: no timestamp\n");
++ return -ENODATA;
+ }
+ }
+
+ /* mandatory subimages parent '/images' node */
+ if (fdt_path_offset(fit, FIT_IMAGES_PATH) < 0) {
+- debug("Wrong FIT format: no images parent node\n");
+- return 0;
++ log_debug("Wrong FIT format: no images parent node\n");
++ return -ENOENT;
+ }
+
+- return 1;
++ return 0;
+ }
+
+
+@@ -1813,7 +1808,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
+ printf("## Loading %s from FIT Image at %08lx ...\n", prop_name, addr);
+
+ bootstage_mark(bootstage_id + BOOTSTAGE_SUB_FORMAT);
+- if (!fit_check_format(fit)) {
++ if (fit_check_format(fit, IMAGE_SIZE_INVAL)) {
+ printf("Bad FIT %s image format!\n", prop_name);
+ bootstage_error(bootstage_id + BOOTSTAGE_SUB_FORMAT);
+ return -ENOEXEC;
+diff --git a/common/splash_source.c b/common/splash_source.c
+index 62763b9ebd56..d43dd0b2cd98 100644
+--- a/common/splash_source.c
++++ b/common/splash_source.c
+@@ -329,8 +329,8 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
+ if (res < 0)
+ return res;
+
+- res = fit_check_format(fit_header);
+- if (!res) {
++ res = fit_check_format(fit_header, IMAGE_SIZE_INVAL);
++ if (res) {
+ debug("Could not find valid FIT image\n");
+ return -EINVAL;
+ }
+diff --git a/common/update.c b/common/update.c
+index f237ea53bb2a..42950edbbf22 100644
+--- a/common/update.c
++++ b/common/update.c
+@@ -280,7 +280,7 @@ int update_tftp(ulong addr, char *interface, char *devstring)
+ got_update_file:
+ fit = (void *)addr;
+
+- if (!fit_check_format((void *)fit)) {
++ if (fit_check_format((void *)fit, IMAGE_SIZE_INVAL)) {
+ printf("Bad FIT format of the update file, aborting "
+ "auto-update\n");
+ return 1;
+diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
+index cc59b21f9f48..c4f35e7325b2 100644
+--- a/drivers/net/fsl-mc/mc.c
++++ b/drivers/net/fsl-mc/mc.c
+@@ -130,7 +130,7 @@ int parse_mc_firmware_fit_image(u64 mc_fw_addr,
+ return -EINVAL;
+ }
+
+- if (!fit_check_format(fit_hdr)) {
++ if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
+ printf("fsl-mc: ERR: Bad firmware image (bad FIT header)\n");
+ return -EINVAL;
+ }
+diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
+index adb2d06010ce..7b930ecc2a02 100644
+--- a/drivers/net/pfe_eth/pfe_firmware.c
++++ b/drivers/net/pfe_eth/pfe_firmware.c
+@@ -150,7 +150,7 @@ static int pfe_fit_check(void)
+ return ret;
+ }
+
+- if (!fit_check_format(pfe_fit_addr)) {
++ if (fit_check_format(pfe_fit_addr, IMAGE_SIZE_INVAL)) {
+ printf("PFE Firmware: Bad firmware image (bad FIT header)\n");
+ ret = -1;
+ return ret;
+diff --git a/include/image.h b/include/image.h
+index ea4c05ca2586..b73f739c1585 100644
+--- a/include/image.h
++++ b/include/image.h
+@@ -453,6 +453,9 @@ extern bootm_headers_t images;
+ #define uimage_to_cpu(x) be32_to_cpu(x)
+ #define cpu_to_uimage(x) cpu_to_be32(x)
+
++/* An invalid size, meaning that the image size is not known */
++#define IMAGE_SIZE_INVAL (-1UL)
++
+ /*
+ * Translation table for entries of a specific type; used by
+ * get_table_entry_id() and get_table_entry_name().
+@@ -1062,7 +1065,23 @@ int fit_image_check_os(const void *fit, int noffset, uint8_t os);
+ int fit_image_check_arch(const void *fit, int noffset, uint8_t arch);
+ int fit_image_check_type(const void *fit, int noffset, uint8_t type);
+ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp);
+-int fit_check_format(const void *fit);
++
++/**
++ * fit_check_format() - Check that the FIT is valid
++ *
++ * This performs various checks on the FIT to make sure it is suitable for
++ * use, looking for mandatory properties, nodes, etc.
++ *
++ * If FIT_FULL_CHECK is enabled, it also runs it through libfdt to make
++ * sure that there are no strange tags or broken nodes in the FIT.
++ *
++ * @fit: pointer to the FIT format image header
++ * @return 0 if OK, -ENOEXEC if not an FDT file, -EINVAL if the full FDT check
++ * failed (e.g. due to bad structure), -ENOMSG if the description is
++ * missing, -ENODATA if the timestamp is missing, -ENOENT if the /images
++ * path is missing
++ */
++int fit_check_format(const void *fit, ulong size);
+
+ int fit_conf_find_compat(const void *fit, const void *fdt);
+
+diff --git a/tools/fit_common.c b/tools/fit_common.c
+index 9506390214ce..5e85ca221ac9 100644
+--- a/tools/fit_common.c
++++ b/tools/fit_common.c
+@@ -26,7 +26,8 @@
+ int fit_verify_header(unsigned char *ptr, int image_size,
+ struct image_tool_params *params)
+ {
+- if (fdt_check_header(ptr) != EXIT_SUCCESS || !fit_check_format(ptr))
++ if (fdt_check_header(ptr) != EXIT_SUCCESS ||
++ fit_check_format(ptr, IMAGE_SIZE_INVAL))
+ return EXIT_FAILURE;
+
+ return EXIT_SUCCESS;
+diff --git a/tools/fit_image.c b/tools/fit_image.c
+index 3b867e06564e..21fc11c084c9 100644
+--- a/tools/fit_image.c
++++ b/tools/fit_image.c
+@@ -764,7 +764,7 @@ static int fit_extract_contents(void *ptr, struct image_tool_params *params)
+ /* Indent string is defined in header image.h */
+ p = IMAGE_INDENT_STRING;
+
+- if (!fit_check_format(fit)) {
++ if (fit_check_format(fit, IMAGE_SIZE_INVAL)) {
+ printf("Bad FIT image format\n");
+ return -1;
+ }
+diff --git a/tools/mkimage.h b/tools/mkimage.h
+index 0254af59fbed..d32625f0a234 100644
+--- a/tools/mkimage.h
++++ b/tools/mkimage.h
+@@ -29,6 +29,8 @@
+ #define debug(fmt,args...)
+ #endif /* MKIMAGE_DEBUG */
+
++#define log_debug(fmt, args...) debug(fmt, ##args)
++
+ static inline void *map_sysmem(ulong paddr, unsigned long len)
+ {
+ return (void *)(uintptr_t)paddr;
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0002-image-Add-an-option-to-do-a-full-check-of-the-FIT.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0002-image-Add-an-option-to-do-a-full-check-of-the-FIT.patch
new file mode 100644
index 000000000..51d858470
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27097/0002-image-Add-an-option-to-do-a-full-check-of-the-FIT.patch
@@ -0,0 +1,212 @@
+From cf469ab0783da6783f89a8e31c213f19fdf38dba Mon Sep 17 00:00:00 2001
+From: Simon Glass <sjg@chromium.org>
+Date: Mon, 15 Feb 2021 17:08:10 -0700
+Subject: [PATCH] image: Add an option to do a full check of the FIT
+
+Some strange modifications of the FIT can introduce security risks. Add an
+option to check it thoroughly, using libfdt's fdt_check_full() function.
+
+Enable this by default if signature verification is enabled.
+
+CVE-2021-27097
+
+Signed-off-by: Simon Glass <sjg@chromium.org>
+Reported-by: Bruce Monroe <bruce.monroe@intel.com>
+Reported-by: Arie Haenel <arie.haenel@intel.com>
+Reported-by: Julien Lenoir <julien.lenoir@intel.com>
+---
+ Kconfig | 19 ++++++++++++
+ common/image-fit.c | 20 ++++++++++++-
+ include/linux/libfdt.h | 2 ++
+ lib/libfdt/fdt_ro.c | 65 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 105 insertions(+), 1 deletion(-)
+
+diff --git a/Kconfig b/Kconfig
+index b62bcdbccf1e..0165ca33c5d1 100644
+--- a/Kconfig
++++ b/Kconfig
+@@ -318,11 +318,21 @@ config FIT_ENABLE_SHA512_SUPPORT
+ SHA512 checksum is a 512-bit (64-byte) hash value used to check that
+ the image contents have not been corrupted.
+
++config FIT_FULL_CHECK
++ bool "Do a full check of the FIT before using it"
++ default y
++ help
++ Enable this do a full check of the FIT to make sure it is valid. This
++ helps to protect against carefully crafted FITs which take advantage
++ of bugs or omissions in the code. This includes a bad structure,
++ multiple root nodes and the like.
++
+ config FIT_SIGNATURE
+ bool "Enable signature verification of FIT uImages"
+ depends on DM
+ select HASH
+ select RSA
++ select FIT_FULL_CHECK
+ help
+ This option enables signature verification of FIT uImages,
+ using a hash signed and verified using RSA. If
+@@ -398,6 +408,14 @@ config SPL_FIT_PRINT
+ help
+ Support printing the content of the fitImage in a verbose manner in SPL.
+
++config SPL_FIT_FULL_CHECK
++ bool "Do a full check of the FIT before using it"
++ help
++ Enable this do a full check of the FIT to make sure it is valid. This
++ helps to protect against carefully crafted FITs which take advantage
++ of bugs or omissions in the code. This includes a bad structure,
++ multiple root nodes and the like.
++
+ config SPL_FIT_SIGNATURE
+ bool "Enable signature verification of FIT firmware within SPL"
+ depends on SPL_DM
+@@ -405,6 +423,7 @@ config SPL_FIT_SIGNATURE
+ select SPL_CRYPTO_SUPPORT
+ select SPL_HASH_SUPPORT
+ select SPL_RSA
++ select SPL_FIT_FULL_CHECK
+
+ config SPL_LOAD_FIT
+ bool "Enable SPL loading U-Boot as a FIT"
+diff --git a/common/image-fit.c b/common/image-fit.c
+index 124d8895cffd..b1926d8b53f8 100644
+--- a/common/image-fit.c
++++ b/common/image-fit.c
+@@ -15,7 +15,6 @@
+ #include <time.h>
+ #else
+ #include <linux/compiler.h>
+-#include <linux/kconfig.h>
+ #include <common.h>
+ #include <errno.h>
+ #include <mapmem.h>
+@@ -26,12 +25,15 @@ DECLARE_GLOBAL_DATA_PTR;
+
+ #include <image.h>
+ #include <bootstage.h>
++#include <linux/kconfig.h>
+ #include <u-boot/crc.h>
+ #include <u-boot/md5.h>
+ #include <u-boot/sha1.h>
+ #include <u-boot/sha256.h>
+ #include <u-boot/sha512.h>
+
++#define log_debug(fmt, args...) debug(fmt, ##args)
++
+ /*****************************************************************************/
+ /* New uImage format routines */
+ /*****************************************************************************/
+@@ -1487,6 +1489,22 @@ int fit_check_format(const void *fit, ulong size)
+ return -ENODATA;
+ }
+ }
++
++ if (CONFIG_IS_ENABLED(FIT_FULL_CHECK)) {
++ /*
++ * If we are not given the size, make do wtih calculating it.
++ * This is not as secure, so we should consider a flag to
++ * control this.
++ */
++ if (size == IMAGE_SIZE_INVAL)
++ size = fdt_totalsize(fit);
++ ret = fdt_check_full(fit, size);
++
++ if (ret) {
++ log_debug("FIT check error %d\n", ret);
++ return -EINVAL;
++ }
++ }
+
+ /* mandatory subimages parent '/images' node */
+ if (fdt_path_offset(fit, FIT_IMAGES_PATH) < 0) {
+diff --git a/include/linux/libfdt.h b/include/linux/libfdt.h
+index eeb2344971f3..29c997ada398 100644
+--- a/include/linux/libfdt.h
++++ b/include/linux/libfdt.h
+@@ -305,6 +305,8 @@ int fdt_next_region(const void *fdt,
+ */
+ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
+ int max_regions, struct fdt_region_state *info);
++
++int fdt_check_full(const void *fdt, size_t bufsize);
+ #endif /* SWIG */
+
+ extern struct fdt_header *working_fdt; /* Pointer to the working fdt */
+diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
+index b6ca4e0b0c30..dfbeb2c21a85 100644
+--- a/lib/libfdt/fdt_ro.c
++++ b/lib/libfdt/fdt_ro.c
+@@ -680,3 +680,68 @@ int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
+
+ return offset; /* error from fdt_next_node() */
+ }
++
++#define INT_MAX ((int)(~0U>>1))
++
++int fdt_check_full(const void *fdt, size_t bufsize)
++{
++ int err;
++ int num_memrsv;
++ int offset, nextoffset = 0;
++ uint32_t tag;
++ unsigned depth = 0;
++ const void *prop;
++ const char *propname;
++
++ if (bufsize < FDT_V1_SIZE)
++ return -FDT_ERR_TRUNCATED;
++ err = fdt_check_header(fdt);
++ if (err != 0)
++ return err;
++ if (bufsize < fdt_totalsize(fdt))
++ return -FDT_ERR_TRUNCATED;
++
++ num_memrsv = fdt_num_mem_rsv(fdt);
++ if (num_memrsv < 0)
++ return num_memrsv;
++
++ while (1) {
++ offset = nextoffset;
++ tag = fdt_next_tag(fdt, offset, &nextoffset);
++
++ if (nextoffset < 0)
++ return nextoffset;
++
++ switch (tag) {
++ case FDT_NOP:
++ break;
++
++ case FDT_END:
++ if (depth != 0)
++ return -FDT_ERR_BADSTRUCTURE;
++ return 0;
++
++ case FDT_BEGIN_NODE:
++ depth++;
++ if (depth > INT_MAX)
++ return -FDT_ERR_BADSTRUCTURE;
++ break;
++
++ case FDT_END_NODE:
++ if (depth == 0)
++ return -FDT_ERR_BADSTRUCTURE;
++ depth--;
++ break;
++
++ case FDT_PROP:
++ prop = fdt_getprop_by_offset(fdt, offset, &propname,
++ &err);
++ if (!prop)
++ return err;
++ break;
++
++ default:
++ return -FDT_ERR_INTERNAL;
++ }
++ }
++}
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27138/0001-image-Check-for-unit-addresses-in-FITs.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27138/0001-image-Check-for-unit-addresses-in-FITs.patch
new file mode 100644
index 000000000..33dbf15be
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/CVE-2021-27138/0001-image-Check-for-unit-addresses-in-FITs.patch
@@ -0,0 +1,106 @@
+From dbfcf0735d5f4d27445176f72e6174edf064c118 Mon Sep 17 00:00:00 2001
+From: Simon Glass <sjg@chromium.org>
+Date: Mon, 15 Feb 2021 17:08:12 -0700
+Subject: [PATCH] image: Check for unit addresses in FITs
+
+Using unit addresses in a FIT is a security risk. Add a check for this
+and disallow it.
+
+CVE-2021-27138
+
+Signed-off-by: Simon Glass <sjg@chromium.org>
+Reported-by: Bruce Monroe <bruce.monroe@intel.com>
+Reported-by: Arie Haenel <arie.haenel@intel.com>
+Reported-by: Julien Lenoir <julien.lenoir@intel.com>
+---
+ common/image-fit.c | 56 ++++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 52 insertions(+), 4 deletions(-)
+
+diff --git a/common/image-fit.c b/common/image-fit.c
+index 78db32e89f6f..6c495ffa4349 100644
+--- a/common/image-fit.c
++++ b/common/image-fit.c
+@@ -1217,6 +1217,34 @@ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp)
+ return (comp == image_comp);
+ }
+
++/**
++ * fdt_check_no_at() - Check for nodes whose names contain '@'
++ *
++ * This checks the parent node and all subnodes recursively
++ *
++ * @fit: FIT to check
++ * @parent: Parent node to check
++ * @return 0 if OK, -EADDRNOTAVAIL is a node has a name containing '@'
++ */
++static int fdt_check_no_at(const void *fit, int parent)
++{
++ const char *name;
++ int node;
++ int ret;
++
++ name = fdt_get_name(fit, parent, NULL);
++ if (!name || strchr(name, '@'))
++ return -EADDRNOTAVAIL;
++
++ fdt_for_each_subnode(node, fit, parent) {
++ ret = fdt_check_no_at(fit, node);
++ if (ret)
++ return ret;
++ }
++
++ return 0;
++}
++
+ int fit_check_format(const void *fit, ulong size)
+ {
+ int ret;
+@@ -1251,10 +1279,27 @@ int fit_check_format(const void *fit, ulong size)
+ if (size == IMAGE_SIZE_INVAL)
+ size = fdt_totalsize(fit);
+ ret = fdt_check_full(fit, size);
++ if (ret)
++ ret = -EINVAL;
++
++ /*
++ * U-Boot stopped using unit addressed in 2017. Since libfdt
++ * can match nodes ignoring any unit address, signature
++ * verification can see the wrong node if one is inserted with
++ * the same name as a valid node but with a unit address
++ * attached. Protect against this by disallowing unit addresses.
++ */
++ if (!ret && CONFIG_IS_ENABLED(FIT_SIGNATURE)) {
++ ret = fdt_check_no_at(fit, 0);
+
++ if (ret) {
++ log_debug("FIT check error %d\n", ret);
++ return ret;
++ }
++ }
+ if (ret) {
+ log_debug("FIT check error %d\n", ret);
+- return -EINVAL;
++ return ret;
+ }
+ }
+
+@@ -1604,10 +1649,13 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
+ printf("## Loading %s from FIT Image at %08lx ...\n", prop_name, addr);
+
+ bootstage_mark(bootstage_id + BOOTSTAGE_SUB_FORMAT);
+- if (fit_check_format(fit, IMAGE_SIZE_INVAL)) {
+- printf("Bad FIT %s image format!\n", prop_name);
++ ret = fit_check_format(fit, IMAGE_SIZE_INVAL);
++ if (ret) {
++ printf("Bad FIT %s image format! (err=%d)\n", prop_name, ret);
++ if (CONFIG_IS_ENABLED(FIT_SIGNATURE) && ret == -EADDRNOTAVAIL)
++ printf("Signature checking prevents use of unit addresses (@) in nodes\n");
+ bootstage_error(bootstage_id + BOOTSTAGE_SUB_FORMAT);
+- return -ENOEXEC;
++ return ret;
+ }
+ bootstage_mark(bootstage_id + BOOTSTAGE_SUB_FORMAT_OK);
+ if (fit_uname) {
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
index 360d8398e..29d938c6e 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -1,6 +1,5 @@
COMPATIBLE_MACHINE = "intel-ast2600"
FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:"
-FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2020-10648:"
# the meta-phosphor layer adds this patch, which conflicts
# with the intel layout for environment
@@ -23,10 +22,10 @@ SRC_URI_append_intel-ast2600 = " \
file://0014-Add-a-workaround-to-cover-eSPI-OOB-free-bug-in-AST26.patch \
file://0015-net-phy-realtek-Change-LED-configuration.patch \
file://0016-Add-system-reset-status-support.patch \
+ file://0016-Add-LED-control-support.patch \
file://0017-Manufacturing-mode-physical-presence-detection.patch \
file://0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch \
file://0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch \
- file://0020-Add-BMC-running-indicator-LED-control.patch \
file://0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch \
file://0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch \
file://0024-fix-SUS_WARN-handling-logic.patch \
@@ -34,9 +33,11 @@ SRC_URI_append_intel-ast2600 = " \
file://0025-Enable-PCIe-L1-support.patch \
file://0027-ast2600-Add-Mailbox-init-function.patch \
file://0028-Improve-randomness-of-mac-address-generation.patch \
+ file://0029-Set-UART-routing-in-lowlevel_init.patch \
"
# CVE-2020-10648 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2020-10648:"
SRC_URI_append_intel-ast2600 = " \
file://0001-image-Correct-comment-for-fit_conf_get_node.patch \
file://0008-image-Load-the-correct-configuration-in-fit_check_si.patch \
@@ -44,6 +45,50 @@ SRC_URI_append_intel-ast2600 = " \
file://0012-image-Use-constants-for-required-and-key-name-hint.patch \
"
+# CVE-2019-11059 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-11059:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-Fix-ext4-block-group-descriptor-sizing.patch \
+ "
+
+# CVE-2019-11690 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-11690:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch \
+ "
+
+# CVE-2019-13104 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13104:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch \
+ "
+
+# CVE-2019-13105 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13105:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-fs-ext4-cache-extent-data.patch \
+ file://0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch \
+ "
+
+# CVE-2019-13106 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13106:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-CVE-2019-13106-ext4-fix-out-of-bounds-memset.patch \
+ "
+
+# CVE-2021-27097 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2021-27097:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-image-Adjust-the-workings-of-fit_check_format.patch \
+ file://0002-image-Add-an-option-to-do-a-full-check-of-the-FIT.patch \
+ "
+
+# CVE-2021-27138 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2021-27138:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-image-Check-for-unit-addresses-in-FITs.patch \
+ "
+
PFR_SRC_URI = " \
file://0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch \
"
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0001-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0001-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch
index 81e742412..05e40afb3 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0001-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0001-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch
@@ -1,4 +1,4 @@
-From 0177d25a23d56bca91fa7938d786b709fd7fba3e Mon Sep 17 00:00:00 2001
+From a136d2c30b850f94ee7b39f842eaede8c0a1c490 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Mon, 27 Apr 2020 12:11:06 -0700
Subject: [PATCH] Add a workaround to cover UART interrupt bug in AST2600 A0
@@ -9,74 +9,66 @@ register for clearing abnormal interrupts in every milli-second.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- arch/arm/boot/dts/aspeed-g6.dtsi | 20 ++++++-------
- drivers/tty/serial/8250/8250_of.c | 63 +++++++++++++++++++++++++++++++++++++++
- 2 files changed, 73 insertions(+), 10 deletions(-)
+ .../arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 8 +++
+ drivers/tty/serial/8250/8250_early.c | 1 +
+ drivers/tty/serial/8250/8250_of.c | 63 +++++++++++++++++++
+ 3 files changed, 72 insertions(+)
-diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
-index 656053386fe8..91f431e419d9 100644
---- a/arch/arm/boot/dts/aspeed-g6.dtsi
-+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
-@@ -502,8 +502,8 @@
- };
+diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
+index 3218884b90f4..08e1f060341e 100644
+--- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
++++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
+@@ -375,6 +375,8 @@
+ };
- uart1: serial@1e783000 {
-- compatible = "ns16550a";
-- reg = <0x1e783000 0x20>;
-+ compatible = "aspeed,ast2600-uart";
-+ reg = <0x1e783000 0x20>, <0x1e6e2014 0x4>, <0x1e78307c 0x4>;
- reg-shift = <2>;
- reg-io-width = <4>;
- interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
-@@ -516,8 +516,8 @@
- };
+ &uart1 {
++ compatible = "aspeed,ast2600-uart";
++ reg = <0x1e783000 0x20>, <0x1e6e2014 0x4>, <0x1e78307c 0x4>;
+ status = "okay";
+ pinctrl-0 = <&pinctrl_txd1_default
+ &pinctrl_rxd1_default
+@@ -387,6 +389,8 @@
+ };
- uart5: serial@1e784000 {
-- compatible = "ns16550a";
-- reg = <0x1e784000 0x1000>;
-+ compatible = "aspeed,ast2600-uart";
-+ reg = <0x1e784000 0x20>, <0x1e6e2014 0x4>, <0x1e78407c 0x4>;
- reg-shift = <2>;
- interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&syscon ASPEED_CLK_GATE_UART5CLK>;
-@@ -744,8 +744,8 @@
- };
+ &uart2 {
++ compatible = "aspeed,ast2600-uart";
++ reg = <0x1e78d000 0x20>, <0x1e6e2014 0x4>, <0x1e78d07c 0x4>;
+ status = "okay";
+ pinctrl-0 = <&pinctrl_txd2_default
+ &pinctrl_rxd2_default
+@@ -399,11 +403,15 @@
+ };
- uart2: serial@1e78d000 {
-- compatible = "ns16550a";
-- reg = <0x1e78d000 0x20>;
-+ compatible = "aspeed,ast2600-uart";
-+ reg = <0x1e78d000 0x20>, <0x1e6e2014 0x4>, <0x1e78d07c 0x4>;
- reg-shift = <2>;
- reg-io-width = <4>;
- interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
-@@ -758,8 +758,8 @@
- };
+ &uart3 {
++ compatible = "aspeed,ast2600-uart";
++ reg = <0x1e78e000 0x20>, <0x1e6e2014 0x4>, <0x1e78e07c 0x4>;
+ status = "okay";
+ pinctrl-0 = <>;
+ };
- uart3: serial@1e78e000 {
-- compatible = "ns16550a";
-- reg = <0x1e78e000 0x20>;
-+ compatible = "aspeed,ast2600-uart";
-+ reg = <0x1e78e000 0x20>, <0x1e6e2014 0x4>, <0x1e78e07c 0x4>;
- reg-shift = <2>;
- reg-io-width = <4>;
- interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
-@@ -772,8 +772,8 @@
- };
+ &uart4 {
++ compatible = "aspeed,ast2600-uart";
++ reg = <0x1e78f000 0x20>, <0x1e6e2014 0x4>, <0x1e78f07c 0x4>;
+ status = "okay";
+ pinctrl-0 = <>;
+ };
+diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
+index 70d7826788f5..56c4725e1b04 100644
+--- a/drivers/tty/serial/8250/8250_early.c
++++ b/drivers/tty/serial/8250/8250_early.c
+@@ -180,6 +180,7 @@ OF_EARLYCON_DECLARE(ns16550, "ns16550", early_serial8250_setup);
+ OF_EARLYCON_DECLARE(ns16550a, "ns16550a", early_serial8250_setup);
+ OF_EARLYCON_DECLARE(uart, "nvidia,tegra20-uart", early_serial8250_setup);
+ OF_EARLYCON_DECLARE(uart, "snps,dw-apb-uart", early_serial8250_setup);
++OF_EARLYCON_DECLARE(uart, "aspeed,ast2600-uart", early_serial8250_setup);
+
+ #ifdef CONFIG_SERIAL_8250_OMAP
- uart4: serial@1e78f000 {
-- compatible = "ns16550a";
-- reg = <0x1e78f000 0x20>;
-+ compatible = "aspeed,ast2600-uart";
-+ reg = <0x1e78f000 0x20>, <0x1e6e2014 0x4>, <0x1e78f07c 0x4>;
- reg-shift = <2>;
- reg-io-width = <4>;
- interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c
-index 9ba31701a372..53850f859424 100644
+index 65e9045dafe6..4d94c9f6a422 100644
--- a/drivers/tty/serial/8250/8250_of.c
+++ b/drivers/tty/serial/8250/8250_of.c
-@@ -16,6 +16,7 @@
+@@ -15,6 +15,7 @@
#include <linux/pm_runtime.h>
#include <linux/clk.h>
#include <linux/reset.h>
@@ -84,7 +76,7 @@ index 9ba31701a372..53850f859424 100644
#include "8250.h"
-@@ -24,6 +25,9 @@ struct of_serial_info {
+@@ -23,6 +24,9 @@ struct of_serial_info {
struct reset_control *rst;
int type;
int line;
@@ -93,8 +85,8 @@ index 9ba31701a372..53850f859424 100644
+ void __iomem *wa_base;
};
- #ifdef CONFIG_ARCH_TEGRA
-@@ -202,6 +206,18 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
+ /*
+@@ -181,6 +185,18 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
return ret;
}
@@ -113,7 +105,7 @@ index 9ba31701a372..53850f859424 100644
/*
* Try to register a serial port
*/
-@@ -250,6 +266,47 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
+@@ -229,6 +245,47 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
if (ret < 0)
goto err_dispose;
@@ -161,7 +153,7 @@ index 9ba31701a372..53850f859424 100644
info->type = port_type;
info->line = ret;
platform_set_drvdata(ofdev, info);
-@@ -271,6 +328,11 @@ static int of_platform_serial_remove(struct platform_device *ofdev)
+@@ -250,6 +307,11 @@ static int of_platform_serial_remove(struct platform_device *ofdev)
{
struct of_serial_info *info = platform_get_drvdata(ofdev);
@@ -173,7 +165,7 @@ index 9ba31701a372..53850f859424 100644
serial8250_unregister_port(info->line);
reset_control_assert(info->rst);
-@@ -341,6 +403,7 @@ static const struct of_device_id of_platform_serial_table[] = {
+@@ -319,6 +381,7 @@ static const struct of_device_id of_platform_serial_table[] = {
.data = (void *)PORT_XSCALE, },
{ .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, },
{ .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, },
@@ -182,5 +174,5 @@ index 9ba31701a372..53850f859424 100644
};
MODULE_DEVICE_TABLE(of, of_platform_serial_table);
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console@.service b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console@.service
deleted file mode 100644
index 7fb8f79d3..000000000
--- a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console@.service
+++ /dev/null
@@ -1,21 +0,0 @@
-[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-small/conf/layer.conf b/meta-openbmc-mods/meta-common-small/conf/layer.conf
index fd2746ef1..bd30de5f8 100644
--- a/meta-openbmc-mods/meta-common-small/conf/layer.conf
+++ b/meta-openbmc-mods/meta-common-small/conf/layer.conf
@@ -8,4 +8,4 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "common-small"
BBFILE_PATTERN_common-small = "^${LAYERDIR}/"
BBFILE_PRIORITY_common-small = "9"
-LAYERSERIES_COMPAT_common-small = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_common-small = "gatesgarth hardknott"
diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend
index fea29b586..680eccc2c 100644
--- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend
+++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend
@@ -15,7 +15,6 @@ EXTRA_OECONF = " \
--sysconfdir=${sysconfdir} \
--libexecdir=${libexecdir} \
--localstatedir=${localstatedir} \
- --with-confsuffix=/${BPN} \
--disable-strip \
--disable-werror \
--extra-cflags='${CFLAGS}' \
diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-full-fitimage.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-full-fitimage.bbclass
index 0fdad5b5c..6e0411a5c 100644
--- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-full-fitimage.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-full-fitimage.bbclass
@@ -77,7 +77,7 @@ fitimage_emit_section_kernel() {
if [ -n "${kernel_csum}" ]; then
hash_blk=$(cat << EOF
- hash@1 {
+ hash-1 {
algo = "${kernel_csum}";
};
EOF
@@ -91,7 +91,7 @@ EOF
fi
cat << EOF >> ${1}
- kernel@${2} {
+ kernel-${2} {
description = "Linux kernel";
data = /incbin/("${3}");
type = "kernel";
@@ -117,7 +117,7 @@ fitimage_emit_section_dtb() {
dtb_csum="${4}"
if [ -n "${dtb_csum}" ]; then
hash_blk=$(cat << EOF
- hash@1 {
+ hash-1 {
algo = "${dtb_csum}";
};
EOF
@@ -125,7 +125,7 @@ EOF
fi
cat << EOF >> ${1}
- fdt@${2} {
+ fdt-${2} {
description = "Flattened Device Tree blob";
data = /incbin/("${3}");
type = "flat_dt";
@@ -148,7 +148,7 @@ fitimage_emit_section_setup() {
setup_csum="${4}"
if [ -n "${setup_csum}" ]; then
hash_blk=$(cat << EOF
- hash@1 {
+ hash-1 {
algo = "${setup_csum}";
};
EOF
@@ -156,7 +156,7 @@ EOF
fi
cat << EOF >> ${1}
- setup@${2} {
+ setup-${2} {
description = "Linux setup.bin";
data = /incbin/("${3}");
type = "x86_setup";
@@ -182,7 +182,7 @@ fitimage_emit_section_ramdisk() {
ramdisk_csum="${4}"
if [ -n "${ramdisk_csum}" ]; then
hash_blk=$(cat << EOF
- hash@1 {
+ hash-1 {
algo = "${ramdisk_csum}";
};
EOF
@@ -218,7 +218,7 @@ EOF
esac
cat << EOF >> ${1}
- ramdisk@${2} {
+ ramdisk-${2} {
description = "${INITRAMFS_IMAGE}";
data = /incbin/("${3}");
type = "ramdisk";
@@ -248,7 +248,7 @@ fitimage_emit_section_config() {
conf_csum="${7}"
if [ -n "${conf_csum}" ]; then
hash_blk=$(cat << EOF
- hash@1 {
+ hash-1 {
algo = "${conf_csum}";
};
EOF
@@ -260,7 +260,7 @@ EOF
# Test if we have any DTBs at all
conf_desc="Linux kernel"
- kernel_line="kernel = \"kernel@${2}\";"
+ kernel_line="kernel = \"kernel-${2}\";"
fdt_line=""
ramdisk_line=""
setup_line=""
@@ -268,26 +268,26 @@ EOF
if [ -n "${3}" ]; then
conf_desc="${conf_desc}, FDT blob"
- fdt_line="fdt = \"fdt@${3}\";"
+ fdt_line="fdt = \"fdt-${3}\";"
fi
if [ -n "${4}" ]; then
conf_desc="${conf_desc}, ramdisk"
- ramdisk_line="ramdisk = \"ramdisk@${4}\";"
+ ramdisk_line="ramdisk = \"ramdisk-${4}\";"
fi
if [ -n "${5}" ]; then
conf_desc="${conf_desc}, setup"
- setup_line="setup = \"setup@${5}\";"
+ setup_line="setup = \"setup-${5}\";"
fi
if [ "${6}" = "1" ]; then
- default_line="default = \"conf@${3}\";"
+ default_line="default = \"conf-${3}\";"
fi
cat << EOF >> ${1}
${default_line}
- conf@${3} {
+ conf-${3} {
description = "${6} ${conf_desc}";
${kernel_line}
${fdt_line}
@@ -315,7 +315,7 @@ EOF
sign_line="${sign_line};"
cat << EOF >> ${1}
- signature@1 {
+ signature-1 {
algo = "${conf_csum},rsa2048";
key-name-hint = "${conf_sign_keyname}";
${sign_line}
diff --git a/meta-openbmc-mods/meta-common/classes/print-src.bbclass b/meta-openbmc-mods/meta-common/classes/print-src.bbclass
new file mode 100644
index 000000000..f305a5433
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/classes/print-src.bbclass
@@ -0,0 +1,7 @@
+python do_print_src () {
+ srcuri = d.getVar('SRC_URI', True).split()
+ srcrev = d.getVar('SRCREV', True).split()
+ bb.warn("SRC_URI: %s SRCREV: %s" % (srcuri, srcrev))
+}
+
+addtask do_print_src before do_fetch
diff --git a/meta-openbmc-mods/meta-common/conf/layer.conf b/meta-openbmc-mods/meta-common/conf/layer.conf
index 23382eda0..5d4becae0 100644
--- a/meta-openbmc-mods/meta-common/conf/layer.conf
+++ b/meta-openbmc-mods/meta-common/conf/layer.conf
@@ -8,4 +8,4 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "common"
BBFILE_PATTERN_common = "^${LAYERDIR}/"
BBFILE_PRIORITY_common = "9"
-LAYERSERIES_COMPAT_common = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_common = "gatesgarth hardknott"
diff --git a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1j.bb b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb
index bf01647ee..034cc610d 100644
--- a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1j.bb
+++ b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb
@@ -23,7 +23,7 @@ SRC_URI_append_class-nativesdk = " \
file://environment.d-openssl.sh \
"
-SRC_URI[sha256sum] = "aaf2fcb575cdf6491b98ab4829abf78a3dec8402b8b81efc8f23c00d443981bf"
+SRC_URI[sha256sum] = "892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5"
inherit lib_package multilib_header multilib_script ptest
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0034-Fix-double-free-in-netgroupcache-BZ-27462.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0034-Fix-double-free-in-netgroupcache-BZ-27462.patch
deleted file mode 100644
index 28580c7e2..000000000
--- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0034-Fix-double-free-in-netgroupcache-BZ-27462.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From dca565886b5e8bd7966e15f0ca42ee5cff686673 Mon Sep 17 00:00:00 2001
-From: DJ Delorie <dj@redhat.com>
-Date: Thu, 25 Feb 2021 16:08:21 -0500
-Subject: [PATCH] nscd: Fix double free in netgroupcache [BZ #27462]
-
-In commit 745664bd798ec8fd50438605948eea594179fba1 a use-after-free
-was fixed, but this led to an occasional double-free. This patch
-tracks the "live" allocation better.
-
-Tested manually by a third party.
-
-Related: RHBZ 1927877
-
-Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
-Reviewed-by: Carlos O'Donell <carlos@redhat.com>
----
- nscd/netgroupcache.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
-index dba6ceec1b..ad2daddafd 100644
---- a/nscd/netgroupcache.c
-+++ b/nscd/netgroupcache.c
-@@ -248,7 +248,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
- : NULL);
- ndomain = (ndomain ? newbuf + ndomaindiff
- : NULL);
-- buffer = newbuf;
-+ *tofreep = buffer = newbuf;
- }
-
- nhost = memcpy (buffer + bufused,
-@@ -319,7 +319,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
- else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE)
- {
- buflen *= 2;
-- buffer = xrealloc (buffer, buflen);
-+ *tofreep = buffer = xrealloc (buffer, buflen);
- }
- else if (status == NSS_STATUS_RETURN
- || status == NSS_STATUS_NOTFOUND
---
-2.27.0
-
diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend
index 6ee6db4fa..327c1ce64 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend
@@ -1,6 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
- file://0034-Fix-double-free-in-netgroupcache-BZ-27462.patch \
file://0035-Fix-build-error.patch \
"
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 4650ec29b..d1aa797a1 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 = "06aa21ab75cecce354b2a17e05d053c6f61d6a29"
+SRCREV = "01fbd0176c403feb29bf2a9ddd17469d0a27c3ef"
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 3e201e799..817e164a4 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 = "8fc53d7cef0dd7ac405b5d7d91a368f376cdb508"
+SRCREV = "ff44e549c44c7658ec11e0c19c13c4c45900cfe4"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb
index d8bfc68c0..bc62305e8 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb
@@ -7,7 +7,7 @@ SECTION = "lib"
inherit autotools pkgconfig
S = "${WORKDIR}/git"
-SRCREV = "a4abce065446410d137cece7cd017ff80251713d"
+SRCREV = "bfc9f8bb8a9bfd02fde8ef3fd78fcd61411d070d"
SRC_URI = "git://github.com/rurban/safeclib.git"
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64).*-linux'
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend
index 3c1c501ee..96439ffc7 100644
--- a/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend
@@ -1 +1,7 @@
RDEPENDS_${PN}-runtime += "${MLPREFIX}pam-plugin-localuser-${libpam_suffix}"
+
+#Default settings lockout duration to 300 seconds and threshold value to 10
+do_install_append() {
+ sed -i 's/deny=0/deny=10/' ${D}${sysconfdir}/pam.d/common-auth
+ sed -i 's/unlock_time=0/unlock_time=300/' ${D}${sysconfdir}/pam.d/common-auth
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend
index 6d16fe190..5e3751ded 100644
--- a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend
@@ -1,5 +1,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI = "git://github.com/openbmc/sdbusplus.git;nobranch=1"
+SRCREV = "95874d930f0bcc8390cd47ab3bb1e5e46db45278"
SRC_URI += " \
file://0001-Revert-server-Check-return-code-for-sd_bus_add_objec.patch \
"
+
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 de947b627..f42119baa 100644
--- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
@@ -2,4 +2,4 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
# Use the latest to support obmc-ikvm properly
SRC_URI = "git://github.com/LibVNC/libvncserver"
-SRCREV = "242fda806d16f06890fb61339aa0a585443af8bb"
+SRCREV = "2b6d595e3ea89597b3bebbf545eb7d3c0a1224a8"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb
index 444f308ba..a562636ba 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/host-misc-comm-manager.git;protocol=ssh"
-SRCREV = "47a56d7f753b5d0dd1eb0ef88005a966eaaa1144"
+SRCREV = "0d8577404fd321841fc84de547fe3d1d2a36909f"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Host.Misc.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
index c28d6a789..95ecf30fc 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
@@ -1,7 +1,7 @@
SUMMARY = "Intel Blocksign tool for PFR image"
DESCRIPTION = "Image signing tool for BMC PFR image"
-inherit native cmake
+inherit cmake native
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
index ef2c2fc20..fa591872a 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
@@ -2,7 +2,7 @@ SUMMARY = "SMBIOS MDR version 2 service for Intel based platform"
DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom"
SRC_URI = "git://github.com/openbmc/smbios-mdr.git"
-SRCREV = "ef55ef0590fc44e3b633635456f782999896b8ad"
+SRCREV = "2285be4fd22709c1dcfba10c2c604528353b428a"
S = "${WORKDIR}/git"
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 4af0acc49..591e86160 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
@@ -4,7 +4,7 @@ KBRANCH = "dev-5.10-intel"
KSRC = "git://github.com/Intel-BMC/linux;protocol=ssh;branch=${KBRANCH}"
# Include this as a comment only for downstream auto-bump
# SRC_URI = "git://github.com/Intel-BMC/linux;protocol=ssh;branch=dev-5.10-intel"
-SRCREV="807fd9e1636097ca70957a3ff373bd1280737e46"
+SRCREV="faadf371d041eb0d2c8b1d4cc729f19cf53e6a92"
do_compile_prepend(){
# device tree compiler flags
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 a8dd27f8a..6bfe783af 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
@@ -1,4 +1,4 @@
-From c5c5634ccc31cd494ad5333987fa6076f0f7464a Mon Sep 17 00:00:00 2001
+From 07bba51a168b769563a649f1c0f3a9126f480e57 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Thu, 2 Apr 2020 17:06:07 +0530
Subject: [PATCH] Adding channel specific privilege to network
@@ -19,17 +19,17 @@ Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
---
- ethernet_interface.cpp | 123 +++++++++++++++++++++++++++++++++++++++++
- ethernet_interface.hpp | 37 ++++++++++++-
- network_manager.cpp | 102 ++++++++++++++++++++++++++++++++++
+ ethernet_interface.cpp | 124 +++++++++++++++++++++++++++++++++++++++++
+ ethernet_interface.hpp | 37 +++++++++++-
+ network_manager.cpp | 102 +++++++++++++++++++++++++++++++++
network_manager.hpp | 9 +++
- 4 files changed, 270 insertions(+), 1 deletion(-)
+ 4 files changed, 271 insertions(+), 1 deletion(-)
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
-index 522be57..89adf69 100644
+index c47a759..d7a4168 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
-@@ -44,6 +44,10 @@ constexpr auto PROPERTY_INTERFACE = "org.freedesktop.DBus.Properties";
+@@ -45,6 +45,10 @@ constexpr auto PROPERTY_INTERFACE = "org.freedesktop.DBus.Properties";
constexpr auto RESOLVED_SERVICE_PATH = "/org/freedesktop/resolve1/link/";
constexpr auto METHOD_GET = "Get";
@@ -40,7 +40,7 @@ index 522be57..89adf69 100644
struct EthernetIntfSocket
{
EthernetIntfSocket(int domain, int type, int protocol)
-@@ -101,6 +105,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
+@@ -128,6 +132,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo));
EthernetInterfaceIntf::speed(std::get<0>(ifInfo));
#endif
@@ -48,10 +48,11 @@ index 522be57..89adf69 100644
// Emit deferred signal.
if (emitSignal)
-@@ -1068,5 +1073,123 @@ void EthernetInterface::deleteAll()
+@@ -1148,5 +1153,124 @@ std::string EthernetInterface::defaultGateway6(std::string gateway)
manager.writeToConfigurationFile();
+ return gw;
}
-
++
+nlohmann::json EthernetInterface::readJsonFile(const std::string& configFile)
+{
+ std::ifstream jsonFile(configFile);
@@ -173,7 +174,7 @@ index 522be57..89adf69 100644
} // namespace network
} // namespace phosphor
diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
-index abaf43e..f6d6363 100644
+index e2418a2..60fd272 100644
--- a/ethernet_interface.hpp
+++ b/ethernet_interface.hpp
@@ -2,11 +2,14 @@
@@ -216,9 +217,9 @@ index abaf43e..f6d6363 100644
class Manager; // forward declaration of network manager.
-@@ -223,6 +230,14 @@ class EthernetInterface : public Ifaces
+@@ -233,6 +240,14 @@ class EthernetInterface : public Ifaces
*/
- void deleteAll();
+ std::string defaultGateway6(std::string gateway) override;
+ /** @brief sets the channel maxium privilege.
+ * @param[in] value - Channel privilege which needs to be set on the
@@ -231,7 +232,7 @@ index abaf43e..f6d6363 100644
using EthernetInterfaceIntf::dHCPEnabled;
using EthernetInterfaceIntf::interfaceName;
using EthernetInterfaceIntf::linkUp;
-@@ -344,6 +359,26 @@ class EthernetInterface : public Ifaces
+@@ -356,6 +371,26 @@ class EthernetInterface : public Ifaces
* @returns true/false value if the address is static
*/
bool originIsManuallyAssigned(IP::AddressOrigin origin);
@@ -406,5 +407,5 @@ index 6815d3f..96e20a6 100644
} // namespace network
--
-2.29.2
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch
deleted file mode 100644
index d0ba59ccd..000000000
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 371fb36e7a92b4139022b568a278e7624727bbaf Mon Sep 17 00:00:00 2001
-From: Johnathan Mantey <johnathanx.mantey@intel.com>
-Date: Tue, 26 Jan 2021 15:02:54 -0800
-Subject: [PATCH] Improved IPv6 netmask parsing
-
-The subnet mask parsing in toV6CIDR only worked for very well behaved
-subnet strings. This became apparent after the BMC received a DHCP
-assigned IPv6 address with an Address Prefix equal to /128. Any
-netmask values trailing the final ":" character were ignored. In
-addition it assumed all subnet entries would be submitted in shorthand
-form.
-
-The changes here handle mask values supplied following the final ":"
-character. It also does more sanity checking on the incoming subnet
-string.
-
-Tested:
-Supplied the function with the following test patterns, and confirmed
-the function returns accurate address prefix values.
- ffff:ffff::
- ffff:fc00::
- ffff:0:0:0:0:0:0:0
- ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
- ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffc
- ffff:0:0:6:0:0:0:0
- :
- ::
-
-Change-Id: Ib2c73fe07a6a3f1c7a5f0e8f231dfef21badb3af
-Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
-
-%% original patch: 0004-Improved-IPv6-netmask-parsing.patch
----
- util.cpp | 67 ++++++++++++++++++++------------------------------------
- 1 file changed, 24 insertions(+), 43 deletions(-)
-
-diff --git a/util.cpp b/util.cpp
-index 0c5dbff..c230221 100644
---- a/util.cpp
-+++ b/util.cpp
-@@ -37,59 +37,40 @@ namespace fs = std::filesystem;
-
- uint8_t toV6Cidr(const std::string& subnetMask)
- {
-- uint8_t pos = 0;
-- uint8_t prevPos = 0;
-- uint8_t cidr = 0;
-- uint16_t buff{};
-- do
-+ struct in6_addr subnet;
-+ int ret = inet_pton(AF_INET6, subnetMask.c_str(), &subnet);
-+ if (ret != 1)
- {
-- // subnet mask look like ffff:ffff::
-- // or ffff:c000::
-- pos = subnetMask.find(":", prevPos);
-- if (pos == std::string::npos)
-- {
-- break;
-- }
--
-- auto str = subnetMask.substr(prevPos, (pos - prevPos));
-- prevPos = pos + 1;
-+ log<level::ERR>("Invalid Mask",
-+ entry("SUBNETMASK=%s", subnetMask.c_str()));
-+ return 0;
-+ }
-
-- // String length is 0
-- if (!str.length())
-- {
-- return cidr;
-- }
-- // converts it into number.
-- if (sscanf(str.c_str(), "%hx", &buff) <= 0)
-+ uint8_t cidr = 0;
-+ bool zeroesFound = false;
-+ int bitsSet, trailingZeroes;
-+ for (int lv = 0; lv < 4; lv++)
-+ {
-+ subnet.s6_addr32[lv] = be32toh(subnet.s6_addr32[lv]);
-+ bitsSet = __builtin_popcount(subnet.s6_addr32[lv]);
-+ if (zeroesFound && bitsSet)
- {
- log<level::ERR>("Invalid Mask",
- entry("SUBNETMASK=%s", subnetMask.c_str()));
--
- return 0;
- }
-+ trailingZeroes = __builtin_ctz(subnet.s6_addr32[lv]);
-+ zeroesFound |= trailingZeroes;
-
-- // convert the number into bitset
-- // and check for how many ones are there.
-- // if we don't have all the ones then make
-- // sure that all the ones should be left justify.
--
-- if (__builtin_popcount(buff) != 16)
-+ if (bitsSet + trailingZeroes != 32)
- {
-- if (((sizeof(buff) * 8) - (__builtin_ctz(buff))) !=
-- __builtin_popcount(buff))
-- {
-- log<level::ERR>("Invalid Mask",
-- entry("SUBNETMASK=%s", subnetMask.c_str()));
--
-- return 0;
-- }
-- cidr += __builtin_popcount(buff);
-- return cidr;
-+ // There are '1' bits interspersed with '0' bits
-+ log<level::ERR>("Invalid Mask",
-+ entry("SUBNETMASK=%s", subnetMask.c_str()));
-+ return 0;
- }
--
-- cidr += 16;
-- } while (1);
--
-+ cidr += bitsSet;
-+ }
- return cidr;
- }
- } // anonymous namespace
---
-2.26.2
-
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend
index 973cba09e..3540e93b4 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend
@@ -3,10 +3,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
DEPENDS += "nlohmann-json boost"
SRC_URI = "git://github.com/openbmc/phosphor-networkd"
-SRCREV = "1b5ec9c5367947d19bdf6efd08251eeb55dd90f4"
+SRCREV = "ee5b2c9469a56205567a8b1b120ecf34fc9f5ef4"
SRC_URI += "file://0003-Adding-channel-specific-privilege-to-network.patch \
- file://0004-Improved-IPv6-netmask-parsing.patch \
"
EXTRA_OECONF_append = " --enable-nic-ethtool=yes"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch
index fdd2ba6e3..e47111c56 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch
@@ -1,4 +1,4 @@
-From 85e7b2d9ede4bb33e02f48ea1d4691d2154fc4a5 Mon Sep 17 00:00:00 2001
+From a85d4c9cf702965593ec771e57a975e30d1d5853 Mon Sep 17 00:00:00 2001
From: Johnathan Mantey <johnathanx.mantey@intel.com>
Date: Tue, 13 Oct 2020 15:00:51 -0700
Subject: [PATCH] Improve initialization of I2C sensors
@@ -32,15 +32,15 @@ missing after AC cycles.
Change-Id: I118df674162677d66e7d211b089430fce384086b
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
---
- include/devices.hpp | 165 ++++++++++++++++++++-----------------
+ include/devices.hpp | 167 +++++++++++++++++++++-----------------
src/Overlay.cpp | 192 ++++++++++++++++++++++++++++++++++----------
- 2 files changed, 239 insertions(+), 118 deletions(-)
+ 2 files changed, 243 insertions(+), 116 deletions(-)
diff --git a/include/devices.hpp b/include/devices.hpp
-index c375b1c..b7dc7d0 100644
+index 50fbe63..2e299a0 100644
--- a/include/devices.hpp
+++ b/include/devices.hpp
-@@ -31,105 +31,122 @@ struct CmpStr
+@@ -31,107 +31,130 @@ struct CmpStr
struct ExportTemplate
{
@@ -61,14 +61,20 @@ index c375b1c..b7dc7d0 100644
const boost::container::flat_map<const char*, ExportTemplate, CmpStr>
exportTemplates{
-- {{"24C02", ExportTemplate("24c02 $Address",
-- "/sys/bus/i2c/devices/i2c-$Bus/new_device")},
-- {"24C64", ExportTemplate("24c64 $Address",
-- "/sys/bus/i2c/devices/i2c-$Bus/new_device")},
+ {{"EEPROM_24C02",
+ ExportTemplate("24c02 $Address",
+- "/sys/bus/i2c/devices/i2c-$Bus/new_device")},
++ "/sys/bus/i2c/devices/i2c-$Bus/new_device",
++ "new_device", "delete_device", false)},
+ {"EEPROM_24C64",
+ ExportTemplate("24c64 $Address",
+- "/sys/bus/i2c/devices/i2c-$Bus/new_device")},
- {"ADM1266",
- ExportTemplate("adm1266 $Address",
- "/sys/bus/i2c/devices/i2c-$Bus/new_device")},
-+ {{"24C02",
++ "/sys/bus/i2c/devices/i2c-$Bus/new_device",
++ "new_device", "delete_device", false)},
++ {"24C02",
+ ExportTemplate("24c02 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
+ "new_device", "delete_device", false)},
+ {"24C64",
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch
index 88e86f68c..8682e2cad 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch
@@ -1,6 +1,6 @@
-From 1e8b3e0fe4ce9aa87a35f6c3ba6e506873d5455c Mon Sep 17 00:00:00 2001
+From ff5dbca96d12b1c2aaaec0bb891125990af3f218 Mon Sep 17 00:00:00 2001
From: mansijos <mansi.joshi@intel.com>
-Date: Fri, 12 Feb 2021 11:26:57 +0530
+Date: Tue, 6 Apr 2021 02:12:56 +0530
Subject: [PATCH] Entity-manager: Add support to update assetTag
Asset tag is an updateable property from User level interface like
@@ -12,58 +12,17 @@ Successfully updated in assetTag interface as well as in fru interface
while using set-property and using redfish as well.
The new value is preserved after BMC resets.
-Change-Id: Iab8b24344d1a27486ceafe21aa2b4496706a2944
+Change-Id: If7fbfd8325488280f500ab0e2c8b38475813cc3f
Signed-off-by: mansijos <mansi.joshi@intel.com>
---
- include/EntityManager.hpp | 15 ++--
- src/EntityManager.cpp | 148 ++++++++++++++++++++++++++++++++------
- 2 files changed, 135 insertions(+), 28 deletions(-)
+ src/EntityManager.cpp | 92 +++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 88 insertions(+), 4 deletions(-)
-diff --git a/include/EntityManager.hpp b/include/EntityManager.hpp
-index 5867556..a4e9922 100644
---- a/include/EntityManager.hpp
-+++ b/include/EntityManager.hpp
-@@ -29,13 +29,16 @@
- #include <list>
- #include <string>
-
--using DBusProbeObjectT = boost::container::flat_map<
-- std::string,
-- std::vector<boost::container::flat_map<std::string, BasicVariantType>>>;
--
- using FoundDeviceT =
- std::vector<boost::container::flat_map<std::string, BasicVariantType>>;
-
-+using FoundDeviceInfoT = std::vector<
-+ std::tuple<boost::container::flat_map<std::string, BasicVariantType>,
-+ std::string, std::string, std::string>>;
-+
-+using DBusProbeObjectT =
-+ boost::container::flat_map<std::string, FoundDeviceInfoT>;
-+
- struct PerformScan : std::enable_shared_from_this<PerformScan>
- {
-
-@@ -62,12 +65,12 @@ struct PerformProbe : std::enable_shared_from_this<PerformProbe>
- {
- PerformProbe(const std::vector<std::string>& probeCommand,
- std::shared_ptr<PerformScan>& scanPtr,
-- std::function<void(FoundDeviceT&)>&& callback);
-+ std::function<void(FoundDeviceInfoT&)>&& callback);
- virtual ~PerformProbe();
-
- std::vector<std::string> _probeCommand;
- std::shared_ptr<PerformScan> scan;
-- std::function<void(FoundDeviceT&)> _callback;
-+ std::function<void(FoundDeviceInfoT&)> _callback;
- };
-
- inline void logDeviceAdded(const nlohmann::json& record)
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
-index aa1df20..cd73675 100644
+index 932b6f9..67b8f95 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
-@@ -47,9 +47,14 @@ constexpr const char* lastConfiguration = "/tmp/configuration/last.json";
+@@ -47,9 +47,17 @@ constexpr const char* lastConfiguration = "/tmp/configuration/last.json";
constexpr const char* currentConfiguration = "/var/configuration/system.json";
constexpr const char* globalSchema = "global.json";
constexpr const int32_t MAX_MAPPER_DEPTH = 0;
@@ -75,98 +34,13 @@ index aa1df20..cd73675 100644
+static foundProbeData foundData;
+static std::map<std::string, foundProbeData> mapFoundData;
+
++constexpr const char* fruConn = "xyz.openbmc_project.FruDevice";
++constexpr const char* fruIntf = "xyz.openbmc_project.FruDevice";
++
struct cmp_str
{
bool operator()(const char* a, const char* b) const
-@@ -169,7 +174,10 @@ void getInterfaces(
- return;
- }
-
-- scan->dbusProbeObjects[std::get<2>(call)].emplace_back(resp);
-+ // Save the dbus info along with device info
-+ scan->dbusProbeObjects[std::get<2>(call)].emplace_back(
-+ std::make_tuple(resp, std::get<0>(call), std::get<1>(call),
-+ std::get<2>(call)));
- },
- std::get<0>(call), std::get<1>(call), "org.freedesktop.DBus.Properties",
- "GetAll", std::get<2>(call));
-@@ -274,11 +282,10 @@ void findDbusObjects(std::vector<std::shared_ptr<PerformProbe>>&& probeVector,
- // probes dbus interface dictionary for a key with a value that matches a regex
- bool probeDbus(const std::string& interface,
- const std::map<std::string, nlohmann::json>& matches,
-- FoundDeviceT& devices, std::shared_ptr<PerformScan> scan,
-+ FoundDeviceInfoT& devices, std::shared_ptr<PerformScan> scan,
- bool& foundProbe)
- {
-- std::vector<boost::container::flat_map<std::string, BasicVariantType>>&
-- dbusObject = scan->dbusProbeObjects[interface];
-+ FoundDeviceInfoT& dbusObject = scan->dbusProbeObjects[interface];
- if (dbusObject.empty())
- {
- foundProbe = false;
-@@ -287,8 +294,9 @@ bool probeDbus(const std::string& interface,
- foundProbe = true;
-
- bool foundMatch = false;
-- for (auto& device : dbusObject)
-+ for (auto& deviceInfo : dbusObject)
- {
-+ auto& device = std::get<0>(deviceInfo);
- bool deviceMatches = true;
- for (auto& match : matches)
- {
-@@ -305,7 +313,7 @@ bool probeDbus(const std::string& interface,
- }
- if (deviceMatches)
- {
-- devices.emplace_back(device);
-+ devices.emplace_back(deviceInfo);
- foundMatch = true;
- deviceMatches = false; // for next iteration
- }
-@@ -315,11 +323,8 @@ bool probeDbus(const std::string& interface,
-
- // default probe entry point, iterates a list looking for specific types to
- // call specific probe functions
--bool probe(
-- const std::vector<std::string>& probeCommand,
-- std::shared_ptr<PerformScan> scan,
-- std::vector<boost::container::flat_map<std::string, BasicVariantType>>&
-- foundDevs)
-+bool probe(const std::vector<std::string>& probeCommand,
-+ std::shared_ptr<PerformScan> scan, FoundDeviceInfoT& foundDevs)
- {
- const static std::regex command(R"(\((.*)\))");
- std::smatch match;
-@@ -449,8 +454,9 @@ bool probe(
- // probe passed, but empty device
- if (ret && foundDevs.size() == 0)
- {
-- foundDevs.emplace_back(
-- boost::container::flat_map<std::string, BasicVariantType>{});
-+ foundDevs.emplace_back(std::make_tuple(
-+ boost::container::flat_map<std::string, BasicVariantType>{},
-+ std::string{}, std::string{}, std::string{}));
- }
- if (matchOne && ret)
- {
-@@ -465,13 +471,13 @@ bool probe(
-
- PerformProbe::PerformProbe(const std::vector<std::string>& probeCommand,
- std::shared_ptr<PerformScan>& scanPtr,
-- std::function<void(FoundDeviceT&)>&& callback) :
-+ std::function<void(FoundDeviceInfoT&)>&& callback) :
- _probeCommand(probeCommand),
- scan(scanPtr), _callback(std::move(callback))
- {}
- PerformProbe::~PerformProbe()
- {
-- FoundDeviceT foundDevs;
-+ FoundDeviceInfoT foundDevs;
- if (probe(_probeCommand, scan, foundDevs))
- {
- _callback(foundDevs);
-@@ -556,6 +562,47 @@ void addArrayToDbus(const std::string& name, const nlohmann::json& array,
+@@ -575,6 +583,43 @@ void addArrayToDbus(const std::string& name, const nlohmann::json& array,
}
}
@@ -186,11 +60,8 @@ index aa1df20..cd73675 100644
+ }
+
+ foundProbeData& tmpMap = it->second;
-+ auto foundConn = tmpMap.find("foundConn");
+ auto foundPath = tmpMap.find("foundPath");
-+ auto foundIntf = tmpMap.find("foundIntf");
-+ if (foundConn == tmpMap.end() || foundPath == tmpMap.end() ||
-+ foundIntf == tmpMap.end())
++ if (foundPath == tmpMap.end())
+ {
+ std::cerr << "No prob object data is avaliable in foundProbeData"
+ << "\n";
@@ -205,20 +76,16 @@ index aa1df20..cd73675 100644
+ << "\n";
+ }
+ },
-+ foundConn->second, foundPath->second, "org.freedesktop.DBus.Properties",
-+ "Set", foundIntf->second, "PRODUCT_ASSET_TAG",
-+ std::variant<PropertyType>(newVal));
++ fruConn, foundPath->second, "org.freedesktop.DBus.Properties", "Set",
++ fruIntf, "PRODUCT_ASSET_TAG", std::variant<PropertyType>(newVal));
+ return true;
+}
+
template <typename PropertyType>
void addProperty(const std::string& propertyName, const PropertyType& value,
sdbusplus::asio::dbus_interface* iface,
-@@ -568,11 +615,21 @@ void addProperty(const std::string& propertyName, const PropertyType& value,
- iface->register_property(propertyName, value);
- return;
+@@ -589,9 +634,18 @@ void addProperty(const std::string& propertyName, const PropertyType& value,
}
-+
iface->register_property(
propertyName, value,
- [&systemConfiguration,
@@ -237,19 +104,17 @@ index aa1df20..cd73675 100644
val = newVal;
if (!setJsonFromPointer(jsonPointerString, val,
systemConfiguration))
-@@ -970,6 +1027,11 @@ void postToDbus(const nlohmann::json& newConfiguration,
+@@ -989,6 +1043,9 @@ void postToDbus(const nlohmann::json& newConfiguration,
populateInterfaceFromJson(systemConfiguration, jsonPointerPath,
boardIface, boardValues, objServer);
jsonPointerPath += "/";
+
-+ std::string foundConn;
+ std::string foundPath;
-+ std::string foundIntf;
+
// iterate through board properties
for (auto& boardField : boardValues.items())
{
-@@ -979,9 +1041,32 @@ void postToDbus(const nlohmann::json& newConfiguration,
+@@ -998,9 +1055,28 @@ void postToDbus(const nlohmann::json& newConfiguration,
createInterface(objServer, boardName, boardField.key(),
boardKeyOrig);
@@ -258,16 +123,12 @@ index aa1df20..cd73675 100644
- iface, boardField.value(), objServer);
+ if (boardField.key() == "FoundProbe")
+ {
-+ foundConn = boardField.value()["Connection"];
+ foundPath = boardField.value()["Path"];
-+ foundIntf = boardField.value()["Interface"];
+ }
+ if (boardField.key() ==
+ "xyz.openbmc_project.Inventory.Decorator.AssetTag")
+ {
-+ foundData["foundConn"] = foundConn;
+ foundData["foundPath"] = foundPath;
-+ foundData["foundIntf"] = foundIntf;
+ mapFoundData[jsonPointerPath + boardField.key()] =
+ foundData;
+
@@ -285,63 +146,24 @@ index aa1df20..cd73675 100644
}
}
-@@ -1278,7 +1363,7 @@ void PerformScan::run()
- auto thisRef = shared_from_this();
- auto probePointer = std::make_shared<PerformProbe>(
- probeCommand, thisRef,
-- [&, recordPtr, probeName](FoundDeviceT& foundDevices) {
-+ [&, recordPtr, probeName](FoundDeviceInfoT& foundDevices) {
- _passed = true;
-
- std::set<nlohmann::json> usedNames;
-@@ -1294,7 +1379,8 @@ void PerformScan::run()
- for (auto itr = foundDevices.begin();
- itr != foundDevices.end();)
- {
-- std::string recordName = getRecordName(*itr, probeName);
-+ std::string recordName =
-+ getRecordName(std::get<0>(*itr), probeName);
-
- auto fromLastJson = lastJson.find(recordName);
- if (fromLastJson != lastJson.end())
-@@ -1328,6 +1414,15 @@ void PerformScan::run()
+@@ -1349,6 +1425,10 @@ void PerformScan::run()
continue;
}
+ nlohmann::json recordVal = *recordPtr;
-+ // Save the dbus connection, path and interface info
-+ // of the device
-+ recordVal[foundObject]["Connection"] =
-+ std::get<1>(*itr);
-+ recordVal[foundObject]["Path"] = std::get<2>(*itr);
-+ recordVal[foundObject]["Interface"] =
-+ std::get<3>(*itr);
++ // Save the dbus path info of the device
++ recordVal[foundObject]["Path"] = std::get<1>(*itr);
+
int index = std::stoi(
nameIt->get<std::string>().substr(indexIdx),
nullptr, 0);
-@@ -1349,8 +1444,9 @@ void PerformScan::run()
-
- std::optional<std::string> replaceStr;
-
-- for (auto& foundDevice : foundDevices)
-+ for (auto& foundDeviceInfo : foundDevices)
- {
-+ auto& foundDevice = std::get<0>(foundDeviceInfo);
- nlohmann::json record = *recordPtr;
- std::string recordName =
- getRecordName(foundDevice, probeName);
-@@ -1382,6 +1478,14 @@ void PerformScan::run()
+@@ -1421,6 +1501,10 @@ void PerformScan::run()
}
}
-+ // Save the dbus connection, path and interface info
-+ // of the device
-+ record[foundObject]["Connection"] =
-+ std::get<1>(foundDeviceInfo);
-+ record[foundObject]["Path"] = std::get<2>(foundDeviceInfo);
-+ record[foundObject]["Interface"] =
-+ std::get<3>(foundDeviceInfo);
++ // Save the dbus path info of the device
++ record[foundObject]["Path"] =
++ std::get<1>(foundDeviceAndPath);
+
if (replaceStr)
{
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0003-Add-logs-to-fwVersionIsSame.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0003-Add-logs-to-fwVersionIsSame.patch
new file mode 100644
index 000000000..94af67967
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0003-Add-logs-to-fwVersionIsSame.patch
@@ -0,0 +1,56 @@
+From 28525b56161e1b659e85e85c33fc00dc397758aa Mon Sep 17 00:00:00 2001
+From: Helen Huang <he.huang@intel.com>
+Date: Mon, 19 Apr 2021 16:06:15 +0800
+Subject: [PATCH] Add logs to fwVersionIsSame()
+
+Add logs to fwVersionIsSame() to indicate whether the firmware
+version is changed or not.
+
+Tested:
+Logs are printed as expected when firmware updating and BMC rebooting.
+
+Log of rebooting:
+The firmware version is similiar as the last boot,
+Hash value of versionFile is:3336889560
+
+Log of Firmware update:
+The firmware version is changed since the last boot,
+hash value of current versionFile is:3336889560,
+hash value of versionFile of last boot is:834871226
+
+Change-Id: I5306917329d2e2e015af58cad1e9c59881f0b217
+Signed-off-by: Helen Huang <he.huang@intel.com>
+---
+ include/Utils.hpp | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/include/Utils.hpp b/include/Utils.hpp
+index 657af92..8238807 100644
+--- a/include/Utils.hpp
++++ b/include/Utils.hpp
+@@ -116,13 +116,22 @@ inline bool fwVersionIsSame(void)
+
+ if (expectedHash == hashString)
+ {
++ std::cout << "The firmware version is similiar as the last boot, "
++ "hash value of versionFile is:"
++ << hashString.c_str() << "\n";
+ return true;
+ }
++ std::cout << "The firmware version is changed since the last boot, hash "
++ "value of current versionFile is:"
++ << expectedHash.c_str()
++ << ", hash value of versionFile of last boot is:"
++ << hashString.c_str() << "\n";
+ hashFile.close();
+ }
+
+ std::ofstream output(versionHashFile);
+ output << expectedHash;
++
+ return false;
+ }
+
+--
+2.17.1
+
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 94bddf2be..9d891c620 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,10 +1,11 @@
# this is here just to bump faster than upstream
# SRC_URI = "git://github.com/openbmc/entity-manager.git"
-SRCREV = "296667f0076888f3cdf898a3f2cdf66da260853e"
+SRCREV = "1694ef625a1075599e40faa695a40d61ccd91095"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://0001-Improve-initialization-of-I2C-sensors.patch \
file://0002-Entity-manager-Add-support-to-update-assetTag.patch \
+ file://0003-Add-logs-to-fwVersionIsSame.patch \
"
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
index 7fb8f79d3..a242dba08 100644
--- 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
@@ -5,15 +5,8 @@ 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'
+ExecStopPost=/bin/sh -c 'echo -n "0" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/raw'
SyslogIdentifier=obmc-console-server
Restart=always
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index 1aa090f54..e935531ee 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -1,7 +1,7 @@
# Keep this as a comment to enable the auto-bump script without
# stomping on SRC_URI from previous .bbappend files
#SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git"
-SRCREV = "ae956ad9efd2be24c5439a4ef6498fb5c8383719"
+SRCREV = "33458d4432a8323616622881f314a73cf0b04d97"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
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 d988b7c93..ab1cd3742 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 = "d11a732a802cc281f4c1583275871fbc5f5ecced"
+SRCREV = "cb4c1a27574a7fe121a851ae7ba67aec254a1129"
FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0015-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch
index 54efbee8c..587421044 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0015-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch
@@ -1,13 +1,13 @@
-From f2dd5e13a0774d8683542798dd96979f9d7a6691 Mon Sep 17 00:00:00 2001
-From: Vernon Mauery <vernon.mauery@intel.com>
-Date: Tue, 29 Sep 2020 13:38:35 -0700
-Subject: [PATCH] Fix delete image by ID and inhibit removal of bmc_active
+From 19661c1173d9d82dfbb879f8cc89c05a0883dffa Mon Sep 17 00:00:00 2001
+From: AppaRao Puli <apparao.puli@linux.intel.com>
+Date: Wed, 21 Apr 2021 21:16:47 +0000
+Subject: [PATCH] Fix delete image by ID and inhibit removal of bmc_active
Delete image by ID was broken because when hitting the delete dbus
interface, it recalculated the ID from the parent version, which then
-does not match because of the random number addition that was added to
-the ID when the parent interface was created. This saves away the parent
-interface ID and recalls it rather than recalculating it.
+does not match because of the random number addition that was added
+to the ID when the parent interface was created. This saves away the
+parent interface ID and recalls it rather than recalculating it.
Also, there was a logic error in deleting images that would delete the
active BMC image. This fixes up that error.
@@ -17,36 +17,51 @@ Tested: run multiple back-to back updates and see that when the fwupd
deleted and that the bmc_active interface is not deleted.
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
+Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
- item_updater.cpp | 17 +++++++++++------
+ image_manager.cpp | 2 +-
+ item_updater.cpp | 20 +++++++++++++-------
pfr_image_manager.cpp | 2 +-
version.cpp | 2 +-
version.hpp | 19 +++++++++++++++----
- 4 files changed, 28 insertions(+), 12 deletions(-)
+ 5 files changed, 31 insertions(+), 14 deletions(-)
+diff --git a/image_manager.cpp b/image_manager.cpp
+index 4be357f..311a63f 100644
+--- a/image_manager.cpp
++++ b/image_manager.cpp
+@@ -219,7 +219,7 @@ int Manager::processImage(const std::string& tarFilePath)
+ {
+ // Create Version object
+ auto versionPtr = std::make_unique<Version>(
+- bus, objPath, version, purpose, extendedVersion,
++ bus, objPath, id, version, purpose, extendedVersion,
+ imageDirPath.string(),
+ std::bind(&Manager::erase, this, std::placeholders::_1));
+ versionPtr->deleteObject =
diff --git a/item_updater.cpp b/item_updater.cpp
-index db255d6..90970d3 100644
+index 6efd519..6685bf5 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
-@@ -133,7 +133,7 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
+@@ -145,7 +145,7 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
activationState, associations)));
auto versionPtr = std::make_unique<VersionClass>(
-- bus, path, version, purpose, filePath,
-+ bus, path, versionId, version, purpose, filePath,
+- bus, path, version, purpose, extendedVersion, filePath,
++ bus, path, versionId, version, purpose, extendedVersion, filePath,
std::bind(&ItemUpdater::erase, this, std::placeholders::_1));
versionPtr->deleteObject =
std::make_unique<phosphor::software::manager::Delete>(bus, path,
-@@ -247,7 +247,7 @@ void ItemUpdater::processBMCImage()
+@@ -263,7 +263,7 @@ void ItemUpdater::processBMCImage()
// Create Version instance for this version.
auto versionPtr = std::make_unique<VersionClass>(
-- bus, path, version, purpose, "",
-+ bus, path, id, version, purpose, "",
+- bus, path, version, purpose, extendedVersion, "",
++ bus, path, id, version, purpose, extendedVersion, "",
std::bind(&ItemUpdater::erase, this, std::placeholders::_1));
auto isVersionFunctional = versionPtr->isFunctional();
if (!isVersionFunctional)
-@@ -322,11 +322,11 @@ void ItemUpdater::erase(std::string entryId)
+@@ -338,11 +338,11 @@ void ItemUpdater::erase(std::string entryId)
auto it = versions.find(entryId);
if (it != versions.end())
{
@@ -62,7 +77,7 @@ index db255d6..90970d3 100644
return;
}
}
-@@ -669,6 +669,11 @@ void ItemUpdater::freeSpace(Activation& caller)
+@@ -681,6 +681,12 @@ void ItemUpdater::freeSpace(Activation& caller)
std::size_t count = 0;
for (const auto& iter : activations)
{
@@ -71,27 +86,37 @@ index db255d6..90970d3 100644
+ // don't bother with function versions
+ continue;
+ }
++
if ((iter.second.get()->activation() ==
server::Activation::Activations::Active) ||
(iter.second.get()->activation() ==
+@@ -775,7 +781,7 @@ void ItemUpdater::createBIOSObject()
+ // Do nothing;
+ };
+ biosVersion = std::make_unique<VersionClass>(
+- bus, path, version, VersionPurpose::Host, "", "",
++ bus, path, versionId, version, VersionPurpose::Host, "", "",
+ std::bind(dummyErase, std::placeholders::_1));
+ biosVersion->deleteObject =
+ std::make_unique<phosphor::software::manager::Delete>(bus, path,
diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
-index 145237e..0c6c3d8 100644
+index 55ad21f..e2dcc80 100644
--- a/pfr_image_manager.cpp
+++ b/pfr_image_manager.cpp
-@@ -308,7 +308,7 @@ int Manager::processImage(const std::string& imgFilePath)
+@@ -399,7 +399,7 @@ int Manager::processImage(const std::string& imgFilePath)
std::string objPath = std::string{SOFTWARE_OBJPATH} + '/' + id;
auto versionPtr = std::make_unique<Version>(
-- bus, objPath, ver, purpose, imageDirPath.string(),
-+ bus, objPath, id, ver, purpose, imageDirPath.string(),
+- bus, objPath, ver, purpose, extVer, imageDirPath.string(),
++ bus, objPath, id, ver, purpose, extVer, imageDirPath.string(),
std::bind(&Manager::erase, this, std::placeholders::_1));
versionPtr->deleteObject =
std::make_unique<phosphor::software::manager::Delete>(bus, objPath,
diff --git a/version.cpp b/version.cpp
-index 18f3f4f..e6fd481 100644
+index 04f40c4..44ef571 100644
--- a/version.cpp
+++ b/version.cpp
-@@ -182,7 +182,7 @@ void Delete::delete_()
+@@ -206,7 +206,7 @@ void Delete::delete_()
{
if (parent.eraseCallback)
{
@@ -101,30 +126,26 @@ index 18f3f4f..e6fd481 100644
}
diff --git a/version.hpp b/version.hpp
-index 9cf76da..ae70ea8 100644
+index 8a68cb5..afc589c 100644
--- a/version.hpp
+++ b/version.hpp
-@@ -74,14 +74,15 @@ class Version : public VersionInherit
+@@ -77,11 +77,11 @@ class Version : public VersionInherit
* @param[in] callback - The eraseFunc callback
*/
Version(sdbusplus::bus::bus& bus, const std::string& objPath,
- const std::string& versionString, VersionPurpose versionPurpose,
-- const std::string& filePath, eraseFunc callback) :
+- const std::string& extVersion, const std::string& filePath,
+- eraseFunc callback) :
+ const std::string& extId, const std::string& versionString,
-+ VersionPurpose versionPurpose, const std::string& filePath,
-+ eraseFunc callback) :
++ VersionPurpose versionPurpose, const std::string& extVersion,
++ const std::string& filePath, eraseFunc callback) :
VersionInherit(bus, (objPath).c_str(), true),
- eraseCallback(callback), versionStr(versionString)
-+ eraseCallback(callback), extId(extId), versionStr(versionString)
++ eraseCallback(callback), versionStr(versionString), extId(extId)
{
// Set properties.
- purpose(versionPurpose);
-- version(versionString);
-+ version(extId);
- path(filePath);
- // Emit deferred signal.
- emit_object_added();
-@@ -134,6 +135,15 @@ class Version : public VersionInherit
+ extendedVersion(extVersion);
+@@ -150,6 +150,15 @@ class Version : public VersionInherit
*/
bool isFunctional();
@@ -140,10 +161,11 @@ index 9cf76da..ae70ea8 100644
/** @brief Persistent Delete D-Bus object */
std::unique_ptr<Delete> deleteObject;
-@@ -143,6 +153,7 @@ class Version : public VersionInherit
+@@ -159,6 +168,8 @@ class Version : public VersionInherit
private:
/** @brief This Version's version string */
const std::string versionStr;
++ /** @brief This is extended version string */
+ const std::string extId;
};
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 c71beebad..63e0aff25 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
@@ -24,6 +24,7 @@ SRC_URI_PFR = " \
file://0014-PFR-image-verification.patch \
file://0016-Process-PLDM-image-type.patch \
file://0017-Fix-build-error.patch \
+ file://0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch \
"
SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', SRC_URI_PFR, '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd_git.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd_git.bbappend
index a294ac520..ff30bacfb 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd_git.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd_git.bbappend
@@ -1,4 +1,4 @@
DEPENDS += " gtest"
#SRC_URI = "git://github.com/openbmc/phosphor-host-postd.git"
-SRCREV = "e2abf4429059b7ee3f90cc07f233a66b3022a176"
+SRCREV = "2a744b2d70ce9de8519a7c716da5009cb049db17"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch
deleted file mode 100644
index d04220b89..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From dcc94627aac5b8e4ad181c8548391c53d27b8896 Mon Sep 17 00:00:00 2001
-From: Karol Wachowski <karol.wachowski@intel.com>
-Date: Tue, 16 Feb 2021 06:47:11 +0000
-Subject: [PATCH] Change InsertMedia action response for POST in proxy mode
-
-Set boost::beast::http::status::method_not_allowed as a response
-for POST request to Virtual Media Insert Media action to keep
-consistency with other non existing requests.
----
- redfish-core/lib/virtual_media.hpp | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index 80e7315..76e8c4a 100644
---- a/redfish-core/lib/virtual_media.hpp
-+++ b/redfish-core/lib/virtual_media.hpp
-@@ -611,10 +611,9 @@ class VirtualMediaActionInsertMedia : public Node
- // Not possible in proxy mode
- BMCWEB_LOG_DEBUG << "InsertMedia not "
- "allowed in proxy mode";
-- messages::resourceNotFound(
-- aResp->res, "VirtualMedia.InsertMedia",
-- resName);
--
-+ aResp->res.result(
-+ boost::beast::http::status::
-+ method_not_allowed);
- return;
- }
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch
new file mode 100644
index 000000000..c9a4119a1
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch
@@ -0,0 +1,182 @@
+
+From 1bbabe4ecdeea20da809b9f1d8e194683629517c Mon Sep 17 00:00:00 2001
+From: Alicja Rybak <alicja.rybak@intel.com>
+Date: Tue, 20 Apr 2021 16:32:37 +0200
+Subject: [PATCH] Invalid status code from InsertMedia REST methods GET, PUT,
+ DELETE, PATCH in proxy mode
+
+Add handlers for GET, PUT, DELETE, PATCH method and function that
+checks which mode is used and set suitable status code:
+Not allowed for Legacy and Not found for Proxy.
+
+Change-Id: Ib4c0a3e9a2a8853caa74c59239d9fcfed99c5e8b
+Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
+---
+ redfish-core/lib/virtual_media.hpp | 154 +++++++++++++++++++++++++++++
+ 1 file changed, 154 insertions(+)
+
+diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
+index 8353ce7..66bf220 100644
+--- a/redfish-core/lib/virtual_media.hpp
++++ b/redfish-core/lib/virtual_media.hpp
+@@ -530,6 +530,160 @@ class VirtualMediaActionInsertMedia : public Node
+ return true;
+ }
+
++ /**
++ * @brief Function checks if insert media request is Legacy or Proxy type
++ * and sets suitable response code for unsupported REST method.
++ *
++ */
++ void CheckProxyMode(crow::Response& res,
++ const crow::Request& req,
++ const std::vector<std::string>& params)
++ {
++ auto aResp = std::make_shared<AsyncResp>(res);
++
++ if (params.size() != 2)
++ {
++ messages::internalError(res);
++ return;
++ }
++
++ // take resource name from URL
++ const std::string& resName = params[1];
++
++ if (params[0] != "bmc")
++ {
++ messages::resourceNotFound(res, "VirtualMedia.Insert", resName);
++
++ return;
++ }
++
++ crow::connections::systemBus->async_method_call(
++ [this, aResp{std::move(aResp)}, req,
++ resName](const boost::system::error_code ec,
++ const GetObjectType& getObjectType) {
++ if (ec)
++ {
++ BMCWEB_LOG_ERROR << "ObjectMapper::GetObject call failed: "
++ << ec;
++ aResp->res.result(
++ boost::beast::http::status::not_found);
++
++ return;
++ }
++ std::string service = getObjectType.begin()->first;
++ BMCWEB_LOG_DEBUG << "GetObjectType: " << service;
++
++ crow::connections::systemBus->async_method_call(
++ [this, service, resName, req,
++ aResp{aResp}](const boost::system::error_code ec,
++ ManagedObjectType& subtree) {
++ if (ec)
++ {
++ BMCWEB_LOG_DEBUG << "DBUS response error";
++
++ return;
++ }
++
++ for (auto& item : subtree)
++ {
++ std::string thispath = item.first.filename();
++ if (thispath.empty())
++ {
++ continue;
++ }
++
++ if (thispath != resName)
++ {
++ continue;
++ }
++
++ auto mode = item.first.parent_path();
++ auto type = mode.parent_path();
++ if (mode.filename().empty() ||
++ type.filename().empty())
++ {
++ continue;
++ }
++
++ if (type.filename() != "VirtualMedia")
++ {
++ continue;
++ }
++
++ // Check if dbus path is Legacy type
++ if (mode.filename() == "Legacy")
++ {
++ BMCWEB_LOG_DEBUG << "InsertMedia only allowed "
++ "with POST method "
++ "in legacy mode";
++ aResp->res.result(
++ boost::beast::http::status::
++ method_not_allowed);
++
++ return;
++ }
++ // Check if dbus path is Proxy type
++ if (mode.filename() == "Proxy")
++ {
++ // Not possible in proxy mode
++ BMCWEB_LOG_DEBUG << "InsertMedia not "
++ "allowed in proxy mode";
++ aResp->res.result(
++ boost::beast::http::status::not_found);
++
++ return;
++ }
++ }
++
++ BMCWEB_LOG_DEBUG << "Parent item not found";
++ aResp->res.result(
++ boost::beast::http::status::not_found);
++ },
++ service, "/xyz/openbmc_project/VirtualMedia",
++ "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
++ },
++ "xyz.openbmc_project.ObjectMapper",
++ "/xyz/openbmc_project/object_mapper",
++ "xyz.openbmc_project.ObjectMapper", "GetObject",
++ "/xyz/openbmc_project/VirtualMedia", std::array<const char*, 0>());
++ }
++
++ /**
++ * @brief Function handles GET method request.
++ */
++ void doGet(crow::Response& res, const crow::Request& req,
++ const std::vector<std::string>& params) override
++ {
++ CheckProxyMode(res, req, params);
++ }
++
++ /**
++ * @brief Function handles PATCH method request.
++ */
++ void doPatch(crow::Response& res, const crow::Request& req,
++ const std::vector<std::string>& params) override
++ {
++ CheckProxyMode(res, req, params);
++ }
++
++ /**
++ * @brief Function handles PUT method request.
++ */
++ void doPut(crow::Response& res, const crow::Request& req,
++ const std::vector<std::string>& params) override
++ {
++ CheckProxyMode(res, req, params);
++ }
++
++ /**
++ * @brief Function handles DELETE method request.
++ */
++ void doDelete(crow::Response& res, const crow::Request& req,
++ const std::vector<std::string>& params) override
++ {
++ CheckProxyMode(res, req, params);
++ }
++
+ /**
+ * @brief Function handles POST method request.
+ *
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch
new file mode 100644
index 000000000..074718349
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch
@@ -0,0 +1,44 @@
+From 81f2c022b22ef75990f30e5ba5bfd4ba5bd41754 Mon Sep 17 00:00:00 2001
+From: Alicja Rybak <alicja.rybak@intel.com>
+Date: Wed, 14 Apr 2021 16:26:59 +0200
+Subject: [PATCH] Bmcweb handle permission denied exception
+
+Add handling of permission denied exception (EPERM) that
+can be thrown by VirtualMedia service during Mount/Unmount dbus operations.
+
+Tested:
+Verified that after mounting/unmounting HTTPS resource twice in a row in legacy mode,
+VirtualMedia returns EPERM, which bmcweb handles as 403 status code.
+
+Change-Id: Ibc18d5ec822c5072605b1fc4651389982002798b
+Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
+---
+ redfish-core/lib/virtual_media.hpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
+index 365290b..bbdc91b 100644
+--- a/redfish-core/lib/virtual_media.hpp
++++ b/redfish-core/lib/virtual_media.hpp
+@@ -900,6 +900,10 @@ class VirtualMediaActionInsertMedia : public Node
+ {
+ messages::resourceInUse(asyncResp->res);
+ }
++ else if (ec == boost::system::errc::permission_denied)
++ {
++ messages::accessDenied(asyncResp->res, "VirtualMedia.Insert");
++ }
+ else
+ {
+ messages::internalError(asyncResp->res);
+@@ -1092,6 +1096,10 @@ class VirtualMediaActionEjectMedia : public Node
+ {
+ messages::resourceInUse(asyncResp->res);
+ }
++ else if (ec == boost::system::errc::permission_denied)
++ {
++ messages::accessDenied(asyncResp->res, "VirtualMedia.Eject");
++ }
+ else
+ {
+ messages::internalError(asyncResp->res);
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch
new file mode 100644
index 000000000..acfd9225b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch
@@ -0,0 +1,32 @@
+From 9493bb8e2f5c708e187313c86e6033de5f103c51 Mon Sep 17 00:00:00 2001
+From: Alicja Rybak <alicja.rybak@intel.com>
+Date: Fri, 23 Apr 2021 17:35:52 +0200
+Subject: [PATCH] Fix unmounting image in proxy mode.
+
+Sometimes Slot0 got higher key than Slot1 and erase function for Slot1
+invalidates elements with keys not less than the erased element.
+In that case invalid slot0 will be unmounted.
+Change order of calling close() and erase() functions to
+unmount correct device.
+
+Change-Id: I7a40a4518982f697d3eed635cde6d06978149cf0
+Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
+---
+ include/nbd_proxy.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
+index 7b90e90..fa7f647 100644
+--- a/include/nbd_proxy.hpp
++++ b/include/nbd_proxy.hpp
+@@ -428,9 +428,9 @@ inline void requestRoutes(App& app)
+ BMCWEB_LOG_DEBUG << "No session to close";
+ return;
+ }
++ session->second->close();
+ // Remove reference to session in global map
+ sessions.erase(session);
+- session->second->close();
+ })
+ .onmessage([](crow::websocket::Connection& conn,
+ const std::string& data, bool) {
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch
new file mode 100644
index 000000000..e52dff3f4
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch
@@ -0,0 +1,135 @@
+From b9747ecfce682f15dce0bb6e41e0c894f29419f3 Mon Sep 17 00:00:00 2001
+From: Snehalatha Venkatesh <snehalathax.v@intel.com>
+Date: Thu, 8 Apr 2021 14:42:07 +0000
+Subject: [PATCH] bmcweb: Add PhysicalContext to Thermal resources
+
+Adding PhysicalContext to make redfish data compliance with OCP
+Server Mgmt Interface v0.2.1.pdf and specific to Thermal resources.
+https://github.com/opencomputeproject/OCP-Profiles/blob/master/
+OCPServerHardwareManagement.v0_2_4.json
+
+Tested:
+1. Redfish validator - passed for this new change
+2. GET - https://<bmc.ip>/redfish/v1/Chassis/<Board>/Thermal
+Response:
+{
+ "@odata.id": "/redfish/v1/Chassis/<Board>/Thermal#/Temperatures/0",
+ "@odata.type": "#Thermal.v1_3_0.Temperature",
+ "LowerThresholdCritical": 0.0,
+ "LowerThresholdNonCritical": 5.0,
+ "MaxReadingRangeTemp": 127.0,
+ "MemberId": "BMC_Temp",
+ "MinReadingRangeTemp": -128.0,
+ "Name": "BMC Temp",
+ "PhysicalContext": "SystemBoard",
+ "ReadingCelsius": 25.75,
+ "Status": {
+ "Health": "OK",
+ "State": "Enabled"
+ },
+ "UpperThresholdCritical": 115.0,
+ "UpperThresholdNonCritical": 110.0
+},
+{
+ "@odata.id": "/redfish/v1/Chassis/<Board>/Thermal#/Temperatures/1",
+ "@odata.type": "#Thermal.v1_3_0.Temperature",
+ "LowerThresholdCritical": 0.0,
+ "LowerThresholdNonCritical": 5.0,
+ "MaxReadingRangeTemp": 255.0,
+ "MemberId": "CPU1_P12V_PVCCIN_VR_Temp",
+ "MinReadingRangeTemp": 0.0,
+ "Name": "CPU1 P12V PVCCIN VR Temp",
+ "PhysicalContext": "CPU",
+ "ReadingCelsius": 41.0,
+ "Status": {
+ "Health": "OK",
+ "State": "Enabled"
+ },
+ "UpperThresholdCritical": 115.0,
+ "UpperThresholdNonCritical": 110.0
+},
+{
+ "@odata.id": "/redfish/v1/Chassis/<Board>/Thermal#/Temperatures/28",
+ "@odata.type": "#Thermal.v1_3_0.Temperature",
+ "LowerThresholdCritical": 0.0,
+ "LowerThresholdNonCritical": 5.0,
+ "MaxReadingRangeTemp": 127.0,
+ "MemberId": "Inlet_BRD_Temp",
+ "MinReadingRangeTemp": -128.0,
+ "Name": "Inlet BRD Temp",
+ "PhysicalContext": "Intake",
+ "ReadingCelsius": 23.187,
+ "Status": {
+ "Health": "OK",
+ "State": "Enabled"
+ },
+ "UpperThresholdCritical": 115.0,
+ "UpperThresholdNonCritical": 110.0
+}
+3. GET - https://<bmc.ip>/redfish/v1/Chassis/<Board>/Power
+Response:
+{
+ "@odata.id": "/redfish/v1/Chassis/<Board>/Power#/Voltages/3",
+ "@odata.type": "#Power.v1_0_0.Voltage",
+ "LowerThresholdCritical": 1.648,
+ "LowerThresholdNonCritical": 1.699,
+ "MaxReadingRange": 2.3984009912875566,
+ "MemberId": "P1V8_PCH",
+ "MinReadingRange": 0.0,
+ "Name": "P1V8 PCH",
+ "ReadingVolts": 1.8055,
+ "Status": {
+ "Health": "OK",
+ "State": "Enabled"
+ },
+ "UpperThresholdCritical": 1.961,
+ "UpperThresholdNonCritical": 1.904
+}
+4. GET - https://<bmc.ip>/redfish/v1/Chassis/<Board>/Sensors/PSU1_Input_Current
+Response:
+{
+ "@odata.id": "/redfish/v1/Chassis/<Board>/Sensors/PSU1_Input_Current",
+ "@odata.type": "#Sensor.v1_0_0.Sensor",
+ "Id": "PSU1_Input_Current",
+ "Name": "PSU1 Input Current",
+ "Reading": 0.947,
+ "ReadingRangeMax": 12.0,
+ "ReadingRangeMin": 0.0,
+ "ReadingType": "Current",
+ "ReadingUnits": "A",
+ "Status": {
+ "Health": "OK",
+ "State": "Enabled"
+ }
+}
+Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com>
+---
+ redfish-core/lib/sensors.hpp | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
+index 9f06d2f..40fcdf8 100644
+--- a/redfish-core/lib/sensors.hpp
++++ b/redfish-core/lib/sensors.hpp
+@@ -964,6 +964,18 @@ inline void objectInterfacesToJson(
+ {
+ unit = "/ReadingCelsius"_json_pointer;
+ sensorJson["@odata.type"] = "#Thermal.v1_3_0.Temperature";
++ if (sensorName.find("CPU") != std::string::npos)
++ {
++ sensorJson["PhysicalContext"] = "CPU";
++ }
++ else if (sensorName.find("Inlet") != std::string::npos)
++ {
++ sensorJson["PhysicalContext"] = "Intake";
++ }
++ else
++ {
++ sensorJson["PhysicalContext"] = "SystemBoard";
++ }
+ // TODO(ed) Documentation says that path should be type fan_tach,
+ // implementation seems to implement fan
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0012-Log-RedFish-event-for-Invalid-login-attempt.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0012-Log-RedFish-event-for-Invalid-login-attempt.patch
new file mode 100644
index 000000000..3ef4ee2de
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0012-Log-RedFish-event-for-Invalid-login-attempt.patch
@@ -0,0 +1,67 @@
+From 1f572a1991fc8d9b08689aa6e3470080467977a7 Mon Sep 17 00:00:00 2001
+From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+Date: Thu, 15 Apr 2021 10:59:42 +0000
+Subject: [PATCH] Log RedFish event for Invalid login attempt
+
+This commit adds support for logging RedFish event log while user tries
+to attempt login with invalid credentials.
+When user trying to login with invalid credentials on HTTPS interface
+like WebUI and RedFish, event should be logged in RedFish event log.
+This event log is useful for further analysis to debug the root-cause
+for failure.
+
+Tested:
+1. Verified RedFish validator passed
+2. Login with wrong credentials on HTTPS interface.
+3. Verified for RedFish/WebUI events. RedFish event logged successfully.
+GET: https://BMC-IP/redfish/v1/Systems/system/LogServices/
+ EventLog/Entries
+Response:
+"Members": [
+{
+ "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/
+ Entries/1618466128",
+ "@odata.type": "#LogEntry.v1_4_0.LogEntry",
+ "Created": "2021-04-15T05:55:28+00:00",
+ "EntryType": "Event",
+ "Id": "1618466128",
+ "Message": "Invalid username or password attempted on HTTPS.",
+ "MessageArgs": [
+ "HTTPS"
+ ],
+ "MessageId": "OpenBMC.0.1.InvalidLoginAttempted",
+ "Name": "System Event Log Entry",
+ "Severity": "Warning"
+}
+
+Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+---
+ include/pam_authenticate.hpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/include/pam_authenticate.hpp b/include/pam_authenticate.hpp
+index 12f19c0..01bf301 100644
+--- a/include/pam_authenticate.hpp
++++ b/include/pam_authenticate.hpp
+@@ -1,6 +1,7 @@
+ #pragma once
+
+ #include <security/pam_appl.h>
++#include <systemd/sd-journal.h>
+
+ #include <boost/utility/string_view.hpp>
+
+@@ -75,6 +76,10 @@ inline int pamAuthenticateUser(const std::string_view username,
+ PAM_SILENT | PAM_DISALLOW_NULL_AUTHTOK);
+ if (retval != PAM_SUCCESS)
+ {
++ sd_journal_send("MESSAGE= %s", "Invalid login attempted on HTTPS",
++ "PRIORITY=%i", LOG_WARNING, "REDFISH_MESSAGE_ID=%s",
++ "OpenBMC.0.1.InvalidLoginAttempted",
++ "REDFISH_MESSAGE_ARGS=%s", "HTTPS", NULL);
+ pam_end(localAuthHandle, PAM_SUCCESS); // ignore retval
+ return retval;
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Add-UART-routing-logic-into-host-console-connection-.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Add-UART-routing-logic-into-host-console-connection-.patch
new file mode 100644
index 000000000..8b0d90fe0
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Add-UART-routing-logic-into-host-console-connection-.patch
@@ -0,0 +1,59 @@
+From 6c10adb53d3247f65e5d9399290e6b8e7962cdef Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Wed, 28 Apr 2021 17:19:50 -0700
+Subject: [PATCH] Add UART routing logic into host console connection flow
+
+Switching UART routing when starting obmc-service introduces garbled
+character printing out on physical host serial output and it's
+inevitable so this commit moves the routing logic into host console
+connection flow in bmcweb to avoid the issue until SOL is actually
+activated.
+
+Tested: The garbled character printing out was not observed during
+BMC booting. SOL worked well.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ include/obmc_console.hpp | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp
+index cdb19901e82d..9c4ae8821074 100644
+--- a/include/obmc_console.hpp
++++ b/include/obmc_console.hpp
+@@ -22,6 +22,9 @@ static boost::container::flat_set<crow::websocket::Connection*> sessions;
+
+ static bool doingWrite = false;
+
++constexpr char const* uartMuxCtrlPath = "/sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart_routing/raw";
++constexpr char const* uartMuxCtrlVal = "0x03450003";
++
+ inline void doWrite()
+ {
+ if (doingWrite)
+@@ -110,6 +113,22 @@ inline void connectHandler(const boost::system::error_code& ec)
+ return;
+ }
+
++ FILE* file = fopen(uartMuxCtrlPath, "w");
++ if (file != nullptr)
++ {
++ int rc = fputs(uartMuxCtrlVal, file);
++ fclose(file);
++ if (rc < 0)
++ {
++ BMCWEB_LOG_ERROR << "Couldn't change UART routing: " << rc;
++ for (crow::websocket::Connection* session : sessions)
++ {
++ session->close("Error in connecting to host port");
++ }
++ return;
++ }
++ }
++
+ doWrite();
+ doRead();
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch
new file mode 100644
index 000000000..bc023839f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch
@@ -0,0 +1,44 @@
+From 48fe2a68d634970795f9ff13903afbedca801088 Mon Sep 17 00:00:00 2001
+From: Nidhin MS <nidhin.ms@intel.com>
+Date: Wed, 14 Apr 2021 11:28:44 +0530
+Subject: [PATCH] Fix: bmcweb crashes if socket directory not present
+
+When trying to mount virtual media image bmcweb tries to create unix
+socket and if the parent directory does not exist
+stream_protocol::acceptor throws error and bmcweb crashes. Fix the same
+
+Tested:
+Removed directory and mounted the vm image. bmcweb crash was not
+observed
+
+Change-Id: I3aea1d8e197c06238f425a97435c01d3c80552a9
+Signed-off-by: Nidhin MS <nidhin.ms@intel.com>
+---
+ include/nbd_proxy.hpp | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
+index 7b90e90..3b28823 100644
+--- a/include/nbd_proxy.hpp
++++ b/include/nbd_proxy.hpp
+@@ -397,6 +397,17 @@ inline void requestRoutes(App& app)
+ // If the socket file exists (i.e. after bmcweb crash),
+ // we cannot reuse it.
+ std::remove((*socketValue).c_str());
++ std::filesystem::path socketPath(*socketValue);
++ std::error_code fsErr;
++ if (!std::filesystem::exists(socketPath.parent_path(),
++ fsErr))
++ {
++ BMCWEB_LOG_ERROR
++ << "VirtualMedia socket directory not present. "
++ << socketPath.parent_path();
++ conn.close("Unable to create unix socket");
++ return;
++ }
+
+ sessions[&conn] = std::make_shared<NbdProxyServer>(
+ conn, *socketValue, *endpointValue,
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch
new file mode 100644
index 000000000..f02e5e1a4
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch
@@ -0,0 +1,51 @@
+From 7cde56820505a4f750cc67caa0dc9300688f3fd9 Mon Sep 17 00:00:00 2001
+From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
+Date: Tue, 13 Apr 2021 15:16:43 +0200
+Subject: [PATCH] Fix comparison for proxy/legacy mode
+
+After sdbusplus made available string path wrapper VM code has been
+updated to use it. This makes legacy mode unusable as appropriate
+change introduced a problem with comparison of DBus object path, which
+is now fixed.
+
+Tested:
+After applying this fix, legacy mode has InsertMedia action enabled
+again.
+
+Change-Id: I062994f23b77cb7ab9c4421f296a65a80b9ce896
+Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
+---
+ redfish-core/lib/virtual_media.hpp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
+index 365290b..dda73d8 100644
+--- a/redfish-core/lib/virtual_media.hpp
++++ b/redfish-core/lib/virtual_media.hpp
+@@ -274,10 +274,22 @@ static void getVmData(const std::shared_ptr<AsyncResp>& aResp,
+ continue;
+ }
+
++ auto mode = item.first.parent_path();
++ auto type = mode.parent_path();
++ if (mode.filename().empty() || type.filename().empty())
++ {
++ continue;
++ }
++
++ if (type.filename() != "VirtualMedia")
++ {
++ continue;
++ }
++
+ aResp->res.jsonValue = vmItemTemplate(name, resName);
+
+ // Check if dbus path is Legacy type
+- if (thispath.find("VirtualMedia/Legacy") != std::string::npos)
++ if (mode.filename() == "Legacy")
+ {
+ aResp->res.jsonValue["Actions"]["#VirtualMedia.InsertMedia"]
+ ["target"] =
+--
+2.26.2
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0003-Move-EventService-init-to-later-stage.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0003-Move-EventService-init-to-later-stage.patch
deleted file mode 100644
index f910915ce..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0003-Move-EventService-init-to-later-stage.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 2dcfef0170ca5ba1f934de6934db64b545ab3b55 Mon Sep 17 00:00:00 2001
-From: AppaRao Puli <apparao.puli@linux.intel.com>
-Date: Tue, 23 Mar 2021 23:36:40 +0000
-Subject: [PATCH] Move EventService init to later stage
-
-The bmcweb crash issue seen when there is eventservice
-config with subscriptions in persistent file.
-
-During EventService instantiation, it uses the "get_io_context()"
-from systemBus, so it should be called after systemBus init. So
-moved the EventService instantiation after systemBus initialization.
-
-Tested:
- - bmcweb crash issue resolved.
-
-Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
-Change-Id: Iab52f0e89478e306af475066fb5691153a05677d
----
- src/webserver_main.cpp | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
-index 3b9631a..f0e2207 100644
---- a/src/webserver_main.cpp
-+++ b/src/webserver_main.cpp
-@@ -80,9 +80,6 @@ int main(int /*argc*/, char** /*argv*/)
- #ifdef BMCWEB_ENABLE_REDFISH
- crow::redfish::requestRoutes(app);
- redfish::RedfishService redfish(app);
--
-- // Create EventServiceManager instance and initialize Config
-- redfish::EventServiceManager::getInstance();
- #endif
-
- #ifdef BMCWEB_ENABLE_DBUS_REST
-@@ -116,6 +113,11 @@ int main(int /*argc*/, char** /*argv*/)
- crow::connections::systemBus =
- std::make_shared<sdbusplus::asio::connection>(*io);
-
-+#ifdef BMCWEB_ENABLE_REDFISH
-+ // Create EventServiceManager instance and initialize Config
-+ redfish::EventServiceManager::getInstance();
-+#endif
-+
- #ifdef BMCWEB_ENABLE_VM_NBDPROXY
- crow::nbd_proxy::requestRoutes(app);
- #endif
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
index e2eaf1761..02d28833f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
@@ -1,4 +1,4 @@
-From dbaf8c1dc402da97fec723d050e063cd283d8736 Mon Sep 17 00:00:00 2001
+From 698d2615c5bc30ab7f89f11ed5659df8bf248ea0 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Tue, 16 Mar 2021 15:37:24 +0000
Subject: [PATCH 5/6] Add SSE style subscription support to eventservice
@@ -126,10 +126,10 @@ index 0000000..6c98e6e
+} // namespace eventservice_sse
+} // namespace redfish
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 148c703..e3eba86 100644
+index 5821e2e..f4d57c2 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -22,13 +22,15 @@
+@@ -23,13 +23,15 @@
#include <sys/inotify.h>
#include <boost/asio/io_context.hpp>
@@ -146,7 +146,7 @@ index 148c703..e3eba86 100644
#include <cstdlib>
#include <ctime>
#include <fstream>
-@@ -45,9 +47,13 @@ using EventServiceConfig = std::tuple<bool, uint32_t, uint32_t>;
+@@ -46,9 +48,13 @@ using EventServiceConfig = std::tuple<bool, uint32_t, uint32_t>;
static constexpr const char* eventFormatType = "Event";
static constexpr const char* metricReportFormatType = "MetricReport";
@@ -160,8 +160,8 @@ index 148c703..e3eba86 100644
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
static std::optional<boost::asio::posix::stream_descriptor> inotifyConn;
static constexpr const char* redfishEventLogDir = "/var/log";
-@@ -390,11 +396,9 @@ class Subscription
- path);
+@@ -391,11 +397,9 @@ class Subscription
+ path, uriProto);
}
- Subscription(const std::shared_ptr<boost::beast::tcp_stream>& adaptor) :
@@ -175,7 +175,7 @@ index 148c703..e3eba86 100644
~Subscription() = default;
-@@ -419,7 +423,7 @@ class Subscription
+@@ -420,7 +424,7 @@ class Subscription
if (sseConn != nullptr)
{
@@ -184,7 +184,7 @@ index 148c703..e3eba86 100644
}
}
-@@ -509,6 +513,7 @@ class Subscription
+@@ -510,6 +514,7 @@ class Subscription
this->sendEvent(
msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
@@ -192,7 +192,7 @@ index 148c703..e3eba86 100644
}
#endif
-@@ -579,14 +584,39 @@ class Subscription
+@@ -565,14 +570,39 @@ class Subscription
return eventSeqNum;
}
@@ -233,7 +233,7 @@ index 148c703..e3eba86 100644
};
static constexpr const bool defaultEnabledState = true;
-@@ -977,6 +1007,8 @@ class EventServiceManager
+@@ -963,6 +993,8 @@ class EventServiceManager
subValue->updateRetryConfig(retryAttempts, retryTimeoutInterval);
subValue->updateRetryPolicy();
@@ -242,7 +242,7 @@ index 148c703..e3eba86 100644
return id;
}
-@@ -1001,11 +1033,40 @@ class EventServiceManager
+@@ -987,11 +1019,40 @@ class EventServiceManager
}
}
@@ -603,7 +603,7 @@ index be6f04d..1875ec9 100644
{{"@odata.id", "/redfish/v1/EventService/Subscriptions"}}},
{"Actions",
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
-index 3b9631a..bf8e705 100644
+index 902c32b..c871faa 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -5,6 +5,7 @@
@@ -614,14 +614,14 @@ index 3b9631a..bf8e705 100644
#include <hostname_monitor.hpp>
#include <ibm/management_console_rest.hpp>
#include <image_upload.hpp>
-@@ -79,6 +80,7 @@ int main(int /*argc*/, char** /*argv*/)
-
+@@ -83,6 +84,7 @@ int main(int /*argc*/, char** /*argv*/)
#ifdef BMCWEB_ENABLE_REDFISH
- crow::redfish::requestRoutes(app);
-+ redfish::eventservice_sse::requestRoutes(app);
+ redfish::requestRoutes(app);
redfish::RedfishService redfish(app);
++ redfish::eventservice_sse::requestRoutes(app);
// Create EventServiceManager instance and initialize Config
+ redfish::EventServiceManager::getInstance();
--
2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
index e83e05c96..4d99b2754 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
@@ -1,4 +1,4 @@
-From 693de7b901e7618585e0e8d848fc37fa0cccd18e Mon Sep 17 00:00:00 2001
+From 82185c52ae6e27cc1e086654a3b7d10e63ecc783 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Wed, 17 Mar 2021 01:16:50 +0000
Subject: [PATCH 6/6] Add EventService SSE filter support
@@ -171,10 +171,10 @@ index 7dfdc80..922dae9 100644
} // namespace redfish
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index e3eba86..8f120b1 100644
+index f4d57c2..567fb9c 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -54,6 +54,11 @@ static constexpr const char* eventServiceFile =
+@@ -55,6 +55,11 @@ static constexpr const char* eventServiceFile =
static constexpr const uint8_t maxNoOfSubscriptions = 20;
static constexpr const uint8_t maxNoOfSSESubscriptions = 10;
@@ -202,7 +202,7 @@ index 1875ec9..4d1ac9f 100644
"TerminateAfterRetries", "SuspendRetries", "RetryForever"};
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
-index cfbc9c2..3493132 100644
+index 7059a38..1e3ef2f 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -2147,6 +2147,32 @@ void mutualExclusiveProperties(crow::Response& res, const std::string& arg1,
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README
index 55340bb5c..3954e89c1 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README
@@ -9,9 +9,6 @@ Upstream revision information:
- EventService: https client support
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/31735/38
- - Move EventService init to later stage
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41516
-
- Add Server-Sent-Events support
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41258/5
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Sync_ReadingUnit_with_Redfish_Sensor_Schema.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Sync_ReadingUnit_with_Redfish_Sensor_Schema.patch
deleted file mode 100644
index e3b25da90..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Sync_ReadingUnit_with_Redfish_Sensor_Schema.patch
+++ /dev/null
@@ -1,227 +0,0 @@
-From 4b7e67d7200c0aba1b27478968d4f71449f1406a Mon Sep 17 00:00:00 2001
-From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
-Date: Mon, 8 Mar 2021 14:35:54 +0000
-Subject: [PATCH] Sync ReadingUnit with Redfish Sensor Schema
-
-Actual attribute "ReadingUnits" does not match with Redfish Sensor
-Schema. This change match "ReadingUnits" with Redfish Sensor Scheme
-1.0.0 and add missing "ReadingType" attribute. This change affect all
-users that depends on old units that does not match with Redfish
-standard. Added toReadingType and toReadingUnit function that uses
-values taken from Redfish Sensor Scheme 1.0.0. Latest version 1.2.0 of
-Sensor scheme defines units same units.
-
-Tested:
- - RedfishServiceValidator pass
-
-Change-Id: I0c8820eba7271022c427cd25dec321db36aa0176
-Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
-Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
----
- redfish-core/lib/power.hpp | 4 +-
- redfish-core/lib/sensors.hpp | 107 +++++++++++++++++++++++++++++------
- redfish-core/lib/thermal.hpp | 4 +-
- 3 files changed, 94 insertions(+), 21 deletions(-)
-
-diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
-index 1c7a009..99c45ef 100644
---- a/redfish-core/lib/power.hpp
-+++ b/redfish-core/lib/power.hpp
-@@ -153,7 +153,7 @@ class Power : public Node
- res.jsonValue["PowerControl"] = nlohmann::json::array();
-
- auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
-- res, chassisName, sensors::dbus::types.at(sensors::node::power),
-+ res, chassisName, sensors::dbus::paths.at(sensors::node::power),
- sensors::node::power);
-
- getChassisData(sensorAsyncResp);
-@@ -336,7 +336,7 @@ class Power : public Node
-
- const std::string& chassisName = params[0];
- auto asyncResp = std::make_shared<SensorsAsyncResp>(
-- res, chassisName, sensors::dbus::types.at(sensors::node::power),
-+ res, chassisName, sensors::dbus::paths.at(sensors::node::power),
- sensors::node::power);
-
- std::optional<std::vector<nlohmann::json>> voltageCollections;
-diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
-index 35114bf..af030f0 100644
---- a/redfish-core/lib/sensors.hpp
-+++ b/redfish-core/lib/sensors.hpp
-@@ -54,9 +54,10 @@ static constexpr std::string_view thermal = "Thermal";
-
- namespace dbus
- {
-+
- static const boost::container::flat_map<std::string_view,
- std::vector<const char*>>
-- types = {{node::power,
-+ paths = {{node::power,
- {"/xyz/openbmc_project/sensors/voltage",
- "/xyz/openbmc_project/sensors/power"}},
- {node::sensors,
-@@ -67,6 +68,88 @@ static const boost::container::flat_map<std::string_view,
- {"/xyz/openbmc_project/sensors/fan_tach",
- "/xyz/openbmc_project/sensors/temperature",
- "/xyz/openbmc_project/sensors/fan_pwm"}}};
-+} // namespace dbus
-+
-+inline const char* toReadingType(const std::string& sensorType)
-+{
-+ if (sensorType == "voltage")
-+ {
-+ return "Voltage";
-+ }
-+ if (sensorType == "power")
-+ {
-+ return "Power";
-+ }
-+ if (sensorType == "current")
-+ {
-+ return "Current";
-+ }
-+ if (sensorType == "fan_tach")
-+ {
-+ return "Rotational";
-+ }
-+ if (sensorType == "temperature")
-+ {
-+ return "Temperature";
-+ }
-+ if (sensorType == "fan_pwm" || sensorType == "utilization")
-+ {
-+ return "Percent";
-+ }
-+ if (sensorType == "altitude")
-+ {
-+ return "Altitude";
-+ }
-+ if (sensorType == "airflow")
-+ {
-+ return "AirFlow";
-+ }
-+ if (sensorType == "energy")
-+ {
-+ return "EnergyJoules";
-+ }
-+ return "";
-+}
-+
-+inline const char* toReadingUnits(const std::string& sensorType)
-+{
-+ if (sensorType == "voltage")
-+ {
-+ return "V";
-+ }
-+ if (sensorType == "power")
-+ {
-+ return "W";
-+ }
-+ if (sensorType == "current")
-+ {
-+ return "A";
-+ }
-+ if (sensorType == "fan_tach")
-+ {
-+ return "RPM";
-+ }
-+ if (sensorType == "temperature")
-+ {
-+ return "Cel";
-+ }
-+ if (sensorType == "fan_pwm" || sensorType == "utilization")
-+ {
-+ return "%";
-+ }
-+ if (sensorType == "altitude")
-+ {
-+ return "m";
-+ }
-+ if (sensorType == "airflow")
-+ {
-+ return "cft_i/min";
-+ }
-+ if (sensorType == "energy")
-+ {
-+ return "J";
-+ }
-+ return "";
- }
- } // namespace sensors
-
-@@ -854,18 +937,8 @@ inline void objectInterfacesToJson(
- if (sensorsAsyncResp->chassisSubNode == sensors::node::sensors)
- {
- sensorJson["@odata.type"] = "#Sensor.v1_0_0.Sensor";
-- if (sensorType == "power")
-- {
-- sensorJson["ReadingUnits"] = "Watts";
-- }
-- else if (sensorType == "current")
-- {
-- sensorJson["ReadingUnits"] = "Amperes";
-- }
-- else if (sensorType == "utilization")
-- {
-- sensorJson["ReadingUnits"] = "Percent";
-- }
-+ sensorJson["ReadingType"] = sensors::toReadingType(sensorType);
-+ sensorJson["ReadingUnits"] = sensors::toReadingUnits(sensorType);
- }
- else if (sensorType == "temperature")
- {
-@@ -2979,8 +3052,8 @@ inline void retrieveUriToDbusMap(const std::string& chassis,
- const std::string& node,
- SensorsAsyncResp::DataCompleteCb&& mapComplete)
- {
-- auto typesIt = sensors::dbus::types.find(node);
-- if (typesIt == sensors::dbus::types.end())
-+ auto pathIt = sensors::dbus::paths.find(node);
-+ if (pathIt == sensors::dbus::paths.end())
- {
- BMCWEB_LOG_ERROR << "Wrong node provided : " << node;
- mapComplete(boost::beast::http::status::bad_request, {});
-@@ -2995,7 +3068,7 @@ inline void retrieveUriToDbusMap(const std::string& chassis,
- uriToDbus) { mapCompleteCb(status, uriToDbus); };
-
- auto resp = std::make_shared<SensorsAsyncResp>(
-- *respBuffer, chassis, typesIt->second, node, std::move(callback));
-+ *respBuffer, chassis, pathIt->second, node, std::move(callback));
- getChassisData(resp);
- }
-
-@@ -3030,7 +3103,7 @@ class SensorCollection : public Node
- const std::string& chassisId = params[0];
- std::shared_ptr<SensorsAsyncResp> asyncResp =
- std::make_shared<SensorsAsyncResp>(
-- res, chassisId, sensors::dbus::types.at(sensors::node::sensors),
-+ res, chassisId, sensors::dbus::paths.at(sensors::node::sensors),
- sensors::node::sensors);
-
- auto getChassisCb =
-diff --git a/redfish-core/lib/thermal.hpp b/redfish-core/lib/thermal.hpp
-index 8e01bee..00acdf9 100644
---- a/redfish-core/lib/thermal.hpp
-+++ b/redfish-core/lib/thermal.hpp
-@@ -48,7 +48,7 @@ class Thermal : public Node
- }
- const std::string& chassisName = params[0];
- auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
-- res, chassisName, sensors::dbus::types.at(sensors::node::thermal),
-+ res, chassisName, sensors::dbus::paths.at(sensors::node::thermal),
- sensors::node::thermal);
-
- // TODO Need to get Chassis Redundancy information.
-@@ -71,7 +71,7 @@ class Thermal : public Node
- allCollections;
-
- auto asyncResp = std::make_shared<SensorsAsyncResp>(
-- res, chassisName, sensors::dbus::types.at(sensors::node::thermal),
-+ res, chassisName, sensors::dbus::paths.at(sensors::node::thermal),
- sensors::node::thermal);
-
- if (!json_util::readJson(req, asyncResp->res, "Temperatures",
---
-2.25.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch
deleted file mode 100644
index aaf3f17c7..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch
+++ /dev/null
@@ -1,671 +0,0 @@
-From 03c4ece83b58b954323111a1a7b2bf2b61402d7e Mon Sep 17 00:00:00 2001
-From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
-Date: Mon, 18 May 2020 11:56:57 +0200
-Subject: [PATCH 2/4] Add POST and DELETE in MetricReportDefinitions
-
-Added POST action in MetricReportDefinitions node to allow user
-to add new MetricReportDefinition. Using minimal set of
-MetricReportDefinition parameters from user bmcweb converts it to
-DBus call "AddReport" to Telemetry that serves as a backend
-for Redfish TelemetryService.
-Added DELETE request in MetricReportDefinitions node to allow user
-to remove report from Telemetry.
-Added conversion from string that represents duration format into
-its numeric equivalent.
-Added unit tests for conversion from and to Duration format.
-
-Tested:
- - Tested using witherspoon image on QEMU
- - Verified POST action in different cases:
- - all parameters are provided, new report is added to collection
- - some parameters are missing or invalid, user gets response with
- description of the issue
- - Verified that reports are removed on DELETE request
- - Verified that on invalid DELETE request user receives response
- with error
- - Verified time_utils::fromDurationString()
- - Succesfully passed RedfishServiceValidator.py
-
-Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
-Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
-Change-Id: I2fed96848594451e22fde686f8c066d7770cc65a
----
- meson.build | 1 +
- .../include/utils/telemetry_utils.hpp | 2 +
- redfish-core/include/utils/time_utils.hpp | 138 +++++++-
- redfish-core/lib/metric_report_definition.hpp | 328 ++++++++++++++++++
- redfish-core/ut/time_utils_test.cpp | 63 ++++
- 5 files changed, 530 insertions(+), 2 deletions(-)
- create mode 100644 redfish-core/ut/time_utils_test.cpp
-
-diff --git a/meson.build b/meson.build
-index 66a066b..22a8c4a 100644
---- a/meson.build
-+++ b/meson.build
-@@ -345,6 +345,7 @@ srcfiles_unittest = ['include/ut/dbus_utility_test.cpp',
- 'redfish-core/ut/privileges_test.cpp',
- 'redfish-core/ut/lock_test.cpp',
- 'redfish-core/ut/configfile_test.cpp',
-+ 'redfish-core/ut/time_utils_test.cpp',
- 'http/ut/utility_test.cpp']
-
- # Gather the Configuration data
-diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
-index a3a8156..0a3af5f 100644
---- a/redfish-core/include/utils/telemetry_utils.hpp
-+++ b/redfish-core/include/utils/telemetry_utils.hpp
-@@ -1,5 +1,7 @@
- #pragma once
-
-+#include "dbus_utility.hpp"
-+
- namespace redfish
- {
-
-diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
-index 4a87ba0..9965d4d 100644
---- a/redfish-core/include/utils/time_utils.hpp
-+++ b/redfish-core/include/utils/time_utils.hpp
-@@ -1,7 +1,13 @@
- #pragma once
-
-+#include "logging.hpp"
-+
-+#include <charconv>
- #include <chrono>
-+#include <cmath>
-+#include <optional>
- #include <string>
-+#include <system_error>
-
- namespace redfish
- {
-@@ -12,6 +18,8 @@ namespace time_utils
- namespace details
- {
-
-+using Days = std::chrono::duration<long long, std::ratio<24 * 60 * 60>>;
-+
- inline void leftZeroPadding(std::string& str, const std::size_t padding)
- {
- if (str.size() < padding)
-@@ -19,8 +27,135 @@ inline void leftZeroPadding(std::string& str, const std::size_t padding)
- str.insert(0, padding - str.size(), '0');
- }
- }
-+
-+template <typename FromTime>
-+bool fromDurationItem(std::string_view& fmt, const char postfix,
-+ std::chrono::milliseconds& out)
-+{
-+ const size_t pos = fmt.find(postfix);
-+ if (pos == std::string::npos)
-+ {
-+ return true;
-+ }
-+ if ((pos + 1U) > fmt.size())
-+ {
-+ return false;
-+ }
-+
-+ const char* end;
-+ std::chrono::milliseconds::rep ticks = 0;
-+ if constexpr (std::is_same_v<FromTime, std::chrono::milliseconds>)
-+ {
-+ end = fmt.data() + std::min<size_t>(pos, 3U);
-+ }
-+ else
-+ {
-+ end = fmt.data() + pos;
-+ }
-+
-+ auto [ptr, ec] = std::from_chars(fmt.data(), end, ticks);
-+ if (ptr != end || ec != std::errc())
-+ {
-+ BMCWEB_LOG_ERROR << "Failed to convert string to decimal with err: "
-+ << static_cast<int>(ec) << "("
-+ << std::make_error_code(ec).message() << "), ptr{"
-+ << static_cast<const void*>(ptr) << "} != end{"
-+ << static_cast<const void*>(end) << "})";
-+ return false;
-+ }
-+
-+ if constexpr (std::is_same_v<FromTime, std::chrono::milliseconds>)
-+ {
-+ ticks *= static_cast<std::chrono::milliseconds::rep>(
-+ std::pow(10, 3 - std::min<size_t>(pos, 3U)));
-+ }
-+ if (ticks < 0)
-+ {
-+ return false;
-+ }
-+
-+ out += FromTime(ticks);
-+ const auto maxConversionRange =
-+ std::chrono::duration_cast<FromTime>(std::chrono::milliseconds::max())
-+ .count();
-+ if (out < FromTime(ticks) || maxConversionRange < ticks)
-+ {
-+ return false;
-+ }
-+
-+ fmt.remove_prefix(pos + 1U);
-+ return true;
-+}
- } // namespace details
-
-+/**
-+ * @brief Convert string that represents value in Duration Format to its numeric
-+ * equivalent.
-+ */
-+std::optional<std::chrono::milliseconds>
-+ fromDurationString(const std::string& str)
-+{
-+ std::chrono::milliseconds out = std::chrono::milliseconds::zero();
-+ std::string_view v = str;
-+
-+ if (v.empty())
-+ {
-+ return out;
-+ }
-+ if (v.front() != 'P')
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+
-+ v.remove_prefix(1);
-+ if (!details::fromDurationItem<details::Days>(v, 'D', out))
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+
-+ if (v.empty())
-+ {
-+ return out;
-+ }
-+ if (v.front() != 'T')
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+
-+ v.remove_prefix(1);
-+ if (!details::fromDurationItem<std::chrono::hours>(v, 'H', out) ||
-+ !details::fromDurationItem<std::chrono::minutes>(v, 'M', out))
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+
-+ if (v.find('.') != std::string::npos && v.find('S') != std::string::npos)
-+ {
-+ if (!details::fromDurationItem<std::chrono::seconds>(v, '.', out) ||
-+ !details::fromDurationItem<std::chrono::milliseconds>(v, 'S', out))
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+ }
-+ else if (!details::fromDurationItem<std::chrono::seconds>(v, 'S', out))
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+
-+ if (!v.empty())
-+ {
-+ BMCWEB_LOG_ERROR << "Invalid duration format: " << str;
-+ return std::nullopt;
-+ }
-+ return out;
-+}
-+
- /**
- * @brief Convert time value into duration format that is based on ISO 8601.
- * Example output: "P12DT1M5.5S"
-@@ -36,8 +171,7 @@ inline std::string toDurationString(std::chrono::milliseconds ms)
- std::string fmt;
- fmt.reserve(sizeof("PxxxxxxxxxxxxDTxxHxxMxx.xxxxxxS"));
-
-- using Days = std::chrono::duration<long, std::ratio<24 * 60 * 60>>;
-- Days days = std::chrono::floor<Days>(ms);
-+ details::Days days = std::chrono::floor<details::Days>(ms);
- ms -= days;
-
- std::chrono::hours hours = std::chrono::floor<std::chrono::hours>(ms);
-diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
-index 59025d9..fcbc99c 100644
---- a/redfish-core/lib/metric_report_definition.hpp
-+++ b/redfish-core/lib/metric_report_definition.hpp
-@@ -1,9 +1,12 @@
- #pragma once
-
- #include "node.hpp"
-+#include "sensors.hpp"
- #include "utils/telemetry_utils.hpp"
- #include "utils/time_utils.hpp"
-
-+#include <boost/container/flat_map.hpp>
-+
- #include <tuple>
- #include <variant>
-
-@@ -95,6 +98,252 @@ inline void fillReportDefinition(
- asyncResp->res.jsonValue["Schedule"]["RecurrenceInterval"] =
- time_utils::toDurationString(std::chrono::milliseconds(*interval));
- }
-+
-+struct AddReportArgs
-+{
-+ std::string name;
-+ std::string reportingType;
-+ bool emitsReadingsUpdate = false;
-+ bool logToMetricReportsCollection = false;
-+ uint64_t interval = 0;
-+ std::vector<std::pair<std::string, std::vector<std::string>>> metrics;
-+};
-+
-+inline bool toDbusReportActions(crow::Response& res,
-+ std::vector<std::string>& actions,
-+ AddReportArgs& args)
-+{
-+ size_t index = 0;
-+ for (auto& action : actions)
-+ {
-+ if (action == "RedfishEvent")
-+ {
-+ args.emitsReadingsUpdate = true;
-+ }
-+ else if (action == "LogToMetricReportsCollection")
-+ {
-+ args.logToMetricReportsCollection = true;
-+ }
-+ else
-+ {
-+ messages::propertyValueNotInList(
-+ res, action, "ReportActions/" + std::to_string(index));
-+ return false;
-+ }
-+ index++;
-+ }
-+ return true;
-+}
-+
-+inline bool getUserParameters(crow::Response& res, const crow::Request& req,
-+ AddReportArgs& args)
-+{
-+ std::vector<nlohmann::json> metrics;
-+ std::vector<std::string> reportActions;
-+ std::optional<nlohmann::json> schedule;
-+ if (!json_util::readJson(req, res, "Id", args.name, "Metrics", metrics,
-+ "MetricReportDefinitionType", args.reportingType,
-+ "ReportActions", reportActions, "Schedule",
-+ schedule))
-+ {
-+ return false;
-+ }
-+
-+ constexpr const char* allowedCharactersInName =
-+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";
-+ if (args.name.empty() || args.name.find_first_not_of(
-+ allowedCharactersInName) != std::string::npos)
-+ {
-+ BMCWEB_LOG_ERROR << "Failed to match " << args.name
-+ << " with allowed character "
-+ << allowedCharactersInName;
-+ messages::propertyValueIncorrect(res, "Id", args.name);
-+ return false;
-+ }
-+
-+ if (args.reportingType != "Periodic" && args.reportingType != "OnRequest")
-+ {
-+ messages::propertyValueNotInList(res, args.reportingType,
-+ "MetricReportDefinitionType");
-+ return false;
-+ }
-+
-+ if (!toDbusReportActions(res, reportActions, args))
-+ {
-+ return false;
-+ }
-+
-+ if (args.reportingType == "Periodic")
-+ {
-+ if (!schedule)
-+ {
-+ messages::createFailedMissingReqProperties(res, "Schedule");
-+ return false;
-+ }
-+
-+ std::string durationStr;
-+ if (!json_util::readJson(*schedule, res, "RecurrenceInterval",
-+ durationStr))
-+ {
-+ return false;
-+ }
-+
-+ std::optional<std::chrono::milliseconds> durationNum =
-+ time_utils::fromDurationString(durationStr);
-+ if (!durationNum)
-+ {
-+ messages::propertyValueIncorrect(res, "RecurrenceInterval",
-+ durationStr);
-+ return false;
-+ }
-+ args.interval = static_cast<uint64_t>(durationNum->count());
-+ }
-+
-+ args.metrics.reserve(metrics.size());
-+ for (auto& m : metrics)
-+ {
-+ std::string id;
-+ std::vector<std::string> uris;
-+ if (!json_util::readJson(m, res, "MetricId", id, "MetricProperties",
-+ uris))
-+ {
-+ return false;
-+ }
-+
-+ args.metrics.emplace_back(std::move(id), std::move(uris));
-+ }
-+
-+ return true;
-+}
-+
-+inline bool getChassisSensorNode(
-+ const std::shared_ptr<AsyncResp>& asyncResp,
-+ const std::vector<std::pair<std::string, std::vector<std::string>>>&
-+ metrics,
-+ boost::container::flat_set<std::pair<std::string, std::string>>& matched)
-+{
-+ for (const auto& [id, uris] : metrics)
-+ {
-+ for (size_t i = 0; i < uris.size(); i++)
-+ {
-+ const std::string& uri = uris[i];
-+ std::string chassis;
-+ std::string node;
-+
-+ if (!boost::starts_with(uri, "/redfish/v1/Chassis/") ||
-+ !dbus::utility::getNthStringFromPath(uri, 3, chassis) ||
-+ !dbus::utility::getNthStringFromPath(uri, 4, node))
-+ {
-+ BMCWEB_LOG_ERROR << "Failed to get chassis and sensor Node "
-+ "from "
-+ << uri;
-+ messages::propertyValueIncorrect(asyncResp->res, uri,
-+ "MetricProperties/" +
-+ std::to_string(i));
-+ return false;
-+ }
-+
-+ if (boost::ends_with(node, "#"))
-+ {
-+ node.pop_back();
-+ }
-+
-+ matched.emplace(std::move(chassis), std::move(node));
-+ }
-+ }
-+ return true;
-+}
-+
-+class AddReport
-+{
-+ public:
-+ AddReport(AddReportArgs argsIn, std::shared_ptr<AsyncResp> asyncResp) :
-+ asyncResp{std::move(asyncResp)}, args{std::move(argsIn)}
-+ {}
-+ ~AddReport()
-+ {
-+ if (asyncResp->res.result() != boost::beast::http::status::ok)
-+ {
-+ return;
-+ }
-+
-+ telemetry::ReadingParameters readingParams;
-+ readingParams.reserve(args.metrics.size());
-+
-+ for (const auto& [id, uris] : args.metrics)
-+ {
-+ for (size_t i = 0; i < uris.size(); i++)
-+ {
-+ const std::string& uri = uris[i];
-+ auto el = uriToDbus.find(uri);
-+ if (el == uriToDbus.end())
-+ {
-+ BMCWEB_LOG_ERROR << "Failed to find DBus sensor "
-+ "corresponding to URI "
-+ << uri;
-+ messages::propertyValueNotInList(asyncResp->res, uri,
-+ "MetricProperties/" +
-+ std::to_string(i));
-+ return;
-+ }
-+
-+ const std::string& dbusPath = el->second;
-+ readingParams.emplace_back(dbusPath, "SINGLE", id, uri);
-+ }
-+ }
-+
-+ crow::connections::systemBus->async_method_call(
-+ [asyncResp = std::move(asyncResp), name = args.name,
-+ uriToDbus = std::move(uriToDbus)](
-+ const boost::system::error_code ec, const std::string&) {
-+ if (ec == boost::system::errc::file_exists)
-+ {
-+ messages::resourceAlreadyExists(
-+ asyncResp->res, "MetricReportDefinition", "Id", name);
-+ return;
-+ }
-+ if (ec == boost::system::errc::too_many_files_open)
-+ {
-+ messages::createLimitReachedForResource(asyncResp->res);
-+ return;
-+ }
-+ if (ec == boost::system::errc::argument_list_too_long)
-+ {
-+ nlohmann::json metricProperties = nlohmann::json::array();
-+ for (const auto& [uri, _] : uriToDbus)
-+ {
-+ metricProperties.emplace_back(uri);
-+ }
-+ messages::propertyValueIncorrect(
-+ asyncResp->res, metricProperties, "MetricProperties");
-+ return;
-+ }
-+ if (ec)
-+ {
-+ messages::internalError(asyncResp->res);
-+ BMCWEB_LOG_ERROR << "respHandler DBus error " << ec;
-+ return;
-+ }
-+
-+ messages::created(asyncResp->res);
-+ },
-+ telemetry::service, "/xyz/openbmc_project/Telemetry/Reports",
-+ "xyz.openbmc_project.Telemetry.ReportManager", "AddReport",
-+ "TelemetryService/" + args.name, args.reportingType,
-+ args.emitsReadingsUpdate, args.logToMetricReportsCollection,
-+ args.interval, readingParams);
-+ }
-+
-+ void insert(const boost::container::flat_map<std::string, std::string>& el)
-+ {
-+ uriToDbus.insert(el.begin(), el.end());
-+ }
-+
-+ private:
-+ std::shared_ptr<AsyncResp> asyncResp;
-+ AddReportArgs args;
-+ boost::container::flat_map<std::string, std::string> uriToDbus{};
-+};
- } // namespace telemetry
-
- class MetricReportDefinitionCollection : public Node
-@@ -126,6 +375,46 @@ class MetricReportDefinitionCollection : public Node
- telemetry::getReportCollection(asyncResp,
- telemetry::metricReportDefinitionUri);
- }
-+
-+ void doPost(crow::Response& res, const crow::Request& req,
-+ const std::vector<std::string>&) override
-+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
-+ telemetry::AddReportArgs args;
-+ if (!telemetry::getUserParameters(res, req, args))
-+ {
-+ return;
-+ }
-+
-+ boost::container::flat_set<std::pair<std::string, std::string>>
-+ chassisSensors;
-+ if (!telemetry::getChassisSensorNode(asyncResp, args.metrics,
-+ chassisSensors))
-+ {
-+ return;
-+ }
-+
-+ auto addReportReq =
-+ std::make_shared<telemetry::AddReport>(std::move(args), asyncResp);
-+ for (const auto& [chassis, sensorType] : chassisSensors)
-+ {
-+ retrieveUriToDbusMap(
-+ chassis, sensorType,
-+ [asyncResp, addReportReq](
-+ const boost::beast::http::status status,
-+ const boost::container::flat_map<std::string, std::string>&
-+ uriToDbus) {
-+ if (status != boost::beast::http::status::ok)
-+ {
-+ BMCWEB_LOG_ERROR << "Failed to retrieve URI to dbus "
-+ "sensors map with err "
-+ << static_cast<unsigned>(status);
-+ return;
-+ }
-+ addReportReq->insert(uriToDbus);
-+ });
-+ }
-+ }
- };
-
- class MetricReportDefinition : public Node
-@@ -184,5 +473,44 @@ class MetricReportDefinition : public Node
- "org.freedesktop.DBus.Properties", "GetAll",
- telemetry::reportInterface);
- }
-+
-+ void doDelete(crow::Response& res, const crow::Request&,
-+ const std::vector<std::string>& params) override
-+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
-+ if (params.size() != 1)
-+ {
-+ messages::internalError(asyncResp->res);
-+ return;
-+ }
-+
-+ const std::string& id = params[0];
-+ const std::string reportPath = telemetry::getDbusReportPath(id);
-+
-+ crow::connections::systemBus->async_method_call(
-+ [asyncResp, id](const boost::system::error_code ec) {
-+ /*
-+ * boost::system::errc and std::errc are missing value for
-+ * EBADR error that is defined in Linux.
-+ */
-+ if (ec.value() == EBADR)
-+ {
-+ messages::resourceNotFound(asyncResp->res,
-+ "MetricReportDefinition", id);
-+ return;
-+ }
-+
-+ if (ec)
-+ {
-+ BMCWEB_LOG_ERROR << "respHandler DBus error " << ec;
-+ messages::internalError(asyncResp->res);
-+ return;
-+ }
-+
-+ asyncResp->res.result(boost::beast::http::status::no_content);
-+ },
-+ telemetry::service, reportPath, "xyz.openbmc_project.Object.Delete",
-+ "Delete");
-+ }
- };
- } // namespace redfish
-diff --git a/redfish-core/ut/time_utils_test.cpp b/redfish-core/ut/time_utils_test.cpp
-new file mode 100644
-index 0000000..70999ce
---- /dev/null
-+++ b/redfish-core/ut/time_utils_test.cpp
-@@ -0,0 +1,63 @@
-+#include "utils/time_utils.hpp"
-+
-+#include <gmock/gmock.h>
-+
-+using namespace testing;
-+
-+class FromDurationTest :
-+ public Test,
-+ public WithParamInterface<
-+ std::pair<std::string, std::optional<std::chrono::milliseconds>>>
-+{};
-+
-+INSTANTIATE_TEST_SUITE_P(
-+ _, FromDurationTest,
-+ Values(std::make_pair("PT12S", std::chrono::milliseconds(12000)),
-+ std::make_pair("PT0.204S", std::chrono::milliseconds(204)),
-+ std::make_pair("PT0.2S", std::chrono::milliseconds(200)),
-+ std::make_pair("PT50M", std::chrono::milliseconds(3000000)),
-+ std::make_pair("PT23H", std::chrono::milliseconds(82800000)),
-+ std::make_pair("P51D", std::chrono::milliseconds(4406400000)),
-+ std::make_pair("PT2H40M10.1S", std::chrono::milliseconds(9610100)),
-+ std::make_pair("P20DT2H40M10.1S",
-+ std::chrono::milliseconds(1737610100)),
-+ std::make_pair("", std::chrono::milliseconds(0)),
-+ std::make_pair("PTS", std::nullopt),
-+ std::make_pair("P1T", std::nullopt),
-+ std::make_pair("PT100M1000S100", std::nullopt),
-+ std::make_pair("PDTHMS", std::nullopt),
-+ std::make_pair("P99999999999999999DT", std::nullopt),
-+ std::make_pair("PD222T222H222M222.222S", std::nullopt),
-+ std::make_pair("PT99999H9999999999999999999999M99999999999S",
-+ std::nullopt),
-+ std::make_pair("PT-9H", std::nullopt)));
-+
-+TEST_P(FromDurationTest, convertToMilliseconds)
-+{
-+ const auto& [str, expected] = GetParam();
-+ EXPECT_THAT(redfish::time_utils::fromDurationString(str), Eq(expected));
-+}
-+
-+class ToDurationTest :
-+ public Test,
-+ public WithParamInterface<std::pair<std::chrono::milliseconds, std::string>>
-+{};
-+
-+INSTANTIATE_TEST_SUITE_P(
-+ _, ToDurationTest,
-+ Values(std::make_pair(std::chrono::milliseconds(12000), "PT12.000S"),
-+ std::make_pair(std::chrono::milliseconds(204), "PT0.204S"),
-+ std::make_pair(std::chrono::milliseconds(200), "PT0.200S"),
-+ std::make_pair(std::chrono::milliseconds(3000000), "PT50M"),
-+ std::make_pair(std::chrono::milliseconds(82800000), "PT23H"),
-+ std::make_pair(std::chrono::milliseconds(4406400000), "P51DT"),
-+ std::make_pair(std::chrono::milliseconds(9610100), "PT2H40M10.100S"),
-+ std::make_pair(std::chrono::milliseconds(1737610100),
-+ "P20DT2H40M10.100S"),
-+ std::make_pair(std::chrono::milliseconds(-250), "")));
-+
-+TEST_P(ToDurationTest, convertToDuration)
-+{
-+ const auto& [ms, expected] = GetParam();
-+ EXPECT_THAT(redfish::time_utils::toDurationString(ms), Eq(expected));
-+}
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README
index cfb47a49b..46128f7ae 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README
@@ -2,9 +2,6 @@ These patches are mirror of upstream TelemetryService implementation.
Until change is integrated they will be manually merged here to enable feature in Intel builds.
Current revisions:
-- Add POST and DELETE in MetricReportDefinitions
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/32536/63
-
- Add support for MetricDefinition scheme
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/60
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 d42618b78..d9b32f5ae 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/bmcweb.git"
-SRCREV = "8e6c099ac8d4b4b3163a26b58fa0f9abb987979a"
+SRCREV = "dab0604af234bdd5010407031a01343d6c242edf"
DEPENDS += "boost-url"
RDEPENDS_${PN} += "phosphor-nslcd-authority-cert-config"
@@ -21,6 +21,9 @@ SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \
file://0009-Add-support-to-ChangePassword-action.patch \
file://0010-managers-add-attributes-for-Manager.CommandShell.patch \
file://0034-recommended-fixes-by-crypto-review-team.patch \
+ file://0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch \
+ file://0012-Log-RedFish-event-for-Invalid-login-attempt.patch \
+ file://0013-Add-UART-routing-logic-into-host-console-connection-.patch \
"
# Temporary downstream mirror of upstream patch to enable feature in Intel builds.
@@ -30,25 +33,29 @@ SRC_URI += "file://0037-Add-state-sensor-messages-to-the-registry.patch \
# EventService: Temporary pulled to downstream. See eventservice\README for details
SRC_URI += "file://eventservice/0001-EventService-Fix-retry-handling-for-http-client.patch \
file://eventservice/0002-EventService-https-client-support.patch \
- file://eventservice/0003-Move-EventService-init-to-later-stage.patch \
file://eventservice/0004-Add-Server-Sent-Events-support.patch \
file://eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch \
file://eventservice/0006-Add-EventService-SSE-filter-support.patch \
"
# Temporary downstream mirror of upstream patches, see telemetry\README for details
-SRC_URI += "file://telemetry/0001-Sync_ReadingUnit_with_Redfish_Sensor_Schema.patch \
- file://telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch \
- file://telemetry/0003-Add-support-for-MetricDefinition-scheme.patch \
+SRC_URI += "file://telemetry/0003-Add-support-for-MetricDefinition-scheme.patch \
file://telemetry/0004-Sync-Telmetry-service-with-EventService.patch \
"
SRC_URI += "file://0001-Add-ConnectedVia-property-to-virtual-media-item-temp.patch \
- file://0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch \
+ file://0002-Invalid-status-code-from-InsertMedia-REST-methods.patch \
file://0003-Set-Inserted-redfish-property-for-not-inserted-resou.patch \
+ file://0004-Bmcweb-handle-permission-denied-exception.patch \
+ file://0005-Fix-unmounting-image-in-proxy-mode.patch \
"
SRC_URI += "file://0038-Revert-Disable-nbd-proxy-from-the-build.patch \
+ file://0039-Fix-comparison-for-proxy-legacy-mode.patch \
+"
+
+# Fix to avoid bmcweb crash on VM mount
+SRC_URI += "file://0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch \
"
# Temporary fix: Move it to service file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch
deleted file mode 100644
index 658f0d8b7..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 4d7c0f704df21912fa447caca4dbba246d1b80f6 Mon Sep 17 00:00:00 2001
-From: Johnathan Mantey <johnathanx.mantey@intel.com>
-Date: Tue, 26 Jan 2021 14:24:53 -0800
-Subject: [PATCH] Correct the IPv6 Router Address Configuration command
-
-The IPv6 Router Address Configuration Get/Set LAN command was not
-reporting or modifying the correct portion of the networking
-system. This command is intended to configure the Routing
-Advertisement feature of IPv6. It is not a direct reflection of the
-DHCP state.
-
-Systemd-networkd manages the Routing Advertisement via the
-IPv6AcceptRA parameter, which according to the networkd documentaion,
-enables/disables IPv6 DHCP functionality.
-
-Tested:
-Issued "ipmitool raw 12 2 3 64 0 0" and was able to read the current
-state of the IPv6AcceptRA variable.
-Issued "ipmitool raw 12 1 3 64 2" and saw the configuration file for
-the channel change, and the addition of a new IPv6 address to the
-network device.
-Issued "ipmitool raw 12 1 3 64 0" and saw that configuration file for
-the channel change, and the removal of the IPv6 address from the
-network device.
-
-Change-Id: Id01441f88ccc9d56449ab8115f4855de74e80cfc
-Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
----
- transporthandler.cpp | 61 ++++++++++++++++++++++++--------------------
- 1 file changed, 34 insertions(+), 27 deletions(-)
-
-diff --git a/transporthandler.cpp b/transporthandler.cpp
-index b81e0d5..50343c7 100644
---- a/transporthandler.cpp
-+++ b/transporthandler.cpp
-@@ -1260,6 +1260,35 @@ SetStatus& getSetStatus(uint8_t channel)
- return setStatus[channel] = SetStatus::Complete;
- }
-
-+/** @brief Gets the IPv6 Router Advertisement value
-+ *
-+ * @param[in] bus - The bus object used for lookups
-+ * @param[in] params - The parameters for the channel
-+ * @return networkd IPV6AcceptRA value
-+ */
-+static bool getIPv6AcceptRA(sdbusplus::bus::bus& bus,
-+ const ChannelParams& params)
-+{
-+ auto raEnabled =
-+ std::get<bool>(getDbusProperty(bus, params.service, params.logicalPath,
-+ INTF_ETHERNET, "IPv6AcceptRA"));
-+ return raEnabled;
-+}
-+
-+/** @brief Sets the IPv6AcceptRA flag
-+ *
-+ * @param[in] bus - The bus object used for lookups
-+ * @param[in] params - The parameters for the channel
-+ * @param[in] ipv6AcceptRA - boolean to enable/disable IPv6 Routing
-+ * Advertisement
-+ */
-+void setIPv6AcceptRA(sdbusplus::bus::bus& bus, const ChannelParams& params,
-+ const bool ipv6AcceptRA)
-+{
-+ setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET,
-+ "IPv6AcceptRA", ipv6AcceptRA);
-+}
-+
- /**
- * Define placeholder command handlers for the OEM Extension bytes for the Set
- * LAN Configuration Parameters and Get LAN Configuration Parameters
-@@ -1629,22 +1658,8 @@ RspType<> setLan(Context::ptr ctx, uint4_t channelBits, uint4_t reserved1,
- {
- return responseReqDataLenInvalid();
- }
-- std::bitset<8> expected;
-- EthernetInterface::DHCPConf dhcp =
-- channelCall<getDHCPProperty>(channel);
-- if ((dhcp == EthernetInterface::DHCPConf::both) |
-- (dhcp == EthernetInterface::DHCPConf::v6))
-- {
-- expected[IPv6RouterControlFlag::Dynamic] = 1;
-- }
-- else
-- {
-- expected[IPv6RouterControlFlag::Static] = 1;
-- }
-- if (expected != control)
-- {
-- return responseInvalidFieldRequest();
-- }
-+ bool enableRA = control[IPv6RouterControlFlag::Dynamic];
-+ channelCall<setIPv6AcceptRA>(channel, enableRA);
- return responseSuccess();
- }
- case LanParam::IPv6StaticRouter1IP:
-@@ -1948,17 +1963,9 @@ RspType<message::Payload> getLan(Context::ptr ctx, uint4_t channelBits,
- case LanParam::IPv6RouterControl:
- {
- std::bitset<8> control;
-- EthernetInterface::DHCPConf dhcp =
-- channelCall<getDHCPProperty>(channel);
-- if ((dhcp == EthernetInterface::DHCPConf::both) ||
-- (dhcp == EthernetInterface::DHCPConf::v6))
-- {
-- control[IPv6RouterControlFlag::Dynamic] = 1;
-- }
-- else
-- {
-- control[IPv6RouterControlFlag::Static] = 1;
-- }
-+ control[IPv6RouterControlFlag::Dynamic] =
-+ channelCall<getIPv6AcceptRA>(channel);
-+ control[IPv6RouterControlFlag::Static] = 0;
- ret.pack(control);
- return responseSuccess(std::move(ret));
- }
---
-2.26.2
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index 81cb43ebe..677641faf 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -8,7 +8,6 @@ SRC_URI += "file://phosphor-ipmi-host.service \
file://0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch \
file://0062-Update-IPMI-Chassis-Control-command.patch \
file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \
- file://0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch \
"
EXTRA_OECONF_append = " --disable-i2c-whitelist-check"
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 0aa63ca03..cc9f2d025 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 = "4a4d1d03d99fabe089e649aa226ad4c61e71684e"
+SRCREV = "3b170152ddc967f270939f4c351be987c451f0ca"
SRC_URI += "file://99-ipmi-kcs.rules"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch
deleted file mode 100644
index 5f749af45..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch
+++ /dev/null
@@ -1,317 +0,0 @@
-From e5ab844259f569656e95f5324f7428229dd811a7 Mon Sep 17 00:00:00 2001
-From: Cheng C Yang <cheng.c.yang@intel.com>
-Date: Wed, 3 Jul 2019 07:39:47 +0800
-Subject: [PATCH] Add dbus interface for sol commands
-
-Add dbus interface for sol config parameters so that after move set/get
-sol config parameter command from net-ipmid to host-ipmid, the command
-can send config parameters to net-ipmid sol service through the dbus
-interface.
-
-Tested by:
-busctl introspect xyz.openbmc_project.Settings /xyz/openbmc_project
-/network/host0/sol can show correct dbus properties of sol parameters.
-ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x00 0x01
-ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x01 0x00
-ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x02 0x83
-ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x03 0x5 0x03
-ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x04 0x5 0x03
-all these commands can change the dbus properties as the value in
-above commands.
-Before and after run these commands, ipmitool -I lanplus -H x -U x
--P x sol activate can start sol session correctly.
-After reboot BMC, "Progress" property in dbus interface change back
-to 0 and other properties will not reset to default value.
-
-Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
----
- command/payload_cmds.cpp | 3 +
- command/sol_cmds.cpp | 84 --------------------------
- sol/sol_manager.cpp | 124 +++++++++++++++++++++++++++++++++++++++
- sol/sol_manager.hpp | 1 +
- sol_module.cpp | 6 --
- 5 files changed, 128 insertions(+), 90 deletions(-)
-
-diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
-index c8e682e..bc987c5 100644
---- a/command/payload_cmds.cpp
-+++ b/command/payload_cmds.cpp
-@@ -41,6 +41,9 @@ std::vector<uint8_t> activatePayload(const std::vector<uint8_t>& inPayload,
- return outPayload;
- }
-
-+ std::get<sol::Manager&>(singletonPool)
-+ .updateSOLParameter(ipmi::convertCurrentChannelNum(
-+ ipmi::currentChNum, getInterfaceIndex()));
- if (!std::get<sol::Manager&>(singletonPool).enable)
- {
- response->completionCode = IPMI_CC_PAYLOAD_TYPE_DISABLED;
-diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
-index fda3e91..a1e820f 100644
---- a/command/sol_cmds.cpp
-+++ b/command/sol_cmds.cpp
-@@ -71,90 +71,6 @@ void activating(uint8_t payloadInstance, uint32_t sessionID)
- outPayload);
- }
-
--std::vector<uint8_t> setConfParams(const std::vector<uint8_t>& inPayload,
-- const message::Handler& handler)
--{
-- std::vector<uint8_t> outPayload(sizeof(SetConfParamsResponse));
-- auto request =
-- reinterpret_cast<const SetConfParamsRequest*>(inPayload.data());
-- auto response = reinterpret_cast<SetConfParamsResponse*>(outPayload.data());
-- response->completionCode = IPMI_CC_OK;
--
-- switch (static_cast<Parameter>(request->paramSelector))
-- {
-- case Parameter::PROGRESS:
-- {
-- uint8_t progress = request->value & progressMask;
-- std::get<sol::Manager&>(singletonPool).progress = progress;
-- break;
-- }
-- case Parameter::ENABLE:
-- {
-- bool enable = request->value & enableMask;
-- std::get<sol::Manager&>(singletonPool).enable = enable;
-- break;
-- }
-- case Parameter::AUTHENTICATION:
-- {
-- if (!request->auth.auth || !request->auth.encrypt)
-- {
-- response->completionCode = ipmiCCWriteReadParameter;
-- }
-- else if (request->auth.privilege <
-- static_cast<uint8_t>(session::Privilege::USER) ||
-- request->auth.privilege >
-- static_cast<uint8_t>(session::Privilege::OEM))
-- {
-- response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST;
-- }
-- else
-- {
-- std::get<sol::Manager&>(singletonPool).solMinPrivilege =
-- static_cast<session::Privilege>(request->auth.privilege);
-- }
-- break;
-- }
-- case Parameter::ACCUMULATE:
-- {
-- using namespace std::chrono_literals;
--
-- if (request->acc.threshold == 0)
-- {
-- response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST;
-- break;
-- }
--
-- std::get<sol::Manager&>(singletonPool).accumulateInterval =
-- request->acc.interval * sol::accIntervalFactor * 1ms;
-- std::get<sol::Manager&>(singletonPool).sendThreshold =
-- request->acc.threshold;
-- break;
-- }
-- case Parameter::RETRY:
-- {
-- using namespace std::chrono_literals;
--
-- std::get<sol::Manager&>(singletonPool).retryCount =
-- request->retry.count;
-- std::get<sol::Manager&>(singletonPool).retryInterval =
-- request->retry.interval * sol::retryIntervalFactor * 1ms;
-- break;
-- }
-- case Parameter::PORT:
-- {
-- response->completionCode = ipmiCCWriteReadParameter;
-- break;
-- }
-- case Parameter::NVBITRATE:
-- case Parameter::VBITRATE:
-- case Parameter::CHANNEL:
-- default:
-- response->completionCode = ipmiCCParamNotSupported;
-- }
--
-- return outPayload;
--}
--
- std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
- const message::Handler& handler)
- {
-diff --git a/sol/sol_manager.cpp b/sol/sol_manager.cpp
-index a118457..55d269a 100644
---- a/sol/sol_manager.cpp
-+++ b/sol/sol_manager.cpp
-@@ -14,6 +14,11 @@
- #include <cmath>
- #include <ipmid/utils.hpp>
- #include <phosphor-logging/log.hpp>
-+#include <sdbusplus/message/types.hpp>
-+
-+constexpr const char* solInterface = "xyz.openbmc_project.Ipmi.SOL";
-+constexpr const char* solPath = "/xyz/openbmc_project/ipmi/sol/";
-+constexpr const char* PROP_INTF = "org.freedesktop.DBus.Properties";
-
- namespace sol
- {
-@@ -103,6 +108,125 @@ void Manager::stopHostConsole()
- }
- }
-
-+std::string getService(sdbusplus::bus::bus& bus, const std::string& intf,
-+ const std::string& path)
-+{
-+ auto mapperCall =
-+ bus.new_method_call("xyz.openbmc_project.ObjectMapper",
-+ "/xyz/openbmc_project/object_mapper",
-+ "xyz.openbmc_project.ObjectMapper", "GetObject");
-+
-+ mapperCall.append(path);
-+ mapperCall.append(std::vector<std::string>({intf}));
-+
-+ std::map<std::string, std::vector<std::string>> mapperResponse;
-+
-+ try
-+ {
-+ auto mapperResponseMsg = bus.call(mapperCall);
-+ mapperResponseMsg.read(mapperResponse);
-+ }
-+ catch (sdbusplus::exception_t&)
-+ {
-+ throw std::runtime_error("ERROR in mapper call");
-+ }
-+
-+ if (mapperResponse.begin() == mapperResponse.end())
-+ {
-+ throw std::runtime_error("ERROR in reading the mapper response");
-+ }
-+
-+ return mapperResponse.begin()->first;
-+}
-+
-+ipmi::PropertyMap getAllDbusProperties(sdbusplus::bus::bus& bus,
-+ const std::string& service,
-+ const std::string& objPath,
-+ const std::string& interface)
-+{
-+ ipmi::PropertyMap properties;
-+
-+ sdbusplus::message::message method = bus.new_method_call(
-+ service.c_str(), objPath.c_str(), PROP_INTF, "GetAll");
-+
-+ method.append(interface);
-+
-+ try
-+ {
-+ sdbusplus::message::message reply = bus.call(method);
-+ reply.read(properties);
-+ }
-+ catch (sdbusplus::exception_t&)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Failed to get all properties",
-+ phosphor::logging::entry("PATH=%s", objPath.c_str()),
-+ phosphor::logging::entry("INTERFACE=%s", interface.c_str()));
-+ throw std::runtime_error("ERROR in reading proerties");
-+ }
-+
-+ return properties;
-+}
-+
-+void Manager::updateSOLParameter(uint8_t channelNum)
-+{
-+ std::variant<uint8_t, bool> value;
-+ sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection());
-+ static std::string solService{};
-+ ipmi::PropertyMap properties;
-+ std::string ethdevice = ipmi::getChannelName(channelNum);
-+ std::string solPathWitheEthName = solPath + ethdevice;
-+ if (solService.empty())
-+ {
-+ try
-+ {
-+ solService = getService(dbus, solInterface, solPathWitheEthName);
-+ }
-+ catch (const std::runtime_error& e)
-+ {
-+ solService.clear();
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error: get SOL service failed");
-+ return;
-+ }
-+ }
-+ try
-+ {
-+ properties = getAllDbusProperties(dbus, solService, solPathWitheEthName,
-+ solInterface);
-+ }
-+ catch (const std::runtime_error&)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error setting sol parameter");
-+ return;
-+ }
-+
-+ progress = std::get<uint8_t>(properties["Progress"]);
-+
-+ enable = std::get<bool>(properties["Enable"]);
-+
-+ forceEncrypt = std::get<bool>(properties["ForceEncryption"]);
-+
-+ forceAuth = std::get<bool>(properties["ForceAuthentication"]);
-+
-+ solMinPrivilege = static_cast<session::Privilege>(
-+ std::get<uint8_t>(properties["Privilege"]));
-+
-+ accumulateInterval =
-+ std::get<uint8_t>((properties["AccumulateIntervalMS"])) *
-+ sol::accIntervalFactor * 1ms;
-+
-+ sendThreshold = std::get<uint8_t>(properties["Threshold"]);
-+
-+ retryCount = std::get<uint8_t>(properties["RetryCount"]);
-+
-+ retryInterval = std::get<uint8_t>(properties["RetryIntervalMS"]) *
-+ sol::retryIntervalFactor * 1ms;
-+
-+ return;
-+}
-+
- void Manager::startPayloadInstance(uint8_t payloadInstance,
- session::SessionID sessionID)
- {
-diff --git a/sol/sol_manager.hpp b/sol/sol_manager.hpp
-index 5b48add..4e797d4 100644
---- a/sol/sol_manager.hpp
-+++ b/sol/sol_manager.hpp
-@@ -252,6 +252,7 @@ class Manager
- * @return 0 on success and errno on failure.
- */
- int writeConsoleSocket(const std::vector<uint8_t>& input) const;
-+ void updateSOLParameter(uint8_t channelNum);
-
- private:
- SOLPayloadMap payloadMap;
-diff --git a/sol_module.cpp b/sol_module.cpp
-index 8200e74..2b1fb46 100644
---- a/sol_module.cpp
-+++ b/sol_module.cpp
-@@ -42,12 +42,6 @@ void registerCommands()
- &getPayloadInfo,
- session::Privilege::USER,
- false},
-- // Set SOL Configuration Parameters
-- {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
-- static_cast<uint16_t>(::command::NetFns::TRANSPORT) | 0x21},
-- &setConfParams,
-- session::Privilege::ADMIN,
-- false},
- // Get SOL Configuration Parameters
- {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
- static_cast<uint16_t>(::command::NetFns::TRANSPORT) | 0x22},
---
-2.17.1
-
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 9b76a8fa4..7fe91fd1f 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 = "de7dd5ce3133a0201e149b6fdf3d3458fb7f06a5"
+SRCREV = "d4a4bed525f79c39705fa526b20ab663bb2c2069"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
@@ -21,7 +21,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://10-nice-rules.conf \
file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \
- file://0009-Add-dbus-interface-for-sol-commands.patch \
file://0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb
index dd48df0c6..47c66ccb8 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb
@@ -1,8 +1,8 @@
SUMMARY = "Phosphor LED Group Management for Intel"
PR = "r1"
-inherit native
inherit obmc-phosphor-utils
+inherit native
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
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 ae498beb8..6c930876f 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 = "dca36d524d22d6efab3f7bfd6adda69dbebb1bf3"
+SRCREV = "37ea118aa8653cc6220c4fd6da0224f0797f4bdc"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb
index 0ed7add07..ee6fd12ee 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libpldm_intel"
DESCRIPTION = "Provides encode/decode APIs for PLDM specifications"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git/libpldm_intel"
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 6a418c330..b9d3c0ca4 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 = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git/mctp_emulator"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb
index 3e8119c66..afe199192 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.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 = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git/mctp_wrapper"
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 c152eef70..96582c76e 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://${PN}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb
index 1fbeefced..c36c0d926 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=615045c30a05cde5c0e924854d43c327"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git/mctpwplus"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
index d53ac712e..8a73394e5 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "git://github.com/Intel-BMC/nvme-mi.git;protocol=ssh"
-SRCREV = "63e1cf7f8b950d37fdb035745bf740ec87ede6ae"
+SRCREV = "832c63d3db86788859f4afb911840f5ba100d230"
S = "${WORKDIR}/git"
PV = "1.0+git${SRCPV}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
index 08571570b..4a2a33878 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI += "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git/pldmd"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb
index 8b4ee807a..134cd9fdd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.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 = "07adfb357cdb679bf9bbcf2eaff7406cfb5fd52b"
+SRCREV = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
S = "${WORKDIR}/git/pmci_launcher"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init
index 245dabe6c..2065f94ee 100755
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init
@@ -149,6 +149,11 @@ RESTORE_FLAG=$RWFS_MNT/.restore_op
if [ -f "$RESTORE_FLAG" ]; then
mount -o remount,rw "$RWFS_MNT"
restore_op=$(cat $RESTORE_FLAG) # read from NV
+ modified_on=$(stat -c %y $RESTORE_FLAG) # get last modified time
+ log "restore_op: $restore_op modified on: $modified_on"
+ # To rule out stale file mounted, Write unique, unused value 0x10
+ # (last 2-bits are b00) before removing the file.
+ echo 16 > $RESTORE_FLAG
# set default value 0 if RESTORE_FLAG file was empty
restore_op=${restore_op:-0}
restore_op=$((restore_op & 3)) # mask off 2 bits
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
index cb4a74a0b..e5c229ac7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -1,4 +1,4 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git"
-SRCREV = "aaffc124b6f49d9bc267e65565bdd5d4c1db1aaf"
+SRCREV = "486e42e9db215070d631b7ac1f8f32537cb3bfe7"
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 d0370ba00..c00b5d4cf 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,7 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PROJECT_SRC_DIR := "${THISDIR}/${PN}"
-SRCREV = "0947d7c1cb9dc5ae4bc740d18aff059cb896c309"
+SRCREV = "6b6891c52e550c42507d4b413cbc4c6a09235535"
#SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
SRC_URI += "\
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend
index f767cda73..ebb498866 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend
@@ -1,2 +1,2 @@
#SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git"
-SRCREV = "84a4c19c48ad28b537cfcce15df39e841e1ed565"
+SRCREV = "0171dd6bce9004e187c957f160809b729322f37d"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
index dcbe656b1..42f23dd9e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
@@ -1,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/telemetry.git"
-SRCREV = "d7cebdd37fade28b0efd34bb9d641135bff758a0"
+SRCREV = "f763c9e3bbe0f86a4a41e7bb0dc70bffde0af9b2"
EXTRA_OEMESON += " -Dmax-reports=5"
EXTRA_OEMESON += " -Dmax-reading-parameters=200"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
index 0b3d54986..c9f14f54c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
@@ -1,7 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI = "git://github.com/openbmc/phosphor-user-manager"
-SRCREV = "9638afb9aa848aa0e696c2447e0fbc70a0aa5eed"
+SRCREV = "18c1b42c1612e0e8d8f5cd9973bba09b447c7185"
EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
index d137f6971..a634b1588 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
@@ -1,4 +1,4 @@
-From 0e426ce8bcde3b6fb131405ef265250a96aa7e0a Mon Sep 17 00:00:00 2001
+From 67797d726b6eb6fa8e1dad063c7d2021cec47ab3 Mon Sep 17 00:00:00 2001
From: James Feist <james.feist@linux.intel.com>
Date: Mon, 17 Jun 2019 12:00:58 -0700
Subject: [PATCH] Customize phosphor-watchdog for Intel platforms
@@ -11,19 +11,23 @@ required for compatibility with Intel platforms.
3. Use host status to enable/disable watchdog
4. Set preTimeoutInterruptOccurFlag
5. Assign watchdog cause for correct reset cause reporting
+ 6. Add NMI Pre-Interrupt support for IPMI watchdog timer.
Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Ren Yu <yux.ren@intel.com>
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
+Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com>
+
+%% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
---
- watchdog.cpp | 212 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++++++---
watchdog.hpp | 23 +++++-
- 2 files changed, 224 insertions(+), 11 deletions(-)
+ 2 files changed, 242 insertions(+), 11 deletions(-)
diff --git a/watchdog.cpp b/watchdog.cpp
-index 9090760..2685401 100644
+index 57e9050..1204db4 100644
--- a/watchdog.cpp
+++ b/watchdog.cpp
@@ -1,11 +1,14 @@
@@ -41,7 +45,7 @@ index 9090760..2685401 100644
namespace phosphor
{
-@@ -18,10 +21,77 @@ using namespace phosphor::logging;
+@@ -18,10 +21,86 @@ using namespace phosphor::logging;
using sdbusplus::exception::SdBusError;
using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -104,6 +108,15 @@ index 9090760..2685401 100644
+static constexpr const char* request = "RequestedHostTransition";
+} // namespace host
+
++namespace nmi
++{
++static constexpr const char* busName = "xyz.openbmc_project.Control.Host.NMI";
++static constexpr const char* path = "/xyz/openbmc_project/control/host0/nmi";
++static constexpr const char* interface = "xyz.openbmc_project.Control.Host.NMI";
++static constexpr const char* request = "NMI";
++
++} // namespace nmi
++
+void Watchdog::powerStateChangedHandler(
+ const std::map<std::string, std::variant<std::string>>& props)
+{
@@ -123,7 +136,7 @@ index 9090760..2685401 100644
void Watchdog::resetTimeRemaining(bool enableWatchdog)
{
-@@ -102,13 +172,102 @@ uint64_t Watchdog::interval(uint64_t value)
+@@ -107,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value)
// Optional callback function on timer expiration
void Watchdog::timeOutHandler()
{
@@ -223,11 +236,20 @@ index 9090760..2685401 100644
+ "Watchdog timeout. timer use: %s",
+ preInterruptActionMessageArgs.c_str(),
+ timeUserMessage.c_str(), NULL);
++
++ if (preTimeoutInterruptAction ==
++ Watchdog::PreTimeoutInterruptAction::NMI)
++ {
++ sdbusplus::message::message preTimeoutInterruptHandler;
++ preTimeoutInterruptHandler = bus.new_method_call(
++ nmi::busName, nmi::path, nmi::interface, nmi::request);
++ bus.call_noreply(preTimeoutInterruptHandler);
++ }
+ }
auto target = actionTargetMap.find(action);
if (target == actionTargetMap.end())
-@@ -128,12 +287,45 @@ void Watchdog::timeOutHandler()
+@@ -133,12 +310,45 @@ void Watchdog::timeOutHandler()
try
{
@@ -327,5 +349,5 @@ index 7de9bb3..b004b7a 100644
void timeOutHandler();
--
-2.29.2
+2.17.1
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 5ef57447d..244af18dc 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 = "f0e37253951a4a32e4929c660232e17961f97bb8"
+SRCREV = "40dd78bd5fe1dfcadd22bba9eee8e402b634b40d"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend
index bdb411121..7ebf1d4d6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend
@@ -1,6 +1,6 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/webui-vue.git"
-SRCREV = "1915d8c4992c1a4165e8ae108e4d799b3b4ce86a"
+SRCREV = "5ed21f2d1e8b82be699a623bfdef550dfd598dbb"
do_compile_prepend() {
cp -vf ${S}/.env.intel ${S}/.env
diff --git a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb
index 873bbe814..83e1a81e4 100644
--- a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb
+++ b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb
@@ -3,13 +3,13 @@ HOMEPAGE = "http://curl.haxx.se/"
BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
SECTION = "console/network"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2e9fb35867314fe31c6a4977ef7dd531"
+LIC_FILES_CHKSUM = "file://COPYING;md5=425f6fdc767cc067518eef9bbdf4ab7b"
SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://0001-replace-krb5-config-with-pkg-config.patch \
"
-SRC_URI[sha256sum] = "0f4d63e6681636539dc88fa8e929f934cd3a840c46e0bf28c73be11e521b77a5"
+SRC_URI[sha256sum] = "e29bfe3633701590d75b0071bbb649ee5ca4ca73f00649268bd389639531c49a"
# Curl has used many names over the years...
CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
diff --git a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch
new file mode 100644
index 000000000..e3f5c6de7
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch
@@ -0,0 +1,45 @@
+Add target to only build tests (not run them)
+
+Not sending upstream as this is only a start of a solution to
+installable tests: It's useful for us already as is.
+
+Upstream-Status: Inappropriate [not a complete solution]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Refactored for 3.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+---
+ Makefile.in | 3 +++
+ testsuite/Makefile.in | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index e5ccfc7..15c9275 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,6 +52,9 @@ clean distclean mostlyclean maintainer-clean tags:
+ echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
+ $(MAKE) $@-here
+
++buildtest:
++ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
++
+ check-here:
+ true
+
+diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
+index 3f5e5f6..8fd68a3 100644
+--- a/testsuite/Makefile.in
++++ b/testsuite/Makefile.in
+@@ -122,6 +122,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
+ # data.
+ VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
+
++buildtest: $(TS_ALL)
++
+ check: $(TS_ALL)
+ TEST_SHLIB_DIR="$(TEST_SHLIB_DIR)" \
+ srcdir="$(srcdir)" \
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 000000000..d5f266681
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,36 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+
+refactored for 3.4. pending not in as of 3.4
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/configure.ac
+===================================================================
+--- nettle-3.4.orig/configure.ac
++++ nettle-3.4/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+
+-AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++ AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
++ [enable_openssl=no
++ break])
++fi
+
+ # For use by the testsuite
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
diff --git a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/dlopen-test.patch b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/dlopen-test.patch
new file mode 100644
index 000000000..ab9b91f88
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/dlopen-test.patch
@@ -0,0 +1,29 @@
+Remove the relative path for libnettle.so so the test
+program can find it.
+Relative paths are not suitable, as the folder strucure for ptest
+is different from the one expected by the nettle testsuite.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ testsuite/dlopen-test.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testsuite/dlopen-test.c b/testsuite/dlopen-test.c
+index 4265bf7..1a25d17 100644
+--- a/testsuite/dlopen-test.c
++++ b/testsuite/dlopen-test.c
+@@ -15,7 +15,7 @@ int
+ main (int argc UNUSED, char **argv UNUSED)
+ {
+ #if HAVE_LIBDL
+- void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW);
++ void *handle = dlopen ("libnettle.so", RTLD_NOW);
+ int (*get_version)(void);
+ if (!handle)
+ {
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/run-ptest b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/run-ptest
new file mode 100644
index 000000000..b90bed66d
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle/run-ptest
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+cd testsuite
+
+failed=0
+all=0
+
+for f in *-test; do
+ if [ "$f" = "sha1-huge-test" ] ; then
+ echo "SKIP: $f (skipped for ludicrous run time)"
+ continue
+ fi
+
+ "./$f"
+ case "$?" in
+ 0)
+ echo "PASS: $f"
+ all=$((all + 1))
+ ;;
+ 77)
+ echo "SKIP: $f"
+ ;;
+ *)
+ echo "FAIL: $f"
+ failed=$((failed + 1))
+ all=$((all + 1))
+ ;;
+ esac
+done
+
+if [ "$failed" -eq 0 ] ; then
+ echo "All $all tests passed"
+else
+ echo "$failed of $all tests failed"
+fi
+
diff --git a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb
new file mode 100644
index 000000000..f8f336008
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb
@@ -0,0 +1,57 @@
+SUMMARY = "A low level cryptographic library"
+DESCRIPTION = "Nettle is a cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space."
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
+DESCRIPTION = "It tries to solve a problem of providing a common set of \
+cryptographic algorithms for higher-level applications by implementing a \
+context-independent set of cryptographic algorithms"
+SECTION = "libs"
+LICENSE = "LGPLv3+ | GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
+ file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
+
+DEPENDS += "gmp"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://Add-target-to-only-build-tests-not-run-them.patch \
+ file://run-ptest \
+ file://check-header-files-of-openssl-only-if-enable_.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://dlopen-test.patch \
+ "
+
+SRC_URI[sha256sum] = "8d2a604ef1cde4cd5fb77e422531ea25ad064679ff0adf956e78b3352e0ef162"
+
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools ptest multilib_header
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "--disable-openssl"
+
+do_compile_ptest() {
+ oe_runmake buildtest
+}
+
+do_install_append() {
+ oe_multilib_header nettle/version.h
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+ # tools can be found in PATH, not in ../tools/
+ sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
+ install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+}
+
+RDEPENDS_${PN}-ptest += "${PN}-dev"
+INSANE_SKIP_${PN}-ptest += "dev-deps"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb b/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb
index 2a857709b..89dbf1d68 100644
--- a/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb
+++ b/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb
@@ -2,7 +2,7 @@ SUMMARY = "i3c-tools"
DESCRIPTION = "Set of tools to interact with i3c devices from user space"
SRC_URI = "git://github.com/vitor-soares-snps/i3c-tools.git"
-SRCREV = "2b37323d0de6265e5da3539f29fe34ac317e5b27"
+SRCREV = "5d752038c72af8e011a2cf988b1476872206e706"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control/0001-Extend-VR-Watchdog-timeout.patch b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control/0001-Extend-VR-Watchdog-timeout.patch
index 61d3105b2..15de955c0 100644
--- a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control/0001-Extend-VR-Watchdog-timeout.patch
+++ b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control/0001-Extend-VR-Watchdog-timeout.patch
@@ -1,32 +1,32 @@
-From 9617412472669eef5d3ed66c05468646d8e8a951 Mon Sep 17 00:00:00 2001
+From 540836801f4ab5e8be9703d2c1350e988b2ccc1f Mon Sep 17 00:00:00 2001
From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
Date: Thu, 11 Jun 2020 13:00:15 -0700
Subject: [PATCH] Extend VR Watchdog timeout
The VR watchdog reset is causing issues on platforms such as
Cooper City that take longer to assert CPU Power Good. This
-extends the timeout to 15s to hold off the reset for Cooper
+extends the timeout to 12s to hold off the reset for Cooper
City.
Change-Id: I9658b4ead6d9bf8eaa30e4aeb9f1d56c2f2187d3
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
---
- power-control-x86/src/power_control.cpp | 2 +-
+ power-control-x86/config/power-config-host0.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
-index b891c8c..b6ee6f1 100644
---- a/power-control-x86/src/power_control.cpp
-+++ b/power-control-x86/src/power_control.cpp
-@@ -53,7 +53,7 @@ const static constexpr int powerPulseTimeMs = 200;
- const static constexpr int forceOffPulseTimeMs = 15000;
- const static constexpr int resetPulseTimeMs = 500;
- const static constexpr int powerCycleTimeMs = 5000;
--const static constexpr int sioPowerGoodWatchdogTimeMs = 1000;
-+const static constexpr int sioPowerGoodWatchdogTimeMs = 12000;
- const static constexpr int psPowerOKWatchdogTimeMs = 8000;
- const static constexpr int gracefulPowerOffTimeMs = 60000;
- const static constexpr int warmResetCheckTimeMs = 500;
+diff --git a/power-control-x86/config/power-config-host0.json b/power-control-x86/config/power-config-host0.json
+index ca9a86a..f579c2b 100644
+--- a/power-control-x86/config/power-config-host0.json
++++ b/power-control-x86/config/power-config-host0.json
+@@ -18,7 +18,7 @@
+ "ForceOffPulseMs": 15000,
+ "ResetPulseMs": 500,
+ "PowerCycleMs": 5000,
+- "SioPowerGoodWatchdogMs": 1000,
++ "SioPowerGoodWatchdogMs": 12000,
+ "PsPowerOKWatchdogMs": 8000,
+ "GracefulPowerOffS": 300,
+ "WarmResetCheckMs": 500,
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
index 26c96db24..93a32164d 100755
--- a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
@@ -1,6 +1,6 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh"
-SRCREV = "92caa4c639903ef076e2f09e985291781edd927d"
+SRCREV = "afd04f0283bfc4854c0100c56ccf8bc1c10c799a"
FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-wht/conf/layer.conf b/meta-openbmc-mods/meta-wht/conf/layer.conf
index 4ce9453f7..a639b642b 100644
--- a/meta-openbmc-mods/meta-wht/conf/layer.conf
+++ b/meta-openbmc-mods/meta-wht/conf/layer.conf
@@ -9,6 +9,6 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "wht"
BBFILE_PATTERN_wht = "^${LAYERDIR}/"
BBFILE_PRIORITY_wht = "11"
-LAYERSERIES_COMPAT_wht = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_wht = "gatesgarth hardknott"
PRODUCT_GENERATION = "wht"
diff --git a/meta-openbmc-mods/meta-wht/conf/local.conf.sample b/meta-openbmc-mods/meta-wht/conf/local.conf.sample
index 7d53790cf..5a5134be5 100644
--- a/meta-openbmc-mods/meta-wht/conf/local.conf.sample
+++ b/meta-openbmc-mods/meta-wht/conf/local.conf.sample
@@ -28,5 +28,9 @@ CONF_VERSION = "5"
#BB_NUMBER_THREADS = "70"
FULL_OPTIMIZATION = "-Os -pipe ${DEBUG_FLAGS}"
-require conf/distro/include/security_flags.inc
+
+# The following class prints the SRC_URI of each recipe in the build
+# Once enabled, run 'bitbake intel-platforms --runonly print_src'
+# on a clean workspace to get the output
+#INHERIT += "print-src"
diff --git a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf
index 441b4b578..5d8689680 100644
--- a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf
+++ b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf
@@ -9,6 +9,6 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "wolfpass"
BBFILE_PATTERN_wolfpass = "^${LAYERDIR}/"
BBFILE_PRIORITY_wolfpass = "11"
-LAYERSERIES_COMPAT_wolfpass = "dunfell gatesgarth"
+LAYERSERIES_COMPAT_wolfpass = "gatesgarth hardknott"
PRODUCT_GENERATION = "prl"
diff --git a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
index d20f54810..578651618 100644
--- a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
+++ b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
@@ -22,4 +22,3 @@ CONF_VERSION = "4"
#BB_NUMBER_THREADS = "70"
FULL_OPTIMIZATION = "-Os -pipe ${DEBUG_FLAGS}"
-require conf/distro/include/security_flags.inc