summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-07-30 01:23:08 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2021-07-30 02:21:22 +0300
commit67327ddc580cb9a85219a534844832a1682780d4 (patch)
tree307cedb87f4c0a329740c55ac364ed489d1d8fc2 /meta-openbmc-mods
parentbb6a14e2f317abf60677c6ad8de9c33d5760bf36 (diff)
downloadopenbmc-67327ddc580cb9a85219a534844832a1682780d4.tar.xz
Update to internal 0.63
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods')
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch744
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch6
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch28
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch4
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0015-net-phy-realtek-Change-LED-configuration.patch8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-LED-control-support.patch10
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch14
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch14
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch10
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch10
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0029-Set-UART-routing-in-lowlevel_init.patch12
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch20
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch62
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0033-Disable-debug-interfaces.patch86
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0034-Implement-the-IPMI-commands-in-FFUJ-mode-in-u-boot.patch211
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch6
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg5
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass1
-rw-r--r--meta-openbmc-mods/meta-common/classes/print-src.bbclass3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch62
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh59
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch54
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-sunrpc-use-snprintf-to-guard-against-buffer-overflow.patch35
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch52
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Add-event-log-for-system-time-synchronization.patch114
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.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/pfr-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch149
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp20
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0034-Add-username-property-to-SessionInfo-interface.patch64
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch47
-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.patch4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0018-bmcweb-Add-BMC-Time-update-log-to-the-registry.patch77
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0019-Add-generic-message-PropertySizeExceeded.patch118
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch72
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0008-Add-checks-on-Event-Subscription-input-parameters.patch85
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch)422
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch)15
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch29
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend11
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch94
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-rakp12-Add-username-to-SessionInfo-interface.patch49
-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/ipmi/phosphor-node-manager-proxy_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend4
-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.bb4
-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
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch147
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0007-Add-support-for-the-energy-hwmon-type.patch267
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0008-CPUSensor-additional-debug-message.patch69
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/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/0005-Added-suport-for-multiple-user-manager-services.patch41
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend7
-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.bb5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-support/gnutls/gnutls_%.bbappend12
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-wht/conf/local.conf.sample2
-rw-r--r--meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample2
93 files changed, 2818 insertions, 831 deletions
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 0705ab3de..d1ccc278a 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 041ad6cfc3d379c8e4fd271e7f9e3d8ea6ee61ac Mon Sep 17 00:00:00 2001
+From 45d1a40a3fc5fa97c92e59fc36fd98eb047a9bd1 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
@@ -7,83 +7,45 @@ 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>
---
- arch/arm/dts/Makefile | 3 +-
- arch/arm/dts/ast2600-intel.dts | 197 ++++++++++++
+ arch/arm/dts/ast2600-intel.dts | 202 ++++---------
arch/arm/lib/interrupts.c | 5 +
- arch/arm/mach-aspeed/ast2600/Kconfig | 8 +
- board/aspeed/ast2600_intel/Kconfig | 13 +
- board/aspeed/ast2600_intel/Makefile | 4 +
+ arch/arm/mach-aspeed/ast2600/Kconfig | 4 +-
+ board/aspeed/ast2600_intel/Makefile | 3 +
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/intel.c | 346 ++++++++++-----------
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
+ 12 files changed, 998 insertions(+), 334 deletions(-)
create mode 100644 board/aspeed/ast2600_intel/ast-espi.c
create mode 100644 board/aspeed/ast2600_intel/ast-irq.c
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
-old mode 100755
-new mode 100644
-index 786042cd8340..df844065cd4f
---- a/arch/arm/dts/Makefile
-+++ b/arch/arm/dts/Makefile
-@@ -684,7 +684,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
- ast2600-fpga.dtb \
- ast2600-rainier.dtb \
- ast2600-slt.dtb \
-- ast2600-tacoma.dtb
-+ ast2600-tacoma.dtb \
-+ ast2600-intel.dtb
-
- dtb-$(CONFIG_ARCH_STI) += stih410-b2260.dtb
-
diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts
-new file mode 100644
-index 000000000000..9a15e204f83b
---- /dev/null
+index c76547cd6352..e6197831cf02 100644
+--- a/arch/arm/dts/ast2600-intel.dts
+++ b/arch/arm/dts/ast2600-intel.dts
-@@ -0,0 +1,197 @@
-+// SPDX-License-Identifier: GPL-2.0+
-+// Copyright (c) 2019-2020 Intel Corporation
-+/dts-v1/;
-+
-+#include "ast2600-u-boot.dtsi"
-+
-+/ {
-+ memory {
-+ device_type = "memory";
-+ reg = <0x80000000 0x40000000>;
-+ };
-+
-+ chosen {
-+ stdout-path = &uart5;
-+ };
-+
-+ aliases {
-+ spi0 = &fmc;
-+ ethernet1 = &mac1;
-+ };
-+
-+ cpus {
-+ cpu@0 {
-+ clock-frequency = <800000000>;
-+ };
-+ cpu@1 {
-+ clock-frequency = <800000000>;
-+ };
-+ };
+@@ -1,10 +1,11 @@
+ // SPDX-License-Identifier: GPL-2.0+
++// Copyright (c) 2019-2021 Intel Corporation
+ /dts-v1/;
+
+ #include "ast2600-u-boot.dtsi"
+
+ / {
+- model = "AST2600 Intel EGS server board";
++ model = "Intel server board with AST2600 as the BMC";
+ compatible = "aspeed,ast2600-intel", "aspeed,ast2600";
+
+ memory {
+@@ -37,6 +38,42 @@
+ clock-frequency = <1200000000>;
+ };
+ };
+
+ system-leds {
+ compatible = "gpio-leds";
@@ -120,139 +82,246 @@ index 000000000000..9a15e204f83b
+
+&uart2 {
+ status = "okay";
-+};
-+
-+&uart5 {
-+ u-boot,dm-pre-reloc;
-+ status = "okay";
-+};
-+
-+&sdrammc {
-+ clock-frequency = <400000000>;
-+};
-+
-+&wdt1 {
+ };
+
+ &uart5 {
+@@ -49,22 +86,24 @@
+ };
+
+ &wdt1 {
+ u-boot,dm-pre-reloc;
-+ status = "okay";
-+};
-+
-+&wdt2 {
+ status = "okay";
+ };
+
+ &wdt2 {
+ u-boot,dm-pre-reloc;
-+ status = "okay";
-+};
-+
-+&wdt3 {
+ status = "okay";
+ };
+
+ &wdt3 {
+ u-boot,dm-pre-reloc;
-+ status = "okay";
-+};
-+
-+&mdio {
-+ status = "okay";
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ ethphy1: ethernet-phy@1 {
-+ reg = <0>;
-+ };
-+
-+ ethphy2: ethernet-phy@2 {
-+ reg = <0>;
-+ };
-+
-+ ethphy3: ethernet-phy@3 {
-+ reg = <0>;
-+ };
-+
-+ ethphy4: ethernet-phy@4 {
-+ reg = <0>;
-+ };
-+};
-+
-+&mac1 {
-+ status = "okay";
-+ phy-mode = "rgmii";
-+ phy-handle = <&ethphy2>;
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mac2link_default &pinctrl_mdio2_default>;
-+};
-+
-+&fmc {
-+ status = "okay";
+ status = "okay";
+ };
+
+ &mdio {
+ status = "okay";
+ pinctrl-names = "default";
+- pinctrl-0 = < &pinctrl_mdio1_default &pinctrl_mdio2_default
+- &pinctrl_mdio3_default &pinctrl_mdio4_default>;
++ pinctrl-0 = <&pinctrl_mdio2_default>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ethphy0: ethernet-phy@0 {
+@@ -84,14 +123,6 @@
+ };
+ };
+
+-&mac0 {
+- status = "okay";
+- phy-mode = "rgmii";
+- phy-handle = <&ethphy0>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_rgmii1_default>;
+-};
+-
+ &mac1 {
+ status = "okay";
+ phy-mode = "rgmii";
+@@ -100,146 +131,30 @@
+ pinctrl-0 = <&pinctrl_rgmii2_default>;
+ };
+
+-&mac2 {
+- status = "okay";
+- phy-mode = "rgmii";
+- phy-handle = <&ethphy2>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_rgmii3_default>;
+-};
+-
+-&mac3 {
+- status = "okay";
+- phy-mode = "rgmii";
+- phy-handle = <&ethphy3>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_rgmii4_default>;
+-};
+-
+ &fmc {
+ status = "okay";
+-
+#if 0
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_fmcquad_default>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fmcquad_default>;
+-
+- flash@0 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-
+- flash@1 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-
+- flash@2 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-};
+-
+-&spi1 {
+- status = "okay";
+-
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1abr_default
+- &pinctrl_spi1cs1_default &pinctrl_spi1wp_default
+- &pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
+-
+- flash@0 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-
+- flash@1 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-};
+-
+-&spi2 {
+- status = "okay";
+-
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_spi2_default &pinctrl_spi2cs1_default
+- &pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
+-
+#endif
-+ flash@0 {
-+ compatible = "spi-flash", "sst,w25q256";
-+ status = "okay";
+ flash@0 {
+ compatible = "spi-flash", "sst,w25q256";
+ status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-
+- flash@1 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+- };
+-
+- flash@2 {
+- compatible = "spi-flash", "sst,w25q256";
+- status = "okay";
+- spi-max-frequency = <50000000>;
+- spi-tx-bus-width = <4>;
+- spi-rx-bus-width = <4>;
+ spi-max-frequency = <40000000>;
+ spi-tx-bus-width = <2>;
+ spi-rx-bus-width = <2>;
-+ };
-+};
-+
-+&emmc_slot0 {
-+ status = "okay";
-+ bus-width = <4>;
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_emmc_default>;
-+};
-+
-+&i2c4 {
-+ status = "okay";
-+
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_i2c5_default>;
-+};
-+
-+&i2c5 {
-+ status = "okay";
-+
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_i2c6_default>;
-+};
-+
-+&i2c6 {
-+ status = "okay";
-+
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_i2c7_default>;
-+};
-+
-+&i2c7 {
-+ status = "okay";
-+
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_i2c8_default>;
-+};
-+
-+&i2c8 {
-+ status = "okay";
-+
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_i2c9_default>;
-+};
-+
+ };
+ };
+
+ &emmc {
+- u-boot,dm-pre-reloc;
+ timing-phase = <0x700ff>;
+ };
+
+ &emmc_slot0 {
+- u-boot,dm-pre-reloc;
+ status = "okay";
+ bus-width = <4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_emmc_default>;
+- sdhci-drive-type = <1>;
+-};
+-
+-&sdhci {
+- timing-phase = <0xc6ffff>;
+-};
+-
+-&sdhci_slot0 {
+- status = "okay";
+- bus-width = <4>;
+- pwr-gpios = <&gpio0 ASPEED_GPIO(V, 0) GPIO_ACTIVE_HIGH>;
+- pwr-sw-gpios = <&gpio0 ASPEED_GPIO(V, 1) GPIO_ACTIVE_HIGH>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_sd1_default>;
+- sdhci-drive-type = <1>;
+-};
+-
+-&sdhci_slot1 {
+- status = "okay";
+- bus-width = <4>;
+- pwr-gpios = <&gpio0 ASPEED_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+- pwr-sw-gpios = <&gpio0 ASPEED_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_sd2_default>;
+- sdhci-drive-type = <1>;
+ };
+
+ &i2c4 {
+@@ -277,29 +192,32 @@
+ pinctrl-0 = <&pinctrl_i2c9_default>;
+ };
+
+-&pcie_bridge1 {
+&i2c9 {
-+ status = "okay";
-+
+ status = "okay";
+-};
+
+-&h2x {
+- status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c10_default>;
-+};
-+
+ };
+
+-#if 0
+-&fsim0 {
+&i2c12 {
-+ status = "okay";
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c13_default>;
-+};
-+
+ };
+
+-&fsim1 {
+&i2c13 {
-+ status = "okay";
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c14_default>;
-+};
-\ No newline at end of file
+ };
+-#endif
+
+-&ehci1 {
++&pcie_bridge1 {
+ status = "okay";
+ };
+
+-&display_port {
++&h2x {
+ status = "okay";
+ };
+
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index ee775ce5d264..8c985532afb4 100644
--- a/arch/arm/lib/interrupts.c
@@ -288,54 +357,26 @@ index ee775ce5d264..8c985532afb4 100644
{
efi_restore_gd();
diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
-index 6258b337bc3d..ffcb110c3ae3 100644
+index fcdc425de59d..0900d22366d3 100644
--- a/arch/arm/mach-aspeed/ast2600/Kconfig
+++ b/arch/arm/mach-aspeed/ast2600/Kconfig
-@@ -32,10 +32,18 @@ config TARGET_SLT_AST2600
+@@ -35,8 +35,8 @@ config TARGET_AST2600_INTEL
+ bool "AST2600-INTEL"
+ depends on ASPEED_AST2600
help
- SLT-AST2600 is Aspeed SLT board for AST2600 chip.
-
-+config TARGET_AST2600_INTEL
-+ bool "AST2600-INTEL"
-+ depends on ASPEED_AST2600
-+ help
+- AST2600-INTEL is an Intel Eagle Stream CRB with
+- AST2600 as the BMC.
+ AST2600-INTEL is an Intel server board with the AST2600
+ as the BMC.
-+
- endchoice
- source "board/aspeed/evb_ast2600/Kconfig"
- source "board/aspeed/fpga_ast2600/Kconfig"
- source "board/aspeed/slt_ast2600/Kconfig"
-+source "board/aspeed/ast2600_intel/Kconfig"
+ endchoice
- endif
-diff --git a/board/aspeed/ast2600_intel/Kconfig b/board/aspeed/ast2600_intel/Kconfig
-new file mode 100644
-index 000000000000..b841dab60c76
---- /dev/null
-+++ b/board/aspeed/ast2600_intel/Kconfig
-@@ -0,0 +1,13 @@
-+if TARGET_AST2600_INTEL
-+
-+config SYS_BOARD
-+ default "ast2600_intel"
-+
-+config SYS_VENDOR
-+ default "aspeed"
-+
-+config SYS_CONFIG_NAME
-+ string "board configuration name"
-+ default "ast2600_intel"
-+
-+endif
diff --git a/board/aspeed/ast2600_intel/Makefile b/board/aspeed/ast2600_intel/Makefile
-new file mode 100644
-index 000000000000..37d2f0064f38
---- /dev/null
+index 1f9fcc73c719..37d2f0064f38 100644
+--- a/board/aspeed/ast2600_intel/Makefile
+++ b/board/aspeed/ast2600_intel/Makefile
-@@ -0,0 +1,4 @@
-+obj-y += intel.o
+@@ -1 +1,4 @@
+ obj-y += intel.o
+obj-y += ast-espi.o
+obj-y += ast-irq.o
+obj-y += ast-timer.o
@@ -1122,19 +1163,87 @@ index 000000000000..cf8c69aba5d3
+ writel(tctrl, AST_TIMER_BASE + TIMER_CONTROL);
+}
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-new file mode 100644
-index 000000000000..4a40a050c3da
---- /dev/null
+index be6dc49a3bc7..092ff8b5c095 100644
+--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -0,0 +1,192 @@
+@@ -1,222 +1,192 @@
+-// SPDX-License-Identifier: GPL-2.0+
+-/*
+- * Copyright (C) ASPEED Technology Inc.
+- */
+// SPDX-License-Identifier: GPL-2.0
-+// Copyright (c) 2019-2020, Intel Corporation.
++// Copyright (c) 2019-2021, Intel Corporation.
+
+/* Intel customizations of Das U-Boot */
-+#include <common.h>
+ #include <common.h>
+#include <asm/gpio.h>
-+#include <asm/io.h>
-+
+ #include <asm/io.h>
+
+-/* SCU registers */
+-#define SCU_BASE 0x1e6e2000
+-#define SCU_PINMUX4 (SCU_BASE + 0x410)
+-#define SCU_PINMUX4_RGMII3TXD1 BIT(19)
+-#define SCU_PINMUX5 (SCU_BASE + 0x414)
+-#define SCU_PINMUX5_SGPMI BIT(27)
+-#define SCU_PINMUX5_SGPMO BIT(26)
+-#define SCU_PINMUX5_SGPMLD BIT(25)
+-#define SCU_PINMUX5_SGPMCK BIT(24)
+-#define SCU_GPIO_PD0 (SCU_BASE + 0x610)
+-#define SCU_GPIO_PD0_B6 BIT(14)
+-#define SCU_PINMUX27 (SCU_BASE + 0x69c)
+-#define SCU_PINMUX27_HBLED_EN BIT(31)
+-
+-/* eSPI registers */
+-#define ESPI_BASE 0x1e6ee000
+-#define ESPI_CTRL (ESPI_BASE + 0x0)
+-#define ESPI_INT_EN (ESPI_BASE + 0xc)
+-#define ESPI_CTRL2 (ESPI_BASE + 0x80)
+-#define ESPI_SYSEVT_INT_EN (ESPI_BASE + 0x94)
+-#define ESPI_SYSEVT1_INT_EN (ESPI_BASE + 0x100)
+-#define ESPI_SYSEVT_INT_T0 (ESPI_BASE + 0x110)
+-#define ESPI_SYSEVT_INT_T1 (ESPI_BASE + 0x114)
+-#define ESPI_SYSEVT1_INT_T0 (ESPI_BASE + 0x120)
+-
+-/* LPC registers */
+-#define LPC_BASE 0x1e789000
+-#define LPC_HICR5 (LPC_BASE + 0x80)
+-#define LPC_HICR5_SIO80HGPIO_EN BIT(31)
+-#define LPC_HICR5_80HGPIO_EN BIT(30)
+-#define LPC_HICR5_80HGPIO_SEL_MASK GENMASK(28, 24)
+-#define LPC_HICR5_80HGPIO_SEL_SHIFT 24
+-#define LPC_HICR5_SNP0_INT_EN BIT(1)
+-#define LPC_HICR5_SNP0_EN BIT(0)
+-#define LPC_HICR6 (LPC_BASE + 0x84)
+-#define LPC_HICR6_STS_SNP1 BIT(1)
+-#define LPC_HICR6_STS_SNP0 BIT(0)
+-#define LPC_SNPWADR (LPC_BASE + 0x90)
+-#define LPC_SNPWADR_SNP0_MASK GENMASK(15, 0)
+-#define LPC_SNPWADR_SNP0_SHIFT 0
+-#define LPC_HICRB (LPC_BASE + 0x100)
+-#define LPC_HICRB_80HSGPIO_EN BIT(13)
+-
+-/* GPIO/SGPIO registers */
+-#define GPIO_BASE 0x1e780000
+-#define GPIO_ABCD_VAL (GPIO_BASE + 0x0)
+-#define GPIO_ABCD_VAL_D4 BIT(28)
+-#define GPIO_ABCD_VAL_C5 BIT(21)
+-#define GPIO_ABCD_VAL_C3 BIT(19)
+-#define GPIO_ABCD_DIR (GPIO_BASE + 0x4)
+-#define GPIO_ABCD_DIR_D4 BIT(28)
+-#define GPIO_ABCD_DIR_C5 BIT(21)
+-#define GPIO_ABCD_DIR_C3 BIT(19)
+-#define GPIO_EFGH_DIR (GPIO_BASE + 0x24)
+-#define GPIO_EFGH_DIR_G6 BIT(22)
+-#define SGPIO_M1_CONF (GPIO_BASE + 0x554)
+-#define SGPIO_M1_CONF_CLKDIV_MASK GENMASK(31, 16)
+-#define SGPIO_M1_CONF_CLKDIV_SHIFT 16
+-#define SGPIO_M1_PINS_MASK GENMASK(10, 6)
+-#define SGPIO_M1_PINS_SHIFT 6
+-#define SPGIO_M1_EN BIT(0)
+-
+-#define LPC_HICR5_UNKVAL_MASK 0x1FFF0000 /* bits with unknown values on reset */
+-
+-static void snoop_init(void)
+/* use GPIOC0 on intel boards */
+#define FFUJ_GPIO "gpio@1e78000016"
+
@@ -1183,14 +1292,15 @@ index 000000000000..4a40a050c3da
+#define SCU_4bc_PASSTHRU2_MASK GENMASK(29, 28)
+
+static void gpio_passthru_init(void)
-+{
+ {
+- u32 val;
+ writel(readl(SCU_BASE | SCU_4bc) |
+ SCU_4bc_PASSTHRU0_MASK | SCU_4bc_PASSTHRU1_MASK,
+ SCU_BASE | SCU_4bc);
+ writel(readl(SCU_BASE | SCU_418) | SCU_418_PBIO_MASK,
+ SCU_BASE | SCU_418);
+}
-+
+
+#define AST_LPC_BASE 0x1e789000
+#define LPC_SNOOP_ADDR 0x80
+#define HICR5 0x080 /* Host Interface Control Register 5 */
@@ -1218,52 +1328,166 @@ index 000000000000..4a40a050c3da
+{
+ uint32_t value;
+ /* enable port80h snoop and sgpio */
-+ /* set lpc snoop #0 to port 0x80 */
+ /* set lpc snoop #0 to port 0x80 */
+- val = readl(LPC_SNPWADR) & 0xffff0000;
+- val |= ((0x80 << LPC_SNPWADR_SNP0_SHIFT) &
+- LPC_SNPWADR_SNP0_MASK);
+- writel(val, LPC_SNPWADR);
+ value = readl(AST_LPC_BASE + SNPWADR) & 0xffff0000;
+ writel(value | LPC_SNOOP_ADDR, AST_LPC_BASE + SNPWADR);
-+
-+ /* clear interrupt status */
+
+ /* clear interrupt status */
+- val = readl(LPC_HICR6);
+- val |= (LPC_HICR6_STS_SNP0 |
+- LPC_HICR6_STS_SNP1);
+- writel(val, LPC_HICR6);
+ value = readl(AST_LPC_BASE + HICR6);
+ value |= HICR6_STR_SNP0W | HICR6_STR_SNP1W;
+ writel(value, AST_LPC_BASE + HICR6);
-+
-+ /* enable lpc snoop #0 and SIOGIO */
+
+ /* enable lpc snoop #0 and SIOGIO */
+- val = readl(LPC_HICR5);
+- val |= (LPC_HICR5_SIO80HGPIO_EN |
+- LPC_HICR5_SNP0_EN);
+- writel(val, LPC_HICR5);
+ value = readl(AST_LPC_BASE + HICR5) & ~(HICR5_UNKVAL_MASK);
+ value |= HICR5_EN_SIOGIO | HICR5_EN_SNP0W;
+ writel(value, AST_LPC_BASE + HICR5);
-+
-+ /* enable port80h snoop on SGPIO */
+
+ /* enable port80h snoop on SGPIO */
+- val = readl(LPC_HICRB);
+- val |= LPC_HICRB_80HSGPIO_EN;
+- writel(val, LPC_HICRB);
+ value = readl(AST_LPC_BASE + HICRB) | HICRB_EN80HSGIO;
+ writel(value, AST_LPC_BASE + HICRB);
-+}
-+
+ }
+
+#define AST_GPIO_BASE 0x1e780000
+
-+static void sgpio_init(void)
-+{
-+#define SGPIO_CLK_DIV(N) ((N) << 16)
-+#define SGPIO_BYTES(N) ((N) << 6)
-+#define SGPIO_ENABLE 1
+ static void sgpio_init(void)
+ {
+ #define SGPIO_CLK_DIV(N) ((N) << 16)
+ #define SGPIO_BYTES(N) ((N) << 6)
+ #define SGPIO_ENABLE 1
+#define GPIO554 0x554
+#define SCU_414 0x414 /* Multi-function Pin Control #5 */
-+#define SCU_414_SGPM_MASK GENMASK(27, 24)
-+
+ #define SCU_414_SGPM_MASK GENMASK(27, 24)
+
+ uint32_t value;
-+ /* set the sgpio clock to pclk/(2*(5+1)) or ~2 MHz */
+ /* set the sgpio clock to pclk/(2*(5+1)) or ~2 MHz */
+- u32 val;
+-
+- val = ((256 << SGPIO_M1_CONF_CLKDIV_SHIFT) & SGPIO_M1_CONF_CLKDIV_MASK) |
+- ((10 << SGPIO_M1_PINS_SHIFT) & SGPIO_M1_PINS_MASK) |
+- SPGIO_M1_EN;
+- writel(val, SGPIO_M1_CONF);
+-
+- val = readl(SCU_PINMUX5);
+- val |= (SCU_PINMUX5_SGPMI |
+- SCU_PINMUX5_SGPMO |
+- SCU_PINMUX5_SGPMLD |
+- SCU_PINMUX5_SGPMCK);
+- writel(val, SCU_PINMUX5);
+ value = SGPIO_CLK_DIV(256) | SGPIO_BYTES(10) | SGPIO_ENABLE;
+ writel(value, AST_GPIO_BASE + GPIO554);
+ writel(readl(SCU_BASE | SCU_414) | SCU_414_SGPM_MASK,
+ SCU_BASE | SCU_414);
-+}
-+
+ }
+
+-static void gpio_init(void)
+static void timer_handler(void *regs)
-+{
+ {
+- /* Default setting of Y23 pad in AST2600 A1 is HBLED so disable it. */
+- writel(readl(SCU_PINMUX27) & ~SCU_PINMUX27_HBLED_EN,
+- SCU_PINMUX27);
+-
+- /*
+- * Set GPIOC3 as an output with value high explicitly since it doesn't
+- * have an external pull up. It uses direct register access because
+- * it's called from board_early_init_f().
+- */
+- writel(readl(SCU_PINMUX4) & ~SCU_PINMUX4_RGMII3TXD1,
+- SCU_PINMUX4);
+- writel(readl(GPIO_ABCD_DIR) | GPIO_ABCD_DIR_C3,
+- GPIO_ABCD_DIR);
+- writel(readl(GPIO_ABCD_VAL) | GPIO_ABCD_VAL_C3,
+- GPIO_ABCD_VAL);
+-
+- writel(readl(SCU_GPIO_PD0) | SCU_GPIO_PD0_B6, SCU_GPIO_PD0);
+-
+- /*
+- * GPIO C5 has a connection between BMC(3.3v) and CPU(1.0v) so if we
+- * set it as an logic high output, it will be clipped by a protection
+- * circuit in the CPU and eventually the signal will be detected as
+- * logic low. So we leave this GPIO as an input so that the signal
+- * can be pulled up by a CPU internal resister. The signal will be
+- * 1.0v logic high resultingy.
+- */
+- writel(readl(GPIO_ABCD_DIR) & ~GPIO_ABCD_DIR_C5,
+- GPIO_ABCD_DIR);
+-
+- /*
+- * Set GPIOD4 as an output with value low explicitly to set the
+- * default SPD mux path to CPU and DIMMs.
+- */
+- writel(readl(GPIO_ABCD_DIR) | GPIO_ABCD_DIR_D4,
+- GPIO_ABCD_DIR);
+- writel(readl(GPIO_ABCD_VAL) & ~GPIO_ABCD_VAL_D4,
+- GPIO_ABCD_VAL);
+-
+- /* GPIO G6 is also an open-drain output so set it as an input. */
+- writel(readl(GPIO_EFGH_DIR) & ~GPIO_EFGH_DIR_G6,
+- GPIO_EFGH_DIR);
+ printf("+");
-+}
-+
+ }
+
+-static void espi_init(void)
+extern int arch_interrupt_init_early(void);
+int board_early_init_f(void)
-+{
+ {
+- u32 reg;
+-
+- /*
+- * Aspeed STRONGLY NOT recommend to use eSPI early init.
+- *
+- * This eSPI early init sequence merely set OOB_FREE. It
+- * is NOT able to actually handle OOB requests from PCH.
+- *
+- * During the power on stage, PCH keep waiting OOB_FREE
+- * to continue its booting. In general, OOB_FREE is set
+- * when BMC firmware is ready. That is, the eSPI kernel
+- * driver is mounted and ready to serve eSPI. However,
+- * it means that PCH must wait until BMC kernel ready.
+- *
+- * For customers that request PCH booting as soon as
+- * possible. You may use this early init to set OOB_FREE
+- * to prevent PCH from blocking by OOB_FREE before BMC
+- * kernel ready.
+- *
+- * If you are not sure what you are doing, DO NOT use it.
+- */
+- reg = readl(ESPI_CTRL);
+- reg |= 0xef;
+- writel(reg, ESPI_CTRL);
+-
+- writel(0x0, ESPI_SYSEVT_INT_T0);
+- writel(0x0, ESPI_SYSEVT_INT_T1);
+-
+- reg = readl(ESPI_INT_EN);
+- reg |= 0x80000000;
+- writel(reg, ESPI_INT_EN);
+-
+- writel(0xffffffff, ESPI_SYSEVT_INT_EN);
+- writel(0x1, ESPI_SYSEVT1_INT_EN);
+- writel(0x1, ESPI_SYSEVT1_INT_T0);
+-
+- reg = readl(ESPI_CTRL2);
+- reg |= 0x50;
+- writel(reg, ESPI_CTRL2);
+-
+- reg = readl(ESPI_CTRL);
+- reg |= 0x10;
+- writel(reg, ESPI_CTRL);
+ /* This is called before relocation; beware! */
+ /* initialize running timer? timer_init is next in the list but
+ * I am not sure if it actually does anything... */
@@ -1277,8 +1501,9 @@ index 000000000000..4a40a050c3da
+
+ /* TODO: is it too late to enforce HW security registers? */
+ return 0;
-+}
-+
+ }
+
+-int board_early_init_f(void)
+extern void timer_enable(int n, uint32_t freq, interrupt_handler_t *handler);
+int board_early_init_r(void)
+{
@@ -1290,11 +1515,14 @@ index 000000000000..4a40a050c3da
+
+extern void espi_init(void);
+int board_late_init(void)
-+{
-+ espi_init();
+ {
+- snoop_init();
+- gpio_init();
+- sgpio_init();
+ espi_init();
+
-+ return 0;
-+}
+ return 0;
+ }
+
+/* aspeed/board.c defines these functions
+int arch_early_init_r(void)
@@ -1358,12 +1586,10 @@ index 94133eaeda78..5e69000b848b 100644
abort = __abortboot(bootdelay);
diff --git a/configs/ast2600_openbmc_defconfig b/configs/ast2600_openbmc_defconfig
-old mode 100755
-new mode 100644
-index 2e2df2e3a235..77c39d848312
+index 179e3b005768..90735feec921 100644
--- a/configs/ast2600_openbmc_defconfig
+++ b/configs/ast2600_openbmc_defconfig
-@@ -13,7 +13,7 @@ CONFIG_FIT=y
+@@ -35,7 +35,7 @@ CONFIG_FIT=y
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw"
CONFIG_USE_BOOTCOMMAND=y
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch
index a036b91fc..c56fd872d 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch
@@ -1,4 +1,4 @@
-From fdb55afe15fdbba33782d01a77bbf994470f40b4 Mon Sep 17 00:00:00 2001
+From 665675336251d1daac56ce80d0490a8f71d13411 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Thu, 12 Dec 2019 12:54:18 +0800
Subject: [PATCH] ast2600: intel-layout-environment-addr
@@ -38,10 +38,10 @@ index 472987d5d52f..434c0df45c85 100644
env_set_hex("fdtcontroladdr",
(unsigned long)map_to_sysmem(gd->fdt_blob));
diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
-index 8718b50f9ebe..70590067dbcf 100644
+index 8f404570b1fb..183a7a502e9c 100644
--- a/include/configs/aspeed-common.h
+++ b/include/configs/aspeed-common.h
-@@ -73,9 +73,18 @@
+@@ -67,9 +67,18 @@
#endif
#ifndef CONFIG_ENV_OFFSET
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch
index 612a104b5..6e44691f8 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch
@@ -1,4 +1,4 @@
-From ddd0ebfaf667f2fd36ed2f8d2d8456dbc6acdaa8 Mon Sep 17 00:00:00 2001
+From 6fe262f07e116ee185d3acf7967b2ea0d6cc3f3d Mon Sep 17 00:00:00 2001
From: arun-pm <arun.p.m@linux.intel.com>
Date: Fri, 29 Nov 2019 00:19:09 +0530
Subject: [PATCH] SPI Quad IO Mode
@@ -14,10 +14,10 @@ Note:- Removed n25q00 Quad I/O support for the time being due to clock issue
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts
-index 9a15e204f83b..1f14753056ee 100644
+index e6197831cf02..c7970c16a474 100644
--- a/arch/arm/dts/ast2600-intel.dts
+++ b/arch/arm/dts/ast2600-intel.dts
-@@ -120,16 +120,14 @@
+@@ -133,16 +133,14 @@
&fmc {
status = "okay";
@@ -55,7 +55,7 @@ index 5882eab2e3fc..42546f4d222a 100644
{ INFO("n25q00a", 0x20bb21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
{ INFO("mt25qu02g", 0x20bb22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
diff --git a/drivers/spi/aspeed_spi.c b/drivers/spi/aspeed_spi.c
-index f93200f8f67e..8ac6e40524fe 100644
+index f93200f8f67e..6db64079ae72 100644
--- a/drivers/spi/aspeed_spi.c
+++ b/drivers/spi/aspeed_spi.c
@@ -17,6 +17,9 @@
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch
index c4b8a00ef..bab279c40 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch
@@ -1,4 +1,4 @@
-From 844e425a503c56bd84dbfe5396c5f8f9b4284e6d Mon Sep 17 00:00:00 2001
+From 053770be23c7826efefa9b7b087d8b285bf8bbcd Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 29 Jan 2020 14:55:44 -0800
Subject: [PATCH] ast2600: Override OTP strap settings
@@ -8,11 +8,11 @@ Also, this commit disables SoC debug interface.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- arch/arm/mach-aspeed/ast2600/platform.S | 24 ++++++++++++++++++++++--
- 1 file changed, 22 insertions(+), 2 deletions(-)
+ arch/arm/mach-aspeed/ast2600/platform.S | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index f96ef1f0dac4..3b6f91a60c3d 100644
+index 81520b0f036e..e479d0276d39 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -44,7 +44,9 @@
@@ -22,10 +22,10 @@ index f96ef1f0dac4..3b6f91a60c3d 100644
+#define AST_SCU_HW_STRAP1_CLR (AST_SCU_BASE + 0x504)
#define AST_SCU_HW_STRAP2 (AST_SCU_BASE + 0x510)
+#define AST_SCU_HW_STRAP2_CLR (AST_SCU_BASE + 0x514)
+ #define AST_SCU_HW_STRAP3 (AST_SCU_BASE + 0x51C)
#define AST_SCU_CA7_PARITY_CHK (AST_SCU_BASE + 0x820)
#define AST_SCU_CA7_PARITY_CLR (AST_SCU_BASE + 0x824)
- #define AST_SCU_MMIO_DEC_SET (AST_SCU_BASE + 0xC24)
-@@ -175,6 +177,26 @@ do_primary_core_setup:
+@@ -176,6 +178,26 @@ do_primary_core_setup:
/* unlock system control unit */
scu_unlock
@@ -52,22 +52,6 @@ index f96ef1f0dac4..3b6f91a60c3d 100644
/* identify AST2600 A0/A1 */
ldr r0, =AST_SCU_REV_ID
ldr r0, [r0]
-@@ -277,7 +299,6 @@ skip_fill_wip_bit:
- ldr r1, =AST_FMC_WDT1_CTRL_MODE
- str r0, [r1]
-
--#if 0
- /* disable UART-based SoC Debug Interface UART5 and P2A bridge*/
- ldr r0, =AST_SCU_DEBUG_CTRL
- ldr r1, [r0]
-@@ -289,7 +310,6 @@ skip_fill_wip_bit:
- ldr r1, [r0]
- orr r1, #0x0A
- str r1, [r0]
--#endif
-
- /* relocate mailbox insn. for cpuN polling SMP go signal */
- adrl r0, mailbox_insn
--
2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch
index 6b417fae9..f3cb01143 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch
@@ -1,4 +1,4 @@
-From ec8377bb77dd560b3f03f02361d268b362e28e7f Mon Sep 17 00:00:00 2001
+From a3b27074feba66aaf63930197b4aa507abdcc983 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 25 Mar 2020 15:04:26 -0700
Subject: [PATCH] AST2600: Add TPM pulse trigger
@@ -11,7 +11,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 17 insertions(+)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index d03a446846bc..ebf883144418 100644
+index 634b8ce20e7d..e8165694c312 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -234,6 +234,21 @@ static void set_gpio_default_state(void)
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch
index a506f3028..6196551a2 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch
@@ -1,4 +1,4 @@
-From f545610f26089e78e71469e9006e3337670af0f4 Mon Sep 17 00:00:00 2001
+From 970a7c3b21e7264bb6ada434652795b5ce947ac7 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Tue, 31 Mar 2020 13:28:31 -0700
Subject: [PATCH] AST2600: Disable DMA arbitration options on MAC1 and MAC2
@@ -17,10 +17,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 18 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index 3b6f91a60c3d..eac52db538b0 100644
+index e479d0276d39..aaacb61a1f8b 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -57,6 +57,12 @@
+@@ -58,6 +58,12 @@
#define AST_FMC_WDT1_CTRL_MODE (AST_FMC_BASE + 0x060)
#define AST_FMC_WDT2_CTRL_MODE (AST_FMC_BASE + 0x064)
@@ -33,7 +33,7 @@ index 3b6f91a60c3d..eac52db538b0 100644
#define AST_GPIO_BASE (0x1E780000)
#define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
-@@ -244,6 +250,18 @@ wait_lock:
+@@ -245,6 +251,18 @@ wait_lock:
bne 2f
1:
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0015-net-phy-realtek-Change-LED-configuration.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0015-net-phy-realtek-Change-LED-configuration.patch
index d701d5a27..e3b53f76a 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0015-net-phy-realtek-Change-LED-configuration.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0015-net-phy-realtek-Change-LED-configuration.patch
@@ -1,4 +1,4 @@
-From 144b845cd597cb93e4a6143a194e5018f2176f23 Mon Sep 17 00:00:00 2001
+From cb1d9b2cb8a3afbbdcc0b5ee81f48c4b185da2bd Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Fri, 5 Jun 2020 14:08:20 -0700
Subject: [PATCH] net: phy: realtek: Change LED configuration
@@ -14,10 +14,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
-index dd45e11b3ad9..167b34b2b2c9 100644
+index 6976ff7c0846..5bd620f67b6a 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
-@@ -169,10 +169,15 @@ static int rtl8211f_config(struct phy_device *phydev)
+@@ -180,10 +180,15 @@ static int rtl8211f_config(struct phy_device *phydev)
phy_write(phydev, MDIO_DEVAD_NONE,
MIIM_RTL8211F_PAGE_SELECT, 0x0);
@@ -36,5 +36,5 @@ index dd45e11b3ad9..167b34b2b2c9 100644
MIIM_RTL8211F_PAGE_SELECT, 0x0);
--
-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
index bc2007288..774767f97 100644
--- 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
@@ -1,4 +1,4 @@
-From d7befc37ba40a248899b5dc8e99bef2746a957d2 Mon Sep 17 00:00:00 2001
+From d88bb32a5c33f356926a309289497f1b1e7c9aa1 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
@@ -24,10 +24,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
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
+index c7970c16a474..7cae636554b6 100644
--- a/arch/arm/dts/ast2600-intel.dts
+++ b/arch/arm/dts/ast2600-intel.dts
-@@ -47,8 +47,8 @@
+@@ -58,8 +58,8 @@
};
hb-led {
label = "hb";
@@ -39,7 +39,7 @@ index 1f14753056ee..5243d1a0afc3 100644
};
};
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 849e81ff3fef..fb9075f93945 100644
+index 6e442cf01472..46f169589915 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -5,6 +5,7 @@
@@ -388,7 +388,7 @@ index 93f6b913c647..a88efde71a69 100644
static const struct udevice_id led_gpio_ids[] = {
diff --git a/include/led.h b/include/led.h
-index 7bfdddfd6fab..fb072c8b9f1a 100644
+index 7bfdddfd6fab..583dbd2f8f0e 100644
--- a/include/led.h
+++ b/include/led.h
@@ -32,7 +32,6 @@ enum led_state_t {
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch
index 66a1b564e..250ca7f5c 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch
@@ -1,4 +1,4 @@
-From 2f4d7260a4ab0eb33d1145cd640019aa1fa1414a Mon Sep 17 00:00:00 2001
+From d7cdcbd4222ef3ad6d532c1034f4649432b0a69d Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Thu, 18 Jun 2020 15:08:57 -0700
Subject: [PATCH] Add a workaround to cover VGA memory size bug in A0
@@ -13,10 +13,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 17 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index eac52db538b0..cf709aaa5d98 100644
+index aaacb61a1f8b..7e6787e5c6db 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -212,6 +212,12 @@ do_primary_core_setup:
+@@ -213,6 +213,12 @@ do_primary_core_setup:
bne 0f
@@ -29,7 +29,7 @@ index eac52db538b0..cf709aaa5d98 100644
/* tune up CPU clocks (A0 only) */
ldr r0, =AST_SCU_HW_STRAP1
ldr r1, [r0]
-@@ -250,6 +256,17 @@ wait_lock:
+@@ -251,6 +257,17 @@ wait_lock:
bne 2f
1:
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch
index 26c83f8d6..547264260 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch
@@ -1,4 +1,4 @@
-From 783ef5212c5efc0561361fd779f1be3b047aee74 Mon Sep 17 00:00:00 2001
+From f7671739c0d48994c3b6b90d08a75f0ba9e9a2ca Mon Sep 17 00:00:00 2001
From: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
Date: Thu, 18 Jun 2020 05:32:48 +0530
Subject: [PATCH] Apply WDT1-2 reset mask to reset needed controller
@@ -61,10 +61,10 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
1 file changed, 22 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index cf709aaa5d98..027265593f03 100644
+index 7e6787e5c6db..937ea0d7b9a0 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -63,6 +63,14 @@
+@@ -64,6 +64,14 @@
#define AST_MAC2_BASE (0x1E680000)
#define AST_MAC2_CTRL2 (AST_MAC2_BASE + 0x058)
@@ -79,7 +79,7 @@ index cf709aaa5d98..027265593f03 100644
#define AST_GPIO_BASE (0x1E780000)
#define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
-@@ -292,6 +300,20 @@ wait_lock:
+@@ -293,6 +301,20 @@ wait_lock:
str r1, [r0]
2:
@@ -97,9 +97,9 @@ index cf709aaa5d98..027265593f03 100644
+ bic r1, r2
+ str r1, [r0]
+
- /* MMIO decode setting */
- ldr r0, =AST_SCU_MMIO_DEC_SET
- mov r1, #0x2000
+ /* PCIeRC/E2M8 power-on reset comes from SCU040
+ But SCU04018 default value is 0x0.
+ It should be 0x1 to reset PCIeRC/E2M8.*/
--
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 e62403413..e143692a0 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,4 +1,4 @@
-From 385629a99a8d07182812264f2868d5f85fb711e0 Mon Sep 17 00:00:00 2001
+From d1acf70afd376b45a73b325ee30c0532a142c4f2 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
@@ -20,10 +20,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
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 027265593f03..e57bd325277f 100644
+index 937ea0d7b9a0..c65adff0d69a 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -64,6 +64,9 @@
+@@ -65,6 +65,9 @@
#define AST_MAC2_CTRL2 (AST_MAC2_BASE + 0x058)
#define AST_WDT1_BASE 0x1E785000
@@ -33,7 +33,7 @@ index 027265593f03..e57bd325277f 100644
#define AST_WDT1_RESET_MASK1 (AST_WDT1_BASE + 0x01C)
#define AST_WDT1_RESET_MASK2 (AST_WDT1_BASE + 0x020)
-@@ -328,6 +331,18 @@ wait_lock:
+@@ -348,6 +351,18 @@ wait_lock:
ldr r1, =AST_SCU_CA7_PARITY_CHK
str r0, [r1]
@@ -53,7 +53,7 @@ index 027265593f03..e57bd325277f 100644
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 948f8a01f868..1a95893631c8 100644
+index 03eff62ce04b..88d9384faf2d 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -7,6 +7,7 @@
@@ -150,7 +150,7 @@ index 4d4248f234fb..90687092e1ae 100644
from += len;
to += len;
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
-index a8f5b6158241..69dfc7f21698 100644
+index e1fe91712e24..13f499a90272 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -20,6 +20,7 @@
@@ -300,7 +300,7 @@ index c2dc3cf548d2..811ead41bb95 100644
return 0;
}
diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
-index 70590067dbcf..0eaf76b50b39 100644
+index 183a7a502e9c..d5befb185b6a 100644
--- a/include/configs/aspeed-common.h
+++ b/include/configs/aspeed-common.h
@@ -20,6 +20,8 @@
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch
index 1191a6077..959fd0bf4 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch
@@ -1,4 +1,4 @@
-From 438ff3a8db6718bb137dccaafa707f8275407742 Mon Sep 17 00:00:00 2001
+From fc01155d6f78ab9940f1d1482b0df44addc5f313 Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
Date: Mon, 22 Feb 2021 17:22:16 +0530
Subject: [PATCH] ast2600-PFR-platform-EXTRST-reset-mask-selection
@@ -16,7 +16,7 @@ Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index bdc0884de1bd..d7115c96f117 100644
+index c65adff0d69a..3db7d993d3ca 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -39,6 +39,8 @@
@@ -28,18 +28,18 @@ index bdc0884de1bd..d7115c96f117 100644
#define AST_SCU_DEBUG_CTRL (AST_SCU_BASE + 0x0C8)
#define AST_SCU_DEBUG_CTRL2 (AST_SCU_BASE + 0x0D8)
#define AST_SCU_HPLL_PARAM (AST_SCU_BASE + 0x200)
-@@ -303,6 +305,16 @@ wait_lock:
+@@ -304,6 +306,16 @@ wait_lock:
str r1, [r0]
2:
+ /* SCU060:EXTRST1# reset mask selection */
+ ldr r0, =AST_SCU_EXTRST_SEL1
-+ ldr r1, =0x6FF1FF5
++ ldr r1, =0x6FF1FF1
+ str r1, [r0]
+
+ /* SCU070:EXTRST2# reset mask selection */
+ ldr r0, =AST_SCU_EXTRST_SEL2
-+ ldr r1, =0x3FFFFF7
++ ldr r1, =0x3FFFFF3
+ str r1, [r0]
+
/* disable eSPI, LPC and PWM resets on WDT1 reset */
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch
index b01b96e16..ee1a8f7a4 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch
@@ -1,4 +1,4 @@
-From 8534fb50dfe7c4e1c042843ded54c4ed23ee7bc2 Mon Sep 17 00:00:00 2001
+From cd13ae4e64d57af84dc98ff6c8d5b31661bc450d Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Tue, 8 Jan 2019 13:33:15 -0800
Subject: [PATCH] Enable PCIe L1 support
@@ -11,12 +11,12 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 14 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index d7115c96f117..803ff94c4fc0 100644
+index 3db7d993d3ca..e2fcb732b6a6 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -329,6 +329,20 @@ wait_lock:
- bic r1, r2
- str r1, [r0]
+@@ -349,6 +349,20 @@ wait_lock:
+ movt r1, #0x0000
+ str r1, [r0]
+ /* enable PCIe L1 support */
+ ldr r0, =0x1e6ed07c
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
index 4d8d97d10..72be1a0b4 100644
--- 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
@@ -1,4 +1,4 @@
-From b6f6c6fe9b92e3b1bbed12e27a65e822a44da528 Mon Sep 17 00:00:00 2001
+From 44321f61f0b0edbde3300cc43b2f3e9f9fd93d44 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
@@ -13,10 +13,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
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
+index e2fcb732b6a6..4cc22e31c604 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -79,6 +79,9 @@
+@@ -80,6 +80,9 @@
#define AST_GPIO_BASE (0x1E780000)
#define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
@@ -26,9 +26,9 @@ index 0d038920b150..dce15c83a093 100644
/* 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]
+@@ -433,6 +436,11 @@ skip_fill_wip_bit:
+ moveq r1, #0xff
+ str r1, [r0]
+ /* set UART routing back to default */
+ ldr r0, =AST_LPC_HICRA
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch
index ac7262f2c..176f9fa04 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch
@@ -1,4 +1,4 @@
-From b68b7c30fa3331642e321d150017d431d8cf6f6d Mon Sep 17 00:00:00 2001
+From a772d7bdde659d689fda47accc0f50bb6ce047d1 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Mon, 17 May 2021 13:11:24 -0700
Subject: [PATCH] Add Aspeed PWM uclass driver
@@ -14,15 +14,15 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
drivers/pinctrl/aspeed/pinctrl_ast2600.c | 130 ++++++++++++++++-
drivers/pwm/Kconfig | 8 ++
drivers/pwm/Makefile | 1 +
- drivers/pwm/aspeed_pwm.c | 175 +++++++++++++++++++++++
- 7 files changed, 461 insertions(+), 1 deletion(-)
+ drivers/pwm/aspeed_pwm.c | 172 +++++++++++++++++++++++
+ 7 files changed, 458 insertions(+), 1 deletion(-)
create mode 100644 drivers/pwm/aspeed_pwm.c
diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts
-index 5243d1a0afc3..79356d8b7a64 100644
+index 7cae636554b6..a76193716d34 100644
--- a/arch/arm/dts/ast2600-intel.dts
+++ b/arch/arm/dts/ast2600-intel.dts
-@@ -53,6 +53,17 @@
+@@ -64,6 +64,17 @@
};
};
@@ -41,7 +41,7 @@ index 5243d1a0afc3..79356d8b7a64 100644
status = "okay";
};
diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi
-index e619f7118886..44ec6655fee7 100644
+index 9c4282515d55..3ff5bf2e16e1 100644
--- a/arch/arm/dts/ast2600.dtsi
+++ b/arch/arm/dts/ast2600.dtsi
@@ -265,6 +265,14 @@
@@ -59,7 +59,7 @@ index e619f7118886..44ec6655fee7 100644
syscon: syscon@1e6e2000 {
compatible = "aspeed,g6-scu", "syscon", "simple-mfd";
reg = <0x1e6e2000 0x1000>;
-@@ -1589,6 +1597,86 @@
+@@ -1598,6 +1606,86 @@
groups = "PWM7";
};
@@ -147,7 +147,7 @@ index e619f7118886..44ec6655fee7 100644
function = "RGMII1";
groups = "RGMII1";
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index ec6b70ae6659..11b8d4dd8360 100644
+index 82df0ac6137e..f1136eec9ab9 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -8,6 +8,7 @@
@@ -212,7 +212,7 @@ index ec6b70ae6659..11b8d4dd8360 100644
int board_early_init_f(void)
{
/* This is called before relocation; beware! */
-@@ -613,6 +661,7 @@ int board_late_init(void)
+@@ -576,6 +624,7 @@ int board_late_init(void)
timer_callback, (void *)1);
#endif
@@ -395,7 +395,7 @@ index a837c35ed2e3..770b054c3f3b 100644
+obj-$(CONFIG_PWM_ASPEED) += aspeed_pwm.o
diff --git a/drivers/pwm/aspeed_pwm.c b/drivers/pwm/aspeed_pwm.c
new file mode 100644
-index 000000000000..111e2971d226
+index 000000000000..bd9a911b4fe2
--- /dev/null
+++ b/drivers/pwm/aspeed_pwm.c
@@ -0,0 +1,172 @@
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch
new file mode 100644
index 000000000..aa1f0cc65
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch
@@ -0,0 +1,62 @@
+From e152d718da6bfdf71d309b7ec885d2050fc19d01 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Wed, 2 Jun 2021 13:03:47 -0700
+Subject: [PATCH] Disable eSPI initialization in u-boot for normal booting
+ cases
+
+Initializing eSPI in u-boot introduces a small blind window of
+handshaking when BMC jumps from boot loader to kernel and it causes
+an infinite PCH waiting issue in ME recovery mode. During the power
+on handshaking, PCH keeps waiting for OOB_FREE to continue its
+booting so the OOB_FREE actually means that BMC is fully ready for
+the power on handshake. To prevent the small blind window, this
+commit removes eSPI initialization in u-boot for normal booting
+cases and makes the kernel eSPI driver responsible for full
+eSPI initialization.
+
+eSPI will be initialized in u-boot only in these specific cases:
+1. When FFUJ (Force Firmware Update Jumper) is populated.
+2. When BMC booting is stopped at u-boot by typing a key.
+3. When BMC goes to u-boot due to the boot failure condition.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ board/aspeed/ast2600_intel/intel.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
+index aff0c8593759..fc2f3c8feea7 100644
+--- a/board/aspeed/ast2600_intel/intel.c
++++ b/board/aspeed/ast2600_intel/intel.c
+@@ -201,7 +201,11 @@ static void gpio_passthru_init(void)
+
+ void board_pre_abort_autoboot(void)
+ {
+- gpio_passthru_init();
++ if (!read_ffuj()) {
++ espi_init();
++ gpio_passthru_init();
++ kcs_init();
++ }
+ }
+
+ #define AST_LPC_BASE 0x1e789000
+@@ -662,7 +666,6 @@ int board_late_init(void)
+ #endif
+
+ pwm_init();
+- espi_init();
+
+ /* Add reset reason to bootargs */
+ snprintf(value, sizeof(value), "0x%x", gd->reset_reason);
+@@ -684,6 +687,7 @@ int board_late_init(void)
+ update_bootargs_cmd("special", "mfg");
+
+ if (read_ffuj()) {
++ espi_init();
+ gpio_passthru_init();
+ kcs_init();
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0033-Disable-debug-interfaces.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0033-Disable-debug-interfaces.patch
new file mode 100644
index 000000000..9a7541eed
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0033-Disable-debug-interfaces.patch
@@ -0,0 +1,86 @@
+From 7a0f0e0915c7d9260a3d067746157112f85822db Mon Sep 17 00:00:00 2001
+From: Chen Yugang <yugang.chen@linux.intel.com>
+Date: Fri, 11 Jun 2021 12:44:25 +0800
+Subject: [PATCH] Disable debug interfaces
+
+1.Disable ARM Core CA7 debug features in
+SCU800: CA7 processor Control
+2.Disable Mailbox Write/Disable in PDSEF0: PCIe
+Device Security Enhancement Control Register F0
+3.Disable target AHB to PCIE RC bridge controller
+in AHBC88: AHB Bus Target Disable Control Register
+
+Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
+---
+ arch/arm/mach-aspeed/ast2600/platform.S | 34 +++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
+index 4cc22e31c6..636bccad32 100644
+--- a/arch/arm/mach-aspeed/ast2600/platform.S
++++ b/arch/arm/mach-aspeed/ast2600/platform.S
+@@ -26,6 +26,9 @@
+ * +----------------------+ AST_SMP_MAILBOX_BASE
+ */
+
++#define AST_AHBC_BASE 0x1E600000
++#define AST_AHBC_BUS_TARGET_CTRL (AST_AHBC_BASE + 0x088)
++
+ #define AST_SMP_MAILBOX_BASE (0x1E6E2180)
+ #define AST_SMP_MBOX_FIELD_ENTRY (AST_SMP_MAILBOX_BASE + 0x0)
+ #define AST_SMP_MBOX_FIELD_GOSIGN (AST_SMP_MAILBOX_BASE + 0x4)
+@@ -50,6 +53,7 @@
+ #define AST_SCU_HW_STRAP2 (AST_SCU_BASE + 0x510)
+ #define AST_SCU_HW_STRAP2_CLR (AST_SCU_BASE + 0x514)
+ #define AST_SCU_HW_STRAP3 (AST_SCU_BASE + 0x51C)
++#define AST_SCU_CA7_PROCESSOR_CTRL (AST_SCU_BASE + 0x800)
+ #define AST_SCU_CA7_PARITY_CHK (AST_SCU_BASE + 0x820)
+ #define AST_SCU_CA7_PARITY_CLR (AST_SCU_BASE + 0x824)
+ #define AST_SCU_MMIO_DEC_SET (AST_SCU_BASE + 0xC24)
+@@ -83,6 +87,9 @@
+ #define AST_LPC_BASE 0x1E789000
+ #define AST_LPC_HICRA (AST_LPC_BASE + 0x09C)
+
++#define AST_PCIEATH_BASE 0x1E7F2000
++#define AST_PCIEATH_SECURITY_CTRL (AST_PCIEATH_BASE + 0x0F0)
++
+ /* Revision ID */
+ #define REV_ID_AST2600A0 0x05000303
+ #define REV_ID_AST2600A1 0x05010303
+@@ -436,6 +443,33 @@ skip_fill_wip_bit:
+ moveq r1, #0xff
+ str r1, [r0]
+
++ /* disable debug interfaces */
++ /* SCU_800 */
++ ldr r0, =AST_SCU_CA7_PROCESSOR_CTRL
++ ldr r1, [r0]
++ ldr r2, =0x0c03f
++ and r1, r1, r2
++ str r1, [r0]
++
++ /* PCIEATH_F0 */
++ ldr r0, =AST_PCIEATH_SECURITY_CTRL
++ ldr r1, [r0]
++ orr r1, #0x50000
++ str r1, [r0]
++
++ /* AHBC_088 */
++ ldr r0, =AST_AHBC_BASE
++ movw r1, #0x1a03
++ movt r1, #0xaeed
++ str r1, [r0]
++ ldr r0, =AST_AHBC_BUS_TARGET_CTRL
++ ldr r1, [r0]
++ orr r1, #0xc0000
++ str r1, [r0]
++ ldr r0, =AST_AHBC_BASE
++ movw r1, #0
++ str r1, [r0]
++
+ /* set UART routing back to default */
+ ldr r0, =AST_LPC_HICRA
+ ldr r1, =0x0
+--
+2.27.0
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0034-Implement-the-IPMI-commands-in-FFUJ-mode-in-u-boot.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0034-Implement-the-IPMI-commands-in-FFUJ-mode-in-u-boot.patch
new file mode 100644
index 000000000..0d27f9d70
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0034-Implement-the-IPMI-commands-in-FFUJ-mode-in-u-boot.patch
@@ -0,0 +1,211 @@
+From 8b0d9f83aeb6e58c271ffe2d07c79397fe813a78 Mon Sep 17 00:00:00 2001
+From: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+Date: Wed, 23 Jun 2021 18:10:08 +0000
+Subject: [PATCH] Implement the IPMI commands in FFUJ mode in u-boot
+
+Implemented the following IPMI commands in force firmware update
+jumper (FFUJ) mode in u-boot.
+
+1. Get BMC execution context (0x23)
+2. Get Security mode (0xb3)
+3. Set security mode (0xb4)
+4. Get buffer size (0x66)
+
+Tested:
+Used ipmitool from Host OS to verify each individual commands
+
+Positive test cases:
+
+get execution context
+ipmitool raw 8 0x23
+11 01
+get buffer size
+ipmitool raw 0x30 0x66
+ff ff
+set security mode
+ipmitool raw 0x30 0xb4 5
+get security mode
+ipmitool raw 0x30 0xb3
+05 00
+set security mode
+ipmitool raw 0x30 0xb4 4
+get security mode
+ipmitool raw 0x30 0xb3
+04 00
+set security mode
+ipmitool raw 0x30 0xb4 3
+get security mode
+ipmitool raw 0x30 0xb3
+03 00
+
+Negative test cases:
+
+set security mode
+ipmitool raw 0x30 0xb4 1
+Unable to send RAW command: Invalid data field in request
+ipmitool raw 0x30 0xb4 2
+Unable to send RAW command: Invalid data field in request
+ipmitool raw 0x30 0xb4 6
+Unable to send RAW command: Invalid data field in request
+ipmitool raw 0x30 0xb4 7
+Unable to send RAW command: Invalid data field in request
+
+Change-Id: I515cec5ff6019aa3ea30a9a38886130e354252a8
+Signed-off-by: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+---
+ board/aspeed/ast2600_intel/ipmi-handler.c | 120 +++++++++++++++++++++-
+ 1 file changed, 117 insertions(+), 3 deletions(-)
+
+diff --git a/board/aspeed/ast2600_intel/ipmi-handler.c b/board/aspeed/ast2600_intel/ipmi-handler.c
+index 04732846ac..5319f986a7 100644
+--- a/board/aspeed/ast2600_intel/ipmi-handler.c
++++ b/board/aspeed/ast2600_intel/ipmi-handler.c
+@@ -4,11 +4,28 @@
+ #include "ipmi-handler.h"
+
+ /* IPMI network function codes */
+-#define NETFN_APP 0x06
++#define NETFN_APP 0x06
++#define NETFN_FIRMWARE 0x08
++#define NETFN_INTEL_OEM 0x30
+
+ /* IPMI command codes */
+ #define CMD_GET_DEV_ID 0x01
+ #define CMD_GET_SELF_TEST_RESULTS 0x04
++#define CMD_FWUPD_GET_EXECUTION_CTX 0x23
++#define CMD_INTL_OEM_GET_BUFFER_SIZE 0x66
++#define CMD_INTL_OEM_GET_SEC_MODE 0xB3
++#define CMD_INTL_OEM_SET_SEC_MODE 0xB4
++
++#define MAX_KCS_BUF_SIZE 1020 /* (0xFF * 4) */
++#define MAX_IPMB_BUF_SIZE 1020 /* (0xFF * 4) */
++
++/* Restriction mode values */
++#define RESTRICTION_MODE_MIN_VALUE 3 /*Provisioning*/
++#define RESTRICION_MODE_MAX_VALUE 5 /*Provisioned host disabled */
++
++#define STR_ENV_PROVISION "provision"
++
++#define PRIMARY_IMAGE 0x01
+
+ typedef u16 (*fun_handler)(u8 *req, u16 req_len, u8 *res);
+
+@@ -28,6 +45,21 @@ struct self_test_res {
+ u8 completion_code;
+ u8 res_byte[2];
+ };
++struct fwupd_get_exe_ctx_res {
++ u8 completion_code;
++ u8 execution_ctx;
++ u8 partition_ptr;
++};
++struct intc_get_buf_size_res {
++ u8 completion_code;
++ u8 kcs_size;
++ u8 ipmb_size;
++};
++struct intc_get_secuirty_mode_res {
++ u8 completion_code;
++ u8 restriction_mode;
++ u8 special_mode;
++};
+
+ struct ipmi_cmd_table {
+ u8 net_fun;
+@@ -84,9 +116,91 @@ static u16 get_self_test_result(u8 *req, u16 req_len, u8 *res)
+ return sizeof(struct self_test_res);
+ }
+
++u16 fwupd_get_execution_ctx(u8 *req, u16 req_len, u8 *res) {
++
++ /* Get firmware update execution context */
++ struct fwupd_get_exe_ctx_res *result = (struct fwupd_get_exe_ctx_res *)res;
++
++ /* For PFR platforms, only primary/active image always */
++ result->partition_ptr = PRIMARY_IMAGE;
++ result->execution_ctx = 0x11; /* Forced Firmware Update mode */
++ result->completion_code = IPMI_CC_OK;
++
++ return sizeof(struct fwupd_get_exe_ctx_res);
++}
++
++static u16 intel_get_buffer_size(u8 *req, u16 req_len, u8 *res) {
++
++ /* Get buffer size */
++ struct intc_get_buf_size_res *result = (struct intc_get_buf_size_res *)res;
++
++ if (req_len != 0) {
++ result->completion_code = IPMI_CC_INVALID_DATA_LENGTH;
++ return sizeof(result->completion_code);
++ }
++
++ /* Size is multiples of four bytes */
++ result->completion_code = IPMI_CC_OK;
++ result->kcs_size = MAX_KCS_BUF_SIZE / 4;
++ result->ipmb_size = MAX_IPMB_BUF_SIZE / 4;
++
++ return sizeof(struct intc_get_buf_size_res);
++}
++
++static u16 intel_get_security_mode(u8 *req, u16 req_len, u8 *res) {
++
++ char *cmdline = NULL;
++ /* Get security mode */
++ struct intc_get_secuirty_mode_res *result =
++ (struct intc_get_secuirty_mode_res *)res;
++
++ if (req_len != 0) {
++ result->completion_code = IPMI_CC_INVALID_DATA_LENGTH;
++ return sizeof(result->completion_code);
++ }
++
++ cmdline = env_get(STR_ENV_PROVISION);
++
++ if (!cmdline) {
++ /* Default provision must be set only by linux */
++ result->completion_code = IPMI_CC_UNSPECIFIED;
++ return sizeof(result->completion_code);
++ }
++
++ result->restriction_mode = simple_strtol(cmdline, NULL, 10);
++ /* special mode is non-volatile and not applicable in U-Boot */
++ result->special_mode = 0;
++ result->completion_code = IPMI_CC_OK;
++
++ return sizeof(*result);
++}
++
++static u16 intel_set_security_mode(u8 *req, u16 req_len, u8 *res) {
++
++ if (req_len != sizeof(*req)) {
++ *res = IPMI_CC_INVALID_DATA_LENGTH;
++ return sizeof(*res);
++ }
++
++ if (*req > RESTRICION_MODE_MAX_VALUE || *req < RESTRICTION_MODE_MIN_VALUE) {
++ *res = IPMI_CC_INVALID_DATA_FIELD;
++ return sizeof(*res);
++ }
++
++ env_set_ulong(STR_ENV_PROVISION, *req);
++ env_save();
++ *res = IPMI_CC_OK;
++
++ return sizeof(*res);
++}
++
+ const struct ipmi_cmd_table cmd_info[] = {
+- { NETFN_APP, CMD_GET_DEV_ID, get_device_id },
+- { NETFN_APP, CMD_GET_SELF_TEST_RESULTS, get_self_test_result }
++ { NETFN_APP, CMD_GET_DEV_ID, get_device_id},
++ { NETFN_APP, CMD_GET_SELF_TEST_RESULTS, get_self_test_result},
++ { NETFN_FIRMWARE, CMD_FWUPD_GET_EXECUTION_CTX, fwupd_get_execution_ctx},
++ { NETFN_INTEL_OEM, CMD_INTL_OEM_GET_BUFFER_SIZE, intel_get_buffer_size},
++ { NETFN_INTEL_OEM, CMD_INTL_OEM_GET_SEC_MODE, intel_get_security_mode},
++ { NETFN_INTEL_OEM, CMD_INTL_OEM_SET_SEC_MODE, intel_set_security_mode}
+ };
+
+ #define CMD_TABLE_SIZE ARRAY_SIZE(cmd_info)
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch
index 3d9d50c8d..df26cb5a9 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch
@@ -1,4 +1,4 @@
-From 948a92b3000120f902292b661a544e35d796784a Mon Sep 17 00:00:00 2001
+From 0b1cf63187baba9016fa01df7e58989c80d57465 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Mon, 13 Apr 2020 09:30:14 +0800
Subject: [PATCH] PFR u-boot env changes as per PFR BMC image
@@ -12,10 +12,10 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
-index 6065ec58db..b13dbd02f3 100644
+index d5befb185b6a..2be63a5c662b 100644
--- a/include/configs/aspeed-common.h
+++ b/include/configs/aspeed-common.h
-@@ -64,9 +64,11 @@
+@@ -68,9 +68,11 @@
#define CONFIG_ENV_SIZE 0x10000
#endif
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg
index e61f3de1e..7d64f1584 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg
@@ -30,3 +30,8 @@ CONFIG_USB_EHCI_HCD=n
CONFIG_USB_STORAGE=n
CONFIG_NETCONSOLE=n
CONFIG_CMD_NFS=n
+CONFIG_POSITION_INDEPENDENT=n
+CONFIG_SYS_TEXT_BASE=0x0
+CONFIG_SPL=n
+CONFIG_ASPEED_DP=n
+CONFIG_PHY_BROADCOM=n \ No newline at end of file
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 dd03c1f17..08eb6336e 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,8 @@
COMPATIBLE_MACHINE = "intel-ast2600"
FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:"
+SRCREV = "e1417368fdc3ba45ffde51a4b13290114a643be4"
+
# the meta-phosphor layer adds this patch, which conflicts
# with the intel layout for environment
@@ -36,6 +38,9 @@ SRC_URI_append_intel-ast2600 = " \
file://0029-Set-UART-routing-in-lowlevel_init.patch \
file://0030-Add-Aspeed-PWM-uclass-driver.patch \
file://0031-Add-a-workaround-to-fix-AST2600-A0-booting-issue.patch \
+ file://0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch \
+ file://0033-Disable-debug-interfaces.patch \
+ file://0034-Implement-the-IPMI-commands-in-FFUJ-mode-in-u-boot.patch \
"
# CVE-2020-10648 vulnerability fix
diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
index e61eb2dae..036164585 100644
--- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
@@ -78,6 +78,7 @@ IMAGE_INSTALL_append = " \
telemetry \
i3c-tools \
configure-usb-c \
+ zip \
"
IMAGE_INSTALL_append = " ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'pfr-manager', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/classes/print-src.bbclass b/meta-openbmc-mods/meta-common/classes/print-src.bbclass
index f305a5433..63613b6a0 100644
--- a/meta-openbmc-mods/meta-common/classes/print-src.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/print-src.bbclass
@@ -1,7 +1,8 @@
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))
+ thisdir = d.getVar('THISDIR', True).split()
+ bb.warn("THISDIR: %s SRC_URI: %s SRCREV: %s" % (thisdir, srcuri, srcrev))
}
addtask do_print_src before do_fetch
diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
index 10df9dd59..f35fee7ab 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
@@ -4,7 +4,7 @@ SUMMARY = "At Scale Debug Service"
DESCRIPTION = "At Scale Debug Service exposes remote JTAG target debug capabilities"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0d1c657b2ba1e8877940a8d1614ec560"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8929d33c051277ca2294fe0f5b062f38"
inherit cmake
@@ -13,8 +13,7 @@ DEPENDS = "sdbusplus openssl libpam libgpiod safec"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
SRC_URI = "git://github.com/Intel-BMC/asd;protocol=git"
-SRC_URI += "file://0001-Fix-build-error-in-kernel-v5.10.patch"
-SRCREV = "1.4.4"
+SRCREV = "1.4.6"
inherit useradd
diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch
deleted file mode 100644
index 7ebedeee3..000000000
--- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 7ed9ba9738d8f27578ea2d00019f8245ee2a5556 Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Mon, 22 Feb 2021 15:32:13 -0800
-Subject: [PATCH] Fix build error in kernel v5.10
-
-Kernel headers should be added as last headers to prevent unexpected
-build breaks.
-
-Change-Id: Ie7d1a054baf2af88b9c46f928d0d84a64d8febd9
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- i2c_handler.c | 5 +++--
- i2c_msg_builder.c | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/i2c_handler.c b/i2c_handler.c
-index 21fb931..05470f4 100644
---- a/i2c_handler.c
-+++ b/i2c_handler.c
-@@ -29,8 +29,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- #include <errno.h>
- #include <fcntl.h>
--#include <linux/i2c-dev.h>
--#include <linux/i2c.h>
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -40,6 +38,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- #include "logging.h"
-
-+#include <linux/i2c-dev.h>
-+#include <linux/i2c.h>
-+
- #define FILE_NAME "/dev/i2c"
- #define MAX_I2C_DEV_FILENAME 256
-
-diff --git a/i2c_msg_builder.c b/i2c_msg_builder.c
-index 6ae06a0..05dc340 100644
---- a/i2c_msg_builder.c
-+++ b/i2c_msg_builder.c
-@@ -27,13 +27,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- #include "i2c_msg_builder.h"
-
--#include <linux/i2c-dev.h>
--#include <linux/i2c.h>
- #include <stdint.h>
- #include <stdlib.h>
-
- #include "logging.h"
-
-+#include <linux/i2c-dev.h>
-+#include <linux/i2c.h>
-+
- STATUS copy_i2c_to_asd(asd_i2c_msg* asd, struct i2c_msg* i2c);
- STATUS copy_asd_to_i2c(const asd_i2c_msg* asd, struct i2c_msg* i2c);
-
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh
index e97995cc1..922aa09f5 100755
--- a/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh
+++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh
@@ -1,15 +1,48 @@
#!/bin/sh
-if [ -e /etc/systemd/system/dropbear@.service ] && \
- [ -e /etc/systemd/system/sockets.target.wants/dropbear.socket ]
-then
- echo "SSH is already enabled"
-else
- cp /usr/share/misc/dropbear@.service /etc/systemd/system/dropbear@.service
- cp /usr/share/misc/dropbear.socket /etc/systemd/system/dropbear.socket
- ln -s /etc/systemd/system/dropbear.socket /etc/systemd/system/sockets.target.wants/dropbear.socket
- groupmems -g priv-admin -a root
- systemctl daemon-reload
- systemctl restart dropbear.socket
- echo "Enabled SSH service for root user successful"
-fi
+usage="$(basename "$0") [-h] [-d] -- Enable/Disable ssh for root user
+where:
+ -h help
+ -d disable ssh and remove priv-admin permission for root user"
+
+enable_ssh() {
+ if [ -e /etc/systemd/system/dropbear@.service ] &&
+ [ -e /etc/systemd/system/sockets.target.wants/dropbear.socket ]; then
+ echo "SSH is already enabled"
+ else
+ cp /usr/share/misc/dropbear@.service /etc/systemd/system/dropbear@.service
+ cp /usr/share/misc/dropbear.socket /etc/systemd/system/dropbear.socket
+ ln -s /etc/systemd/system/dropbear.socket /etc/systemd/system/sockets.target.wants/dropbear.socket
+ groupmems -g priv-admin -a root
+ systemctl daemon-reload
+ systemctl restart dropbear.socket
+ echo "Enabled SSH service for root user successful"
+ fi
+}
+
+disable_ssh() {
+ if [ -e /etc/systemd/system/dropbear@.service ] &&
+ [ -e /etc/systemd/system/sockets.target.wants/dropbear.socket ]; then
+ systemctl stop dropbear.socket
+ systemctl stop dropbear@*.service
+ rm -rf /etc/systemd/system/sockets.target.wants/dropbear.socket
+ rm -rf /etc/systemd/system/dropbear.socket
+ rm -rf /etc/systemd/system/dropbear@.service
+ groupmems -g priv-admin -d root
+ echo "SSH disabled"
+ else
+ echo "SSH is already disabled"
+ fi
+}
+
+case "$1" in
+"-h")
+ echo ${usage}
+ ;;
+"-d")
+ disable_ssh
+ ;;
+*)
+ enable_ssh
+ ;;
+esac
diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch
new file mode 100644
index 000000000..5e1bc958b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch
@@ -0,0 +1,54 @@
+From 42d359350510506b87101cf77202fefcbfc790cb Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@linux-m68k.org>
+Date: Thu, 27 May 2021 12:49:47 +0200
+Subject: [PATCH] Use __pthread_attr_copy in mq_notify (bug 27896)
+
+Make a deep copy of the pthread attribute object to remove a potential
+use-after-free issue.
+---
+ sysdeps/unix/sysv/linux/mq_notify.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c
+index cc575a0cdd..f7ddfe5a6c 100644
+--- a/sysdeps/unix/sysv/linux/mq_notify.c
++++ b/sysdeps/unix/sysv/linux/mq_notify.c
+@@ -133,8 +133,11 @@ helper_thread (void *arg)
+ (void) __pthread_barrier_wait (&notify_barrier);
+ }
+ else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED)
+- /* The only state we keep is the copy of the thread attributes. */
+- free (data.attr);
++ {
++ /* The only state we keep is the copy of the thread attributes. */
++ pthread_attr_destroy (data.attr);
++ free (data.attr);
++ }
+ }
+ return NULL;
+ }
+@@ -255,8 +258,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
+ if (data.attr == NULL)
+ return -1;
+
+- memcpy (data.attr, notification->sigev_notify_attributes,
+- sizeof (pthread_attr_t));
++ __pthread_attr_copy (data.attr, notification->sigev_notify_attributes);
+ }
+
+ /* Construct the new request. */
+@@ -270,7 +272,10 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
+
+ /* If it failed, free the allocated memory. */
+ if (__glibc_unlikely (retval != 0))
+- free (data.attr);
++ {
++ pthread_attr_destroy (data.attr);
++ free (data.attr);
++ }
+
+ return retval;
+ }
+--
+2.27.0
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-sunrpc-use-snprintf-to-guard-against-buffer-overflow.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-sunrpc-use-snprintf-to-guard-against-buffer-overflow.patch
new file mode 100644
index 000000000..079ce0faa
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-sunrpc-use-snprintf-to-guard-against-buffer-overflow.patch
@@ -0,0 +1,35 @@
+From 174f4391195960b0b728fb5ee4959fcb9e12d59a Mon Sep 17 00:00:00 2001
+From: Philipp Tomsich <philipp.tomsich@vrull.eu>
+Date: Wed, 2 Dec 2020 20:04:11 +0100
+Subject: [PATCH] sunrpc: use snprintf to guard against buffer overflow
+
+GCC11 has improved detection of buffer overflows detectable through the analysis
+of format strings and parameters, which identifies the following issue:
+ netname.c:52:28: error: '%s' directive writing up to 255 bytes into a region
+ of size between 239 and 249 [-Werror=format-overflow=]
+
+This rewrites user2netname() to use snprintf to guard against overflows.
+---
+ sunrpc/netname.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sunrpc/netname.c b/sunrpc/netname.c
+index ceed23b1a72d..1a18b7a39453 100644
+--- a/sunrpc/netname.c
++++ b/sunrpc/netname.c
+@@ -49,8 +49,10 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
+ if ((strlen (dfltdom) + OPSYS_LEN + 3 + MAXIPRINT) > (size_t) MAXNETNAMELEN)
+ return 0;
+
+- sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom);
+- i = strlen (netname);
++ i = snprintf (netname, MAXNETNAMELEN + 1, "%s.%d@%s", OPSYS, uid, dfltdom);
++ if (i > (size_t) MAXNETNAMELEN)
++ return 0;
++
+ if (netname[i - 1] == '.')
+ netname[i - 1] = '\0';
+ return 1;
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch
new file mode 100644
index 000000000..447943a46
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch
@@ -0,0 +1,52 @@
+From 217b6dc298156bdb0d6aea9ea93e7e394a5ff091 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Tue, 1 Jun 2021 17:51:41 +0200
+Subject: [PATCH] Fix use of __pthread_attr_copy in mq_notify (bug 27896)
+
+__pthread_attr_copy can fail and does not initialize the attribute
+structure in that case.
+
+If __pthread_attr_copy is never called and there is no allocated
+attribute, pthread_attr_destroy should not be called, otherwise
+there is a null pointer dereference in rt/tst-mqueue6.
+
+Fixes commit 42d359350510506b87101cf77202fefcbfc790cb
+("Use __pthread_attr_copy in mq_notify (bug 27896)").
+
+Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
+---
+ sysdeps/unix/sysv/linux/mq_notify.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c
+index f7ddfe5a6c..6f46d29d1d 100644
+--- a/sysdeps/unix/sysv/linux/mq_notify.c
++++ b/sysdeps/unix/sysv/linux/mq_notify.c
+@@ -258,7 +258,14 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
+ if (data.attr == NULL)
+ return -1;
+
+- __pthread_attr_copy (data.attr, notification->sigev_notify_attributes);
++ int ret = __pthread_attr_copy (data.attr,
++ notification->sigev_notify_attributes);
++ if (ret != 0)
++ {
++ free (data.attr);
++ __set_errno (ret);
++ return -1;
++ }
+ }
+
+ /* Construct the new request. */
+@@ -271,7 +278,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
+ int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, &se);
+
+ /* If it failed, free the allocated memory. */
+- if (__glibc_unlikely (retval != 0))
++ if (retval != 0 && data.attr != NULL)
+ {
+ pthread_attr_destroy (data.attr);
+ free (data.attr);
+--
+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 327c1ce64..77cd9ce46 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend
@@ -2,4 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://0035-Fix-build-error.patch \
+ file://0036-sunrpc-use-snprintf-to-guard-against-buffer-overflow.patch \
+ file://0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch \
+ file://0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
index 38426e81d..9a78fd9f8 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libmctp"
DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)"
SRC_URI = "git://github.com/openbmc/libmctp.git"
-SRCREV = "9f5b47a5844023719b84855cb6c554271c95ee4a"
+SRCREV = "cfeaef8ecb0ab8c59ea4e145603523e599d60014"
PV = "0.1+git${SRCPV}"
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 628352f2c..e26e7ada4 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,7 @@ 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 = "fb9f1aa1ea3c944fbba17b51ab26264af1c67a25"
+SRCREV = "323818779d541d53a70b8894f21e14b082ca59d0"
+
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Add-event-log-for-system-time-synchronization.patch b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Add-event-log-for-system-time-synchronization.patch
new file mode 100644
index 000000000..8e07ad56a
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Add-event-log-for-system-time-synchronization.patch
@@ -0,0 +1,114 @@
+From 5be7b53e598faa7605add3f9856d3b3eb4b50fe1 Mon Sep 17 00:00:00 2001
+From: Joshi-Mansi <mansi.joshi@linux.intel.com>
+Date: Thu, 13 May 2021 03:09:24 +0530
+Subject: [PATCH] Add event log for time synchronization
+
+Adding time synchronization event logs can be helpful in distinguishing
+older date and newly synced date with the first initialization
+(from 1970) or any later syncs either done via NTP or Manually.
+
+Tested:
+Confirmed that the event is getting logged correctly in Redfish.
+
+Signed-off-by: Joshi-Mansi <mansi.joshi@linux.intel.com>
+Change-Id: I8901227990ee7bc41de30af13c775cc45016a626
+---
+ src/timedate/timedated.c | 14 ++++++++++++++
+ src/timesync/timesyncd-manager.c | 14 ++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
+index 8149facb34..5da7158c0d 100644
+--- a/src/timedate/timedated.c
++++ b/src/timedate/timedated.c
+@@ -8,6 +8,7 @@
+ #include "sd-bus.h"
+ #include "sd-event.h"
+ #include "sd-messages.h"
++#include "sd-journal.h"
+
+ #include "alloc-util.h"
+ #include "bus-common-errors.h"
+@@ -805,6 +806,8 @@ static int method_set_time(sd_bus_message *m, void *userdata, sd_bus_error *erro
+ struct timespec ts;
+ usec_t start;
+ struct tm tm;
++ char olddate[FORMAT_TIMESTAMP_MAX];
++ char newdate[FORMAT_TIMESTAMP_MAX];
+
+ assert(m);
+ assert(c);
+@@ -819,6 +822,9 @@ static int method_set_time(sd_bus_message *m, void *userdata, sd_bus_error *erro
+ if (context_ntp_service_is_active(c) > 0)
+ return sd_bus_error_set(error, BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED, "Automatic time synchronization is enabled");
+
++ usec_t oldtime = now(CLOCK_REALTIME);
++ format_timestamp(olddate, sizeof(olddate), oldtime);
++
+ /* this only gets used if dbus does not provide a timestamp */
+ start = now(CLOCK_MONOTONIC);
+
+@@ -886,6 +892,14 @@ static int method_set_time(sd_bus_message *m, void *userdata, sd_bus_error *erro
+ "REALTIME="USEC_FMT, timespec_load(&ts),
+ LOG_MESSAGE("Changed local time to %s", ctime(&ts.tv_sec)));
+
++ // Log an event when the system time is set manually
++ usec_t newtime = now(CLOCK_REALTIME);
++ format_timestamp(newdate, sizeof(newdate), newtime);
++ sd_journal_send("MESSAGE=BMC time updated Manually: New time=%s, Old time=%s",
++ newdate, olddate, "PRIORITY=%i", LOG_INFO,
++ "REDFISH_MESSAGE_ID=%s", "OpenBMC.0.1.BMCTimeUpdatedManually",
++ "REDFISH_MESSAGE_ARGS=%s,%s", newdate, olddate, NULL);
++
+ return sd_bus_reply_method_return(m, NULL);
+ }
+
+diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
+index 93ba4ef87d..d46097da07 100644
+--- a/src/timesync/timesyncd-manager.c
++++ b/src/timesync/timesyncd-manager.c
+@@ -11,6 +11,7 @@
+ #include <sys/types.h>
+
+ #include "sd-daemon.h"
++#include "sd-journal.h"
+
+ #include "alloc-util.h"
+ #include "dns-domain.h"
+@@ -425,6 +426,8 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
+ bool spike;
+ int leap_sec;
+ int r;
++ char olddate[FORMAT_TIMESTAMP_MAX];
++ char newdate[FORMAT_TIMESTAMP_MAX];
+
+ assert(source);
+ assert(m);
+@@ -513,6 +516,9 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
+ return manager_connect(m);
+ }
+
++ usec_t oldtime = now(CLOCK_REALTIME);
++ format_timestamp(olddate, sizeof(olddate), oldtime);
++
+ /* valid packet */
+ m->pending = false;
+ m->retry_interval = 0;
+@@ -610,6 +616,14 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
+
+ server_address_pretty(m->current_server_address, &pretty);
+ /* "Initial", as further successful syncs will not be logged. */
++ /* Log an event for NTP Synchronization from older date to newly synced date. */
++ usec_t newtime = now(CLOCK_REALTIME);
++ format_timestamp(newdate, sizeof(newdate), newtime);
++ sd_journal_send("MESSAGE=BMC time updated via NTP: New time=%s, Old time=%s",
++ newdate, olddate, "PRIORITY=%i", LOG_INFO,
++ "REDFISH_MESSAGE_ID=%s", "OpenBMC.0.1.BMCTimeUpdatedViaNTP",
++ "REDFISH_MESSAGE_ARGS=%s,%s", newdate, olddate, NULL);
++
+ log_info("Initial synchronization to time server %s (%s).", strna(pretty), m->current_server_name->string);
+ sd_notifyf(false, "STATUS=Initial synchronization to time server %s (%s).", strna(pretty), m->current_server_name->string);
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend
index 19843d892..ca73c1770 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend
@@ -6,6 +6,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch \
file://systemd-time-wait-sync.service \
+ file://0002-Add-event-log-for-system-time-synchronization.patch \
"
USERADD_PACKAGES_remove = "${PN}-journal-gateway ${PN}-journal-upload ${PN}-journal-remote"
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 7172e7a00..16d362620 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 = "d0bc9c46e217fd923ccad4719d8701b25e3c0523"
+SRCREV = "a452ef3efa2ff0efb9d223fc5d477a0b4db6f0bf"
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend
index 0d2c589ae..04499f1b7 100644
--- a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend
@@ -1,4 +1,4 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
#SRC_URI = "git://github.com/openbmc/obmc-ikvm"
-SRCREV = "673ac2eb1117a7d692460f808f1d947495d033db"
+SRCREV = "7a420e4c928ce4f0720a82a74e05d23ef3c362fb"
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 a562636ba..dff0d2a23 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 = "0d8577404fd321841fc84de547fe3d1d2a36909f"
+SRCREV = "da65b239e6622fbf913a904480fe3ff87ee02dec"
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/pfr-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend
index f89a2fbb0..cbf56344d 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend
@@ -1,5 +1,5 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/pfr-manager"
-SRCREV = "2dfaf507da581ed4c71d41c02976e4efafc1d634"
+SRCREV = "29b4779eb8dd444f2e70806e35ae2c398222a74d"
DEPENDS += " libgpiod \
"
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 44cee7361..fefbfa403 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 = "d23b84a7eb2be944b12e6539cf627f595b299fda"
+SRCREV = "5b285892fe22bc5ed9ddf5a5f1322b58a55cfca8"
S = "${WORKDIR}/git"
@@ -26,6 +26,7 @@ DEPENDS += " \
phosphor-logging \
libpeci \
i2c-tools \
+ nlohmann-json \
"
EXTRA_OECMAKE="-DYOCTO=1 -DIPMI_BLOB=0"
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 54e182386..d1f5daef0 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
@@ -1,12 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-LINUX_VERSION = "5.10.30"
+LINUX_VERSION = "5.10.46"
-KBRANCH = "dev-5.10-intel"
+KBRANCH = "dev-5.10.46-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="0785121bf4894ebecd9a6efc82331894fefd6c82"
+SRCREV="9ec121d97a292628e01462df8f13b017add3b034"
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 428d4a67e..282b5669a 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
@@ -19,16 +19,16 @@ 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 | 124 +++++++++++++++++++++++++++++++++++++++++
- ethernet_interface.hpp | 37 +++++++++++-
- network_manager.cpp | 102 +++++++++++++++++++++++++++++++++
- network_manager.hpp | 9 +++
+ src/ethernet_interface.cpp | 124 +++++++++++++++++++++++++++++++++++++++++
+ src/ethernet_interface.hpp | 37 +++++++++++-
+ src/network_manager.cpp | 102 +++++++++++++++++++++++++++++++++
+ src/network_manager.hpp | 9 +++
4 files changed, 271 insertions(+), 1 deletion(-)
-diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
+diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
index 607e658..e2b2da9 100644
---- a/ethernet_interface.cpp
-+++ b/ethernet_interface.cpp
+--- a/src/ethernet_interface.cpp
++++ b/src/ethernet_interface.cpp
@@ -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";
@@ -173,10 +173,10 @@ index 607e658..e2b2da9 100644
+
} // namespace network
} // namespace phosphor
-diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
+diff --git a/src/ethernet_interface.hpp b/src/ethernet_interface.hpp
index 8e28b51..ebba151 100644
---- a/ethernet_interface.hpp
-+++ b/ethernet_interface.hpp
+--- a/src/ethernet_interface.hpp
++++ b/src/ethernet_interface.hpp
@@ -2,11 +2,14 @@
#include "types.hpp"
@@ -259,10 +259,10 @@ index 8e28b51..ebba151 100644
};
} // namespace network
-diff --git a/network_manager.cpp b/network_manager.cpp
+diff --git a/src/network_manager.cpp b/src/network_manager.cpp
index 881b767..847852f 100644
---- a/network_manager.cpp
-+++ b/network_manager.cpp
+--- a/src/network_manager.cpp
++++ b/src/network_manager.cpp
@@ -36,6 +36,13 @@ extern std::unique_ptr<Timer> restartTimer;
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
@@ -379,10 +379,10 @@ index 881b767..847852f 100644
}
bool Manager::createDefaultNetworkFiles(bool force)
-diff --git a/network_manager.hpp b/network_manager.hpp
+diff --git a/src/network_manager.hpp b/src/network_manager.hpp
index 227955c..9f5b7a9 100644
---- a/network_manager.hpp
-+++ b/network_manager.hpp
+--- a/src/network_manager.hpp
++++ b/src/network_manager.hpp
@@ -155,6 +155,12 @@ class Manager : public details::VLANCreateIface
return (interfaces.find(intf) != interfaces.end());
}
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 3877adabd..808380de7 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,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
DEPENDS += "nlohmann-json boost"
SRC_URI = "git://github.com/openbmc/phosphor-networkd"
-SRCREV = "de433b74ec5bce22043ea44c55e83d9be3dc5372"
+SRCREV = "d49c5c650bd6b13f267d59be452ac2b4493e8201"
SRC_URI += " file://0003-Adding-channel-specific-privilege-to-network.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb
index b91cc5e9e..7426dc6de 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe
inherit meson systemd
SRC_URI = "git://github.com/openbmc/bios-settings-mgr.git"
-SRCREV = "c0f926d6cbf9636a42f4bc3d33b9602e4633c478"
+SRCREV = "5e2cb7206e695662f09c7cb4e0c73ba11686acaa"
SYSTEMD_SERVICE_${PN} += " \
xyz.openbmc_project.biosconfig_manager.service \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch
new file mode 100644
index 000000000..4f6679dde
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch
@@ -0,0 +1,149 @@
+From 95a1f9e5f65d35adc3cf8d3b3095d92b63c17f85 Mon Sep 17 00:00:00 2001
+From: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+Date: Sun, 20 Jun 2021 18:22:34 +0000
+Subject: [PATCH] Add MUX and Drives present in HSBP in json configuration
+
+Added Mux addresses for all 3 HSBP configuration and the drive
+names to be exposed via entity manager when the HSBP is connected
+
+Added board instance to separate each HSBP board.
+
+Tested:
+After this addition, detected the MUXes in entity manager
+tree as well as in /dev/i2c-mux location. Also able to detect
+the drive address.
+
+Change-Id: Ic07e3880cf5b6f8a47ee7b8f1f98e12042765da8
+Signed-off-by: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+
+---
+ configurations/F2U8X25 HSBP.json | 78 ++++++++++++++++++++++++++++++--
+ 1 file changed, 75 insertions(+), 3 deletions(-)
+
+diff --git a/configurations/F2U8X25 HSBP.json b/configurations/F2U8X25 HSBP.json
+index c6c7678..e2eedfa 100644
+--- a/configurations/F2U8X25 HSBP.json
++++ b/configurations/F2U8X25 HSBP.json
+@@ -7,6 +7,30 @@
+ "Name": "F2U8X25 HSBP1 FRU",
+ "Type": "EEPROM"
+ },
++ {
++ "Address": "0x70",
++ "Bus": "$bus",
++ "ChannelNames": [
++ "Drive_1",
++ "Drive_2",
++ "Drive_3",
++ "Drive_4"
++ ],
++ "Name": "Drive Mux 1",
++ "Type": "PCA9546Mux"
++ },
++ {
++ "Address": "0x74",
++ "Bus": "$bus",
++ "ChannelNames": [
++ "Drive_5",
++ "Drive_6",
++ "Drive_7",
++ "Drive_8"
++ ],
++ "Name": "Drive Mux 2",
++ "Type": "PCA9546Mux"
++ },
+ {
+ "Address": "0x48",
+ "Bus": "$bus",
+@@ -40,7 +64,7 @@
+ "Type": "TMP75"
+ }
+ ],
+- "Name": "F2U8X25 HSBP",
++ "Name": "F2U8X25 HSBP 1",
+ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 80})",
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+@@ -58,6 +82,30 @@
+ "Name": "F2U8X25 HSBP2 FRU",
+ "Type": "EEPROM"
+ },
++ {
++ "Address": "0x73",
++ "Bus": "$bus",
++ "ChannelNames": [
++ "Drive_9",
++ "Drive_10",
++ "Drive_11",
++ "Drive_12"
++ ],
++ "Name": "Drive Mux 3",
++ "Type": "PCA9546Mux"
++ },
++ {
++ "Address": "0x77",
++ "Bus": "$bus",
++ "ChannelNames": [
++ "Drive_13",
++ "Drive_14",
++ "Drive_15",
++ "Drive_16"
++ ],
++ "Name": "Drive Mux 4",
++ "Type": "PCA9546Mux"
++ },
+ {
+ "Address": "0x4B",
+ "Bus": "$bus",
+@@ -91,7 +139,7 @@
+ "Type": "TMP75"
+ }
+ ],
+- "Name": "F2U8X25 HSBP",
++ "Name": "F2U8X25 HSBP 2",
+ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 83})",
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+@@ -109,6 +157,30 @@
+ "Name": "F2U8X25 HSBP3 FRU",
+ "Type": "EEPROM"
+ },
++ {
++ "Address": "0x72",
++ "Bus": "$bus",
++ "ChannelNames": [
++ "Drive_17",
++ "Drive_18",
++ "Drive_19",
++ "Drive_20"
++ ],
++ "Name": "Drive Mux 5",
++ "Type": "PCA9546Mux"
++ },
++ {
++ "Address": "0x76",
++ "Bus": "$bus",
++ "ChannelNames": [
++ "Drive_21",
++ "Drive_22",
++ "Drive_23",
++ "Drive_24"
++ ],
++ "Name": "Drive Mux 6",
++ "Type": "PCA9546Mux"
++ },
+ {
+ "Address": "0x4A",
+ "Bus": "$bus",
+@@ -142,7 +214,7 @@
+ "Type": "TMP75"
+ }
+ ],
+- "Name": "F2U8X25 HSBP",
++ "Name": "F2U8X25 HSBP 3",
+ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 82})",
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+--
+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 a7448a84b..9447fb3cb 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 = "cda147301b0fa7eac99eee3a7565604dbd6f74dd"
+SRCREV = "c02d8cbbe8ded5368014d66bcf3279de758011d9"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://0002-Entity-manager-Add-support-to-update-assetTag.patch \
file://0003-Add-logs-to-fwVersionIsSame.patch \
+ file://0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
index 00e2b53fe..454bdc1db 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
@@ -13,6 +13,7 @@
* limitations under the License.
*/
+#include <systemd/sd-journal.h>
#include <time.h>
#include <boost/asio/io_service.hpp>
@@ -323,9 +324,22 @@ class PCHSync
{
return false;
}
- phosphor::logging::log<phosphor::logging::level::INFO>(
- "Update BMC time to: ",
- phosphor::logging::entry("TIME=%s", dateString.c_str()));
+ char newDateString[32] = {0};
+ strftime(newDateString, sizeof(newDateString), "%F %T",
+ gmtime(&PCHTimeSeconds));
+
+ struct tm* timeinfo;
+ char oldDateString[32] = {0};
+ timeinfo = gmtime(&BMCTimeSeconds);
+ strftime(oldDateString, sizeof(oldDateString), "%F %T", timeinfo);
+
+ // Log event about BMC time update via PCH
+ sd_journal_send(
+ "MESSAGE=BMC time updated via PCH: New time=%s, Old time=%s",
+ newDateString, oldDateString, "PRIORITY=%i", LOG_INFO,
+ "REDFISH_MESSAGE_ID=%s", "OpenBMC.0.1.BMCTimeUpdatedViaHost",
+ "REDFISH_MESSAGE_ARGS=%s,%s", newDateString, oldDateString,
+ NULL);
}
// During the boot time, systemd-timesyncd.service checks
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0034-Add-username-property-to-SessionInfo-interface.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0034-Add-username-property-to-SessionInfo-interface.patch
new file mode 100644
index 000000000..29c49874a
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0034-Add-username-property-to-SessionInfo-interface.patch
@@ -0,0 +1,64 @@
+From 3a507873ed733ed0e313f6efb89f7a491577e015 Mon Sep 17 00:00:00 2001
+From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+Date: Tue, 1 Jun 2021 12:27:50 +0000
+Subject: [PATCH] Add username property to SessionInfo interface
+
+Add username property to SessionInfo interface to get username info on
+individual IPMI session Id's on Redfish
+
+Tested:
+Verified on SessionInfo D-bus interface.
+
+busctl introspect xyz.openbmc_project.Ipmi.Channel.eth0
+ /xyz/openbmc_project/ipmi/session/eth0/0
+NAME TYPE SIGNATURE RESULT/VALUE FLAGS
+......
+xyz.openbmc_project.Ipmi.SessionInfo interface - - -
+.ChannelNum property y 0 emits-change writable
+.CurrentPrivilege property y 0 emits-change writable
+.RemoteIPAddr property u 2225389066 emits-change writable
+.RemoteMACAddress property ay 0 emits-change writable
+.RemotePort property q 35749 emits-change writable
+.SessionHandle property y 0 emits-change writable
+.State property y 0 emits-change writable
+.UserID property y 0 emits-change writable
+.Username property s "" emits-change writable
+
+Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+---
+ xyz/openbmc_project/Ipmi/SESSION_README.md | 1 +
+ xyz/openbmc_project/Ipmi/SessionInfo.interface.yaml | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/xyz/openbmc_project/Ipmi/SESSION_README.md b/xyz/openbmc_project/Ipmi/SESSION_README.md
+index c59b251..18ae66a 100644
+--- a/xyz/openbmc_project/Ipmi/SESSION_README.md
++++ b/xyz/openbmc_project/Ipmi/SESSION_README.md
+@@ -16,6 +16,7 @@ so that both phosphor-ipmi-host & phosphr-ipmi-net will be in sync.
+ * RemotePort - Remote port address.
+ * RemoteMACAddress -Remote MAC Address.
+ * UserID - Session created by given user id.
++* Username - Session created by given username.
+
+
+
+diff --git a/xyz/openbmc_project/Ipmi/SessionInfo.interface.yaml b/xyz/openbmc_project/Ipmi/SessionInfo.interface.yaml
+index 0ddc025..a7c3a90 100644
+--- a/xyz/openbmc_project/Ipmi/SessionInfo.interface.yaml
++++ b/xyz/openbmc_project/Ipmi/SessionInfo.interface.yaml
+@@ -46,6 +46,12 @@ properties:
+ Session created by given user ID.
+ errors:
+ - xyz.openbmc_project.Common.Error.InternalFailure
++ - name: Username
++ type: string
++ description: >
++ Session created by given username.
++ errors:
++ - xyz.openbmc_project.Common.Error.InternalFailure
+ - name: State
+ type: byte
+ default: 0
+--
+2.17.1
+
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 e935531ee..a90647b14 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 = "33458d4432a8323616622881f314a73cf0b04d97"
+SRCREV = "28dcc9a3bd3cf2e0f99f8d225dfd47b85815720e"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -18,4 +18,5 @@ SRC_URI += "file://0007-ipmi-set-BIOS-id.patch \
file://0030-Add-PLDM-version-purpose-enumeration.patch \
file://0032-update-meson-build-for-MCTP-interfaces.patch \
file://0033-update-meson-build-for-PLDM-FWU-interfaces.patch \
+ file://0034-Add-username-property-to-SessionInfo-interface.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch
index 0a47e3278..b8df3e07c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch
@@ -1,4 +1,4 @@
-From 6ce336adafd723319befc4ce918ba67a0ad3492c Mon Sep 17 00:00:00 2001
+From 6e95f4a761021e3204912e3a7c5b80a18d9f16cf Mon Sep 17 00:00:00 2001
From: Jennifer Lee <jennifer1.lee@intel.com>
Date: Mon, 10 Dec 2018 10:36:44 -0800
Subject: [PATCH] Modified firmware activation to launch fwupd.sh through
@@ -11,35 +11,43 @@ Subject: [PATCH] Modified firmware activation to launch fwupd.sh through
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
---
- activation.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++-
+ activation.cpp | 50 +++++++++++++++++++++++++++++++++++++----------
meson.build | 2 ++
meson_options.txt | 3 +++
- static/flash.cpp | 42 ++++++++++++++++++++++++++++++++++++++++--
+ static/flash.cpp | 42 +++++++++++++++++++++++++++++++++++++--
ubi/flash.cpp | 9 +++------
- 5 files changed, 92 insertions(+), 9 deletions(-)
+ 5 files changed, 88 insertions(+), 18 deletions(-)
diff --git a/activation.cpp b/activation.cpp
-index c82e297..d690a39 100644
+index 5490cd9974b3..e43959d78ed2 100644
--- a/activation.cpp
+++ b/activation.cpp
-@@ -88,7 +88,50 @@ auto Activation::activation(Activations value) -> Activations
-
+@@ -88,20 +88,50 @@ auto Activation::activation(Activations value) -> Activations
+
if (value == softwareServer::Activation::Activations::Activating)
{
+-#ifdef WANT_SIGNATURE_VERIFY
+- fs::path uploadDir(IMG_UPLOAD_DIR);
+- if (!verifySignature(uploadDir / versionId, SIGNED_IMAGE_CONF_PATH))
+#ifdef FWUPD_SCRIPT
+ if (!activationProgress)
-+ {
+ {
+- onVerifyFailed();
+- // Stop the activation process, if fieldMode is enabled.
+- if (parent.control::FieldMode::fieldModeEnabled())
+ // Enable systemd signals
+ Activation::subscribeToSystemdSignals();
+ parent.freeSpace(*this);
+
+ activationProgress =
+ std::make_unique<ActivationProgress>(bus, path);
-
++
+#ifdef WANT_SIGNATURE_VERIFY
+ fs::path uploadDir(IMG_UPLOAD_DIR);
+ if (!verifySignature(uploadDir / versionId, SIGNED_IMAGE_CONF_PATH))
-+ {
+ {
+- return softwareServer::Activation::activation(
+- softwareServer::Activation::Activations::Failed);
+ onVerifyFailed();
+ // Stop the activation process, if fieldMode is enabled.
+ if (parent.control::FieldMode::fieldModeEnabled())
@@ -47,8 +55,9 @@ index c82e297..d690a39 100644
+ return softwareServer::Activation::activation(
+ softwareServer::Activation::Activations::Failed);
+ }
-+ }
-+#endif
+ }
+- }
+ #endif
+ flashWrite();
+ }
+ else if (activationProgress->progress() == 100)
@@ -62,7 +71,7 @@ index c82e297..d690a39 100644
+
+ // Remove version object from image manager
+ Activation::deleteImageManagerObject();
-+
+
+ // Create active association
+ parent.createActiveAssociation(path);
+
@@ -73,7 +82,7 @@ index c82e297..d690a39 100644
#ifdef HOST_BIOS_UPGRADE
auto purpose = parent.versions.find(versionId)->second->purpose();
if (purpose == VersionPurpose::Host)
-@@ -111,7 +154,6 @@ auto Activation::activation(Activations value) -> Activations
+@@ -124,7 +154,6 @@ auto Activation::activation(Activations value) -> Activations
return softwareServer::Activation::activation(value);
}
#endif
@@ -81,7 +90,7 @@ index c82e297..d690a39 100644
auto versionStr = parent.versions.find(versionId)->second->version();
if (!minimum_ship_level::verify(versionStr))
-@@ -175,6 +217,7 @@ auto Activation::activation(Activations value) -> Activations
+@@ -174,6 +203,7 @@ auto Activation::activation(Activations value) -> Activations
return softwareServer::Activation::activation(
softwareServer::Activation::Activations::Active);
#endif
@@ -90,7 +99,7 @@ index c82e297..d690a39 100644
else
{
diff --git a/meson.build b/meson.build
-index a6ebcc4..5c79009 100644
+index a6ebcc43c0ec..5c7900924959 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,8 @@ conf.set('WANT_SIGNATURE_VERIFY', \
@@ -103,7 +112,7 @@ index a6ebcc4..5c79009 100644
conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed'))
conf.set_quoted('HASH_FILE_NAME', get_option('hash-file-name'))
diff --git a/meson_options.txt b/meson_options.txt
-index 0877798..da257b7 100644
+index 4def7f982809..74e757b75f01 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,6 +25,9 @@ option('verify-signature', type: 'feature',
@@ -117,7 +126,7 @@ index 0877798..da257b7 100644
option(
'active-bmc-max-allowed', type: 'integer',
diff --git a/static/flash.cpp b/static/flash.cpp
-index 101828b..5506a59 100644
+index 101828b1ade5..5506a59ac499 100644
--- a/static/flash.cpp
+++ b/static/flash.cpp
@@ -22,9 +22,11 @@ namespace updater
@@ -183,7 +192,7 @@ index 101828b..5506a59 100644
} // namespace updater
diff --git a/ubi/flash.cpp b/ubi/flash.cpp
-index a263bfb..c58eefc 100644
+index a263bfb81116..c58eefc4ec48 100644
--- a/ubi/flash.cpp
+++ b/ubi/flash.cpp
@@ -15,13 +15,10 @@ void Activation::flashWrite()
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-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 587421044..eb5a40fbf 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-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
@@ -13,8 +13,8 @@ Also, there was a logic error in deleting images that would delete the
active BMC image. This fixes up that error.
Tested: run multiple back-to back updates and see that when the fwupd
- script calls delete on the seamless images, the interfaces are
- deleted and that the bmc_active interface is not deleted.
+ script calls delete, the interfaces are 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>
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0018-bmcweb-Add-BMC-Time-update-log-to-the-registry.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0018-bmcweb-Add-BMC-Time-update-log-to-the-registry.patch
new file mode 100644
index 000000000..829384305
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0018-bmcweb-Add-BMC-Time-update-log-to-the-registry.patch
@@ -0,0 +1,77 @@
+From 3ec1f79d1cb29724e345586f0baefca81d98d3ae Mon Sep 17 00:00:00 2001
+From: mansijos <mansi.joshi@intel.com>
+Date: Wed, 26 May 2021 17:40:04 +0530
+Subject: [PATCH] [bmcweb] Add BMC Time update log to the registry
+
+Add message in registry to log an event that indicates BMC time
+is set via NTP, Host or Manually.
+During early stage of system boot if any critical events occur,
+they are getting logged with 1970 timestamp till the time BMC
+time update happens. This is expected behavior, but to call it out
+explicitly it is good to log when BMC time is updated.
+
+Tested:
+Built and validator passes.
+Confirmed that the event is getting logged correctly in Redfish.
+
+Signed-off-by: mansijos <mansi.joshi@intel.com>
+---
+ .../registries/openbmc_message_registry.hpp | 35 ++++++++++++++++++-
+ 1 file changed, 34 insertions(+), 1 deletion(-)
+
+diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp
+index 2f981db..a00d235 100644
+--- a/redfish-core/include/registries/openbmc_message_registry.hpp
++++ b/redfish-core/include/registries/openbmc_message_registry.hpp
+@@ -29,7 +29,7 @@ const Header header = {
+ "0.2.0",
+ "OpenBMC",
+ };
+-constexpr std::array<MessageEntry, 193> registry = {
++constexpr std::array<MessageEntry, 196> registry = {
+ MessageEntry{
+ "ADDDCCorrectable",
+ {
+@@ -286,6 +286,39 @@ constexpr std::array<MessageEntry, 193> registry = {
+ {},
+ "None.",
+ }},
++ MessageEntry{"BMCTimeUpdatedViaHost",
++ {
++ "Indicates that BMC time has been set via Host.",
++ "BMC time has been set via Host. "
++ "Date Time is set to %1 from %2.",
++ "OK",
++ "OK",
++ 2,
++ {"string", "string"},
++ "None.",
++ }},
++ MessageEntry{"BMCTimeUpdatedManually",
++ {
++ "Indicates that BMC time has been set Manually.",
++ "BMC time has been set Manually. "
++ "Date Time is set to %1 from %2.",
++ "OK",
++ "OK",
++ 2,
++ {"string", "string"},
++ "None.",
++ }},
++ MessageEntry{"BMCTimeUpdatedViaNTP",
++ {
++ "Indicates that BMC time has been set via NTP.",
++ "BMC time has been set via NTP. "
++ "Date Time is set to %1 from %2.",
++ "OK",
++ "OK",
++ 2,
++ {"string", "string"},
++ "None.",
++ }},
+ MessageEntry{"ChassisIntrusionDetected",
+ {
+ "Indicates that a physical security event "
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0019-Add-generic-message-PropertySizeExceeded.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0019-Add-generic-message-PropertySizeExceeded.patch
new file mode 100644
index 000000000..756ea24d7
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0019-Add-generic-message-PropertySizeExceeded.patch
@@ -0,0 +1,118 @@
+From da893566ec02aefe235685f1b6742269aab37909 Mon Sep 17 00:00:00 2001
+From: Nitin Wankhade <nitinx.arunrao.wankhade@intel.com>
+Date: Thu, 24 Jun 2021 15:29:24 +0000
+Subject: [PATCH] Add generic message - PropertySizeExceeded
+
+Adding a generic error message "PropertySizeExceeded"
+to address properties which exceed there defined size limit.
+
+Tested:
+No functional change. Build passed.
+Verified by explicitly sending this message as a response.
+
+Change-Id: I0e9f85f82a69c598e169fc8e9a68c3f66c0084d8
+Signed-off-by: Nitin Wankhade <nitinx.arunrao.wankhade@intel.com>
+---
+ redfish-core/include/error_messages.hpp | 12 +++++++++
+ .../registries/base_message_registry.hpp | 17 +++++++++++-
+ redfish-core/src/error_messages.cpp | 27 +++++++++++++++++++
+ 3 files changed, 55 insertions(+), 1 deletion(-)
+
+diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
+index 922dae9..586246c 100644
+--- a/redfish-core/include/error_messages.hpp
++++ b/redfish-core/include/error_messages.hpp
+@@ -222,6 +222,18 @@ nlohmann::json propertyValueFormatError(const std::string& arg1,
+ void propertyValueFormatError(crow::Response& res, const std::string& arg1,
+ const std::string& arg2);
+
++/**
++ * @brief Formats PropertySizeExceeded message into JSON
++ * Message body: "The property <arg1> is too long. The value exceeds its size
++ * limit."
++ *
++ * @param[in] arg1 Parameter of message that will replace %1 in its body.
++ *
++ * @returns Message PropertySizeExceeded formatted to JSON */
++nlohmann::json propertySizeExceeded(const std::string& arg1);
++
++void propertySizeExceeded(crow::Response& res, const std::string& arg1);
++
+ /**
+ * @brief Formats PropertyValueNotInList message into JSON
+ * Message body: "The value <arg1> for the property <arg2> is not in the list of
+diff --git a/redfish-core/include/registries/base_message_registry.hpp b/redfish-core/include/registries/base_message_registry.hpp
+index 7c385a0..79d324e 100644
+--- a/redfish-core/include/registries/base_message_registry.hpp
++++ b/redfish-core/include/registries/base_message_registry.hpp
+@@ -36,7 +36,7 @@ const Header header = {
+ constexpr const char* url =
+ "https://redfish.dmtf.org/registries/Base.1.8.1.json";
+
+-constexpr std::array<MessageEntry, 74> registry = {
++constexpr std::array<MessageEntry, 75> registry = {
+ MessageEntry{
+ "AccessDenied",
+ {
+@@ -592,6 +592,21 @@ constexpr std::array<MessageEntry, 74> registry = {
+ "Remove the property from the request body and resubmit "
+ "the request if the operation failed.",
+ }},
++ MessageEntry{"PropertySizeExceeded",
++ {
++ "Indicates that a given property exceeds the size "
++ "limit imposed.",
++ "The property %1 is too long. The value exceeds "
++ "its size limit.",
++ "Warning",
++ "Warning",
++ 1,
++ {
++ "string",
++ },
++ "Correct the value for the property in the request body "
++ "and resubmit the request if the operation failed.",
++ }},
+ MessageEntry{"PropertyUnknown",
+ {
+ "Indicates that an unknown property was included in the "
+diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
+index 409adb1..11e59be 100644
+--- a/redfish-core/src/error_messages.cpp
++++ b/redfish-core/src/error_messages.cpp
+@@ -514,6 +514,33 @@ void propertyValueFormatError(crow::Response& res, const std::string& arg1,
+ addMessageToJson(res.jsonValue, propertyValueFormatError(arg1, arg2), arg2);
+ }
+
++/**
++ * @internal
++ * @brief Formats PropertySizeExceeded message into JSON for the specified
++ * property
++ *
++ * See header file for more information
++ * @endinternal
++ */
++nlohmann::json propertySizeExceeded(const std::string& arg1)
++{
++ return nlohmann::json{
++ {"@odata.type", "#Message.v1_1_1.Message"},
++ {"MessageId", "Base.1.8.1.PropertySizeExceeded"},
++ {"Message", "The property " + arg1 +
++ " is too long. The value exceeds its size limit."},
++ {"MessageArgs", {arg1}},
++ {"MessageSeverity", "Warning"},
++ {"Resolution", "Correct the value for the property in the request body "
++ "and resubmit the request if the operation failed."}};
++}
++
++void propertySizeExceeded(crow::Response& res, const std::string& arg1)
++{
++ res.result(boost::beast::http::status::bad_request);
++ addMessageToJson(res.jsonValue, propertySizeExceeded(arg1), arg1);
++}
++
+ /**
+ * @internal
+ * @brief Formats PropertyValueNotInList message into JSON for the specified
+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 16e8affa5..c3e3acbca 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 dda3c7a46391ef88e7c6a6f61fba7fe9133336bf Mon Sep 17 00:00:00 2001
+From 3dc6f6d807060cf3b38486e4190fd1ba9c66c66b 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] Add EventService SSE filter support
@@ -25,25 +25,26 @@ Tested:
- To get all Redfish events,
URI: /redfish/v1/EventService/Subscriptions/SSE?$filter=(EventFormatType%20eq%20Event)
- To get Redfish events with RegistryPrefix "OpenBMC"
- URi: /redfish/v1/EventService/Subscriptions/SSE?$filter=(RegistryPrefix%20eq%20OpenBMC)
+ URI: /redfish/v1/EventService/Subscriptions/SSE?$filter=(RegistryPrefix%20eq%20OpenBMC)
- To get only DC power of Events,
URI: /redfish/v1/EventService/Subscriptions/SSE?$filter=(EventFormatType%20eq%20Event)%20and%20(MessageId%20eq%20DCPowerOff)
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
+Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Change-Id: I55c6f53bb5e57aa1f2d1601f1a16525a33b13bd2
---
- include/eventservice_sse.hpp | 94 ++++++++++++++++++-
- redfish-core/include/error_messages.hpp | 9 ++
- .../include/event_service_manager.hpp | 5 +
- redfish-core/lib/event_service.hpp | 5 -
- redfish-core/src/error_messages.cpp | 26 +++++
- 5 files changed, 130 insertions(+), 9 deletions(-)
+ include/eventservice_sse.hpp | 141 +++++++++++++++++-
+ redfish-core/include/error_messages.hpp | 9 ++
+ .../include/event_service_manager.hpp | 5 +
+ redfish-core/lib/event_service.hpp | 5 -
+ redfish-core/src/error_messages.cpp | 26 ++++
+ 5 files changed, 177 insertions(+), 9 deletions(-)
diff --git a/include/eventservice_sse.hpp b/include/eventservice_sse.hpp
-index 6c98e6e..ff72c4d 100644
+index 6c98e6e..01e4126 100644
--- a/include/eventservice_sse.hpp
+++ b/include/eventservice_sse.hpp
-@@ -23,16 +23,102 @@ static bool createSubscription(std::shared_ptr<crow::SseConnection>& conn,
+@@ -23,16 +23,149 @@ static bool createSubscription(std::shared_ptr<crow::SseConnection>& conn,
}
BMCWEB_LOG_DEBUG << "Request query param size: " << req.urlParams.size();
@@ -130,6 +131,53 @@ index 6c98e6e..ff72c4d 100644
+ }
+ }
+ }
++
++ if (!msgIds.empty())
++ {
++ std::vector<std::string> registryPrefix;
++
++ // If no registry prefixes are mentioned, consider all supported
++ // prefixes to validate message ID
++ if (regPrefixes.empty())
++ {
++ registryPrefix.assign(supportedRegPrefixes.begin(),
++ supportedRegPrefixes.end());
++ }
++
++ for (const std::string& id : msgIds)
++ {
++ bool validId = false;
++
++ // Check for Message ID in each of the selected Registry
++ for (const std::string& it : registryPrefix)
++ {
++ const boost::beast::span<
++ const redfish::message_registries::MessageEntry>
++ registry =
++ redfish::message_registries::getRegistryFromPrefix(
++ it);
++
++ if (std::any_of(
++ registry.cbegin(), registry.cend(),
++ [&id](
++ const redfish::message_registries::MessageEntry&
++ messageEntry) {
++ return !id.compare(messageEntry.first);
++ }))
++ {
++ validId = true;
++ break;
++ }
++ }
++
++ if (!validId)
++ {
++ messages::propertyValueNotInList(res, id, "MessageId");
++ res.end();
++ return false;
++ }
++ }
++ }
+ }
+
std::shared_ptr<redfish::Subscription> subValue =
@@ -171,7 +219,7 @@ 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 ac644c1..3661fed 100644
+index e826207..f201134 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -55,6 +55,11 @@ static constexpr const char* eventServiceFile =
@@ -203,7 +251,7 @@ index 7c9bb7a..297a4ea 100644
"TerminateAfterRetries", "SuspendRetries", "RetryForever"};
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
-index 7059a38..1e3ef2f 100644
+index ad5f819..409adb1 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/0008-Add-checks-on-Event-Subscription-input-parameters.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0008-Add-checks-on-Event-Subscription-input-parameters.patch
new file mode 100644
index 000000000..874c82e2f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0008-Add-checks-on-Event-Subscription-input-parameters.patch
@@ -0,0 +1,85 @@
+From b43da33c7bc9ad4d5eea35c9ba68efdd6ed6d34d Mon Sep 17 00:00:00 2001
+From: Nitin Wankhade <nitinx.arunrao.wankhade@intel.com>
+Date: Mon, 28 Jun 2021 19:59:57 +0000
+Subject: [PATCH] Add checks on Event Subscription input parameters
+
+There is no check on the size of input parameters(Context,
+Destination and Header) during Event Subscription.This
+creates out of memory situation.
+This commit checks for the size of input parameters and
+rejects if it is exceeding the input size limits.
+
+Tested
+ - Validated using POST on Event Subscription.
+ - When Context, Destination and Headers were too long,
+ received a error message denoting the same.
+
+Change-Id: Iec2cd766c0e137b72706fc2da468d4fefd8fbaae
+Signed-off-by: Nitin Wankhade <nitinx.arunrao.wankhade@intel.com>
+---
+ redfish-core/lib/event_service.hpp | 30 +++++++++++++++++++++++++++++-
+ 1 file changed, 29 insertions(+), 1 deletion(-)
+
+diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
+index ed4955e..0cb0f00 100644
+--- a/redfish-core/lib/event_service.hpp
++++ b/redfish-core/lib/event_service.hpp
+@@ -16,6 +16,10 @@
+ #pragma once
+ #include "event_service_manager.hpp"
+
++#define MAX_CONTEXT_SIZE 256
++#define MAX_DESTINATION_SIZE 1024
++#define MAX_HEADER_SIZE 8096
++
+ namespace redfish
+ {
+ static constexpr const std::array<const char*, 3> supportedRetryPolicies = {
+@@ -243,7 +247,11 @@ class EventDestinationCollection : public Node
+ {
+ return;
+ }
+-
++ if (destUrl.size() > MAX_DESTINATION_SIZE)
++ {
++ messages::propertySizeExceeded(asyncResp->res, "Destination");
++ return;
++ }
+ if (regPrefixes && msgIds)
+ {
+ if (regPrefixes->size() && msgIds->size())
+@@ -350,11 +358,31 @@ class EventDestinationCollection : public Node
+
+ if (context)
+ {
++ if (context->size() > MAX_CONTEXT_SIZE)
++ {
++ messages::propertySizeExceeded(asyncResp->res, "Context");
++ return;
++ }
+ subValue->customText = *context;
+ }
+
+ if (headers)
+ {
++ size_t cumulativeLen = 0;
++
++ for (nlohmann::json& itr : *headers)
++ {
++ std::string hdr{itr.dump(
++ -1, ' ', true, nlohmann::json::error_handler_t::replace)};
++ cumulativeLen += hdr.length();
++
++ if (cumulativeLen > MAX_HEADER_SIZE)
++ {
++ messages::propertySizeExceeded(asyncResp->res,
++ "HttpHeaders");
++ return;
++ }
++ }
+ subValue->httpHeaders = *headers;
+ }
+
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch
index 8b08c6c5e..f03e49223 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch
@@ -1,38 +1,39 @@
-From d664a145a96a642597c74819c183410d4a04fce0 Mon Sep 17 00:00:00 2001
+From 6acffea563905c00f4b6d00c738fe7516e03c724 Mon Sep 17 00:00:00 2001
From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Date: Tue, 13 Apr 2021 13:00:18 +0000
Subject: [PATCH] Add support for MetricDefinition scheme
-Added MetricDefinition node to Redfish code. Now user is able
-to list all available metrics in OpenBMC that are supported
-by Telemetry service. Metrics are grouped by following
-categories: temperature, power, voltage, current, fan_tach,
-fan_pwm, utilization.
+Added MetricDefinition node to Redfish code. Now user is able to list
+all available metrics in OpenBMC that are supported by Telemetry
+service. Metrics are grouped by following categories: temperature,
+power, voltage, current, fan_tach, fan_pwm, utilization.
Tested:
- - MetricDefinitions response is filled with existing sensors,
- it works with and without Telemetry service
- - Validated a presence of MetricDefinition members and it
- attributes
- - Succesfully passed RedfishServiceValidator.py using
- witherspoon image on QEMU
+ - MetricDefinitions response is filled with existing sensors, it works
+ with and without Telemetry service
+ - Validated a presence of MetricDefinition members and its attributes
+ - Successfully passed RedfishServiceValidator.py using witherspoon image
+ on QEMU
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00
---
redfish-core/include/redfish.hpp | 3 +
+ .../include/utils/get_chassis_names.hpp | 58 ++++
.../include/utils/telemetry_utils.hpp | 2 +
- redfish-core/lib/metric_definition.hpp | 335 ++++++++++++++++++
+ redfish-core/lib/metric_definition.hpp | 264 ++++++++++++++++++
+ redfish-core/lib/sensors.hpp | 25 +-
redfish-core/lib/telemetry_service.hpp | 2 +
- 4 files changed, 342 insertions(+)
+ 6 files changed, 342 insertions(+), 12 deletions(-)
+ create mode 100644 redfish-core/include/utils/get_chassis_names.hpp
create mode 100644 redfish-core/lib/metric_definition.hpp
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
-index 7a14969..d280a86 100644
+index 4418c3d..594520d 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
-@@ -26,6 +26,7 @@
+@@ -25,6 +25,7 @@
#include "../lib/managers.hpp"
#include "../lib/memory.hpp"
#include "../lib/message_registries.hpp"
@@ -40,7 +41,7 @@ index 7a14969..d280a86 100644
#include "../lib/metric_report.hpp"
#include "../lib/metric_report_definition.hpp"
#include "../lib/network_protocol.hpp"
-@@ -219,6 +220,8 @@ class RedfishService
+@@ -215,6 +216,8 @@ class RedfishService
nodes.emplace_back(std::make_unique<HypervisorResetActionInfo>(app));
nodes.emplace_back(std::make_unique<TelemetryService>(app));
@@ -49,31 +50,19 @@ index 7a14969..d280a86 100644
nodes.emplace_back(
std::make_unique<MetricReportDefinitionCollection>(app));
nodes.emplace_back(std::make_unique<MetricReportDefinition>(app));
-diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
-index 5872350..1b4f75d 100644
---- a/redfish-core/include/utils/telemetry_utils.hpp
-+++ b/redfish-core/include/utils/telemetry_utils.hpp
-@@ -10,6 +10,8 @@ namespace telemetry
-
- constexpr const char* service = "xyz.openbmc_project.Telemetry";
- constexpr const char* reportInterface = "xyz.openbmc_project.Telemetry.Report";
-+constexpr const char* metricDefinitionUri =
-+ "/redfish/v1/TelemetryService/MetricDefinitions/";
- constexpr const char* metricReportDefinitionUri =
- "/redfish/v1/TelemetryService/MetricReportDefinitions/";
- constexpr const char* metricReportUri =
-diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp
+diff --git a/redfish-core/include/utils/get_chassis_names.hpp b/redfish-core/include/utils/get_chassis_names.hpp
new file mode 100644
-index 0000000..515fe86
+index 0000000..0276b6f
--- /dev/null
-+++ b/redfish-core/lib/metric_definition.hpp
-@@ -0,0 +1,335 @@
++++ b/redfish-core/include/utils/get_chassis_names.hpp
+@@ -0,0 +1,58 @@
+#pragma once
+
-+#include "async_resp.hpp"
-+#include "node.hpp"
-+#include "sensors.hpp"
-+#include "utils/telemetry_utils.hpp"
++#include <include/dbus_singleton.hpp>
++
++#include <array>
++#include <string>
++#include <vector>
+
+namespace redfish
+{
@@ -81,52 +70,6 @@ index 0000000..515fe86
+namespace utils
+{
+
-+class AsyncRespWithFinalizer
-+{
-+ public:
-+ AsyncRespWithFinalizer(
-+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) :
-+ asyncResp(asyncResp)
-+ {}
-+
-+ AsyncRespWithFinalizer(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-+ std::function<void(crow::Response&)> finalizer) :
-+ asyncResp(asyncResp),
-+ finalizer(std::move(finalizer))
-+ {}
-+
-+ AsyncRespWithFinalizer(const AsyncRespWithFinalizer&) = delete;
-+ AsyncRespWithFinalizer(AsyncRespWithFinalizer&&) = delete;
-+
-+ ~AsyncRespWithFinalizer()
-+ {
-+ if (finalizer)
-+ {
-+ try
-+ {
-+ finalizer(asyncResp->res);
-+ }
-+ catch (const std::exception& e)
-+ {
-+ BMCWEB_LOG_ERROR << "Executing finalizer failed: " << e.what();
-+ messages::internalError(asyncResp->res);
-+ }
-+ }
-+ }
-+
-+ void setFinalizer(std::function<void(crow::Response&)> newFinalizer)
-+ {
-+ finalizer = std::move(newFinalizer);
-+ }
-+
-+ private:
-+ std::shared_ptr<bmcweb::AsyncResp> asyncResp;
-+ std::function<void(crow::Response&)> finalizer;
-+
-+ public:
-+ crow::Response& res = asyncResp->res;
-+};
-+
+template <typename F>
+inline void getChassisNames(F&& cb)
+{
@@ -170,6 +113,37 @@ index 0000000..515fe86
+
+} // namespace utils
+
++} // namespace redfish
+diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
+index 5872350..1b4f75d 100644
+--- a/redfish-core/include/utils/telemetry_utils.hpp
++++ b/redfish-core/include/utils/telemetry_utils.hpp
+@@ -10,6 +10,8 @@ namespace telemetry
+
+ constexpr const char* service = "xyz.openbmc_project.Telemetry";
+ constexpr const char* reportInterface = "xyz.openbmc_project.Telemetry.Report";
++constexpr const char* metricDefinitionUri =
++ "/redfish/v1/TelemetryService/MetricDefinitions/";
+ constexpr const char* metricReportDefinitionUri =
+ "/redfish/v1/TelemetryService/MetricReportDefinitions/";
+ constexpr const char* metricReportUri =
+diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp
+new file mode 100644
+index 0000000..072fe20
+--- /dev/null
++++ b/redfish-core/lib/metric_definition.hpp
+@@ -0,0 +1,264 @@
++#pragma once
++
++#include "async_resp.hpp"
++#include "node.hpp"
++#include "sensors.hpp"
++#include "utils/get_chassis_names.hpp"
++#include "utils/telemetry_utils.hpp"
++
++namespace redfish
++{
++
+namespace telemetry
+{
+
@@ -180,7 +154,8 @@ index 0000000..515fe86
+ {
+ sdbusplus::message::object_path path(dbusSensor);
+ sdbusplus::message::object_path parentPath = path.parent_path();
-+ std::string type = parentPath.filename();
++ const std::string type = parentPath.filename();
++
+ if (type.empty())
+ {
+ BMCWEB_LOG_ERROR << "Received invalid DBus Sensor Path = "
@@ -191,18 +166,24 @@ index 0000000..515fe86
+ nlohmann::json& members = res.jsonValue["Members"];
+
+ const std::string odataId =
-+ telemetry::metricDefinitionUri + std::move(type);
-+
-+ const auto it =
-+ std::find_if(members.begin(), members.end(),
-+ [&odataId](const nlohmann::json& item) {
-+ auto kt = item.find("@odata.id");
-+ if (kt == item.end())
-+ {
-+ return false;
-+ }
-+ return kt->get<std::string>() == odataId;
-+ });
++ std::string(telemetry::metricDefinitionUri) +
++ sensors::toReadingType(type);
++
++ const auto it = std::find_if(members.begin(), members.end(),
++ [&odataId](const nlohmann::json& item) {
++ auto kt = item.find("@odata.id");
++ if (kt == item.end())
++ {
++ return false;
++ }
++ const std::string* value =
++ kt->get_ptr<const std::string*>();
++ if (!value)
++ {
++ return false;
++ }
++ return *value == odataId;
++ });
+
+ if (it == members.end())
+ {
@@ -242,25 +223,8 @@ index 0000000..515fe86
+ asyncResp->res.jsonValue["Members"] = nlohmann::json::array();
+ asyncResp->res.jsonValue["Members@odata.count"] = 0;
+
-+ auto handleRetrieveUriToDbusMap =
-+ [asyncResp](
-+ 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);
-+ messages::internalError(asyncResp->res);
-+ return;
-+ }
-+ telemetry::addMembers(asyncResp->res, uriToDbus);
-+ };
-+
+ utils::getChassisNames(
-+ [handleRetrieveUriToDbusMap = std::move(handleRetrieveUriToDbusMap),
-+ asyncResp](boost::system::error_code ec,
++ [asyncResp](boost::system::error_code ec,
+ const std::vector<std::string>& chassisNames) {
+ if (ec)
+ {
@@ -269,6 +233,22 @@ index 0000000..515fe86
+ return;
+ }
+
++ auto handleRetrieveUriToDbusMap =
++ [asyncResp](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);
++ messages::internalError(asyncResp->res);
++ return;
++ }
++ telemetry::addMembers(asyncResp->res, uriToDbus);
++ };
++
+ for (const std::string& chassisName : chassisNames)
+ {
+ for (const auto& [sensorNode, _] : sensors::dbus::paths)
@@ -286,8 +266,26 @@ index 0000000..515fe86
+namespace telemetry
+{
+
++bool isSensorIdSupported(std::string_view readingType)
++{
++ for (const std::pair<std::string_view, std::vector<const char*>>&
++ typeToPaths : sensors::dbus::paths)
++ {
++ for (const char* supportedPath : typeToPaths.second)
++ {
++ if (readingType ==
++ sensors::toReadingType(
++ sdbusplus::message::object_path(supportedPath).filename()))
++ {
++ return true;
++ }
++ }
++ }
++ return false;
++}
++
+void addMetricProperty(
-+ utils::AsyncRespWithFinalizer& asyncResp, const std::string& id,
++ bmcweb::AsyncResp& asyncResp, const std::string& readingType,
+ const boost::container::flat_map<std::string, std::string>& el)
+{
+ nlohmann::json& metricProperties =
@@ -298,7 +296,7 @@ index 0000000..515fe86
+ std::string sensorId;
+ if (dbus::utility::getNthStringFromPath(dbusSensor, 3, sensorId))
+ {
-+ if (sensorId == id)
++ if (sensors::toReadingType(sensorId) == readingType)
+ {
+ metricProperties.push_back(redfishSensor);
+ }
@@ -329,80 +327,152 @@ index 0000000..515fe86
+ const crow::Request&,
+ const std::vector<std::string>& params) override
+ {
-+ auto telemetryAsyncResp =
-+ std::make_shared<utils::AsyncRespWithFinalizer>(asyncResp);
-+
+ if (params.size() != 1)
+ {
-+ messages::internalError(telemetryAsyncResp->res);
++ messages::internalError(asyncResp->res);
+ return;
+ }
+
-+ const std::string& id = params[0];
-+ telemetryAsyncResp->setFinalizer([id](crow::Response& res) {
-+ if (res.jsonValue["MetricProperties"].empty())
-+ {
-+ messages::resourceNotFound(res, "MetricDefinition", id);
-+ }
-+ });
++ const std::string& readingType = params[0];
+
-+ telemetryAsyncResp->res.jsonValue["MetricProperties"] =
-+ nlohmann::json::array();
-+ telemetryAsyncResp->res.jsonValue["Id"] = id;
-+ telemetryAsyncResp->res.jsonValue["Name"] = id;
-+ telemetryAsyncResp->res.jsonValue["@odata.id"] =
-+ telemetry::metricDefinitionUri + id;
-+ telemetryAsyncResp->res.jsonValue["@odata.type"] =
-+ "#MetricDefinition.v1_0_3.MetricDefinition";
-+ telemetryAsyncResp->res.jsonValue["MetricDataType"] = "Decimal";
-+ telemetryAsyncResp->res.jsonValue["MetricType"] = "Numeric";
-+ telemetryAsyncResp->res.jsonValue["IsLinear"] = true;
-+ telemetryAsyncResp->res.jsonValue["Units"] =
-+ sensors::toReadingUnits(id);
-+
-+ auto handleRetrieveUriToDbusMap =
-+ [telemetryAsyncResp,
-+ id](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);
-+ messages::internalError(telemetryAsyncResp->res);
-+ return;
-+ }
-+ telemetry::addMetricProperty(*telemetryAsyncResp, id,
-+ uriToDbus);
-+ };
++ if (!telemetry::isSensorIdSupported(readingType))
++ {
++ messages::resourceNotFound(asyncResp->res, "MetricDefinition",
++ readingType);
++ return;
++ }
+
-+ utils::getChassisNames(
-+ [handleRetrieveUriToDbusMap = std::move(handleRetrieveUriToDbusMap),
-+ telemetryAsyncResp,
-+ id](boost::system::error_code ec,
-+ const std::vector<std::string>& chassisNames) {
-+ if (ec)
-+ {
-+ messages::internalError(telemetryAsyncResp->res);
-+ BMCWEB_LOG_ERROR << "getChassisNames error: " << ec.value();
-+ return;
-+ }
++ asyncResp->res.jsonValue["MetricProperties"] = nlohmann::json::array();
++ asyncResp->res.jsonValue["Id"] = readingType;
++ asyncResp->res.jsonValue["Name"] = readingType;
++ asyncResp->res.jsonValue["@odata.id"] =
++ telemetry::metricDefinitionUri + readingType;
++ asyncResp->res.jsonValue["@odata.type"] =
++ "#MetricDefinition.v1_0_3.MetricDefinition";
++ asyncResp->res.jsonValue["MetricDataType"] = "Decimal";
++ asyncResp->res.jsonValue["MetricType"] = "Numeric";
++ asyncResp->res.jsonValue["IsLinear"] = true;
++ asyncResp->res.jsonValue["Implementation"] = "PhysicalSensor";
++ asyncResp->res.jsonValue["Units"] =
++ sensors::toReadingUnits(readingType);
++
++ utils::getChassisNames([asyncResp,
++ readingType](boost::system::error_code ec,
++ const std::vector<std::string>&
++ chassisNames) {
++ if (ec)
++ {
++ messages::internalError(asyncResp->res);
++ BMCWEB_LOG_ERROR << "getChassisNames error: " << ec.value();
++ return;
++ }
+
-+ for (const std::string& chassisName : chassisNames)
-+ {
-+ for (const auto& [sensorNode, dbusPaths] :
-+ sensors::dbus::paths)
++ auto handleRetrieveUriToDbusMap =
++ [asyncResp, readingType](
++ const boost::beast::http::status status,
++ const boost::container::flat_map<std::string, std::string>&
++ uriToDbus) {
++ if (status != boost::beast::http::status::ok)
+ {
-+ retrieveUriToDbusMap(chassisName, sensorNode.data(),
-+ handleRetrieveUriToDbusMap);
++ BMCWEB_LOG_ERROR << "Failed to retrieve URI to dbus "
++ "sensors map with err "
++ << static_cast<unsigned>(status);
++ messages::internalError(asyncResp->res);
++ return;
+ }
++ telemetry::addMetricProperty(*asyncResp, readingType,
++ uriToDbus);
++ };
++
++ for (const std::string& chassisName : chassisNames)
++ {
++ for (const auto& [sensorNode, dbusPaths] : sensors::dbus::paths)
++ {
++ retrieveUriToDbusMap(chassisName, sensorNode.data(),
++ handleRetrieveUriToDbusMap);
+ }
-+ });
++ }
++ });
+ }
+};
+
+} // namespace redfish
+diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
+index e7f4cde..b16b014 100644
+--- a/redfish-core/lib/sensors.hpp
++++ b/redfish-core/lib/sensors.hpp
+@@ -111,46 +111,47 @@ inline const char* toReadingType(const std::string& sensorType)
+ return "";
+ }
+
+-inline const char* toReadingUnits(const std::string& sensorType)
++inline const char* toReadingUnits(const std::string& readingType)
+ {
+- if (sensorType == "voltage")
++ if (readingType == "Voltage")
+ {
+ return "V";
+ }
+- if (sensorType == "power")
++ if (readingType == "Power")
+ {
+ return "W";
+ }
+- if (sensorType == "current")
++ if (readingType == "Current")
+ {
+ return "A";
+ }
+- if (sensorType == "fan_tach")
++ if (readingType == "Rotational")
+ {
+ return "RPM";
+ }
+- if (sensorType == "temperature")
++ if (readingType == "Temperature")
+ {
+ return "Cel";
+ }
+- if (sensorType == "fan_pwm" || sensorType == "utilization")
++ if (readingType == "Percent")
+ {
+ return "%";
+ }
+- if (sensorType == "altitude")
++ if (readingType == "Altitude")
+ {
+ return "m";
+ }
+- if (sensorType == "airflow")
++ if (readingType == "AirFlow")
+ {
+ return "cft_i/min";
+ }
+- if (sensorType == "energy")
++ if (readingType == "EnergyJoules")
+ {
+ return "J";
+ }
+ return "";
+ }
++
+ } // namespace sensors
+
+ /**
+@@ -953,11 +954,11 @@ inline void objectInterfacesToJson(
+ sensorJson["ReadingType"] = readingType;
+ }
+
+- const std::string& readingUnits = sensors::toReadingUnits(sensorType);
++ const std::string& readingUnits = sensors::toReadingUnits(readingType);
+ if (readingUnits.empty())
+ {
+ BMCWEB_LOG_ERROR << "Redfish cannot map reading unit for "
+- << sensorType;
++ << readingType;
+ }
+ else
+ {
diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp
index 9ec0737..de9c800 100644
--- a/redfish-core/lib/telemetry_service.hpp
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch
index 4119045f1..9b77c29df 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch
@@ -1,4 +1,4 @@
-From 0ed9ff4f37e7d3ea81073ad35acd530730104033 Mon Sep 17 00:00:00 2001
+From 206411b4c9b603e7b0edf63e03c0ef7bf10b09b2 Mon Sep 17 00:00:00 2001
From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
Date: Tue, 15 Dec 2020 12:30:31 +0100
Subject: [PATCH] Sync Telmetry service with EventService
@@ -22,7 +22,7 @@ Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
2 files changed, 69 insertions(+), 115 deletions(-)
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index c3c110a..dc99cda 100644
+index a1761bb..0e2ebfd 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -14,6 +14,7 @@
@@ -33,7 +33,7 @@ index c3c110a..dc99cda 100644
#include "node.hpp"
#include "registries.hpp"
#include "registries/base_message_registry.hpp"
-@@ -529,47 +530,32 @@ class Subscription
+@@ -523,47 +524,32 @@ class Subscription
}
#endif
@@ -92,7 +92,7 @@ index c3c110a..dc99cda 100644
this->sendEvent(
msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
}
-@@ -1421,75 +1407,6 @@ class EventServiceManager
+@@ -1359,75 +1345,6 @@ class EventServiceManager
}
#endif
@@ -168,7 +168,7 @@ index c3c110a..dc99cda 100644
void unregisterMetricReportSignal()
{
if (matchTelemetryMonitor)
-@@ -1509,9 +1426,11 @@ class EventServiceManager
+@@ -1447,9 +1364,11 @@ class EventServiceManager
}
BMCWEB_LOG_DEBUG << "Metrics report signal - Register";
@@ -183,7 +183,7 @@ index c3c110a..dc99cda 100644
matchTelemetryMonitor = std::make_shared<sdbusplus::bus::match::match>(
*crow::connections::systemBus, matchStr,
-@@ -1522,10 +1441,43 @@ class EventServiceManager
+@@ -1460,10 +1379,43 @@ class EventServiceManager
return;
}
@@ -291,5 +291,4 @@ index ad15a05..18a6dcc 100644
telemetry::service, reportPath,
"org.freedesktop.DBus.Properties", "Get",
--
-2.17.1
-
+2.25.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch
new file mode 100644
index 000000000..645351a51
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch
@@ -0,0 +1,26 @@
+From dc7e43c70285596195efd9d328b303091794278c Mon Sep 17 00:00:00 2001
+From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
+Date: Mon, 31 May 2021 10:08:57 +0000
+Subject: [PATCH] Revert "Remove LogService from TelemetryService"
+
+This reverts commit 2b3da45876aac57a36d3093379a992d699e7e396.
+---
+ redfish-core/lib/telemetry_service.hpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp
+index de9c800..f05bf6d 100644
+--- a/redfish-core/lib/telemetry_service.hpp
++++ b/redfish-core/lib/telemetry_service.hpp
+@@ -38,6 +38,8 @@ class TelemetryService : public Node
+ "/redfish/v1/TelemetryService/MetricReportDefinitions";
+ asyncResp->res.jsonValue["MetricReports"]["@odata.id"] =
+ "/redfish/v1/TelemetryService/MetricReports";
++ asyncResp->res.jsonValue["LogService"]["@odata.id"] =
++ "/redfish/v1/Managers/bmc/LogServices/Journal";
+
+ crow::connections::systemBus->async_method_call(
+ [asyncResp](
+--
+2.25.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch
new file mode 100644
index 000000000..ffab743f6
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch
@@ -0,0 +1,29 @@
+From 0ca8c383db8c9afbce63380955a20ada0acc20b7 Mon Sep 17 00:00:00 2001
+From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
+Date: Wed, 2 Jun 2021 12:44:43 +0000
+Subject: [PATCH] event service fix, added Context field to response
+
+Tested:
+ - Context field is present
+ - No regression detected
+
+Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
+---
+ redfish-core/include/event_service_manager.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
+index 2b957ea..289886b 100644
+--- a/redfish-core/include/event_service_manager.hpp
++++ b/redfish-core/include/event_service_manager.hpp
+@@ -556,6 +556,7 @@ class Subscription
+ << id;
+ return;
+ }
++ msg["Context"] = customText;
+
+ this->sendEvent(
+ msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
+--
+2.25.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 20c93c08e..ea6ac73bd 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
@@ -3,8 +3,13 @@ Until change is integrated they will be manually merged here to enable feature i
Current revisions:
- Add support for MetricDefinition scheme
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/72
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/80
- Sync Telmetry service with EventService
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/30
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/31
+- LogService field, actual implementation will be upstreamed with triggers feature
+ file://telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch
+
+- Event service fix for Context field
+ file://telemetry/0004-event-service-fix-added-Context-field-to-response.patch
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 7e9d42228..2a7221b7b 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 = "2ebb9683287cf6b1a2f2cc3c077bd99aceefa8dd"
+SRCREV = "eb75770c6c4369984cb150ded4f5ace410ed24a9"
DEPENDS += "boost-url"
RDEPENDS_${PN} += "phosphor-nslcd-authority-cert-config"
@@ -22,6 +22,8 @@ SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \
file://0015-Add-state-sensor-messages-to-the-registry.patch \
file://0016-Fix-bmcweb-crashes-if-socket-directory-not-present.patch \
file://0017-Add-msg-registry-for-subscription-related-actions.patch \
+ file://0018-bmcweb-Add-BMC-Time-update-log-to-the-registry.patch \
+ file://0019-Add-generic-message-PropertySizeExceeded.patch \
"
# OOB Bios Config:
@@ -50,11 +52,14 @@ SRC_URI += "file://eventservice/0001-EventService-Fix-retry-handling-for-http-cl
file://eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch \
file://eventservice/0006-Add-EventService-SSE-filter-support.patch \
file://eventservice/0007-EventService-Log-events-for-subscription-actions.patch \
+ file://eventservice/0008-Add-checks-on-Event-Subscription-input-parameters.patch \
"
# Temporary downstream mirror of upstream patches, see telemetry\README for details
-SRC_URI += " file://telemetry/0003-Add-support-for-MetricDefinition-scheme.patch \
- file://telemetry/0004-Sync-Telmetry-service-with-EventService.patch \
+SRC_URI += " file://telemetry/0001-Add-support-for-MetricDefinition-scheme.patch \
+ file://telemetry/0002-Sync-Telmetry-service-with-EventService.patch \
+ file://telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch \
+ file://telemetry/0004-event-service-fix-added-Context-field-to-response.patch \
"
# Temporary fix: Move it to service file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch
new file mode 100644
index 000000000..f24d585a9
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch
@@ -0,0 +1,94 @@
+From 1b01638d44ebb5d6163899775dea2fcc7e0715d6 Mon Sep 17 00:00:00 2001
+From: Helen Huang <he.huang@intel.com>
+Date: Mon, 31 May 2021 09:19:55 +0800
+Subject: [PATCH] Add log count limitation to requestAdd()
+
+To avoid log storm, add the log count limitation to
+requestAdd().
+
+Change-Id: I91894ff07fa252ed7746816535611a33b6f640ea
+Signed-off-by: Helen Huang <he.huang@intel.com>
+---
+ ipmbbridged.cpp | 44 ++++++++++++++++++++++++++++++++++++++------
+ ipmbbridged.hpp | 3 +++
+ 2 files changed, 41 insertions(+), 6 deletions(-)
+
+diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
+index 6d1be04..93f5b2f 100644
+--- a/ipmbbridged.cpp
++++ b/ipmbbridged.cpp
+@@ -916,12 +916,44 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+
+ if (i2cRetryCnt == ipmbI2cNumberOfRetries)
+ {
+- std::string msgToLog =
+- "requestAdd: Sent to I2C failed after retries."
+- " busId=" +
+- std::to_string(ipmbBusId) + ", error=" + ec.message();
+- phosphor::logging::log<phosphor::logging::level::INFO>(
+- msgToLog.c_str());
++ if ((requestAddLogCount <= ipmbRequestAddLogLimit) ||
++ (!(requestAddLogCount % ipmbRequestAddLogInterval)) ||
++ (UINT_MAX == requestAddLogCount))
++ {
++ std::string msgToLog;
++ if (requestAddLogCount == ipmbRequestAddLogLimit)
++ {
++ msgToLog = "requestAdd: There are " +
++ std::to_string(ipmbRequestAddLogLimit - 1) +
++ " similiar logs."
++ " To avoid log storm, not all the logs for the "
++ "issue will be shown: ";
++ }
++ if (!(requestAddLogCount % ipmbRequestAddLogInterval) && (requestAddLogCount != 0))
++ {
++ msgToLog = "requestAdd: There are " +
++ std::to_string(requestAddLogCount) +
++ " similiar logs so far: ";
++ }
++ if (UINT_MAX == requestAddLogCount)
++ {
++ msgToLog = "requestAdd: There are " +
++ std::to_string(requestAddLogCount) +
++ " similiar logs,"
++ " The log count will be rolled back to zero: ";
++ }
++ msgToLog += "requestAdd: Sent to I2C failed after retries."
++ " busId=" +
++ std::to_string(ipmbBusId) +
++ ", error=" + ec.message();
++ phosphor::logging::log<phosphor::logging::level::INFO>(
++ msgToLog.c_str());
++ }
++ requestAddLogCount++;
++ }
++ else
++ {
++ requestAddLogCount = 0;
+ }
+
+ request->timer->expires_after(
+diff --git a/ipmbbridged.hpp b/ipmbbridged.hpp
+index c79ac63..eaba7ae 100644
+--- a/ipmbbridged.hpp
++++ b/ipmbbridged.hpp
+@@ -50,6 +50,8 @@ constexpr int ipmbMaxOutstandingRequestsCount = 64;
+ constexpr int ipmbNumberOfTries = 6;
+ constexpr uint64_t ipmbRequestRetryTimeout = 250; // ms
+
++constexpr int ipmbRequestAddLogLimit = 10;
++constexpr int ipmbRequestAddLogInterval = 100;
+ /**
+ * @brief Ipmb I2C communication
+ */
+@@ -313,6 +315,7 @@ class IpmbChannel
+ uint8_t ipmbBusId;
+ uint8_t channelIdx;
+
++ unsigned int requestAddLogCount = 0;
+ std::shared_ptr<IpmbCommandFilter> commandFilter;
+
+ // array storing outstanding requests
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
index 33392f3c1..a83e1f670 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -2,10 +2,11 @@ SRC_URI = "git://github.com/openbmc/ipmbbridge.git"
SRCREV = "8fe0abe6d9f69f735e93d7055687fce4b56e80bf"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-Add-dbus-method-SlotIpmbRequest.patch \
+ file://0002-Add-log-count-limitation-to-requestAdd.patch \
file://ipmb-channels.json \
"
do_install_append() {
install -D ${WORKDIR}/ipmb-channels.json \
${D}/usr/share/ipmbbridge
-} \ No newline at end of file
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-rakp12-Add-username-to-SessionInfo-interface.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-rakp12-Add-username-to-SessionInfo-interface.patch
new file mode 100644
index 000000000..89a111d06
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-rakp12-Add-username-to-SessionInfo-interface.patch
@@ -0,0 +1,49 @@
+From 20bf13de482b02a4a467f44070f7ff184c340dd2 Mon Sep 17 00:00:00 2001
+From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+Date: Tue, 1 Jun 2021 12:22:19 +0000
+Subject: [PATCH] rakp12: Add username to SessionInfo interface
+
+Add username to SessionInfo interface to get username info on individual
+IPMI session Id's on Redfish
+
+Tested:
+1. Activate SOL session
+Command: ipmitool -I lanplus -U root -P 0penBmc -H <BMC_IP> -C 17
+ sol activate
+Response: // Success
+2. Verified on SessionInfo D-bus interface.
+busctl introspect xyz.openbmc_project.Ipmi.Channel.eth0
+ /xyz/openbmc_project/ipmi/session/eth0/<session_id>
+NAME TYPE SIGNATURE RESULT/VALUE FLAGS
+......
+xyz.openbmc_project.Ipmi.SessionInfo interface - - -
+.ChannelNum property y 3 emits-change writable
+.CurrentPrivilege property y 4 emits-change writable
+.RemoteIPAddr property u 22253066 emits-change writable
+.RemoteMACAddress property ay 0 emits-change writable
+.RemotePort property q 41096 emits-change writable
+.SessionHandle property y 129 emits-change writable
+.State property y 2 emits-change writable
+.UserID property y 1 emits-change writable
+.Username property s "root" emits-change writable
+
+Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+---
+ command/rakp12.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/command/rakp12.cpp b/command/rakp12.cpp
+index 099c5dc..98b6891 100644
+--- a/command/rakp12.cpp
++++ b/command/rakp12.cpp
+@@ -227,6 +227,7 @@ std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload,
+ }
+ session->channelNum(chNum);
+ session->userID(userId);
++ session->username(userName);
+ // minimum privilege of Channel / User / session::privilege::USER
+ // has to be used as session current privilege level
+ uint8_t minPriv = 0;
+--
+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 56b581ce7..7a36ac50e 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 = "7b645018775b85a0c61148e592d951841809eef9"
+SRCREV = "ecc8efad10bc2101a434a0c1fbd253eeaa1a3a99"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
@@ -22,6 +22,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://10-nice-rules.conf \
file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \
file://0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch \
+ file://0012-rakp12-Add-username-to-SessionInfo-interface.patch \
"
do_install_append() {
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
index 8a6911345..d5c1888b3 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicat
with Management Engine via IPMB"
SRC_URI = "git://github.com/Intel-BMC/node-manager;protocol=ssh"
-SRCREV = "1b243b3bfa5a3523a6ca9805626c8cf045146697"
+SRCREV = "23590b428ea26e0ed4b8225015471b962e3b3704"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend
index 48f72ab36..15673c0bf 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend
@@ -1,3 +1,5 @@
SRC_URI = "git://github.com/openbmc/peci-pcie"
-SRCREV = "d570dfd4f3a7c38b029f74a8194eeb3911b5f6a5"
+SRCREV = "6f55203b70316baec228073abcd581b64985af93"
+
+EXTRA_OECMAKE += "-DWAIT_FOR_OS_STANDBY=1 -DUSE_RDENDPOINTCFG=1"
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 6881a8065..8d965268f 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 = "807b80296c9793900f46ba5675e5e739fc18dafd"
+SRCREV = "ba0ec42a97e5e87c04b67473e32f14b7bdc7e930"
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 67b7d2b42..cc611e3db 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 = "0b73929a2116d9e1386e7e95190787bed7e715a8"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
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 7527e949d..78c5d7823 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 = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
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 f9c2adcb5..7a8bd2bc4 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 = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
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 78244d0ba..4588c399b 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 = "e850d4ad2f72698e51f0a95bb949aa7a6055ccd6"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
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 055b9b7e4..aa9eb1fac 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 = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
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 2f0e2c8e7..965ed2543 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 = "f3ba26e5fd3542d3c30b1069c4c1439a637f42ba"
+SRCREV = "a7b519e7e67b45aec7022c7fb608bcd9a4b9c91b"
S = "${WORKDIR}/git"
PV = "1.0+git${SRCPV}"
@@ -14,4 +14,4 @@ inherit meson systemd
SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.nvme-mi.service"
DEPENDS = "boost sdbusplus systemd phosphor-logging mctpwplus googletest nlohmann-json"
-EXTRA_OEMESON = "-Dyocto_dep='enabled' -Dtests='enabled'"
+EXTRA_OEMESON = "-Dyocto_dep='enabled'"
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 3d747004a..d2790db29 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 = "0b73929a2116d9e1386e7e95190787bed7e715a8"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
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 1ad639ba1..b9bf23609 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 = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
+SRCREV = "7c8ae26530a7634ed75cf28f52fb97431bd046ce"
S = "${WORKDIR}/git/pmci_launcher"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch
index c9175fd64..6815b5563 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch
@@ -1,105 +1,109 @@
-From 17e3ed85f2ff919ff52b4a3fe7a1eb0026f28898 Mon Sep 17 00:00:00 2001
+From 235bb8a9b809c2449e3f5bf4e999db881012c144 Mon Sep 17 00:00:00 2001
From: Zhikui Ren <zhikui.ren@intel.com>
-Date: Thu, 24 Sep 2020 14:27:32 -0700
-Subject: [PATCH] Fix missing threshold de-assert event when threshold changes.
+Date: Tue, 22 Jun 2021 11:35:12 -0700
+Subject: [PATCH] Fix missing de-assert event when threshold changes
+Issue:
Sensor can be re-constructed when sensor configuration changes
like a new threshold value. Threshold deassert can be missed
if the new threshold value fixes the alarm because the
default state for new threshold interface is de-asserted.
-Send threshold de-assert message after interfaces are initialized to
-ensure de-assert event is logged if there is an active assert
-event.
+
+Resolution:
+Add a member variable hadValidSensor that is initialized to false
+for new sensor. When hadValidSensor is false, threshold property changed
+message will be emitted even if threshold property did not change,
+If the previous sensor instance had the threshold raised,
+Phosphor-sel-logger would notice the change and log a de-assert event.
+If the previous sensor instance did not have the threshold raised,
+Phosphor-sel-logger would notice this is not a change and not create
+new SEL log.
+Set hadValidSensor to true when sensor value is updated with a value
+that is not NaN. This is done after threshold property changed message
+is emitted.
Tested:
-step1:
-busctl set-property xyz.openbmc_project.ADCSensor /xyz/openbmc_project/sensors/voltage/P3VBAT xyz.openbmc_project.Sensor.Threshold.Warning WarningLow d 2.457
-ipmitool sel list
-SEL has no entries
-step2:
-busctl set-property xyz.openbmc_project.ADCSensor /xyz/openbmc_project/sensors/voltage/P3VBAT xyz.openbmc_project.Sensor.Threshold.Warning WarningLow d 3.1
-ipmitool sel list
- 1 | 09/24/20 | 21:30:15 UTC | Voltage #0x2d | Lower Non-critical going low | Asserted
-step3:
-busctl set-property xyz.openbmc_project.ADCSensor /xyz/openbmc_project/sensors/voltage/P3VBAT xyz.openbmc_project.Sensor.Threshold.Warning WarningLow d 2.457
-ipmitool sel list
- 1 | 09/24/20 | 21:30:15 UTC | Voltage #0x2d | Lower Non-critical going low | Asserted
- 2 | 09/24/20 | 21:30:33 UTC | Voltage #0x2d | Lower Non-critical going low | Deasserted
+1. Change threshold value for a voltage sensor to force a SEL.
+ ipmitool raw 0x04 0x26 0x60 0x1b 0x95 0x6b 0x00 0x99 0xa6 0x00
+
+2. Verify SEL logged threshold assert event as expected
+ ipmitool sel list
+ 1 | Pre-Init |0000007277| Voltage #0x60 | Upper Non-critical going high | Asserted
+
+3. Use ipmitool to change threshold value back to normal
+ ipmitool raw 0x04 0x26 0x60 0x1b 0x95 0x6b 0x00 0xa4 0xa6 0x00
+
+4. Verify SEL logged threshold de-assert event as expected
+ ipmitool sel list
+ 1 | Pre-Init |0000007277| Voltage #0x60 | Upper Non-critical going high | Asserted
+ 2 | Pre-Init |0000007304| Voltage #0x60 | Upper Non-critical going high | Deasserted
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
-Change-Id: If28870ac1e0d09be4a631a3145408ec70390dfc5
---
- include/Thresholds.hpp | 5 ++++-
- include/sensor.hpp | 13 +++++++++++++
- src/ADCSensor.cpp | 1 +
- src/Thresholds.cpp | 15 +++++++++++++--
- 4 files changed, 31 insertions(+), 3 deletions(-)
+ include/Thresholds.hpp | 2 +-
+ include/sensor.hpp | 2 ++
+ src/Thresholds.cpp | 17 ++++++++++++++---
+ 3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/include/Thresholds.hpp b/include/Thresholds.hpp
-index ca2b0a0..c1d0baf 100644
+index af63f72..fd507d0 100644
--- a/include/Thresholds.hpp
+++ b/include/Thresholds.hpp
-@@ -45,7 +45,10 @@ struct Threshold
+@@ -44,7 +44,7 @@ struct Threshold
void assertThresholds(Sensor* sensor, double assertValue,
thresholds::Level level, thresholds::Direction direction,
- bool assert);
+ bool assert, bool force = false);
-+
-+void forceDeassertThresholds(Sensor* sensor, thresholds::Level level,
-+ thresholds::Direction direction);
struct TimerUsed
{
diff --git a/include/sensor.hpp b/include/sensor.hpp
-index 0ef87d5..d50b2ff 100644
+index b98241b..6235674 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
-@@ -312,6 +312,19 @@ struct Sensor
- operationalInterface->register_property("Functional", true);
- operationalInterface->initialize();
+@@ -71,6 +71,7 @@ struct Sensor
+ std::shared_ptr<sdbusplus::asio::dbus_interface> operationalInterface;
+ double value = std::numeric_limits<double>::quiet_NaN();
+ double rawValue = std::numeric_limits<double>::quiet_NaN();
++ bool hadValidValue = false;
+ bool overriddenState = false;
+ bool internalSet = false;
+ double hysteresisTrigger;
+@@ -432,6 +433,7 @@ struct Sensor
+ {
+ markFunctional(true);
+ markAvailable(true);
++ hadValidValue = true;
}
-+
-+ // Sensor can be reconstructed when sensor configuration changes
-+ // like a new threshold value. Threshold deassert can be missed
-+ // if the new threshold value fixes the alarm because
-+ // default state for new threshold interface is de-asserted.
-+ // Send threshold de-assert message during initialization to
-+ // ensure de-assert events are logged if there is an active assert
-+ // event.
-+ for (auto& threshold : thresholds)
-+ {
-+ thresholds::forceDeassertThresholds(this, threshold.level,
-+ threshold.direction);
-+ }
}
- bool readingStateGood()
-diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp
-index fe600d7..632fc8c 100644
---- a/src/ADCSensor.cpp
-+++ b/src/ADCSensor.cpp
-@@ -88,6 +88,7 @@ ADCSensor::~ADCSensor()
- // close the input dev to cancel async operations
- inputDev.close();
- waitTimer.cancel();
-+
- objServer.remove_interface(thresholdInterfaceWarning);
- objServer.remove_interface(thresholdInterfaceCritical);
- objServer.remove_interface(sensorInterface);
diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp
-index f4d4ed0..3c791c9 100644
+index bbe8e20..78ded55 100644
--- a/src/Thresholds.cpp
+++ b/src/Thresholds.cpp
-@@ -344,6 +344,7 @@ bool checkThresholds(Sensor* sensor)
+@@ -418,10 +418,19 @@ bool checkThresholds(Sensor* sensor)
{
bool status = true;
std::vector<ChangeParam> changes = checkThresholds(sensor, sensor->value);
+
++ // Sensor can be reconstructed when sensor configuration changes
++ // like a new threshold value. Threshold deassert can be missed
++ // if the new threshold value fixes the alarm because
++ // default state for new threshold interface is de-asserted.
++ // force sending assert/de-assert message when a not NaN value is updated
++ // for the first time even when threshold property did not change.
++ bool forceAssert = !sensor->hadValidValue;
for (const auto& change : changes)
{
assertThresholds(sensor, change.assertValue, change.threshold.level,
-@@ -392,7 +393,7 @@ void checkThresholdsPowerDelay(Sensor* sensor, ThresholdTimer& thresholdTimer)
+- change.threshold.direction, change.asserted);
++ change.threshold.direction, change.asserted,
++ forceAssert);
+ if (change.threshold.level == thresholds::Level::CRITICAL &&
+ change.asserted)
+ {
+@@ -473,7 +482,7 @@ void checkThresholdsPowerDelay(const std::weak_ptr<Sensor>& weakSensor,
void assertThresholds(Sensor* sensor, double assertValue,
thresholds::Level level, thresholds::Direction direction,
@@ -108,7 +112,7 @@ index f4d4ed0..3c791c9 100644
{
std::string property;
std::shared_ptr<sdbusplus::asio::dbus_interface> interface;
-@@ -432,7 +433,9 @@ void assertThresholds(Sensor* sensor, double assertValue,
+@@ -513,7 +522,9 @@ void assertThresholds(Sensor* sensor, double assertValue,
return;
}
@@ -119,21 +123,6 @@ index f4d4ed0..3c791c9 100644
{
try
{
-@@ -452,6 +455,14 @@ void assertThresholds(Sensor* sensor, double assertValue,
- }
- }
-
-+// Explicitely de-assert a threshold with existing sensor value
-+// Should only be called on sensor desctruction
-+void forceDeassertThresholds(Sensor* sensor, thresholds::Level level,
-+ thresholds::Direction direction)
-+{
-+ assertThresholds(sensor, sensor->value, level, direction, false, true);
-+}
-+
- bool parseThresholdsFromAttr(
- std::vector<thresholds::Threshold>& thresholdVector,
- const std::string& inputPath, const double& scaleFactor,
--
2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch
index fb38b0348..0a6e73708 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch
@@ -1,4 +1,4 @@
-From f516fc884fcbc03bf560b4ef975ad236232bd1e6 Mon Sep 17 00:00:00 2001
+From ba069b63307352ae0dc0a94a837306dc0bc51e94 Mon Sep 17 00:00:00 2001
From: Zhikui Ren <zhikui.ren@intel.com>
Date: Tue, 11 May 2021 11:14:55 -0700
Subject: [PATCH] CPUSensor: create RequiredTempSensor if defined
@@ -48,7 +48,7 @@ index 29b8209..5d09e4e 100644
static constexpr unsigned int sensorScaleFactor = 1000;
static constexpr unsigned int sensorPollMs = 1000;
diff --git a/src/CPUSensor.cpp b/src/CPUSensor.cpp
-index 7f9a2c5..7c29cf0 100644
+index c882698..277dd3f 100644
--- a/src/CPUSensor.cpp
+++ b/src/CPUSensor.cpp
@@ -99,6 +99,75 @@ CPUSensor::CPUSensor(const std::string& path, const std::string& objectType,
@@ -65,8 +65,8 @@ index 7f9a2c5..7c29cf0 100644
+ std::vector<thresholds::Threshold>&& thresholdsIn,
+ const std::string& sensorConfiguration) :
+ Sensor(boost::replace_all_copy(sensorName, " ", "_"),
-+ std::move(thresholdsIn), sensorConfiguration, objectType, 0, 0, conn,
-+ PowerState::on),
++ std::move(thresholdsIn), sensorConfiguration, objectType, false, 0,
++ 0, conn, PowerState::on),
+ objServer(objectServer), inputDev(io), waitTimer(io),
+ privTcontrol(std::numeric_limits<double>::quiet_NaN()), dtsOffset(0),
+ show(true), pollTime(CPUSensor::sensorPollMs), minMaxReadCounter(0)
@@ -128,10 +128,10 @@ index 7f9a2c5..7c29cf0 100644
{
// close the input dev to cancel async operations
diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
-index 92c1716..4c00551 100644
+index c565890..a28a5be 100644
--- a/src/CPUSensorMain.cpp
+++ b/src/CPUSensorMain.cpp
-@@ -332,10 +332,9 @@ bool createSensors(boost::asio::io_service& io,
+@@ -333,10 +333,9 @@ bool createSensors(boost::asio::io_service& io,
{
if (debug)
{
@@ -144,7 +144,7 @@ index 92c1716..4c00551 100644
}
// check hidden properties
-@@ -636,9 +635,9 @@ void detectCpuAsync(
+@@ -637,9 +636,9 @@ void detectCpuAsync(
});
}
@@ -156,7 +156,7 @@ index 92c1716..4c00551 100644
sdbusplus::asio::object_server& objectServer)
{
bool useCache = false;
-@@ -700,6 +699,45 @@ bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+@@ -701,6 +700,45 @@ bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
iface->register_property("Present", *present);
iface->initialize();
inventoryIfaces[name] = std::move(iface);
@@ -202,7 +202,7 @@ index 92c1716..4c00551 100644
}
auto findBus = config.second.find("Bus");
-@@ -728,7 +766,6 @@ bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+@@ -729,7 +767,6 @@ bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
std::cout << "name: " << name << "\n";
std::cout << "type: " << type << "\n";
}
@@ -210,7 +210,7 @@ index 92c1716..4c00551 100644
cpuConfigs.emplace(bus, addr, name, State::OFF);
}
}
-@@ -764,7 +801,8 @@ int main()
+@@ -765,7 +802,8 @@ int main()
return; // we're being canceled
}
@@ -220,7 +220,7 @@ index 92c1716..4c00551 100644
{
detectCpuAsync(pingTimer, creationTimer, io, objectServer,
systemBus, cpuConfigs, sensorConfigs);
-@@ -792,7 +830,7 @@ int main()
+@@ -793,7 +831,7 @@ int main()
return; // we're being canceled
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0007-Add-support-for-the-energy-hwmon-type.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0007-Add-support-for-the-energy-hwmon-type.patch
new file mode 100644
index 000000000..dbe851fde
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0007-Add-support-for-the-energy-hwmon-type.patch
@@ -0,0 +1,267 @@
+From b839028a4dda6fcec027f3a26887e0de0e8172bb Mon Sep 17 00:00:00 2001
+From: Szymon Dompke <szymon.dompke@intel.com>
+Date: Tue, 18 May 2021 05:22:33 +0200
+Subject: [PATCH] Add support for the energy hwmon type
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With this commit CPUSensors should be able detect hwmon files of type
+‘energy’ described here:
+
+ https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
+
+These files hold a cumulative energy [micro Joule].
+Values read from these type of files will be exposed on dbus as a new
+sensor. An example:
+
+└─/xyz
+ └─/xyz/openbmc_project
+ └─/xyz/openbmc_project/sensors
+ ├─/xyz/openbmc_project/sensors/energy
+ │ └─/xyz/openbmc_project/sensors/energy/Cumulative_Energy_CPU1
+
+The energy counter will have different scale factor and different
+default min/max values than other types of CPU sensors (power/temp).
+
+Tested:
+ Tested on physical machine where the `energy_input` files were present,
+ works as desired no regression detected.
+
+Authored-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
+Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
+---
+ include/CPUSensor.hpp | 13 ++++++--
+ src/CPUSensor.cpp | 69 +++++++++++++++----------------------------
+ src/CPUSensorMain.cpp | 30 ++++++++++++++++---
+ 3 files changed, 60 insertions(+), 52 deletions(-)
+
+diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
+index 5d09e4e..cb3742a 100644
+--- a/include/CPUSensor.hpp
++++ b/include/CPUSensor.hpp
+@@ -16,6 +16,15 @@
+ #include <variant>
+ #include <vector>
+
++struct SensorProperties
++{
++ std::string path;
++ std::string units;
++ double max;
++ double min;
++ unsigned int scaleFactor;
++};
++
+ class CPUSensor : public Sensor
+ {
+ public:
+@@ -25,7 +34,7 @@ class CPUSensor : public Sensor
+ boost::asio::io_service& io, const std::string& sensorName,
+ std::vector<thresholds::Threshold>&& thresholds,
+ const std::string& configuration, int cpuId, bool show,
+- double dtsOffset);
++ double dtsOffset, const SensorProperties& sensorProperties);
+
+ // Create a CPUSensor without a path to sensor value
+ CPUSensor(const std::string& objectType,
+@@ -36,7 +45,6 @@ class CPUSensor : public Sensor
+ const std::string& sensorConfiguration);
+
+ ~CPUSensor() override;
+- static constexpr unsigned int sensorScaleFactor = 1000;
+ static constexpr unsigned int sensorPollMs = 1000;
+ static constexpr size_t warnAfterErrorCount = 10;
+ static constexpr const char* labelTcontrol = "Tcontrol";
+@@ -54,6 +62,7 @@ class CPUSensor : public Sensor
+ size_t pollTime;
+ bool loggedInterfaceDown = false;
+ uint8_t minMaxReadCounter;
++ unsigned int scaleFactor;
+ void setupRead(void);
+ void handleResponse(const boost::system::error_code& err);
+ void checkThresholds(void) override;
+diff --git a/src/CPUSensor.cpp b/src/CPUSensor.cpp
+index 277dd3f..0621e04 100644
+--- a/src/CPUSensor.cpp
++++ b/src/CPUSensor.cpp
+@@ -39,59 +39,37 @@ CPUSensor::CPUSensor(const std::string& path, const std::string& objectType,
+ boost::asio::io_service& io, const std::string& sensorName,
+ std::vector<thresholds::Threshold>&& thresholdsIn,
+ const std::string& sensorConfiguration, int cpuId,
+- bool show, double dtsOffset) :
++ bool show, double dtsOffset,
++ const SensorProperties& sensorProperties) :
+ Sensor(boost::replace_all_copy(sensorName, " ", "_"),
+- std::move(thresholdsIn), sensorConfiguration, objectType, false, 0,
+- 0, conn, PowerState::on),
++ std::move(thresholdsIn), sensorConfiguration, objectType, false,
++ sensorProperties.max, sensorProperties.min, conn, PowerState::on),
+ objServer(objectServer), inputDev(io), waitTimer(io), path(path),
+ privTcontrol(std::numeric_limits<double>::quiet_NaN()),
+ dtsOffset(dtsOffset), show(show), pollTime(CPUSensor::sensorPollMs),
+- minMaxReadCounter(0)
++ minMaxReadCounter(0), scaleFactor(sensorProperties.scaleFactor)
+ {
+ nameTcontrol = labelTcontrol;
+ nameTcontrol += " CPU" + std::to_string(cpuId);
+ if (show)
+ {
+- if (auto fileParts = splitFileName(path))
++ std::string interfacePath = sensorProperties.path + name;
++ sensorInterface = objectServer.add_interface(
++ interfacePath, "xyz.openbmc_project.Sensor.Value");
++ if (thresholds::hasWarningInterface(thresholds))
+ {
+- auto& [type, nr, item] = *fileParts;
+- std::string interfacePath;
+- const char* units;
+- if (type.compare("power") == 0)
+- {
+- interfacePath = "/xyz/openbmc_project/sensors/power/" + name;
+- units = sensor_paths::unitWatts;
+- minValue = 0;
+- maxValue = 511;
+- }
+- else
+- {
+- interfacePath =
+- "/xyz/openbmc_project/sensors/temperature/" + name;
+- units = sensor_paths::unitDegreesC;
+- minValue = -128;
+- maxValue = 127;
+- }
+-
+- sensorInterface = objectServer.add_interface(
+- interfacePath, "xyz.openbmc_project.Sensor.Value");
+- if (thresholds::hasWarningInterface(thresholds))
+- {
+- thresholdInterfaceWarning = objectServer.add_interface(
+- interfacePath,
+- "xyz.openbmc_project.Sensor.Threshold.Warning");
+- }
+- if (thresholds::hasCriticalInterface(thresholds))
+- {
+- thresholdInterfaceCritical = objectServer.add_interface(
+- interfacePath,
+- "xyz.openbmc_project.Sensor.Threshold.Critical");
+- }
+- association = objectServer.add_interface(interfacePath,
+- association::interface);
+-
+- setInitialProperties(conn, units);
++ thresholdInterfaceWarning = objectServer.add_interface(
++ interfacePath, "xyz.openbmc_project.Sensor.Threshold.Warning");
++ }
++ if (thresholds::hasCriticalInterface(thresholds))
++ {
++ thresholdInterfaceCritical = objectServer.add_interface(
++ interfacePath, "xyz.openbmc_project.Sensor.Threshold.Critical");
+ }
++ association =
++ objectServer.add_interface(interfacePath, association::interface);
++
++ setInitialProperties(conn, sensorProperties.units);
+ }
+
+ // call setup always as not all sensors call setInitialProperties
+@@ -248,7 +226,7 @@ void CPUSensor::updateMinMaxValues(void)
+ auto& [suffix, oldValue, dbusName, newValue] = vectorItem;
+ auto attrPath = boost::replace_all_copy(path, fileItem, suffix);
+
+- if(auto tmp = readFile(attrPath, CPUSensor::sensorScaleFactor))
++ if (auto tmp = readFile(attrPath, scaleFactor))
+ {
+ newValue.get() = *tmp;
+ }
+@@ -302,7 +280,7 @@ void CPUSensor::handleResponse(const boost::system::error_code& err)
+ std::getline(responseStream, response);
+ rawValue = std::stod(response);
+ responseStream.clear();
+- double nvalue = rawValue / CPUSensor::sensorScaleFactor;
++ double nvalue = rawValue / scaleFactor;
+
+ if (show)
+ {
+@@ -328,8 +306,7 @@ void CPUSensor::handleResponse(const boost::system::error_code& err)
+ {
+ std::vector<thresholds::Threshold> newThresholds;
+ if (parseThresholdsFromAttr(newThresholds, path,
+- CPUSensor::sensorScaleFactor,
+- dtsOffset))
++ scaleFactor, dtsOffset))
+ {
+ if (!std::equal(thresholds.begin(), thresholds.end(),
+ newThresholds.begin(),
+diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
+index a28a5be..baa2bb6 100644
+--- a/src/CPUSensorMain.cpp
++++ b/src/CPUSensorMain.cpp
+@@ -94,6 +94,18 @@ static constexpr std::array<const char*, 1> sensorTypes = {"XeonCPU"};
+ static constexpr std::array<const char*, 3> hiddenProps = {
+ CPUSensor::labelTcontrol, "Tthrottle", "Tjmax"};
+
++static const boost::container::flat_map<std::string, SensorProperties>
++ sensorPropertiesMap = {
++ {"power",
++ {"/xyz/openbmc_project/sensors/power/", sensor_paths::unitWatts, 511,
++ 0, 1000}},
++ {"energy",
++ {"/xyz/openbmc_project/sensors/energy/", sensor_paths::unitJoules,
++ std::numeric_limits<uint32_t>::max() / 1000000, 0.0, 1000000}},
++ {"temp",
++ {"/xyz/openbmc_project/sensors/temperature/",
++ sensor_paths::unitDegreesC, 127.0, -128.0, 1000}}};
++
+ void detectCpuAsync(
+ boost::asio::deadline_timer& pingTimer,
+ boost::asio::deadline_timer& creationTimer, boost::asio::io_service& io,
+@@ -297,7 +309,8 @@ bool createSensors(boost::asio::io_service& io,
+
+ auto directory = hwmonNamePath.parent_path();
+ std::vector<fs::path> inputPaths;
+- if (!findFiles(directory, R"((temp|power)\d+_(input|average|cap)$)",
++ if (!findFiles(directory,
++ R"((temp|power|energy)\d+_(input|average|cap)$)",
+ inputPaths, 0))
+ {
+ std::cerr << "No temperature sensors in system\n";
+@@ -365,6 +378,16 @@ bool createSensors(boost::asio::io_service& io,
+ }
+ }
+
++ const auto& it = sensorPropertiesMap.find(type);
++ if (it == sensorPropertiesMap.end())
++ {
++ std::cerr
++ << "Failure getting sensor properties for sensor type: "
++ << type << "\n";
++ continue;
++ }
++ const SensorProperties& prop = it->second;
++
+ std::vector<thresholds::Threshold> sensorThresholds;
+ std::string labelHead = label.substr(0, label.find(' '));
+ parseThresholdsFromConfig(*sensorData, sensorThresholds,
+@@ -372,8 +395,7 @@ bool createSensors(boost::asio::io_service& io,
+ if (sensorThresholds.empty())
+ {
+ if (!parseThresholdsFromAttr(sensorThresholds, inputPathStr,
+- CPUSensor::sensorScaleFactor,
+- dtsOffset))
++ prop.scaleFactor, dtsOffset))
+ {
+ std::cerr << "error populating thresholds for "
+ << sensorName << "\n";
+@@ -385,7 +407,7 @@ bool createSensors(boost::asio::io_service& io,
+ sensorPtr = std::make_unique<CPUSensor>(
+ inputPathStr, sensorType, objectServer, dbusConnection, io,
+ sensorName, std::move(sensorThresholds), *interfacePath, cpuId,
+- show, dtsOffset);
++ show, dtsOffset, prop);
+ createdSensors.insert(sensorName);
+ if (debug)
+ {
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0008-CPUSensor-additional-debug-message.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0008-CPUSensor-additional-debug-message.patch
new file mode 100644
index 000000000..40c8d46bd
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0008-CPUSensor-additional-debug-message.patch
@@ -0,0 +1,69 @@
+From c045d0ace218a8f0c9e9af0b04aed24ec733fc79 Mon Sep 17 00:00:00 2001
+From: Zhikui Ren <zhikui.ren@intel.com>
+Date: Tue, 22 Jun 2021 14:49:44 -0700
+Subject: [PATCH] CPUSensor: additional debug message
+
+Add debug message to capture more information on threshold changes.
+
+Example output - DTS threshold changes when Tcontrol was first read
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: Core_16_CPU1: Tcontrol changed from nan to 92
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: Core_22_CPU1: Tcontrol changed from nan to 92
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: Core_24_CPU1: Tcontrol changed from nan to 92
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: DTS_CPU1: Tcontrol changed from nan to 92
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: Threshold: /sys/bus/peci/devices/peci-0/0-30/peci-cputemp.0/hwmon/hwmon12/temp2_max: 92
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: Threshold: /sys/bus/peci/devices/peci-0/0-30/peci-cputemp.0/hwmon/hwmon12/temp2_crit: 100
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: DTS_CPU1: new threshold value 92
+ Jan 01 00:06:06 intel-obmc cpusensor[461]: DTS_CPU1: new threshold value 100
+
+The above message will be logged when BMC reset or host resets.
+
+Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
+---
+ src/CPUSensor.cpp | 5 +++++
+ src/Thresholds.cpp | 7 ++-----
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/CPUSensor.cpp b/src/CPUSensor.cpp
+index 0621e04..65acdac 100644
+--- a/src/CPUSensor.cpp
++++ b/src/CPUSensor.cpp
+@@ -300,6 +300,7 @@ void CPUSensor::handleResponse(const boost::system::error_code& err)
+ : std::numeric_limits<double>::quiet_NaN();
+ if (gTcontrol != privTcontrol)
+ {
++ std::cout << name << ": Tcontrol changed from " << privTcontrol << " to " << gTcontrol << "\n";
+ privTcontrol = gTcontrol;
+
+ if (!thresholds.empty())
+@@ -318,6 +319,10 @@ void CPUSensor::handleResponse(const boost::system::error_code& err)
+ thresholds::updateThresholds(this);
+ }
+ }
++ for (auto& threshold : thresholds)
++ {
++ std::cout << name << ": new threshold value " << threshold.value << "\n";
++ }
+ }
+ else
+ {
+diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp
+index 78ded55..283dacf 100644
+--- a/src/Thresholds.cpp
++++ b/src/Thresholds.cpp
+@@ -583,11 +583,8 @@ bool parseThresholdsFromAttr(
+ if (auto val = readFile(attrPath, scaleFactor))
+ {
+ *val += offset;
+- if (debug)
+- {
+- std::cout << "Threshold: " << attrPath << ": " << *val
+- << "\n";
+- }
++ std::cout << "Threshold: " << attrPath << ": " << *val
++ << "\n";
+ thresholdVector.emplace_back(level, direction, *val);
+ }
+ }
+--
+2.17.1
+
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 361e425e5..95c9000c3 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 = "13b63f8f597d396db8b5bd182ac2e5814d599e2f"
+SRCREV = "8685b17ab14a187eae08399153b9ec6bace2ab9b"
#SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
SRC_URI += "\
@@ -12,6 +12,8 @@ SRC_URI += "\
file://0004-Fan-Tach-Sensor-Threshold-Ignore-Zero.patch \
file://0005-Fix-PECI-ioctl-number.patch \
file://0006-CPUSensor-create-RequirediTempSensor-if-defined.patch \
+ file://0007-Add-support-for-the-energy-hwmon-type.patch \
+ file://0008-CPUSensor-additional-debug-message.patch \
"
DEPENDS_append = " libgpiod libmctp"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
index 6acbfff37..275963595 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
@@ -1,7 +1,7 @@
SUMMARY = "Settings"
SRC_URI = "git://github.com/Intel-BMC/settings.git;protocol=ssh"
-SRCREV = "1bdbb05873b5790bd56b683ce8ddf1a02a6795e7"
+SRCREV = "1a39605ff52db92048df733181eda8fcfe18ce2f"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
index adcdd0588..e566f3ea6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/special-mode-manager.git;protocol=ssh"
-SRCREV = "4f4f122790b999dc7db973a80727dbc1ca785e57"
+SRCREV = "5f413eec673f3e6e5e754e2c55048abf0a146e5b"
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-post-code-manager_git.bbappend
index ebb498866..8732ccd40 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 = "0171dd6bce9004e187c957f160809b729322f37d"
+SRCREV = "aed7b3de090005433b16ca986ed3df4dbc81446f"
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 34a93fb6c..3183745ce 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 = "32859b634e366a015331fb8ab62766340df9c7b8"
+SRCREV = "4ab1d496d8a50d0466afb7f49668c40758bfe6a9"
EXTRA_OEMESON += " -Dmax-reports=10"
EXTRA_OEMESON += " -Dmax-reading-parameters=200"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
index dfd980a2b..a7f431049 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
@@ -1,13 +1,14 @@
-From 6fd1c797ec7440551052e8fc638d06313c9d6836 Mon Sep 17 00:00:00 2001
+From 75971b8faf7ef7af7285ba7d5207be71c66e5d11 Mon Sep 17 00:00:00 2001
From: Radivoje Jovanovic <radivoje.jovanovic@intel.com>
Date: Mon, 2 Jul 2018 19:23:25 -0700
-Subject: [PATCH 1/2] Added suport for multiple user manager services
+Subject: [PATCH] Added suport for multiple user manager services
Support added for SSSD service implementation
Signed-off-by: Alberto Salazar Perez <alberto.salazar.perez@intel.com>
Signed-off-by: Radivoje Jovanovic <radivoje.jovanovic@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
+Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
---
Makefile.am | 5 +-
mainapp.cpp | 90 +++++-
@@ -20,7 +21,7 @@ Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.co
create mode 100644 user_service.hpp
diff --git a/Makefile.am b/Makefile.am
-index 7c7271e..58916b0 100644
+index 1dbd594..fe47aaf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,12 @@
@@ -151,7 +152,7 @@ index e08da61..f4b7f8c 100644
// Claim the bus now
bus.request_name(USER_MANAGER_BUSNAME);
diff --git a/user_mgr.cpp b/user_mgr.cpp
-index c65a822..eed81aa 100644
+index 1b14e8e..f6f2fdb 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -18,43 +18,34 @@
@@ -285,7 +286,7 @@ index c65a822..eed81aa 100644
throwForInvalidPrivilege(priv);
throwForInvalidGroups(groupNames);
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
throwForUserExists(userName);
throwForUserNameConstraints(userName, groupNames);
throwForMaxGrpUserCount(groupNames);
@@ -328,7 +329,7 @@ index c65a822..eed81aa 100644
void UserMgr::deleteUser(std::string userName)
{
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
throwForUserDoesNotExist(userName);
- try
- {
@@ -352,7 +353,7 @@ index c65a822..eed81aa 100644
void UserMgr::renameUser(std::string userName, std::string newUserName)
{
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
throwForUserDoesNotExist(userName);
throwForUserExists(newUserName);
throwForUserNameConstraints(newUserName,
@@ -380,7 +381,7 @@ index c65a822..eed81aa 100644
throwForInvalidPrivilege(priv);
throwForInvalidGroups(groupNames);
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
throwForUserDoesNotExist(userName);
const std::vector<std::string>& oldGroupNames =
usersList[userName].get()->userGroups();
@@ -421,7 +422,7 @@ index c65a822..eed81aa 100644
void UserMgr::userEnable(const std::string& userName, bool enabled)
{
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
throwForUserDoesNotExist(userName);
- try
- {
@@ -443,7 +444,7 @@ index c65a822..eed81aa 100644
UserSSHLists UserMgr::getUserAndSshGrpList()
{
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
-
- std::vector<std::string> userList;
- std::vector<std::string> sshUsersList;
@@ -500,7 +501,7 @@ index c65a822..eed81aa 100644
bool UserMgr::isUserEnabled(const std::string& userName)
{
- // All user management lock has to be based on /etc/shadow
-- phosphor::user::shadow::Lock lock();
+- // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
- std::array<char, 4096> buffer{};
- struct spwd spwd;
- struct spwd* resultPtr = nullptr;
@@ -552,7 +553,7 @@ index c65a822..eed81aa 100644
@@ -1106,11 +866,9 @@ void UserMgr::initUserObjects(void)
{
// All user management lock has to be based on /etc/shadow
- phosphor::user::shadow::Lock lock();
+ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
- std::vector<std::string> userNameList;
- std::vector<std::string> sshGrpUsersList;
UserSSHLists userSSHLists = getUserAndSshGrpList();
@@ -628,7 +629,7 @@ index f5aac22..5d5ca99 100644
"priv-user", "priv-noaccess"};
diff --git a/user_service.cpp b/user_service.cpp
new file mode 100644
-index 0000000..ad4e510
+index 0000000..6e11755
--- /dev/null
+++ b/user_service.cpp
@@ -0,0 +1,789 @@
@@ -726,7 +727,7 @@ index 0000000..ad4e510
+ phosphor::user::UserSSHLists getUserAndSshGrpList() const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+
+ std::vector<std::string> userList;
+ std::vector<std::string> sshUsersList;
@@ -812,7 +813,7 @@ index 0000000..ad4e510
+ const std::string& priv, const bool& enabled) const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+
+ std::string groups = getCSVFromVector(groupNames);
+ bool sshRequested = removeStringFromCSV(groups, phosphor::user::grpSsh);
@@ -847,7 +848,7 @@ index 0000000..ad4e510
+ const std::string& newUserName) const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+ try
+ {
+ std::string newHomeDir = "/home/" + newUserName;
@@ -867,7 +868,7 @@ index 0000000..ad4e510
+ void deleteUser(const std::string& userName) const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+
+ try
+ {
@@ -888,7 +889,7 @@ index 0000000..ad4e510
+ const std::string& priv) const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+
+ std::string groups = getCSVFromVector(groupNames);
+ bool sshRequested = removeStringFromCSV(groups, phosphor::user::grpSsh);
@@ -922,7 +923,7 @@ index 0000000..ad4e510
+ const bool& enabled) const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+ try
+ {
+ phosphor::user::executeCmd("/usr/sbin/usermod", userName.c_str(),
@@ -939,7 +940,7 @@ index 0000000..ad4e510
+ bool isUserEnabled(const std::string& userName) const override
+ {
+ // All user management lock has to be based on /etc/shadow
-+ phosphor::user::shadow::Lock lock();
++ // TODO phosphor-user-manager#10 phosphor::user::shadow::Lock lock{};
+ std::array<char, 4096> buffer{};
+ struct spwd spwd;
+ struct spwd* resultPtr = nullptr;
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 43fd25df4..c0d4215a0 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 = "e6500a493a156dd58a92b384c77aef2cbd3addac"
+SRCREV = "607ed50ae1c4817969a117d951a3e90f686fbde0"
EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}"
@@ -9,3 +9,8 @@ SRC_URI += " \
file://0005-Added-suport-for-multiple-user-manager-services.patch \
file://0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch \
"
+
+FILES_${PN} += "/dbus-1/system.d/phosphor-nslcd-cert-config.conf"
+FILES_${PN} += "/usr/share/phosphor-certificate-manager/nslcd"
+FILES_${PN} += "\
+ /lib/systemd/system/multi-user.target.wants/phosphor-certificate-manager@nslcd.service" \ No newline at end of file
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 244af18dc..36b155fe9 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 = "40dd78bd5fe1dfcadd22bba9eee8e402b634b40d"
+SRCREV = "2397c142c0d75c7705757a52848945b00928232d"
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 618f4dddb..398dced5c 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 = "71114feb9a800d42f6eeddfa477077a8ab8e44f6"
+SRCREV = "240c056c8989c5e3e0f0ff640f38f3e4cdbc6ac5"
do_compile_prepend() {
cp -vf ${S}/.env.intel ${S}/.env
diff --git a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb
index 83e1a81e4..bd7d8005c 100644
--- a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb
+++ b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.76.0.bb
@@ -63,6 +63,11 @@ EXTRA_OECONF = " \
--disable-curldebug \
"
+# Move to ssl as TLS backend for cipher suite limitation support.
+# It does not work with gnutls backend.
+PACKAGECONFIG_remove = "gnutls"
+PACKAGECONFIG += "ssl"
+
do_install_append_class-target() {
# cleanup buildpaths from curl-config
sed -i \
diff --git a/meta-openbmc-mods/meta-common/recipes-support/gnutls/gnutls_%.bbappend b/meta-openbmc-mods/meta-common/recipes-support/gnutls/gnutls_%.bbappend
deleted file mode 100644
index 4377bf0e3..000000000
--- a/meta-openbmc-mods/meta-common/recipes-support/gnutls/gnutls_%.bbappend
+++ /dev/null
@@ -1,12 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-PV = "3.6.15"
-
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \
- "
-SRC_URI[md5sum] = "e80e0d20a8bb337a15fa63caa7f67006"
-#SRC_URI[sha256sum] = "3847a3354dd908c5e603f490865ae10577d7ee3b5edf35e82d1ed8cfa1cf0191"
-SRC_URI[sha256sum] = "0ea8c3283de8d8335d7ae338ef27c53a916f15f382753b174c18b45ffd481558"
-
-
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 93a32164d..f7576c55f 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 = "afd04f0283bfc4854c0100c56ccf8bc1c10c799a"
+SRCREV = "b4d03b1399ef12242cee7716617bef9a3935cf0c"
FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-wht/conf/local.conf.sample b/meta-openbmc-mods/meta-wht/conf/local.conf.sample
index 5a5134be5..5e6ed9fb3 100644
--- a/meta-openbmc-mods/meta-wht/conf/local.conf.sample
+++ b/meta-openbmc-mods/meta-wht/conf/local.conf.sample
@@ -7,7 +7,7 @@ SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*"
EXTRA_IMAGE_FEATURES = "validation-unsecure"
# Uncomment the following line to enable debug features / default user account.
#EXTRA_IMAGE_FEATURES += "debug-tweaks"
-USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+USER_CLASSES ?= "buildstats image-prelink"
PATCHRESOLVE = "noop"
# PFR image Build
diff --git a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
index 578651618..8b2d71b2e 100644
--- a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
+++ b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
@@ -7,7 +7,7 @@ SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*"
EXTRA_IMAGE_FEATURES = "validation-unsecure"
# Uncomment the following line to enable debug features / default user account.
#EXTRA_IMAGE_FEATURES += "debug-tweaks"
-USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+USER_CLASSES ?= "buildstats image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \