summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmbills <jason.m.bills@intel.com>2021-06-25 18:34:41 +0300
committerGitHub <noreply@github.com>2021-06-25 18:34:41 +0300
commitc6b1c6ba7a01b7987d65d61c262c44c320193108 (patch)
treec31fba338a65c86741b16e061d66e0e060e3b768
parente7436234669703196c5ed56f33050d2dc19127cd (diff)
parentdefdca82c107f46e980c84bffb1b2c1263522fa0 (diff)
downloadopenbmc-2021-0.57.tar.xz
Merge pull request #68 from Intel-BMC/update2021-0.571-0.57
Update
-rw-r--r--meta-amd/meta-ethanolx/conf/machine/ethanolx.conf1
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-baseboard.json30
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-chassis.json210
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/configuration/ethanolx-yaml-config/ethanolx-ipmi-sensors.yaml126
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@48.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@49.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4a.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4b.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4c.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4d.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4e.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4f.conf8
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf23
-rw-r--r--meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend20
-rw-r--r--meta-amd/recipes-amd/amd-fpga/amd-fpga.bb2
-rw-r--r--meta-aspeed/MAINTAINERS8
-rw-r--r--meta-aspeed/README.md4
-rw-r--r--meta-aspeed/classes/socsec-sign.bbclass66
-rw-r--r--meta-aspeed/recipes-bsp/u-boot/files/rsa_oem_dss_key.pem59
-rw-r--r--meta-aspeed/recipes-bsp/u-boot/files/rsa_pub_oem_dss_key.pem18
-rw-r--r--meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb5
-rw-r--r--meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed.inc42
-rw-r--r--meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc2
-rw-r--r--meta-aspeed/recipes-kernel/linux/linux-aspeed.inc6
-rw-r--r--meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.crt35
-rw-r--r--meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.key60
-rw-r--r--meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb4
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json11
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend11
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend1
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json69
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules3
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend12
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend5
-rwxr-xr-xmeta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/yosemitev2/ipmb-channels.json7
-rw-r--r--meta-fii/conf/layer.conf2
-rw-r--r--meta-fii/meta-kudo/conf/layer.conf2
-rw-r--r--meta-fii/meta-kudo/conf/machine/kudo.conf7
-rw-r--r--meta-fii/meta-kudo/recipes-kernel/linux/linux-nuvoton/kudo.cfg2
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service15
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb21
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/ipmi/fii-ipmi-oem_git.bb26
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw.bb6
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw.sh13
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh19
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot.bb30
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/host-powerctrl.service12
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh27
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd.bb21
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo-ras.sh575
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo.sh276
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb16
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json35
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb16
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/blacklist.json3
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/kudo.json1616
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager_%.bbappend8
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/kudo_uart_mux_ctrl.sh48
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/obmc-console@.service18
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS1.conf2
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS3.conf3
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/console/obmc-console_%.bbappend41
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend10
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json5
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend8
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend8
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.service9
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.sh3
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json394
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend21
-rw-r--r--meta-google/recipes-connectivity/avahi/files/avahi-daemon.conf2
-rw-r--r--meta-google/recipes-core/dropbear/dropbear_%.bbappend4
-rw-r--r--meta-google/recipes-extended/networking/sslh_git.bb2
-rw-r--r--meta-google/recipes-google/google-misc/google-misc.inc2
-rw-r--r--meta-google/recipes-google/ncsi/files/50-gbmc-ncsi.rules.in20
-rw-r--r--meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in101
-rw-r--r--meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in101
-rw-r--r--meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb21
-rwxr-xr-xmeta-google/recipes-google/networking/files/gbmc-ip-monitor.sh2
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge.bb105
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/+-bmc-gbmcbrusb.network8
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev5
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in9
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.netdev3
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.network4
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-br.rules27
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.service5
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.sh27
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh96
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh74
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh76
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh71
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/ipmi.service.in11
-rw-r--r--meta-google/recipes-google/networking/gbmc-iperf3.bb4
-rw-r--r--meta-google/recipes-google/networking/network-sh/lib.sh236
-rwxr-xr-xmeta-google/recipes-google/networking/network-sh/test.sh169
-rw-r--r--meta-google/recipes-google/systemd/files/40-gbmc-forward.conf5
-rw-r--r--meta-google/recipes-google/systemd/gbmc-systemd-config.bb29
-rw-r--r--meta-ibm/conf/machine/p10bmc.conf23
l---------meta-ibm/conf/machine/rainier.conf1
-rw-r--r--meta-ibm/conf/machine/witherspoon-tacoma.conf1
-rw-r--r--meta-ibm/recipes-core/systemd/systemd/journald-size-policy-16MB.conf8
-rw-r--r--meta-ibm/recipes-core/systemd/systemd/journald-size-policy-2MB.conf (renamed from meta-ibm/recipes-core/systemd/systemd/journald-size-policy.conf)0
-rw-r--r--meta-ibm/recipes-core/systemd/systemd_%.bbappend8
-rw-r--r--meta-ibm/recipes-extended/sudo/sudo_%.bbappend8
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/everest/config.json24
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-1s4u/config.json20
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-2u/config.json84
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-4u/config.json30
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/everest/config.json8
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-1s4u/config.json8
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-2u/config.json12
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-4u/config.json12
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.json8
-rw-r--r--meta-ibm/recipes-phosphor/images/obmc-phosphor-image.bbappend58
-rw-r--r--meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json1085
-rw-r--r--meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json430
-rw-r--r--meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json507
-rw-r--r--meta-ibm/recipes-phosphor/network/phosphor-network_%.bbappend2
-rw-r--r--meta-ibm/recipes-phosphor/power/phosphor-power_%.bbappend4
-rwxr-xr-xmeta-intel-openbmc/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb2
-rw-r--r--meta-intel-openbmc/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb2
-rw-r--r--meta-lenovo/meta-hr630/recipes-phosphor/network/phosphor-network_%.bbappend6
-rw-r--r--meta-lenovo/meta-hr855xg2/recipes-phosphor/network/phosphor-network_%.bbappend6
-rw-r--r--meta-nuvoton/MAINTAINERS5
-rw-r--r--meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb4
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CPC-Baseboard.json10
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json10
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json10
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch12
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0002-AST2600-Enable-host-searial-port-clock-configuration.patch (renamed from meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch)10
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch19
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch16
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch16
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch19
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch12
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0010-Fix-timer-support.patch16
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0011-KCS-driver-support-in-uBoot.patch14
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0013-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch10
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-system-reset-status-support.patch16
-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.patch12
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0019-Apply-WDT1-2-reset-mask-to-reset-needed-controller.patch8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch18
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch13
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch (renamed from meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-Enable-PCIe-L1-support.patch)6
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch576
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0031-Add-a-workaround-to-fix-AST2600-A0-booting-issue.patch32
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg2
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend20
l---------[-rw-r--r--]meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend19
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch104
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/dbus-1.init123
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/tmpdir.patch44
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/dbus/dbus_%.bbappend11
-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_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0003-Fix-keyboard-and-mouse-input-events-dropping-issue.patch162
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0004-Connect-HID-gadget-device-dynamically.patch494
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0005-Refine-HID-report-writing-logic.patch295
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch60
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch64
-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.patch28
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch35
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch39
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch31
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch70
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend1
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch137
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch547
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-recommended-fixes-by-crypto-review-team.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0015-Add-state-sensor-messages-to-the-registry.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0037-Add-state-sensor-messages-to-the-registry.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0016-Fix-bmcweb-crashes-if-socket-directory-not-present.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0017-Add-msg-registry-for-subscription-related-actions.patch81
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch51
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch)32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0002-BaseBiosTable-Add-support-for-PATCH-operation.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch)17
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch)19
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0004-Add-support-to-ChangePassword-action.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch)26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0005-Fix-remove-bios-user-pwd-change-option-via-Redfish.patch44
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0001-EventService-Fix-retry-handling-for-http-client.patch46
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0002-EventService-https-client-support.patch35
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch25
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch85
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch23
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch132
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch400
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0001-Revert-Disable-nbd-proxy-from-the-build.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0038-Revert-Disable-nbd-proxy-from-the-build.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0002-bmcweb-handle-device-or-resource-busy-exception.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0003-Add-ConnectedVia-property-to-virtual-media-item-temp.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Add-ConnectedVia-property-to-virtual-media-item-temp.patch)9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch)63
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0005-Set-Inserted-redfish-property-for-not-inserted-resou.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Set-Inserted-redfish-property-for-not-inserted-resou.patch)13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0006-Bmcweb-handle-permission-denied-exception.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch)11
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0007-Fix-unmounting-image-in-proxy-mode.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch)9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0008-Fix-VM-NBDPROXY-build-issue-with-AsyncResp.patch37
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend51
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch234
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend3
-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/system/callback-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0002-Add-support-for-ssl-config.patch16
-rw-r--r--meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb6
-rw-r--r--meta-openpower/classes/openpower-software-manager-virtual-pnor.bbclass4
-rw-r--r--meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb2
-rw-r--r--meta-openpower/recipes-phosphor/host/op-proc-control_git.bb2
-rw-r--r--meta-openpower/recipes-phosphor/ipmi/openpower-host-ipmi-flash_git.bb2
-rw-r--r--meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb2
-rw-r--r--meta-openpower/recipes-phosphor/logging/openpower-libhei_git.bb4
-rw-r--r--meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc2
-rw-r--r--meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc2
-rw-r--r--meta-phosphor/classes/phosphor-networkd-rev.bbclass2
-rw-r--r--meta-phosphor/recipes-extended/pam/pam-ipmi_git.bb2
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc2
-rw-r--r--meta-phosphor/recipes-extended/stdplus/stdplus_git.bb2
-rw-r--r--meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/console/obmc-console_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager/xyz.openbmc_project.Time.Manager.service16
-rw-r--r--meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager_git.bb4
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb1
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh5
-rw-r--r--meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb3
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb5
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service12
-rw-r--r--meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Syslog.Config.service12
-rw-r--r--meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb25
-rw-r--r--meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/mctp/mctp_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb9
-rw-r--r--meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/pldm/pldm.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/power/phosphor-power.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb6
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules2
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules2
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/phosphor-max31785-msl@.service12
-rwxr-xr-xmeta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh24
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service10
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb65
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.inc2
-rw-r--r--meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb1
-rw-r--r--meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb2
-rw-r--r--meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb2
-rwxr-xr-xmeta-phosphor/recipes-x86/chassis/x86-power-control_git.bb2
-rwxr-xr-xmeta-quanta/meta-common/recipes-phosphor/health/files/bmc_health_config.json15
-rwxr-xr-xmeta-quanta/meta-common/recipes-phosphor/health/phosphor-health-monitor_%.bbappend9
-rw-r--r--meta-quanta/meta-gbs/conf/machine/gbs.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config24
-rw-r--r--meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend6
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/gbs-bios-update.bb3
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/gbs-nvme-pwr-ctrl/gbs-nvme-pwr-ctrl.bb2
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/gbs-sysinit.bb3
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb1
-rw-r--r--meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-host-s0-set-failsafe.service4
-rw-r--r--meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/0003-Add-basic-support-for-SB-TSI-sensors.patch327
-rw-r--r--meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/gbs.cfg12
-rw-r--r--meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton_%.bbappend1
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config.bb4
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml435
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/console/files/80-gbs-nuvoton-sol.rules1
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/console/obmc-console_%.bbappend13
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch57
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0025-Add-PreInterruptFlag-properity-in-DBUS.patch39
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend5
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/images/obmc-phosphor-image.bbappend1
-rwxr-xr-xmeta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend9
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-flash_%.bbappend2
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch79
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Fix-issues-and-support-signed-sensor-values.patch169
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Update-Host-State-Transition-function.patch137
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Update-IPMI-Chassis-Control-command-transition-reque.patch180
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch138
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend15
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/leds/phosphor-led-manager_%.bbappend15
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/logging/phosphor-logging_%.bbappend1
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/network/phosphor-network_%.bbappend3
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-gbs-apps.bb2
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-obmc-apps%.bbappend4
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend7
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-Add-power-on-monitor-mechanism.patch (renamed from meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0001-lev-add-poweron-monitor-feature.patch)144
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-lev-add-sensors-slow-readings.patch295
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-fan-controller@103000.conf10
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend5
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/config-virtual-sensor.json12
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace7
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend4
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch313
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/host08
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-powercycle.service9
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-poweroff.service8
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-reset.service9
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service16
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service17
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend14
-rw-r--r--meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service11
-rw-r--r--meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb34
-rw-r--r--meta-quanta/meta-gsj/recipes-phosphor/network/phosphor-network_%.bbappend1
-rw-r--r--meta-quanta/meta-gsj/recipes-quanta/network/mac-address/mac-address/config.txt (renamed from meta-quanta/meta-gsj/recipes-gsj/mac-address/files/config.txt)0
-rw-r--r--meta-quanta/meta-gsj/recipes-quanta/network/mac-address_%.bbappend10
-rw-r--r--meta-wistron/OWNERS9
-rw-r--r--meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend2
357 files changed, 10078 insertions, 5559 deletions
diff --git a/meta-amd/meta-ethanolx/conf/machine/ethanolx.conf b/meta-amd/meta-ethanolx/conf/machine/ethanolx.conf
index 7469c9a1c..7fb6e7ec1 100644
--- a/meta-amd/meta-ethanolx/conf/machine/ethanolx.conf
+++ b/meta-amd/meta-ethanolx/conf/machine/ethanolx.conf
@@ -24,6 +24,7 @@ OBMC_MACHINE_FEATURES += "\
VIRTUAL-RUNTIME_skeleton_workbook = "${MACHINE}-config"
VIRTUAL-RUNTIME_obmc-host-state-manager ?= "x86-power-control"
VIRTUAL-RUNTIME_obmc-chassis-state-manager ?= "x86-power-control"
+VIRTUAL-RUNTIME_obmc-sensors-hwmon ?= "dbus-sensors"
PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-amd-apps"
PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-amd-apps"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-baseboard.json b/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-baseboard.json
index 0ce9f8096..cea3d0602 100644
--- a/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-baseboard.json
+++ b/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-baseboard.json
@@ -11,6 +11,36 @@
"Type": "FanConnector"
},
{
+ "Name": "SYS FAN1 connector",
+ "Status": "disabled",
+ "Type": "FanConnector"
+ },
+ {
+ "Name": "SYS FAN2 connector",
+ "Status": "disabled",
+ "Type": "FanConnector"
+ },
+ {
+ "Name": "SYS FAN3 connector",
+ "Status": "disabled",
+ "Type": "FanConnector"
+ },
+ {
+ "Name": "SYS FAN4 connector",
+ "Status": "disabled",
+ "Type": "FanConnector"
+ },
+ {
+ "Name": "SYS FAN5 connector",
+ "Status": "disabled",
+ "Type": "FanConnector"
+ },
+ {
+ "Name": "SYS FAN6 connector",
+ "Status": "disabled",
+ "Type": "FanConnector"
+ },
+ {
"Address": "0x48",
"Bus": 7,
"Name": "BMC",
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-chassis.json b/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-chassis.json
index ff4cbdc54..329ed0286 100644
--- a/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-chassis.json
+++ b/meta-amd/meta-ethanolx/recipes-phosphor/configuration/entity-manager/ethanolx-chassis.json
@@ -69,6 +69,216 @@
"Value": 8000
}
]
+ },
+ {
+ "Index": 2,
+ "BindConnector": "SYS FAN1 connector",
+ "MaxReading": 6000,
+ "Name": "SYS_FAN1",
+ "Type": "AspeedFan",
+ "Pwm": 3,
+ "Tachs": [3],
+ "Thresholds": [
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 10000
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 8000
+ }
+ ]
+ },
+ {
+ "Index": 3,
+ "BindConnector": "SYS FAN2 connector",
+ "MaxReading": 6000,
+ "Name": "SYS_FAN2",
+ "Type": "AspeedFan",
+ "Pwm": 4,
+ "Tachs": [4],
+ "Thresholds": [
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 10000
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 8000
+ }
+ ]
+ },
+ {
+ "Index": 4,
+ "BindConnector": "SYS FAN3 connector",
+ "MaxReading": 6000,
+ "Name": "SYS_FAN3",
+ "Type": "AspeedFan",
+ "Pwm": 5,
+ "Tachs": [5],
+ "Thresholds": [
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 10000
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 8000
+ }
+ ]
+ },
+ {
+ "Index": 5,
+ "BindConnector": "SYS FAN4 connector",
+ "MaxReading": 6000,
+ "Name": "SYS_FAN4",
+ "Type": "AspeedFan",
+ "Pwm": 6,
+ "Tachs": [6],
+ "Thresholds": [
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 10000
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 8000
+ }
+ ]
+ },
+ {
+ "Index": 6,
+ "BindConnector": "SYS FAN5 connector",
+ "MaxReading": 6000,
+ "Name": "SYS_FAN5",
+ "Type": "AspeedFan",
+ "Pwm": 7,
+ "Tachs": [7],
+ "Thresholds": [
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 10000
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 8000
+ }
+ ]
+ },
+ {
+ "Index": 7,
+ "BindConnector": "SYS FAN6 connector",
+ "MaxReading": 6000,
+ "Name": "SYS_FAN6",
+ "Type": "AspeedFan",
+ "Pwm": 8,
+ "Tachs": [8],
+ "Thresholds": [
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 10000
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 8000
+ }
+ ]
}
],
"Name": "AMD EthanolX Chassis",
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/configuration/ethanolx-yaml-config/ethanolx-ipmi-sensors.yaml b/meta-amd/meta-ethanolx/recipes-phosphor/configuration/ethanolx-yaml-config/ethanolx-ipmi-sensors.yaml
index 24f827902..e9a25ccce 100644
--- a/meta-amd/meta-ethanolx/recipes-phosphor/configuration/ethanolx-yaml-config/ethanolx-ipmi-sensors.yaml
+++ b/meta-amd/meta-ethanolx/recipes-phosphor/configuration/ethanolx-yaml-config/ethanolx-ipmi-sensors.yaml
@@ -200,3 +200,129 @@
Offsets:
0x0:
type: double
+
+11:
+ entityID: 0x1D
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/SYS_FAN1
+ sensorReadingType: 0x01
+ multiplierM: 40
+ offsetB: 0
+ bExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ scale: 0
+ rExp: 0
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0x0:
+ type: double
+
+12:
+ entityID: 0x1D
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/SYS_FAN2
+ sensorReadingType: 0x01
+ multiplierM: 40
+ offsetB: 0
+ bExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ scale: 0
+ rExp: 0
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0x0:
+ type: double
+
+13:
+ entityID: 0x1D
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/SYS_FAN3
+ sensorReadingType: 0x01
+ multiplierM: 40
+ offsetB: 0
+ bExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ scale: 0
+ rExp: 0
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0x0:
+ type: double
+
+14:
+ entityID: 0x1D
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/SYS_FAN4
+ sensorReadingType: 0x01
+ multiplierM: 40
+ offsetB: 0
+ bExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ scale: 0
+ rExp: 0
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0x0:
+ type: double
+
+15:
+ entityID: 0x1D
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/SYS_FAN5
+ sensorReadingType: 0x01
+ multiplierM: 40
+ offsetB: 0
+ bExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ scale: 0
+ rExp: 0
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0x0:
+ type: double
+
+16:
+ entityID: 0x1D
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/SYS_FAN6
+ sensorReadingType: 0x01
+ multiplierM: 40
+ offsetB: 0
+ bExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ scale: 0
+ rExp: 0
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0x0:
+ type: double
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@48.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@48.conf
deleted file mode 100644
index 9cd98bb25..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@48.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "BMC"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@49.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@49.conf
deleted file mode 100644
index 8e4a2afb6..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@49.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "DIMM_P0_ABCD_P1_EFGH"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4a.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4a.conf
deleted file mode 100644
index 5c5c230be..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4a.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "DIMM_P1_EFGH"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4b.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4b.conf
deleted file mode 100644
index 3570aafdf..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4b.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "PCIe_Slots"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4c.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4c.conf
deleted file mode 100644
index 68143291a..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4c.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "DIMM_P0_EFGH_P1_ABCD"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4d.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4d.conf
deleted file mode 100644
index 51a5e29d4..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4d.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "DIMM_P1_ABCD"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4e.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4e.conf
deleted file mode 100644
index 0c28e5d25..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4e.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "DIMM_P0_EFGH"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4f.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4f.conf
deleted file mode 100644
index 9a0eb7565..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@300/lm75a@4f.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LABEL_temp1= "DIMM_P0_ABCD"
-WARNLO_temp1= "5000"
-WARNHI_temp1= "38000"
-CRITHI_temp1 = "40000"
-CRITLO_temp1 = "0"
-MINVALUE_temp1 = "-128"
-MAXVALUE_temp1 = "127"
-EVENT_temp1= "WARNHI,WARNLO,CRITHI,CRITLO"
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf
deleted file mode 100644
index 0620d1640..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-# EthanolX has 8 fan ports but only 2 are standard 4-wire fans with PWM and TACH.
-LABEL_fan1 = "P0_Fan_Speed"
-LABEL_fan2 = "P1_Fan_Speed"
-
-PWM_TARGET_fan1 = "1"
-PWM_TARGET_fan2 = "2"
-
-WARNLO_fan1= "10"
-WARNHI_fan1= "8000"
-CRITHI_fan1 = "10000"
-CRITLO_fan1 = "0"
-MINVALUE_fan1 = "100"
-MAXVALUE_fan1 = "6000"
-EVENT_fan1= "WARNHI,WARNLO,CRITHI,CRITLO"
-
-WARNLO_fan2= "10"
-WARNHI_fan2= "8000"
-CRITHI_fan2 = "10000"
-CRITLO_fan2 = "0"
-MINVALUE_fan2 = "100"
-MAXVALUE_fan2 = "6000"
-EVENT_fan2= "WARNHI,WARNLO,CRITHI,CRITLO"
-
diff --git a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
deleted file mode 100644
index b0631e627..000000000
--- a/meta-amd/meta-ethanolx/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
+++ /dev/null
@@ -1,20 +0,0 @@
-FILESEXTRAPATHS_prepend_ethanolx := "${THISDIR}/${PN}:"
-EXTRA_OEMESON_append_ethanolx = " -Dnegative-errno-on-fail=true"
-
-
-CHIPS = " \
- bus@1e78a000/i2c-bus@300/lm75a@48 \
- bus@1e78a000/i2c-bus@300/lm75a@49 \
- bus@1e78a000/i2c-bus@300/lm75a@4a \
- bus@1e78a000/i2c-bus@300/lm75a@4b \
- bus@1e78a000/i2c-bus@300/lm75a@4c \
- bus@1e78a000/i2c-bus@300/lm75a@4d \
- bus@1e78a000/i2c-bus@300/lm75a@4e \
- bus@1e78a000/i2c-bus@300/lm75a@4f \
- pwm-tacho-controller@1e786000 \
- "
-ITEMSFMT = "ahb/apb/{0}.conf"
-ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
-
-ENVS = "obmc/hwmon/{0}"
-SYSTEMD_ENVIRONMENT_FILE_${PN}_append_ethanolx = " ${@compose_list(d, 'ENVS', 'ITEMS')}"
diff --git a/meta-amd/recipes-amd/amd-fpga/amd-fpga.bb b/meta-amd/recipes-amd/amd-fpga/amd-fpga.bb
index 3fcaeaa91..32efddea2 100644
--- a/meta-amd/recipes-amd/amd-fpga/amd-fpga.bb
+++ b/meta-amd/recipes-amd/amd-fpga/amd-fpga.bb
@@ -10,7 +10,7 @@ SRCREV = "${AUTOREV}"
SRC_URI = "file://fpgardu.sh"
SRC_URI += "file://LICENSE"
-S = "${WORKDIR}/"
+S = "${WORKDIR}"
do_install () {
install -d ${D}${bindir}
diff --git a/meta-aspeed/MAINTAINERS b/meta-aspeed/MAINTAINERS
index 453d5e497..f1f736f31 100644
--- a/meta-aspeed/MAINTAINERS
+++ b/meta-aspeed/MAINTAINERS
@@ -14,7 +14,7 @@ Description of section entries:
Section entries are structured according to the following scheme:
- X: NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>
+ X: NAME <EMAIL_USERNAME@DOMAIN> <DISCORD_USERNAME!>
X: ...
.
.
@@ -24,10 +24,10 @@ Description of section entries:
organization; FILE_PATH is a file path within the repository, possibly with
wildcards; X is a tag of one of the following types:
- M: Denotes maintainer; has fields NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>;
+ M: Denotes maintainer; has fields NAME <EMAIL_USERNAME@DOMAIN> <DISCORD_USERNAME!>;
if omitted from an entry, assume one of the maintainers from the
MAINTAINERS entry.
- R: Denotes reviewer; has fields NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>;
+ R: Denotes reviewer; has fields NAME <EMAIL_USERNAME@DOMAIN> <DISCORD_USERNAME!>;
these people are to be added as reviewers for a change matching the repo
path.
F: Denotes forked from an external repository; has fields URL.
@@ -46,4 +46,4 @@ START OF MAINTAINERS LIST
# @openbmc and is synced by the maintainer using git-subtree. Please submit
# changes against @openbmc.
M: Brad Bishop <bradleyb@fuzziesquirrel.com> <radsquirrel!>
-M: Joel Stanley <joel@jms.id.au> <shenki!>
+M: Joel Stanley <joel@jms.id.au>
diff --git a/meta-aspeed/README.md b/meta-aspeed/README.md
index b97bbc78d..c0fab4e9d 100644
--- a/meta-aspeed/README.md
+++ b/meta-aspeed/README.md
@@ -32,5 +32,5 @@ Patch checklist. Please ensure patches adhere to the following guidelines:
message](https://chris.beams.io/posts/git-commit/#seven-rules)
For questions or help please come join us on the [mailing
-list](https://lists.ozlabs.org/listinfo/openbmc) or in
-[IRC](irc://freenode.net/openbmc).
+list](https://lists.ozlabs.org/listinfo/openbmc) or on
+[Discord](https://discord.gg/69Km47zH98).
diff --git a/meta-aspeed/classes/socsec-sign.bbclass b/meta-aspeed/classes/socsec-sign.bbclass
new file mode 100644
index 000000000..1b1576592
--- /dev/null
+++ b/meta-aspeed/classes/socsec-sign.bbclass
@@ -0,0 +1,66 @@
+# ASPEED AST2600 devices can use Aspeed's utility 'socsec'
+# to sign the SPL (pubkey written to OTP region)
+# The variables below carry default values to the spl_sign()
+# function below.
+SOCSEC_SIGN_ENABLE ?= "0"
+SOCSEC_SIGN_KEY ?= ""
+SOCSEC_SIGN_SOC ?= "2600"
+SOCSEC_SIGN_ALGO ?= "RSA4096_SHA512"
+SOCSEC_SIGN_HELPER ?= ""
+# u-boot-aspeed-sdk commit '2c3b53489c ast2600: Modify SPL SRAM layout'
+# changes the SDRAM layout so that the verification region does NOT
+# intersects the stack. The parameter below can be used to instruct
+# socsec to work in either mode (ommitting it throws a warning), but
+# newer (post v00.03.03) u-boot-aspeed-sdk need this set to false
+SOCSEC_SIGN_EXTRA_OPTS ?= "--stack_intersects_verification_region=false"
+DEPENDS += '${@oe.utils.conditional("SOCSEC_SIGN_ENABLE", "1", " socsec-native", "", d)}'
+
+
+# Signs the SPL binary with a pre-established key
+sign_spl_helper() {
+ signing_helper_args=""
+
+ if [ "${SOC_FAMILY}" != "aspeed-g6" ] ; then
+ echo "Warning: SPL signing is only supported on AST2600 boards"
+ elif [ ! -e "${SOCSEC_SIGN_KEY}" ] ; then
+ echo "Warning: Invalid socsec signing key - SPL verified boot won't be available"
+ else
+ rm -f ${SPL_BINARY}.staged
+
+ if [ -n "${SOCSEC_SIGN_HELPER}" ] ; then
+ signing_helper_args="--signing_helper ${SOCSEC_SIGN_HELPER}"
+ fi
+ socsec make_secure_bl1_image \
+ --soc ${SOCSEC_SIGN_SOC} \
+ --algorithm ${SOCSEC_SIGN_ALGO} \
+ --rsa_sign_key ${SOCSEC_SIGN_KEY} \
+ --bl1_image ${DEPLOYDIR}/${SPL_IMAGE} \
+ ${signing_helper_args} \
+ ${SOCSEC_SIGN_EXTRA_OPTS} \
+ --output ${SPL_BINARY}.staged
+ cp -f ${SPL_BINARY}.staged ${B}/${CONFIG_B_PATH}/${SPL_BINARY}
+ mv -f ${SPL_BINARY}.staged ${DEPLOYDIR}/${SPL_IMAGE}
+ fi
+}
+
+sign_spl() {
+ mkdir -p ${DEPLOYDIR}
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ for config in ${UBOOT_MACHINE}; do
+ CONFIG_B_PATH="${config}"
+ cd ${B}/${config}
+ sign_spl_helper
+ done
+ else
+ CONFIG_B_PATH=""
+ cd ${B}
+ sign_spl_helper
+ fi
+}
+
+
+do_deploy_append() {
+ if [ "${SOCSEC_SIGN_ENABLE}" = "1" -a -n "${SPL_BINARY}" ] ; then
+ sign_spl
+ fi
+}
diff --git a/meta-aspeed/recipes-bsp/u-boot/files/rsa_oem_dss_key.pem b/meta-aspeed/recipes-bsp/u-boot/files/rsa_oem_dss_key.pem
new file mode 100644
index 000000000..a3474c437
--- /dev/null
+++ b/meta-aspeed/recipes-bsp/u-boot/files/rsa_oem_dss_key.pem
@@ -0,0 +1,59 @@
+# U-Boot SPL 'Insecure' key (also known as 'development' or
+# 'imprint' key), used to sign development images of the ASPEED
+# AST2600 boards' U-boot SPL. This key SHOULD NOT be used to
+# sign production images.
+# This key is 4096 bits in size and any key overriding it must
+# also change the SOCSEC_SIGN_ALGO variable.
+# See meta-aspeed/classes/socsec-sign.bbclass for more info.
+
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKQIBAAKCAgEA6hC1IHlB4SqRbesC8BtC00icAYUuYmAiO6CHCyph2Pv2CQT5
+Yct8WSKA/6kNAUpsJwlM18ZX0yMcGVZeS9058hgZdMgoDC57Jw5Tw5foN6CBBF72
+oJM5Z+wAjD41jiX1T2tsCvlWLeNOS1RcqViLDOdk++olpVgsSlAvW23DmblVxVhz
+67L55vK6lc4r/VcVtHJ2bdehjk6j/BcehdQchhz76fpL9EBZJ1tm9k+m7aRhhRqf
+BJUP5/Jl1+paRY1dBDVzjmE+DneVYvBuMfvh3gQlQVwomsdImH/VuWQc9xAozacB
+s6RtWHxIS+uf9qUDR622mKueKojH3PPMO+4su5EGRNKAAH9dS356pqhzpmZvgFvU
+J7zZFxQBfjpMrF+fGHUD0QkUofAxlpeyldv/+ubxzwUm0PrYGIhowuPItT7/ASqz
+xCKa/dfYVCTlPSJOP+Wi00pJBZOFuDk4HHao98BCUeGE4t065Di81GZ2F9amf5B/
+/jIjkM3o9vrThe3GWbWtP3kmw7OQyMeUzUKxIUTq3cvblNpo80gfYzYwWQakjhE6
+aV7xLQIxv28c8I2JrsvjXQIAg77W/XdT/+rS53k3DgrcjK7l7nWjmOxXr6p9f9fF
+HXF/fmEYeeuK6NaFH24LW97jk+IRjv8ig29ZyrzEctuzky80lHcVFYnE/3cCAwEA
+AQKCAgAqf0wTkFCIzEzJU0EeTSTN7cH9eKvaSrAMeXHrcg9/8QdTzeZlfieem2gm
+gxAMavHGCKc+ChIKELbaVtcaGRmbPgrpLCoxRAMyLSTCP4N3Dho+q+tFblWe67eR
+vv3ESFoIyG0+dNTT0hB2FuQYDy538k9gebvKEH9CItrmU8CO2ZqcERpC8iTzbKC5
+8EwGXFhhgeLEwMDhcJ/PdnchP0jKhNqsObiuqTxGrA6+q+mX/h+Cpjm3AEV6DIW3
+NSKcvDTmPbo0YK1+vPGPnC21v5Db2Y7WFiB9Ma+ZmKQ6W9Xyeame5TKm5jTAOxh5
+SFer1XwJ+J1NjONTv6/iCxXKz8ypDJ9wiFQ7Hb3u84+jQiTWhjpFbnvT3lkN+Z8i
+Q7z7QSYcIGHdH1q9x/LkuG5zzGB0yRMAnayzUiyTyQbNRZZHbB4mNB1zWFocUwv5
+bpnACt5NtsxwCJHVZRpffBcekM0AjKXWQ4oxJPcAmhqh2MIu4vmEG6cfMYGP+dpP
+R2unAbs3kSAEwvZaydPZmgi9TYLViYWrxXuloGBow1naisQCY3R9XVzLYmCVEvng
+20C7odj8or+Qrx6qa1m06RLUsHexKyniIYLbwfPcHIf9afdKv7N/ruGH4u+Nv/2B
+I62a9IfOUobBBnSbeA5nHk9bC2G2MBUCwW9jP1Vd4TcXwJwmsQKCAQEA98gY0ZGC
+rlj/SOxTYo/6GSfmjHeXJzxWXmH6UDFUMphkaO0RWa/cq2szShdaQa2JKrU4G5xR
+K+hYKSotlWb5EjQPQX5uaieI61UWsPbAqs6MSqZyYvgDKeBV40urXrR5ImivsUAO
+DKwoNMa4z8JIaKdHB0kT1vK9G/QiLPtJ6Wh8q0+hp+1T/IodXOR3zFHkURJVwVob
+Wbas0ZXXMhi1ywO7ZmZRXpnNOQv/m09hBUYGwITAp/KBxaeseGxhR3r6l9rmNtJI
+i40/90QHMCXtEwHRvUGTOP8he2n4AhhXQrlr3WOqFrku3y1e+BfLFEOo92j+WjA3
+skFsQsFy8motrwKCAQEA8dQlQMqeC69+ldd/64xaaqa5LuxLhPY5aYu5d3OCuoTF
+l6cviKut3h18QLyuy28ZFaI1b/pPS8lvZntw6ryXGNutH6sz0Wtf0Joe/2JT1ZLs
+Ra2Np0VZcJmlaFk0XC/CX344gGv5CqSwPqtNn2/Ej76ReRLh0q/hdJdTqKtTHYMe
+t3VDZIJwrd5iqFH8Yygd/FFqIfgPSRo1V7ylXj9UEke2zy82dki2kBeeMo+wDLGV
+rULejvN9h8IVBK0bBymBSjLXcSN5q4T092lGAV6aMBRcD5n2g6RMeFGE9oimfIWy
+WmThXgV6O1OQYA7t6SxCDAcfQZc41Zj2y3dOhPDEuQKCAQBN9MNyM9Ckn9V5kPjP
+GrM59ObBLOL+cipOOY8yacKuxGla5bM+v2iy+eBCIETCQyHTsP49GZokMU6DbQS4
+a5RTWNOv7GI6vcODHtsrxAZr9t4GooV8g8EjDLSY9XauLiOqYrtcDeYdsJBZwmfk
+3aBAZNig/ynhx68du1qBQnJHoBsRHtWiarWwz5dbYXoba2xk4VrfoUTXnfSTYAw7
+c7DGdZ8hIXHaTJNXrmG18Gx650Q6j8m5TT/s+sr1fEvC3Hs5CaLCfrhaR49ncRy9
+1kDXaQwe+iGingpftMBVkGjr0kCQf8nEqnCHwNOPRJUdBAiGBp93qpHrYE/6VLig
+ci17AoIBAQC3+F0y0jGz0Blr4tqFFmw+kIF2qfq1tx9sJQi+T9jXDmTHfz+RKJIH
+1MSO9zu+tdEOfS1L98/VZvPhsezwFvKXzZ8B5ZtxKM9mgaktPd9rLe+i/moyI3bs
+S2bjYGGN9CNZxEs1n26BY1JVCrrtnPibJi3DPtMfFgBdUzYordV4MSTwCjxvvS/9
+hZ3mUSDBSmataj5kgzMVuON10KS5c1IA6h+vtEopaB3CtsT50AftUDf+7E0l0STh
+X4vf19Uk+LVL/iuZ/ZP1IRu/EI5aQl7oTsTOdaFs+lPWgKW3a7PELW3GiNJOVbps
+YaEHArSJW8sPHWfw3Rs2m7y8gxHv3r65AoIBAQCmrMwqEnN3J4S0rx62/Kohkfqo
+QQNnG/r4d07z0UbBheO2PRWFqBbyv32j3stoQeNmbA1Fzn6Wsx434o5n/VyA+g9D
+dRc4X0l46UAPkuZrB20vxgso06QkPtSy7IFVGgqKYy+JG94me5nfIRUhqqF57N+x
+gR73fSnykARPFqvG8XG78Aki43U9gQUlq0094eenZu4ikZq1bHslR4/zPMGzwHzb
+6gMk5/nAdCrI9F1mKmSt3AnfpkWIYiGZUIoOnv12+dUZc7E5sT+cUI2JZr1CegJ1
+c4XKN2hkZb4MP95cE4rh7DGodZDW5KjiViXHVExUrdv3jBoZlX+Af6atm0K0
+-----END RSA PRIVATE KEY-----
diff --git a/meta-aspeed/recipes-bsp/u-boot/files/rsa_pub_oem_dss_key.pem b/meta-aspeed/recipes-bsp/u-boot/files/rsa_pub_oem_dss_key.pem
new file mode 100644
index 000000000..e3800179c
--- /dev/null
+++ b/meta-aspeed/recipes-bsp/u-boot/files/rsa_pub_oem_dss_key.pem
@@ -0,0 +1,18 @@
+# Public portion of the U-Boot SPL 'Insecure' key kept here
+# as a convenience.
+# Please refer to 'rsa_oem_dss_key.pem' for more info
+
+-----BEGIN PUBLIC KEY-----
+MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA6hC1IHlB4SqRbesC8BtC
+00icAYUuYmAiO6CHCyph2Pv2CQT5Yct8WSKA/6kNAUpsJwlM18ZX0yMcGVZeS905
+8hgZdMgoDC57Jw5Tw5foN6CBBF72oJM5Z+wAjD41jiX1T2tsCvlWLeNOS1RcqViL
+DOdk++olpVgsSlAvW23DmblVxVhz67L55vK6lc4r/VcVtHJ2bdehjk6j/BcehdQc
+hhz76fpL9EBZJ1tm9k+m7aRhhRqfBJUP5/Jl1+paRY1dBDVzjmE+DneVYvBuMfvh
+3gQlQVwomsdImH/VuWQc9xAozacBs6RtWHxIS+uf9qUDR622mKueKojH3PPMO+4s
+u5EGRNKAAH9dS356pqhzpmZvgFvUJ7zZFxQBfjpMrF+fGHUD0QkUofAxlpeyldv/
++ubxzwUm0PrYGIhowuPItT7/ASqzxCKa/dfYVCTlPSJOP+Wi00pJBZOFuDk4HHao
+98BCUeGE4t065Di81GZ2F9amf5B//jIjkM3o9vrThe3GWbWtP3kmw7OQyMeUzUKx
+IUTq3cvblNpo80gfYzYwWQakjhE6aV7xLQIxv28c8I2JrsvjXQIAg77W/XdT/+rS
+53k3DgrcjK7l7nWjmOxXr6p9f9fFHXF/fmEYeeuK6NaFH24LW97jk+IRjv8ig29Z
+yrzEctuzky80lHcVFYnE/3cCAwEAAQ==
+-----END PUBLIC KEY-----
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb
index 99bcafc09..727c62d27 100644
--- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb
+++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb
@@ -3,11 +3,16 @@ require u-boot-common-aspeed-sdk_${PV}.inc
UBOOT_MAKE_TARGET ?= "DEVICE_TREE=${UBOOT_DEVICETREE}"
require u-boot-aspeed.inc
+inherit socsec-sign
PROVIDES += "u-boot"
DEPENDS += "bc-native dtc-native"
SRC_URI_append_df-phosphor-mmc = " file://u-boot-env-ast2600.txt"
+SRC_URI += " \
+ file://rsa_oem_dss_key.pem;sha256sum=64a379979200d39949d3e5b0038e3fdd5548600b2f7077a17e35422336075ad4 \
+ file://rsa_pub_oem_dss_key.pem;sha256sum=40132a694a10af2d1b094b1cb5adab4d6b4db2a35e02d848b2b6a85e60738264 \
+ "
UBOOT_ENV_SIZE_df-phosphor-mmc = "0x10000"
UBOOT_ENV_df-phosphor-mmc = "u-boot-env"
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed.inc b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed.inc
index 55d8b4787..0b9bc20d2 100644
--- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed.inc
+++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed.inc
@@ -26,48 +26,6 @@ PACKAGECONFIG[openssl] = ",,openssl-native"
# file already exists it will not be overwritten.
UBOOT_LOCALVERSION ?= ""
-# Some versions of u-boot use .bin and others use .img. By default use .bin
-# but enable individual recipes to change this value.
-UBOOT_SUFFIX ??= "bin"
-UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
-UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
-UBOOT_MAKE_TARGET ?= "all"
-
-# Output the ELF generated. Some platforms can use the ELF file and directly
-# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging
-# purposes.
-UBOOT_ELF ?= ""
-UBOOT_ELF_SUFFIX ?= "elf"
-UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}"
-UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}"
-UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
-
-# Some versions of u-boot build an SPL (Second Program Loader) image that
-# should be packaged along with the u-boot binary as well as placed in the
-# deploy directory. For those versions they can set the following variables
-# to allow packaging the SPL.
-SPL_BINARY ?= ""
-SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
-SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
-SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
-
-# Additional environment variables or a script can be installed alongside
-# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
-# or 'boot.scr', should be packaged along with u-boot as well as placed in the
-# deploy directory. Machine configurations needing one of these files should
-# include it in the SRC_URI and set the UBOOT_ENV parameter.
-UBOOT_ENV_SUFFIX ?= "txt"
-UBOOT_ENV ?= ""
-UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
-UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
-UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
-
-# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf
-# to find EXTLINUX conf file.
-UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
-UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
-UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
-
# returns all the elements from the src uri that are .cfg files
def find_cfgs(d):
sources=src_patches(d, True)
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc b/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc
index 4e7a92c2e..b662bf442 100644
--- a/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc
+++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc
@@ -8,7 +8,7 @@ PE = "1"
# We use the revision in order to avoid having to fetch it from the
# repo during parse
-SRCREV = "869b79f73711d5a7b6c0bfa3c8888dc2583d1526"
+SRCREV = "44a8c618c1215e0faac0f335f0afd56ed4240e76"
SRC_URI = "git://git@github.com/openbmc/u-boot.git;nobranch=1;protocol=https"
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc b/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc
index 6a1471f26..aa060295f 100644
--- a/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc
@@ -8,7 +8,11 @@ KCONFIG_MODE="--alldefconfig"
KSRC ?= "git://github.com/openbmc/linux;protocol=git;branch=${KBRANCH}"
SRC_URI = "${KSRC}"
-SRC_URI += " file://defconfig"
+SRC_URI += " \
+ file://defconfig \
+ file://rsa_oem_fitimage_key.key;sha256sum=eeb4ff2ebbfbd97b6254fe6dbaeea41067e54c65176c233ec7b2ab2decf1ddcd \
+ file://rsa_oem_fitimage_key.crt;sha256sum=45f5a55497cce8040999bf9f3214d471ac7b83ab7acef41c4425a34662e8372e \
+ "
LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.crt b/meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.crt
new file mode 100644
index 000000000..0e8f25704
--- /dev/null
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.crt
@@ -0,0 +1,35 @@
+# Certificate for the 'Insecure' Kernel fitimage key, required
+# by the signing process for U-Boot FIT Signature Validation.
+# Please refer to 'rsa_oem_fitimage_key.key' for more info
+
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgIUMP4fGTalbDhpTcr7sr+VKnUunRUwDQYJKoZIhvcNAQEL
+BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
+GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMTA0MjgxMzAzMDhaFw0yMTA1
+MjgxMzAzMDhaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
+HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQDMZ5gF78Jx+yzI4bh0imCi0kgRdljANokDu1DZpa2S
+tPybosJk1453fWy8ZEsJupS1l6IPhEvWkehxL4pviADKle1S4yx5vmKV7b+ppKqV
+LBXrVF4kphcbSTBqfOGa0mQeGBFUuhTKamjy9yyV6UhIBgutK5bJvQZThzU5ZBtG
+g4zWIHSSyVMc5ACWfZuLcfjAp1s3hqY1Fi2grcTHQquPvyuyT5Xr2utmT2tdNr6D
+9tdhdS3Xfb7HTjPRCcjRXhCPWxKqTneLrttRhK18vyg0LTPQ4vtVSHnCt2JpVCrV
+Vg5YqvyfEu+fSh8kL0aveLK0afEGorb9XY0e2JmIUtJoONRGUaZCHdJ6R7v8fpgu
+uEe0kBBOi1QLUUbFu7v/FQzgGbCaCA2E+aJRoBTooxM6RHsJp4s/LTsb+Pdl2sDM
+Hno8fJ2qDVPO3vserrHunwTXUWcwyWhpWaYx+P7tDilH5K6cNTgivbvepfcbNDNl
+8ZeZCK3EH6fdMkxTb0giqGpVjMlBgwf/RH2cYMzF83BchXoljpoyQmXhoi14uDS7
+LjgA5JUBeeqq1xEyFn+iYPrcnBFubetIg5zBiTjMZmz4aANQxlUGZ9sKAlHzQwPv
+J+rkpR3dHzi9PHpzY3+5ptwGfLYP1sLbozNY3qE3wAIerkGgCgMuVp5XDJAlkO4M
+HQIDAQABo1MwUTAdBgNVHQ4EFgQU5Du6F0E1sZpyDCGQswhvPuFlKUQwHwYDVR0j
+BBgwFoAU5Du6F0E1sZpyDCGQswhvPuFlKUQwDwYDVR0TAQH/BAUwAwEB/zANBgkq
+hkiG9w0BAQsFAAOCAgEAYnBJi9l9zvJldrVuVIa7IZQhKlLXuVU2yL3Az3Hr8ejg
+FNwF9XdxXDxvBiQatIdZ/fv8ukqo+OBCyw1sE8u668S9ca1rr5+vq2PaxNn//ZLV
+zmJ12yZa7SOkJgsWsjNlSwM+VWIbLKC+25nRYuA3S03XcLLmXzxEbxIYFuynds8W
+pQqYMn1CZ9y6Yz7MtDo9p+JU1kFqgxocBLKpgcRgqbQ1vWHjE91r10iS6E1N8YAi
+EPsO7Nh6DzfhFY4Wo+S9tTZwBL/dKqO4Ft4XPFKA1nEH8ZyGTI3jfRUYn5IaRc7g
+5Hy8Mla/n7UvKrZIEitD5fqOvxm2g7Bck28cpr2gH+Cy5q6ivfJkycGRfy6BDfDl
+fv41PJSnrrvxNuXB9ylBXat8K0nBPjY8vOr0uFXPzVHC3Rj2e8zD6GsOzFvkyvfQ
+qYrUYKVs1U74PMTdu9wc9z+sS1CBvdq2KZPaZImqvctS3VP3mfmqxCHQLYx3WX23
+J0KGpbfmBOtHwcgBHna0ZAY7ImbF47+FL1eHzITVoMagFteEYC4LI4uqsznI2dNi
+gjrTmQLnm8DkwvBFwXOa2QyaM2I4Dk+q7+FHwCxiTJdmTnd6LFH5nufmq5oIAy2d
+/G0EqPom0AZz1i+Ee90xCjiFLd2vzdv5U+EWKkOjUiM/XdvglrsVCUdQ41gorRo=
+-----END CERTIFICATE-----
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.key b/meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.key
new file mode 100644
index 000000000..d9bc4a748
--- /dev/null
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/rsa_oem_fitimage_key.key
@@ -0,0 +1,60 @@
+# Kernel fitImage 'Insecure' key (also known as 'development' or
+# 'imprint' key), used to sign development images of the OpenBMC
+# Kernel fitImage. This key SHOULD NOT be used to sign
+# production images.
+# This key is 4096 bits in size and can be used by adjusting
+# the UBOOT_SIGN_KEYNAME, UBOOT_SIGN_KEYDIR and FIT_SIGN_ALG
+# variables (see uboot-sign.bbclass for more info)
+
+-----BEGIN PRIVATE KEY-----
+MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDMZ5gF78Jx+yzI
+4bh0imCi0kgRdljANokDu1DZpa2StPybosJk1453fWy8ZEsJupS1l6IPhEvWkehx
+L4pviADKle1S4yx5vmKV7b+ppKqVLBXrVF4kphcbSTBqfOGa0mQeGBFUuhTKamjy
+9yyV6UhIBgutK5bJvQZThzU5ZBtGg4zWIHSSyVMc5ACWfZuLcfjAp1s3hqY1Fi2g
+rcTHQquPvyuyT5Xr2utmT2tdNr6D9tdhdS3Xfb7HTjPRCcjRXhCPWxKqTneLrttR
+hK18vyg0LTPQ4vtVSHnCt2JpVCrVVg5YqvyfEu+fSh8kL0aveLK0afEGorb9XY0e
+2JmIUtJoONRGUaZCHdJ6R7v8fpguuEe0kBBOi1QLUUbFu7v/FQzgGbCaCA2E+aJR
+oBTooxM6RHsJp4s/LTsb+Pdl2sDMHno8fJ2qDVPO3vserrHunwTXUWcwyWhpWaYx
++P7tDilH5K6cNTgivbvepfcbNDNl8ZeZCK3EH6fdMkxTb0giqGpVjMlBgwf/RH2c
+YMzF83BchXoljpoyQmXhoi14uDS7LjgA5JUBeeqq1xEyFn+iYPrcnBFubetIg5zB
+iTjMZmz4aANQxlUGZ9sKAlHzQwPvJ+rkpR3dHzi9PHpzY3+5ptwGfLYP1sLbozNY
+3qE3wAIerkGgCgMuVp5XDJAlkO4MHQIDAQABAoICAQCQ0IgdFJtfI4O8ImcLcgo6
+8N4MORtxunFiCnCickXB3aXmIe61gR43O84wvqGHGABJk09GzQTp1N+oaPUcRW/C
+F2xXQAl/i0nPTOxwJPCR1PUGj/RO5LkUJMs/dpBjntE9nPGSZG9cZP1LvaCB6Q/D
+rzzQiERBU0FLJkyoB2tnjsXV4pKUeDwBCOv9sqnjpnCFFUyDz0qr67WR0+rI/UwN
+AHTV1JqzyZrjFjtLhAB///7h1iIPPNBP5fDCFbuH0avL1Mspi4QYm15Yp7Y93jR+
+mtPOFzHXXwyczk3Tr8TU9i4d1a46iTDpWpsriK78nHeHaFNRzy/z2zai9vP3aC4W
+UV0F/57y7KS++lQKG+fZZVz7DcV1CysehL/xxZo+B1RmBXfmWD0hGhnKeIL6jShh
+FfILWQ63EgTAMRzvEmOpnW6VemF5IHAA0yYHbfs8uebZrXRf7v3WdyWwK57/d9Gy
+YHCNMH3cP1J+/1BCzvNhXBRu/YDLgcPMJFklMm6gOdcsy3lA5GpNIRmOiiGaoYQs
+KozLyPlmt7s6dP3VrAnnRXCzm140wMzKAq8L1o1gNOsXV06ig609DUMHUbfxT04W
+4anjyiJTvBWrNr2FxOjuZPqleIApZR+GPFm17IFapmlPN7cOrYlXs786a5qyYoED
+jdjNh6RWNdDM0iiPVt9VBQKCAQEA+fBvRiphuSnqiSVvosb3gB1bY2phHzLJjTPB
+2sx2L9TdBQdv5JMh9ugbJO06CQgT1JLghtB4/CKDAjgAvSayXeNws1KVgpIUQdq4
+Nat6G+UNRtRuCQwrEkiKEmHbMQHdkzirzDPdzgp/tnl/HXDgji9UZEItnSi8OCdM
+Ofocp1SHBpdbxDm3OEGH/v46MhT0S+nfL6Y1V8pYBd52tTv+CWh5yDDHtrsDmJfq
+tVv6Gs1EOq4L8DcdDQltqf31KXC2YR6ANA4/XvuK+nsObjkj2jHIFrUMzaOWwxxd
+mLlLdqy98M3+kiLTzCyhxLY5/WPB1+stgDi9QSYm7cxfnNK3MwKCAQEA0Vx9v84a
+TH/2NUGciLTDmrwXZ5Au18JZJk6JYYRsxekT+C8HgGxKz3UY411Bxj2ZDRprrnMh
+XCQz0BjOrSpaDnB7mlLUWoo7ykLoDWWarSD4sJjlK6fJm0D3ke4Na8RJNWLUxqoH
+wyqx5ikJXc/g8aRFlHWu5g2gkjIp+Tl572xMx/XaT+IJ/ZCZU6Fzq+IBf258Z7Dn
+/HowxPgxd63wsZPTo4H+H0xUkjad9ggfurBgGfGUkxCOc2pw/vm4URuQGEHb6aNe
+DHoHT/8vI/wsAaLB0aCSq4aWRe/2GVYV1xueWpd8EWM0KE1N7PAMGCjE6AuWd7fU
+Ksu+D7onpVjvbwKCAQEAyBE6QUQzrXBsGRQqZHY4MAlP2iiRTdPtmmXPy0DXajpO
+IXRukN1l1qq877YlOo2IsiRQLho6fjlx/RivHroXFSi2UhTNMROVu5FE21FEEYgs
+NIJfAkcHQz9lpolGV9hScUJv4qmx5vhoeryOkBaG6cnhF9ARizfMUnbCgbY/sYHs
+A86s2koI67MpFWiTVPuJAitXSGEXWgrSowAMrc4z73v9382MUC0rF76jVkEl1sZw
+0zf2vnaffowJiIWM9XsPwnYT0ZeGCpX4DcDrMDf1BvfKXsLWWNWWHOBb26CXU4u7
+D0MVgAz41Pr1Eu17ReXQiPHsHjNM6xWLG9b4wiO6GQKCAQBibJMJiwE+GaJL4y6N
+7j1PD0IJg/UhpdJ3edCIMdNZL3wd3y4tp7t70FcE/KCha+/6AwPAnYt/X92j5SW0
+rwZrZ2IUaQBAGGCHc/DX635OCgQgMaD7ZwQWovJAfqN8mGi6Wl4hj2nazMWZqI0o
+t0PPFiVH6BNzP9DPKholemnirw1hrCkYCPIdbM9IS8yvb664k96UeMx3G5K15uCK
+nRFcylxisAgh+qZ/noGgWq1f/O8RA0uP3+a4R8AbfpayOr0BSmTyb8UVJIEvkI4+
+4pxloHhx7oVFch5PfsI5owjdebR2bmT7X6HzmHQcAbYN3YzEcj4oxhlOjT4q8p8U
+0rytAoIBAC0+u5KwNUYHzgi7nnQeCNwoYnJpo3+8Sm2GKxzntj7omyMJQd9MsvjI
+tWdvuwGv04B9WxEz+oY1RDP+5GETd0PrYaDJwIuqbsCHU4g0R5gy0gF5msb07NIw
+/+wTTTcYpgUc166KBCTXZk68W86KL2F2i3q4pHx4HB2xYdNnqFjn3Ih7c4sYTuX1
++iWxOQtgZVwAC6kc/FW1kV0Jhmq5FCsiIExfTRmObmjO/R1lZS5PuzYPmwpbJ/9m
+4dlne1W/MIiVLcQgXHnNzFLcOHrLCTR/TLV6l4vVe9BHFnc6OX4Vf/hAwA93sEm0
+xaPMnGMcWU4pg8ytNSMuYDfobC5hPxo=
+-----END PRIVATE KEY-----
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb b/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb
index 9df959114..084606b61 100644
--- a/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb
@@ -1,6 +1,6 @@
KBRANCH ?= "dev-5.10"
-LINUX_VERSION ?= "5.10.30"
+LINUX_VERSION ?= "5.10.39"
-SRCREV="d538d632fb2046278ff3457994d64d43ee2901c7"
+SRCREV="45c6dc0de963bfdd8b468dceeea24f56a8e51424"
require linux-aspeed.inc
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json
new file mode 100644
index 000000000..c16564440
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json
@@ -0,0 +1,11 @@
+{
+ "gpio_configs": {
+ "NMIButton": "NMI_BUTTON",
+ "NMIOut": "NMI_OUT",
+ "PostComplete": "POST_COMPLETE",
+ "PwrButton": "POWER_BUTTON",
+ "PwrOK": "PS_PWROK",
+ "PwrOut": "POWER_OUT",
+ "RstOut": "RESET_OUT"
+ }
+}
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend
new file mode 100644
index 000000000..6ec2a728c
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " file://power-config-host0.json"
+
+do_install_append() {
+ install -d {D}/usr/share/x86-power-control/
+ install -m 0644 ${WORKDIR}/power-config-host0.json ${D}/usr/share/x86-power-control/
+}
+
+EXTRA_OECMAKE = "-DWITH_RESETBUTTON=OFF"
+
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 000000000..72d991c7e
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 000000000..dc37c30c7
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,69 @@
+{
+ "0" : {
+ "name" : "Ipmb",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "ipmb",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "1" : {
+ "name" : "eth1",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "2" : {
+ "name" : "eth0",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "7" : {
+ "name" : "ipmi_kcs4",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "system-interface",
+ "protocol_type" : "kcs",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "8" : {
+ "name" : "INTRABMC",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "max_transfer_size" : 256,
+ "channel_info" : {
+ "medium_type" : "oem",
+ "protocol_type" : "oem",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "15" : {
+ "name" : "ipmi_kcs3",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "system-interface",
+ "protocol_type" : "kcs",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ }
+}
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules
new file mode 100644
index 000000000..fae7f0969
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules
@@ -0,0 +1,3 @@
+# Replace the '-' to '_', since Dbus object/interface names do not allow '-'.
+KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3"
+KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
new file mode 100644
index 000000000..8547d9b9b
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+KCS_DEVICE = "ipmi_kcs3"
+SMM_DEVICE = "ipmi_kcs4"
+SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
+
+SRC_URI += "file://99-ipmi-kcs.rules"
+
+do_install_append() {
+ install -d ${D}${base_libdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/99-ipmi-kcs.rules ${D}${base_libdir}/udev/rules.d/
+}
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
new file mode 100644
index 000000000..ff6edc92b
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -0,0 +1,5 @@
+RMCPP_EXTRA = "eth1"
+SYSTEMD_SERVICE_${PN} += " \
+ ${PN}@${RMCPP_EXTRA}.service \
+ ${PN}@${RMCPP_EXTRA}.socket \
+ "
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/yosemitev2/ipmb-channels.json b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/yosemitev2/ipmb-channels.json
index fd552e4b2..43276132b 100755
--- a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/yosemitev2/ipmb-channels.json
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/yosemitev2/ipmb-channels.json
@@ -27,6 +27,13 @@
"bmc-addr": 32,
"remote-addr": 64,
"devIndex": 3
+ },
+ {
+ "type": "ipmb",
+ "slave-path": "/dev/ipmb-13",
+ "bmc-addr": 32,
+ "remote-addr": 64,
+ "devIndex": 4
}
]
}
diff --git a/meta-fii/conf/layer.conf b/meta-fii/conf/layer.conf
index 8895ad5db..4cb55ee26 100644
--- a/meta-fii/conf/layer.conf
+++ b/meta-fii/conf/layer.conf
@@ -5,4 +5,4 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "fii-layer"
BBFILE_PATTERN_fii-layer := "^${LAYERDIR}/"
-LAYERSERIES_COMPAT_fii-layer = "warrior zeus gatesgarth dunfell"
+LAYERSERIES_COMPAT_fii-layer = "warrior zeus gatesgarth dunfell hardknott"
diff --git a/meta-fii/meta-kudo/conf/layer.conf b/meta-fii/meta-kudo/conf/layer.conf
index 84da9fb54..84c091cea 100644
--- a/meta-fii/meta-kudo/conf/layer.conf
+++ b/meta-fii/meta-kudo/conf/layer.conf
@@ -7,4 +7,4 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "kudo-layer"
BBFILE_PATTERN_kudo-layer = "^${LAYERDIR}/"
-LAYERSERIES_COMPAT_kudo-layer = "warrior zeus gatesgarth dunfell"
+LAYERSERIES_COMPAT_kudo-layer = "warrior zeus gatesgarth dunfell hardknott"
diff --git a/meta-fii/meta-kudo/conf/machine/kudo.conf b/meta-fii/meta-kudo/conf/machine/kudo.conf
index c136987c7..a016fd760 100644
--- a/meta-fii/meta-kudo/conf/machine/kudo.conf
+++ b/meta-fii/meta-kudo/conf/machine/kudo.conf
@@ -20,11 +20,18 @@ GBMC_NCSI_IF_NAME = "eth0"
IMAGE_FSTYPES += " cpio.${INITRAMFS_CTYPE}.u-boot"
+SERIAL_CONSOLES = "115200;ttyS0"
+
OBMC_MACHINE_FEATURES += " \
obmc-host-ipmi \
+ obmc-phosphor-fan-mgmt \
+ obmc-phosphor-flash-mgmt \
"
PREFERRED_PROVIDER_virtual/obmc-fan-control = "phosphor-pid-control"
PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-kudo-apps"
PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-ssif"
PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-kudo-apps"
+PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-kudo-apps"
+# Remove unneeded binaries from image
+IMAGE_FEATURES_remove = "obmc-health-monitor"
diff --git a/meta-fii/meta-kudo/recipes-kernel/linux/linux-nuvoton/kudo.cfg b/meta-fii/meta-kudo/recipes-kernel/linux/linux-nuvoton/kudo.cfg
index c43b0745b..ff6022724 100644
--- a/meta-fii/meta-kudo/recipes-kernel/linux/linux-nuvoton/kudo.cfg
+++ b/meta-fii/meta-kudo/recipes-kernel/linux/linux-nuvoton/kudo.cfg
@@ -6,6 +6,8 @@ CONFIG_SENSORS_ADC128D818=y
CONFIG_SENSORS_ADM1275=y
CONFIG_SENSORS_TMP102=y
CONFIG_SENSORS_TMP421=y
+CONFIG_SENSORS_MAX31790=y
+CONFIG_SENSORS_MAX34440=y
CONFIG_PMBUS=y
CONFIG_SENSORS_PMBUS=y
diff --git a/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service
new file mode 100644
index 000000000..f9f03e7c3
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Power Cycle by Hotswap Controller
+
+[Service]
+Environment= PSU_HARDRESET_DELAY=1
+EnvironmentFile=-/run/psu_timedelay
+ExecStartPre=sleep $PSU_HARDRESET_DELAY
+ExecStart=gpioset 2 30=1
+Restart=no
+Type=oneshot
+RemainAfterExit=true
+StandardOutput=syslog
+
+[Install]
+WantedBy=gbmc-psu-hardreset.target
diff --git a/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb
new file mode 100644
index 000000000..d01b898a9
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Power Cycle by Hotswap Controller"
+DESCRIPTION = "Power Cycle by Hotswap Controller Daemon"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+
+DEPENDS += "systemd"
+RDEPENDS_${PN} += "bash"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append_kudo = " file://hotswap-power-cycle.service"
+
+do_install() {
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/hotswap-power-cycle.service ${D}${systemd_unitdir}/system/hotswap-power-cycle.service
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = " hotswap-power-cycle.service"
diff --git a/meta-fii/meta-kudo/recipes-kudo/ipmi/fii-ipmi-oem_git.bb b/meta-fii/meta-kudo/recipes-kudo/ipmi/fii-ipmi-oem_git.bb
new file mode 100644
index 000000000..c5a4328ae
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/ipmi/fii-ipmi-oem_git.bb
@@ -0,0 +1,26 @@
+SUMMARY = "foxconn OEM IPMI commands"
+DESCRIPTION = "foxconn OEM IPMI commands"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "boost phosphor-ipmi-host phosphor-logging systemd libgpiod"
+
+inherit cmake obmc-phosphor-ipmiprovider-symlink
+
+EXTRA_OECMAKE="-DENABLE_TEST=0 -DYOCTO=1"
+
+LIBRARY_NAMES = "libfiioemcmds.so"
+
+SRC_URI = "git://github.com/openbmc/foxconn-ipmi-oem.git"
+SRCREV = "163226efd02b91994aaa474005979560965ac3d6"
+
+HOSTIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
+NETIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
+
+FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
+FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
+FILES_${PN}_append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
+FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV}"
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw.bb b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw.bb
index 3f5a30ec6..03ce088fc 100644
--- a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw.bb
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw.bb
@@ -14,14 +14,15 @@ RDEPENDS_${PN} += "libsystemd"
RDEPENDS_${PN} += "bash"
-SRC_URI_append_kudo = " \
+SRC_URI = " \
file://kudo-fw.sh \
file://kudo-fw-ver.service \
file://kudo-fw-ver.sh \
+ file://kudo-lib.sh \
"
SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN}_append_kudo = " \
+SYSTEMD_SERVICE_${PN} = " \
kudo-fw-ver.service \
"
@@ -29,6 +30,7 @@ do_install () {
install -d ${D}/${sbindir}
install -m 0755 ${WORKDIR}/kudo-fw.sh ${D}/${sbindir}/kudo-fw.sh
install -m 0755 ${WORKDIR}/kudo-fw-ver.sh ${D}/${sbindir}/kudo-fw-ver.sh
+ install -m 0755 ${WORKDIR}/kudo-lib.sh ${D}/${sbindir}/kudo-lib.sh
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/kudo-fw-ver.service ${D}${systemd_system_unitdir}
}
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw.sh
index e42795f0c..1ef73cc13 100644
--- a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw.sh
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw.sh
@@ -2,15 +2,7 @@
devpath="/sys/bus/i2c/devices/13-0077/driver"
-# set_gpio_ctrl
-# pin #, direction, high(1)/low(0)
-function set_gpio_ctrl() {
- echo $1 > /sys/class/gpio/export
- echo $2 > /sys/class//gpio/gpio$1/direction
- echo $3 > /sys/class/gpio/gpio$1/value
- echo $1 > /sys/class/gpio/unexport
- sleep 1
-}
+source /usr/sbin/kudo-lib.sh
function fwbios() {
KERNEL_FIU_ID="c0000000.spi"
@@ -32,8 +24,8 @@ function fwbios() {
if [ ! -f $1 ]; then
echo " Cannot find the" $1 "image file"
exit 1
- fi
+ fi
echo "Flashing BIOS @/dev/$BIOS_MTD"
flashcp -v $1 /dev/$BIOS_MTD
wait
@@ -52,7 +44,6 @@ function fwbios() {
rm -f $1
}
-
function fwbmccpld() {
# BMC_JTAG_MUX_1 #218 0:BMC 1:MB
set_gpio_ctrl 218 out 0
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh
new file mode 100644
index 000000000..377257eac
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# set_gpio_ctrl
+# pin #, direction, high(1)/low(0)
+function set_gpio_ctrl() {
+ echo $1 > /sys/class/gpio/export
+ echo $2 > /sys/class//gpio/gpio$1/direction
+ echo $3 > /sys/class/gpio/gpio$1/value
+ echo $1 > /sys/class/gpio/unexport
+ sleep 1
+}
+
+# get_gpio_ctrl
+# pin #
+function get_gpio_ctrl() {
+ echo $1 > /sys/class/gpio/export
+ echo $(cat /sys/class/gpio/gpio$1/value)
+ echo $1 > /sys/class/gpio/unexport
+}
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot.bb b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot.bb
new file mode 100644
index 000000000..87e4f747b
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Phosphor OpenBMC Kudo System Power Control Service"
+DESCRIPTION = "Phosphor OpenBMC Kudo System Power Control Daemon"
+
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+inherit obmc-phosphor-systemd
+
+DEPENDS += "systemd"
+RDEPENDS_${PN} += "libsystemd"
+RDEPENDS_${PN} += "bash"
+
+SRC_URI = " \
+ file://init_once.sh \
+ file://host-powerctrl.service \
+ "
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = " \
+ host-powerctrl.service \
+ "
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/init_once.sh ${D}${sbindir}/
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/host-powerctrl.service ${D}${systemd_unitdir}/system
+}
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/host-powerctrl.service b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/host-powerctrl.service
new file mode 100644
index 000000000..14c14d480
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/host-powerctrl.service
@@ -0,0 +1,12 @@
+[Unit]
+Description = Host Power Control Sequence
+
+[Service]
+Restart=no
+RemainAfterExit=true
+Type=oneshot
+ExecStart=/usr/sbin/init_once.sh
+StandardOutput=syslog
+
+[Install]
+WantedBy=sysinit.target
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh
new file mode 100644
index 000000000..b589379fb
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+source /usr/sbin/kudo-lib.sh
+
+# set all mux route to CPU before power on host
+# BMC_CPU_RTC_I2C_SEL #120
+set_gpio_ctrl 120 out 1
+# BMC_CPU_DDR_I2C_SEL #84
+set_gpio_ctrl 84 out 1
+# BMC_CPU_EEPROM_I2C_SEL #85
+set_gpio_ctrl 85 out 1
+# BMC_CPU_PMBUS_SEL #86
+set_gpio_ctrl 86 out 1
+
+# LED control
+# LED_BMC_LIVE #7
+set_gpio_ctrl 7 out 1
+
+# SPI control
+# Send command to CPLD to switch the bios spi interface to host
+i2cset -y -f -a 13 0x76 0x10 0x00
+
+# Power control
+# MON_BMC_ALIVE, GPIO 10
+set_gpio_ctrl 10 out 1
+# S0_BMC_OK, GPIO 69
+set_gpio_ctrl 69 out 1
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd.bb b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd.bb
new file mode 100644
index 000000000..f4e0bb09f
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Phosphor OpenBMC Kudo System Command"
+DESCRIPTION = "Phosphor OpenBMC Kudo System Command Daemon"
+
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+RDEPENDS_${PN} += "bash"
+
+SRC_URI = " \
+ file://kudo.sh \
+ file://kudo-ras.sh \
+ "
+
+SYSTEMD_PACKAGES = "${PN}"
+
+do_install () {
+ install -d ${D}/${sbindir}
+ install -m 0755 ${WORKDIR}/kudo.sh ${D}/${sbindir}/kudo.sh
+ install -m 0755 ${WORKDIR}/kudo-ras.sh ${D}/${sbindir}/kudo-ras.sh
+}
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo-ras.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo-ras.sh
new file mode 100644
index 000000000..af1b0a4e7
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo-ras.sh
@@ -0,0 +1,575 @@
+#!/bin/bash
+
+powerState=$(i2cget -f -y 0x2 0x4f 0xe0 b)
+
+getGPISourceRegisters(){
+ REG60=$(i2cget -f -y 0x2 0x4f 0x60 w) # GPI Data Set
+ REG61=$(i2cget -f -y 0x2 0x4f 0x61 w) # GPI DATA Set #0
+ REG62=$(i2cget -f -y 0x2 0x4f 0x62 w) # GPI DATA Set #1
+ REG63=$(i2cget -f -y 0x2 0x4f 0x63 w) # GPI DATA Set #2
+ REG64=$(i2cget -f -y 0x2 0x4f 0x64 w) # GPI DATA Set #3
+ DS0Pres=$((REG60 & 0x0100))
+ DS1Pres=$((REG60 & 0x0200))
+ DS2Pres=$((REG60 & 0x0400))
+ DS3Pres=$((REG60 & 0x0800))
+}
+
+getErrorCount() {
+ MemCE=$(i2cget -f -y 0x2 0x4f 0x90 w)
+ MemUE=$(i2cget -f -y 0x2 0x4f 0x93 w)
+ CoreCE=$(i2cget -f -y 0x2 0x4f 0x80 w)
+ CoreUE=$(i2cget -f -y 0x2 0x4f 0x83 w)
+ PCIeCE=$(i2cget -f -y 0x2 0x4f 0xc0 w)
+ PCIeUE=$(i2cget -f -y 0x2 0x4f 0xc2 w)
+ OtherCE=$(i2cget -f -y 0x2 0x4f 0xd0 w)
+ OtherUE=$(i2cget -f -y 0x2 0x4f 0xd8 w)
+}
+
+getReg61Vals() {
+ REG61_0800=$((REG61 & 0x0800))
+ REG61_0800_VAL=$((REG61_0800 >> 8))
+ REG61_1000=$((REG61 & 0x1000))
+ REG61_1000_VAL=$((REG61_1000 >> 12))
+}
+
+getReg62Vals() {
+ REG62_0100=$((REG62 & 0x0100))
+ REG62_0100_VAL=$((REG62_0100 >> 8))
+ REG62_0200=$((REG62 & 0x0200))
+ REG62_0200_VAL=$((REG62_0200 >> 9))
+ REG62_0400=$((REG62 & 0x0400))
+ REG62_0400_VAL=$((REG62_0400 >> 10))
+}
+
+getReg63Vals() {
+ REG63_0100=$((REG63 & 0x0100))
+ REG63_0100_VAL=$((REG63_0100 >> 8))
+}
+
+getReg64Vals() {
+ REG64_0100=$((REG64 & 0x0100))
+ REG64_0100_VAL=$((REG64_0100 >> 8))
+ REG64_0200=$((REG64 & 0x0200))
+ REG64_0200_VAL=$((REG64_0200 >> 9))
+ REG64_0800=$((REG64 & 0x0800))
+ REG64_0800_VAL=$((REG64_0800 >> 11))
+ REG64_2000=$((REG64 & 0x2000))
+ REG64_2000_VAL=$((REG64_2000 >> 13))
+ REG64_4000=$((REG64 & 0x4000))
+ REG64_4000_VAL=$((REG64_4000 >> 14))
+ REG64_8000=$((REG64 & 0x8000))
+ REG64_8000_VAL=$((REG64_8000 >> 15))
+ REG64_0001=$((REG64 & 0x0001))
+ REG64_0001_VAL=$((REG64_0001))
+}
+
+getGPIStatusRegisters(){
+ REG70=$(i2cget -f -y 0x2 0x4f 0x70 w) # Core, DIMM, SLC, PCIe, and Other errors
+ REG78=$(i2cget -f -y 0x2 0x4f 0x78 w) # VRD Fault/Warning Error
+ REG79=$(i2cget -f -y 0x2 0x4f 0x79 w) # VRD Hot
+ REG7A=$(i2cget -f -y 0x2 0x4f 0x7A w) # DIMM Hot Error
+ REG7B=$(i2cget -f -y 0x2 0x4f 0x7B w) # Boot #1 Error
+ REG7C=$(i2cget -f -y 0x2 0x4f 0x7C w) # Boot #2 Error
+ REG7D=$(i2cget -f -y 0x2 0x4f 0x7D w) # Watchdog/Other Status
+ REG7E=$(i2cget -f -y 0x2 0x4f 0x7E w) # RAS internal error
+}
+
+getReg70Vals() {
+ REG70_0100=$((REG70 & 0x0100))
+ REG70_0100_VAL=$((REG70_0100 >> 8))
+ REG70_0200=$((REG70 & 0x0200))
+ REG70_0200_VAL=$((REG70_0200 >> 9))
+ REG70_0400=$((REG70 & 0x0400))
+ REG70_0400_VAL=$((REG70_0400 >> 10))
+ REG70_0800=$((REG70 & 0x0800))
+ REG70_0800_VAL=$((REG70_0800 >> 11))
+ REG70_4000=$((REG70 & 0x4000))
+ REG70_4000_VAL=$((REG70_4000 >> 14))
+ REG70_8000=$((REG70 & 0x8000))
+ REG70_8000_VAL=$((REG70_8000 >> 15))
+ REG70_0001=$((REG70 & 0x0001))
+ REG70_0001_VAL=$((REG70_0001))
+ REG70_0002=$((REG70 & 0x0002))
+ REG70_0002_VAL=$((REG70_0002 >> 1))
+}
+
+getReg78Vals() {
+ REG78_0100=$((REG78 & 0x0100))
+ REG78_0100_VAL=$((REG78_0100 >> 8))
+ REG78_0200=$((REG78 & 0x0200))
+ REG78_0200_VAL=$((REG78_0200 >> 9))
+ REG78_0400=$((REG78 & 0x0400))
+ REG78_0400_VAL=$((REG78_0400 >> 10))
+ REG78_0800=$((REG78 & 0x0800))
+ REG78_0800_VAL=$((REG78_0800 >> 11))
+ REG78_1000=$((REG78 & 0x1000))
+ REG78_1000_VAL=$((REG78_1000 >> 12))
+ REG78_2000=$((REG78 & 0x2000))
+ REG78_2000_VAL=$((REG78_2000 >> 13))
+ REG78_4000=$((REG78 & 0x4000))
+ REG78_4000_VAL=$((REG78_4000 >> 14))
+ REG78_8000=$((REG78 & 0x8000))
+ REG78_8000_VAL=$((REG78_8000 >> 15))
+ REG78_0001=$((REG78 & 0x0001))
+ REG78_0001_VAL=$((REG78_0001))
+ REG78_0002=$((REG78 & 0x0002))
+ REG78_0002_VAL=$((REG78_0002 >> 1))
+ REG78_0004=$((REG78 & 0x0004))
+ REG78_0004_VAL=$((REG78_0004 >> 2))
+ REG78_0008=$((REG78 & 0x0008))
+ REG78_0008_VAL=$((REG78_0008 >> 3))
+}
+
+getReg79Vals() {
+ REG79_0100=$((REG79 & 0x0100))
+ REG79_0100_VAL=$((REG79_0100 >> 8))
+ REG79_1000=$((REG79 & 0x1000))
+ REG79_1000_VAL=$((REG79_1000 >> 12))
+ REG79_2000=$((REG79 & 0x2000))
+ REG79_2000_VAL=$((REG79_2000 >> 13))
+ REG79_4000=$((REG79 & 0x4000))
+ REG79_4000_VAL=$((REG79_4000 >> 14))
+ REG79_0001=$((REG79 & 0x0001))
+ REG79_0001_VAL=$((REG79_0001))
+ REG79_0002=$((REG79 & 0x0002))
+ REG79_0002_VAL=$((REG79_0002 >> 1))
+ REG79_0004=$((REG79 & 0x0004))
+ REG79_0004_VAL=$((REG79_0004 >> 2))
+ REG79_0008=$((REG79 & 0x0008))
+ REG79_0008_VAL=$((REG79_0008 >> 3))
+}
+
+getReg7AVals() {
+ REG7A_0100=$((REG7A & 0x0100))
+ REG7A_0100_VAL=$((REG7A_0100 >> 8))
+ REG7A_0200=$((REG7A & 0x0200))
+ REG7A_0200_VAL=$((REG7A_0200 >> 9))
+ REG7A_0400=$((REG7A & 0x0400))
+ REG7A_0400_VAL=$((REG7A_0400 >> 10))
+ REG7A_0800=$((REG7A & 0x0800))
+ REG7A_0800_VAL=$((REG7A_0800 >> 11))
+ REG7A_1000=$((REG7A & 0x1000))
+ REG7A_1000_VAL=$((REG7A_1000 >> 12))
+ REG7A_2000=$((REG7A & 0x2000))
+ REG7A_2000_VAL=$((REG7A_2000 >> 13))
+ REG7A_4000=$((REG7A & 0x4000))
+ REG7A_4000_VAL=$((REG7A_4000 >> 14))
+ REG7A_8000=$((REG7A & 0x8000))
+ REG7A_8000_VAL=$((REG7A_8000 >> 15))
+}
+
+getReg7DVals() {
+ REG7D_0100=$((REG7D & 0x0100))
+ REG7D_0100_VAL=$((REG7D_0100 >> 8))
+ REG7D_0200=$((REG7D & 0x0200))
+ REG7D_0200_VAL=$((REG7D_0200 >> 9))
+ REG7D_0400=$((REG7D & 0x0400))
+ REG7D_0400_VAL=$((REG7D_0400 >> 10))
+}
+
+getReg7EVals() {
+ REG7E_0100=$((REG7E & 0x0100))
+ REG7E_0100_VAL=$((REG7E_0100 >> 8))
+ REG7E_0200=$((REG7E & 0x0200))
+ REG7E_0200_VAL=$((REG7E_0200 >> 9))
+}
+
+getGPIMaskRegisters(){
+ REG50=$(i2cget -f -y 0x2 0x4f 0x50 w) # GPI Control #0
+ REG51=$(i2cget -f -y 0x2 0x4f 0x51 w) # GPI Control #1
+ REG52=$(i2cget -f -y 0x2 0x4f 0x52 w) # GPI Control #2
+ REG53=$(i2cget -f -y 0x2 0x4f 0x53 w) # GPI Control #3
+ REG54=$(i2cget -f -y 0x2 0x4f 0x54 w) # GPI CE/UE Mask
+}
+
+getReg50Vals() {
+ REG50_0400=$((REG50 & 0x0400))
+ REG50_0400_VAL=$((REG50_0400 >> 10))
+ REG50_0800=$((REG50 & 0x0800))
+ REG50_0800_VAL=$((REG50_0800 >> 11))
+}
+
+getReg51Vals() {
+ REG51_0100=$((REG51 & 0x0100))
+ REG51_0100_VAL=$((REG51_0100 >> 8))
+ REG51_0200=$((REG51 & 0x0200))
+ REG51_0200_VAL=$((REG51_0200 >> 9))
+ REG51_0400=$((REG51 & 0x0400))
+ REG51_0400_VAL=$((REG51_0400 >> 10))
+}
+
+getReg52Vals() {
+ REG52_0100=$((REG52 & 0x0100))
+ REG52_0100_VAL=$((REG52_0100 >> 8))
+}
+
+getReg53Vals() {
+ REG53_0100=$((REG53 & 0x0100))
+ REG53_0100_VAL=$((REG53_0100 >> 8))
+ REG53_0200=$((REG53 & 0x0200))
+ REG53_0200_VAL=$((REG53_0200 >> 9))
+ REG53_0800=$((REG53 & 0x0800))
+ REG53_0800_VAL=$((REG53_0800 >> 11))
+ REG53_2000=$((REG53 & 0x2000))
+ REG53_2000_VAL=$((REG53_2000 >> 13))
+ REG53_4000=$((REG53 & 0x4000))
+ REG53_4000_VAL=$((REG53_4000 >> 14))
+ REG53_8000=$((REG53 & 0x8000))
+ REG53_8000_VAL=$((REG53_8000 >> 15))
+ REG53_0001=$((REG53 & 0x0001))
+ REG53_0001_VAL=$((REG53_0001))
+}
+
+getReg54Vals() {
+ REG54_0100=$((REG54 & 0x0100))
+ REG54_0100_VAL=$((REG54_0100 >> 8))
+ REG54_0200=$((REG54 & 0x0200))
+ REG54_0200_VAL=$((REG54_0200 >> 9))
+ REG54_0001=$((REG54 & 0x0001))
+ REG54_0001_VAL=$((REG54_0001))
+ REG54_0002=$((REG54 & 0x0002))
+ REG54_0002_VAL=$((REG54_0002 >> 1))
+ REG54_0004=$((REG54 & 0x0004))
+ REG54_0004_VAL=$((REG54_0004 >> 2))
+ REG54_0008=$((REG54 & 0x0008))
+ REG54_0008_VAL=$((REG54_0008 >> 3))
+ REG54_0010=$((REG54 & 0x0010))
+ REG54_0010_VAL=$((REG54_0010 >> 4))
+ REG54_0020=$((REG54 & 0x0020))
+ REG54_0020_VAL=$((REG54_0020 >> 5))
+}
+
+
+
+if [ -z $powerState ]
+ then
+ echo "System is currently Powered off S6"
+else
+ echo "System is currently in ${powerState} "
+
+ # Get Error Count
+ getErrorCount
+ echo " "
+ echo " Error Count: "
+ echo " Memory Errors: Correctable $((MemCE >> 8)) Uncorrectable $((MemUE >> 8)) "
+ echo " Core Errors: Correctable $((CoreCE >> 8)) Uncorrectable $((CoreUE >> 8))"
+ echo " PCIe Errors: Correctable $((PCIeCE >> 8)) Uncorrectable $((PCIeUE >> 8)) "
+ echo " Other Errors: Correctable $((OtherCE >> 8)) Uncorrectable $((OtherUE >> 8)) "
+
+ # GPI Source Registers
+ getGPISourceRegisters
+ echo " "
+ echo " GPI Source Registers: "
+ echo " GPI Data Set #0 Present: $((DS0Pres >> 8)) "
+ echo " GPI Data Set #1 Present: $((DS1Pres >> 9)) "
+ echo " GPI Data Set #2 Present: $((DS2Pres >> 10)) "
+ echo " GPI Data Set #3 Present: $((DS3Pres >> 11)) "
+
+ # REG61 Data Set#0
+ getReg61Vals
+ echo " "
+ echo " GPI Data Set#0: "
+ if [[ "$REG61_0800_VAL" != 0 ]]; then
+ echo " Platform Booting "
+ fi
+ if [[ "$REG61_1000_VAL" != 0 ]]; then
+ echo " Critical Stop "
+ fi
+
+ # REG62 Data Set#1
+ getReg62Vals
+ echo " "
+ echo " GPI Data Set#1: "
+ if [[ "$REG62_0100_VAL" != 0 ]]; then
+ echo " SoC VR HOT/Warn/Fault "
+ fi
+ if [[ "$REG62_0200_VAL" != 0 ]]; then
+ echo " Core VR HOT/Warn/Fault "
+ fi
+ if [[ "$REG62_0400_VAL" != 0 ]]; then
+ echo " DIMM HOT/Warn/Fault "
+ fi
+
+ # REG63 Data Set#2
+ getReg63Vals
+ echo " "
+ echo " GPI Data Set#2: "
+ if [[ "$REG63_0100_VAL" != 0 ]]; then
+ echo " DIMM HOT "
+ fi
+
+ # REG64 Data Set#3
+ getReg64Vals
+ echo " "
+ echo " GPI Data Set#3: "
+ if [[ "$REG64_0100_VAL" != 0 ]]; then
+ echo " Core Errors "
+ fi
+ if [[ "$REG64_0200_VAL" != 0 ]]; then
+ echo " Memory Errors "
+ fi
+ if [[ "$REG64_0800_VAL" != 0 ]]; then
+ echo " PCIe Errors "
+ fi
+ if [[ "$REG64_2000_VAL" != 0 ]]; then
+ echo " Other Errors "
+ fi
+ if [[ "$REG64_4000_VAL" != 0 ]]; then
+ echo " ACPI State Change "
+ fi
+ if [[ "$REG64_8000_VAL" != 0 ]]; then
+ echo " Boot Errors "
+ fi
+ if [[ "$REG64_0001_VAL" != 0 ]]; then
+ echo " RAS Internal Error "
+ fi
+
+ # GPI Status Regs
+ getGPIStatusRegisters
+ echo " "
+ echo " GPI Status Regs "
+
+ getReg70Vals
+ echo " "
+ echo " Core, DIMM, SLC, PCIe, and Other errors: "
+ if [[ "$REG70_0100_VAL" != 0 ]]; then
+ echo " Core CE Error "
+ fi
+ if [[ "$REG70_0200_VAL" != 0 ]]; then
+ echo " Core UE Error "
+ fi
+ if [[ "$REG70_0400_VAL" != 0 ]]; then
+ echo " DIMM CE Error "
+ fi
+ if [[ "$REG70_0800_VAL" != 0 ]]; then
+ echo " DIMM UE Error "
+ fi
+ if [[ "$REG70_4000_VAL" != 0 ]]; then
+ echo " PCIe CE Error "
+ fi
+ if [[ "$REG70_8000_VAL" != 0 ]]; then
+ echo " PCIe UE Error "
+ fi
+ if [[ "$REG70_0001_VAL" != 0 ]]; then
+ echo " Other CE Error "
+ fi
+ if [[ "$REG70_0002_VAL" != 0 ]]; then
+ echo " Other UE Error "
+ fi
+
+ getReg78Vals
+ echo " "
+ echo " VRD Fault/Warning Error: "
+ if [[ "$REG78_0100_VAL" != 0 ]]; then
+ echo " SoC VRD fault/warning "
+ fi
+ if [[ "$REG78_0200_VAL" != 0 ]]; then
+ echo " Core VRD1 fault/warning "
+ fi
+ if [[ "$REG78_0400_VAL" != 0 ]]; then
+ echo " Core VRD2 fault/warning "
+ fi
+ if [[ "$REG78_0800_VAL" != 0 ]]; then
+ echo " Core VRD3 fault/warning "
+ fi
+ if [[ "$REG78_1000_VAL" != 0 ]]; then
+ echo " DIMM VRD1 fault/warning "
+ fi
+ if [[ "$REG78_2000_VAL" != 0 ]]; then
+ echo " DIMM VRD2 fault/warning "
+ fi
+ if [[ "$REG78_4000_VAL" != 0 ]]; then
+ echo " DIMM VRD3 fault/warning "
+ fi
+ if [[ "$REG78_8000_VAL" != 0 ]]; then
+ echo " DIMM VRD3 fault/warning "
+ fi
+ if [[ "$REG78_0001_VAL" != 0 ]]; then
+ echo " DIMM fault/warning "
+ fi
+ if [[ "$REG78_0002_VAL" != 0 ]]; then
+ echo " DIMM fault/warning "
+ fi
+ if [[ "$REG78_0004_VAL" != 0 ]]; then
+ echo " DIMM fault/warning "
+ fi
+ if [[ "$REG78_0008_VAL" != 0 ]]; then
+ echo " DIMM fault/warning "
+ fi
+
+ getReg79Vals
+ echo " "
+ echo " VRD Hot: "
+ if [[ "$REG79_0100_VAL" != 0 ]]; then
+ echo " SoC VRD is HOT "
+ fi
+ if [[ "$REG79_1000_VAL" != 0 ]]; then
+ echo " Core VRD1 is HOT "
+ fi
+ if [[ "$REG79_2000_VAL" != 0 ]]; then
+ echo " Core VRD2 is HOT "
+ fi
+ if [[ "$REG79_4000_VAL" != 0 ]]; then
+ echo " Core VRD3 is HOT "
+ fi
+ if [[ "$REG79_0001_VAL" != 0 ]]; then
+ echo " DIMM VRD1 is HOT "
+ fi
+ if [[ "$REG79_0002_VAL" != 0 ]]; then
+ echo " DIMM VRD2 is HOT "
+ fi
+ if [[ "$REG79_0004_VAL" != 0 ]]; then
+ echo " DIMM VRD3 is HOT "
+ fi
+ if [[ "$REG79_0008_VAL" != 0 ]]; then
+ echo " DIMM VRD4 is HOT "
+ fi
+
+ getReg7AVals
+ echo " "
+ echo " DIMM Hot Error: "
+ if [[ "$REG7A_0100_VAL" != 0 ]]; then
+ echo " DIMM channel 0 is HOT "
+ fi
+ if [[ "$REG7A_0200_VAL" != 0 ]]; then
+ echo " DIMM channel 1 is HOT "
+ fi
+ if [[ "$REG7A_0400_VAL" != 0 ]]; then
+ echo " DIMM channel 2 is HOT "
+ fi
+ if [[ "$REG7A_0800_VAL" != 0 ]]; then
+ echo " DIMM channel 3 is HOT "
+ fi
+ if [[ "$REG7A_1000_VAL" != 0 ]]; then
+ echo " DIMM channel 4 is HOT "
+ fi
+ if [[ "$REG7A_2000_VAL" != 0 ]]; then
+ echo " DIMM channel 5 is HOT "
+ fi
+ if [[ "$REG7A_4000_VAL" != 0 ]]; then
+ echo " DIMM channel 6 is HOT "
+ fi
+ if [[ "$REG7A_8000_VAL" != 0 ]]; then
+ echo " DIMM channel 7 is HOT "
+ fi
+
+ echo " "
+ echo " Boot #1 Error: $((REG7B >> 8)) "
+ echo " Boot #2 Error: $((REG7C >> 8)) "
+
+
+ getReg7DVals
+ echo " "
+ echo " Watchdog/Other Status: "
+ if [[ "$REG7D_0100_VAL" != 0 ]]; then
+ echo " Non-secure WDT expired "
+ fi
+ if [[ "$REG7D_0200_VAL" != 0 ]]; then
+ echo " Secure WDT expired "
+ fi
+ if [[ "$REG7D_0400_VAL" != 0 ]]; then
+ echo " Firmware WDT expired "
+ fi
+
+ getReg7EVals
+ echo " "
+ echo " RAS internal error: "
+ if [[ "$REG7E_0100_VAL" != 0 ]]; then
+ echo " Error from SMpro "
+ fi
+ if [[ "$REG7E_0200_VAL" != 0 ]]; then
+ echo " Error from PMpro "
+ fi
+
+ # GPI Mask Regs
+ getGPIMaskRegisters
+ echo " "
+ echo " GPI Mask Regs "
+
+ getReg50Vals
+ echo " "
+ echo " GPI Control #0: "
+
+ if [[ "$REG50_0400_VAL" != 0 ]]; then
+ echo " Platform Booting "
+ fi
+ if [[ "$REG50_0800_VAL" != 0 ]]; then
+ echo " Critical Stop "
+ fi
+
+ getReg51Vals
+ echo " "
+ echo " GPI Control #1: "
+
+ if [[ "$REG51_0100_VAL" != 0 ]]; then
+ echo " SoC VR HOT/Warn/Fault "
+ fi
+ if [[ "$REG51_0200_VAL" != 0 ]]; then
+ echo " Core VR HOT/Warn/Fault "
+ fi
+ if [[ "$REG51_0400_VAL" != 0 ]]; then
+ echo " DIMM VRD HOT/Warn/Fault "
+ fi
+
+ getReg52Vals
+ echo " "
+ echo " GPI Control #2: "
+
+ if [[ "$REG52_0100_VAL" != 0 ]]; then
+ echo " DIMM HOT "
+ fi
+
+ getReg53Vals
+ echo " "
+ echo " GPI Control #3: "
+ if [[ "$REG53_0100_VAL" != 0 ]]; then
+ echo " Core Errors "
+ fi
+ if [[ "$REG53_0200_VAL" != 0 ]]; then
+ echo " Memory Errors "
+ fi
+ if [[ "$REG53_0800_VAL" != 0 ]]; then
+ echo " PCIe Errors "
+ fi
+ if [[ "$REG53_2000_VAL" != 0 ]]; then
+ echo " Other SoC Errors "
+ fi
+ if [[ "$REG53_4000_VAL" != 0 ]]; then
+ echo " ACPI State Change "
+ fi
+ if [[ "$REG53_8000_VAL" != 0 ]]; then
+ echo " Boot Errors "
+ fi
+ if [[ "$REG53_0001_VAL" != 0 ]]; then
+ echo " RAS Internal Error "
+ fi
+
+ getReg54Vals
+ echo " "
+ echo " GPI CE/UE Mask: "
+ if [[ "$REG54_0100_VAL" != 0 ]]; then
+ echo " Core CE "
+ fi
+ if [[ "$REG54_0200_VAL" != 0 ]]; then
+ echo " Core UE "
+ fi
+ if [[ "$REG54_0001_VAL" != 0 ]]; then
+ echo " DIMM CE "
+ fi
+ if [[ "$REG54_0002_VAL" != 0 ]]; then
+ echo " DIMM UE "
+ fi
+ if [[ "$REG54_0004_VAL" != 0 ]]; then
+ echo " PCIe CE "
+ fi
+ if [[ "$REG54_0008_VAL" != 0 ]]; then
+ echo " PCIe UE "
+ fi
+ if [[ "$REG54_0010_VAL" != 0 ]]; then
+ echo " Other CE "
+ fi
+ if [[ "$REG54_0020_VAL" != 0 ]]; then
+ echo " Other UE "
+ fi
+
+fi
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo.sh
new file mode 100644
index 000000000..0c12fca13
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-cmd/kudo.sh
@@ -0,0 +1,276 @@
+#!/bin/bash
+# help information
+
+source /usr/sbin/kudo-lib.sh
+
+function usage_rst() {
+ echo " kudo rst [parameter]"
+ echo " hotswap --> reset the whole kudo node"
+ echo " system --> reset the host"
+ echo " btn --> trigger a power button event"
+ echo " shutdown --> send out shutdown signal to CPU"
+ echo " display --> "
+}
+
+function usage_led() {
+
+ echo " kudo led 'att'/'boot' [parameter]"
+ echo " on --> change to CPU console"
+ echo " off --> change to CPU 0 SCP console"
+ echo " status --> change to CPU 1 SCP console"
+}
+
+function usage_uart() {
+ echo " kudo uart [parameter]"
+ echo " host --> change to CPU console"
+ echo " scp1 --> change to CPU 0 SCP console"
+ echo " scp2 --> change to CPU 1 SCP console"
+ echo " hosthr --> change CPU console to header"
+ echo " scphr --> change SCP console to header"
+ echo " display --> "
+}
+
+function usage() {
+ echo " kudo BMC console system utilities"
+ echo " kudo [optional] [parameter]"
+ echo " rst --> reset traget device"
+ echo " fw --> get version"
+ echo " uart --> control the uart mux"
+ echo " led --> control the leds"
+}
+
+function reset() {
+ case $1 in
+ hotswap)
+ # Virtual reset #94
+ set_gpio_ctrl 94 out 1
+ ;;
+ system)
+ # S0 system reset #65
+ set_gpio_ctrl 65 out 0
+ sleep 1
+ set_gpio_ctrl 65 out 1
+ ;;
+ btn)
+ # power button #203
+ set_gpio_ctrl 203 out 1
+ sleep 1
+ set_gpio_ctrl 203 out 0
+ ;;
+ shutdown)
+ # BMC_CPU_SHD_REQ #70
+ set_gpio_ctrl 70 out 0
+ sleep 3
+ set_gpio_ctrl 70 out 1
+ ;;
+ forceOff)
+ # power button #203
+ set_gpio_ctrl 203 out 1
+ sleep 6
+ set_gpio_ctrl 203 out 0
+ ;;
+ display)
+ echo "Virtual reset #94" $(get set_gpio_ctrl 94)
+ echo "S0 System reset #65" $(get set_gpio_ctrl 65)
+ echo "Power Button #203" $(get set_gpio_ctrl 203)
+ echo "BMC_CPU SHD Req #70" $(get set_gpio_ctrl 70)
+ ;;
+ *)
+ usage_rst
+ ;;
+ esac
+}
+
+function fw_rev() {
+ BMC_CPLD_VER_FILE="/run/cpld0.version"
+ MB_CPLD_VER_FILE="/run/cpld1.version"
+
+ cmd=$(cat $BMC_CPLD_VER_FILE)
+ echo " BMC_CPLD: " $cmd
+ cmd=$(cat $MB_CPLD_VER_FILE)
+ echo " MB_CPLD: " $cmd
+
+ cmd=$(cat /etc/os-release | grep VERSION -w | cut -d '=' -f 2)
+ echo " BMC : " ${cmd}
+
+ #BMC PWR Sequencer
+ i2cset -y -f -a 14 0x59 0xfe 0x0000 w
+ cmd=$(i2cget -y -f -a 14 0x59 0xfe i 2 | awk '{print substr($0,3)}')
+ echo " BMC PowerSequencer : ${cmd}"
+ #only display with smbios exists
+ if [[ -e /var/lib/smbios/smbios2 ]]; then
+ cmd=$(busctl introspect xyz.openbmc_project.Smbios.MDR_V2 \
+ /xyz/openbmc_project/inventory/system/chassis/motherboard/bios | grep Version | awk '{print $4}')
+ echo " Bios: $cmd"
+ fi
+
+ cmd=$(i2cget -f -y 2 0x4f 0x1 w);
+ echo " SCP Firmware: ${cmd}"
+
+ adm1266_ver | grep REVISION
+
+}
+
+function uartmux() {
+ case $1 in
+ host)
+ set_gpio_ctrl 167 out 1
+ ;;
+ scp1)
+ set_gpio_ctrl 161 out 1
+ set_gpio_ctrl 177 out 1
+ set_gpio_ctrl 198 out 0
+ ;;
+ scp2)
+ set_gpio_ctrl 161 out 1
+ set_gpio_ctrl 177 out 1
+ set_gpio_ctrl 198 out 1
+ ;;
+ hosthr)
+ set_gpio_ctrl 167 out 0
+ ;;
+ scphr)
+ set_gpio_ctrl 161 out 0
+ set_gpio_ctrl 177 out 0
+ ;;
+ display)
+ if [ $(get_gpio_ctrl 167) -eq 1 ]; then
+ echo " CPU host to BMC console"
+ else
+ echo " CPU host to header"
+ fi
+ if [ $(get_gpio_ctrl 161) -eq 1 ] && [ $(get_gpio_ctrl 177) -eq 1 ]; then
+ if [ $(get_gpio_ctrl 198) -eq 1 ]; then
+ echo " SCP2 host to BMC console"
+ else
+ echo " SCP1 host to BMC console"
+ fi
+ elif [ $(get_gpio_ctrl 161) -eq 0 ] && [ $(get_gpio_ctrl 177) -eq 0 ]; then
+ if [ $(get_gpio_ctrl 198) -eq 1 ]; then
+ echo " SCP2 host to Header"
+ else
+ echo " SCP1 host to Header"
+ fi
+ else
+ echo "It's unknown status"
+ echo "167" $(get_gpio_ctrl 167)
+ echo "161" $(get_gpio_ctrl 161)
+ echo "177" $(get_gpio_ctrl 177)
+ echo "198" $(get_gpio_ctrl 198)
+ fi
+ ;;
+ *)
+ usage_uart
+ ;;
+ esac
+}
+
+function ledtoggle() {
+
+ CurrentLED=$( i2cget -y -f -a 34 0x76 0x05 i 1 | cut -d ' ' -f 2)
+ case $1 in
+ boot)
+ cmd=$((($CurrentLED & 0x40) != 0))
+ case $2 in
+ on)
+ #turn on LED
+ if [[ $cmd -eq 0 ]]; then
+ setValue=$(( 0x40 + $CurrentLED ))
+ i2cset -y -f -a 34 0x76 0x10 $setValue
+ fi
+ ;;
+ off)
+ #turn off led
+ if [[ $cmd -eq 1 ]]; then
+ setValue=$(( 0x80 & $CurrentLED ))
+ i2cset -y -f -a 34 0x76 0x10 $setValue
+ fi
+ ;;
+ toggle)
+ #turn on LED
+ setValue=$(( 0x40 ^ $CurrentLED ))
+ i2cset -y -f -a 34 0x76 0x10 $setValue
+ ;;
+ status)
+ #displayLED status
+ if [[ $cmd -eq 1 ]]; then
+ echo "on"
+ else
+ echo "off"
+ fi
+ ;;
+ *)
+ usage_led
+ ;;
+ esac
+ ;;
+ att)
+ cmd=$((($CurrentLED & 0x80) != 0))
+ case $2 in
+ on)
+ #turn on LED
+ if [[ $cmd -eq 0 ]]; then
+ setValue=$(( 0x80 + $CurrentLED ))
+ i2cset -y -f -a 34 0x76 0x10 $setValue
+ fi
+ ;;
+ off)
+ #turn off led
+ if [[ $cmd -eq 1 ]]; then
+ setValue=$(( 0x40 & $CurrentLED ))
+ i2cset -y -f -a 34 0x76 0x10 $setValue
+ fi
+ ;;
+ toggle)
+ #turn on LED
+ setValue=$(( 0x80 ^ $CurrentLED ))
+ i2cset -y -f -a 34 0x76 0x10 $setValue
+ ;;
+ status)
+ #displayLED status
+ if [[ $cmd -eq 1 ]]; then
+ echo "on"
+ else
+ echo "off"
+ fi
+ ;;
+ *)
+ usage_led
+ ;;
+ esac
+ ;;
+ *)
+ usage_led
+ ;;
+ esac
+}
+
+function usblist() {
+ for i in {0..8}
+ do
+ cmd="devmem 0xf083"$i"154"
+ printf "udc%d : 0xF803%d154-" "$i" "$i"
+ $cmd
+ done
+}
+
+case $1 in
+ rst)
+ reset $2
+ ;;
+ fw)
+ fw_rev
+ ;;
+ uart)
+ uartmux $2
+ ;;
+ usb)
+ usblist
+ ;;
+ led)
+ ledtoggle $2 $3
+ ;;
+ *)
+ usage
+ ;;
+esac
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb
new file mode 100644
index 000000000..85006dadc
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb
@@ -0,0 +1,16 @@
+UMMARY = "Kudo IPMI Entity association mapping."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI += "file://kudo_entity_association_map.json"
+
+FILES_${PN} = " \
+ ${datadir}/ipmi-entity-association/entity_association_map.json \
+ "
+
+do_install() {
+ install -d ${D}${datadir}/ipmi-entity-association
+ install -m 0644 -D ${WORKDIR}/kudo_entity_association_map.json \
+ ${D}${datadir}/ipmi-entity-association/entity_association_map.json
+}
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json
new file mode 100644
index 000000000..2530684c0
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json
@@ -0,0 +1,35 @@
+{
+ "system_board": [
+ {"instance": 1, "name": "/"}
+ ],
+ "system_internal_expansion_board": [
+ {"instance": 1, "name": "/"}
+ ],
+ "power_system_board": [
+ {"instance": 1, "name": "/"}
+ ],
+ "add_in_card": [
+ {"instance": 0, "name": "/PE0"},
+ {"instance": 1, "name": "/PE1"},
+ {"instance": 2, "name": "/PE2"},
+ {"instance": 3, "name": "/PE3"},
+ {"instance": 4, "name": "/PE4"},
+ {"instance": 5, "name": "/PE5"},
+ {"instance": 6, "name": "/PE6"},
+ {"instance": 7, "name": "/PE7"}
+ ],
+ "fan": [
+ {"instance": 0, "name": "/fan0"},
+ {"instance": 1, "name": "/fan1"},
+ {"instance": 2, "name": "/fan2"},
+ {"instance": 3, "name": "/fan3"},
+ {"instance": 4, "name": "/fan4"},
+ {"instance": 5, "name": "/fan5"}
+ ],
+ "cooling_unit": [
+ {"instance": 0, "name": "/ZONE0"},
+ {"instance": 1, "name": "/ZONE1"},
+ {"instance": 2, "name": "/ZONE2"},
+ {"instance": 3, "name": "/ZONE3"}
+ ]
+}
diff --git a/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb b/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb
index f64373e89..41a345d8e 100644
--- a/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb
+++ b/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb
@@ -7,12 +7,15 @@ PROVIDES = "${PACKAGES}"
PACKAGES = " \
${PN}-kudo-system \
${PN}-kudo-fw \
+ ${PN}-fan-mgmt \
"
PROVIDES += "virtual/obmc-system-mgmt"
+PROVIDES += "virtual/obmc-fan-mgmt"
RPROVIDES_${PN}-kudo-system += "virtual-obmc-system-mgmt"
-RPROVIDES_${PN}-kudo-fw += "virtual-obmc-system-mgmt"
+RPROVIDES_${PN}-kudo-fw += "virtual-obmc-flash-mgmt"
+RPROVIDES_${PN}-fan-mgmt += "virtual-obmc-fan-mgmt"
SUMMARY_${PN}-kudo-system = "KUDO System"
RDEPENDS_${PN}-kudo-system = " \
@@ -20,10 +23,15 @@ RDEPENDS_${PN}-kudo-system = " \
ethtool \
memtester \
loadsvf \
+ fii-ipmi-oem \
+ kudo-entity-association-map \
+ hotswap-power-cycle \
obmc-console \
usb-network \
ncsid \
gbmc-mac-config \
+ kudo-boot \
+ kudo-cmd \
"
SUMMARY_${PN}-kudo-fw = "KUDO Firmware"
@@ -34,3 +42,9 @@ RDEPENDS_${PN}-kudo-fw = " \
kudo-cpld-update \
kudo-scp-update \
"
+
+SUMMARY_${PN}-fan-mgmt = "kudo fan mgmt"
+RDEPENDS_${PN}-fan-mgmt = " \
+ pwm-init \
+ phosphor-pid-control \
+ "
diff --git a/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/blacklist.json b/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/blacklist.json
new file mode 100644
index 000000000..b304fe1d9
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/blacklist.json
@@ -0,0 +1,3 @@
+{
+ "buses": [1]
+}
diff --git a/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/kudo.json b/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/kudo.json
index 2c5fdb3bc..6437e77b0 100644
--- a/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/kudo.json
+++ b/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager/kudo.json
@@ -24,8 +24,8 @@
"vout4_Name":"DC_P3V3_PU",
"vout5_Name":"DC_3V3_STBY",
"vout6_Name":"DC_P1V175",
- "vout2_Max":3,
- "vout3_Max":2.2,
+ "vout2_Max":3.5,
+ "vout3_Max":2.5,
"vout4_Max":5.8,
"vout5_Max":5.8,
"vout6_Max":3,
@@ -35,35 +35,35 @@
"Name":"upper critical",
"Label":"vout2",
"Severity":1,
- "Value":2.75
+ "Value":2.877
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout2",
"Severity":0,
- "Value":2.5
+ "Value":2.74
},
- {
- "Direction":"less than",
- "Name":"lower critical",
- "Label":"vout2",
- "Severity":1,
- "Value":2.375
- },
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout2",
"Severity":0,
- "Value":2.4
+ "Value":2.260
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout2",
+ "Severity":1,
+ "Value":2.192
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout3",
"Severity":1,
- "Value":1.32
+ "Value":1.33
},
{
"Direction":"greater than",
@@ -74,101 +74,101 @@
},
{
"Direction":"less than",
- "Name":"lower critical",
+ "Name":"lower non critical",
"Label":"vout3",
- "Severity":1,
- "Value":1.14
+ "Severity":0,
+ "Value":1.15
},
{
"Direction":"less than",
- "Name":"lower non critical",
+ "Name":"lower critical",
"Label":"vout3",
- "Severity":0,
- "Value":1.17
+ "Severity":1,
+ "Value":1.137
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout4",
"Severity":1,
- "Value":3.63
+ "Value":3.927
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout4",
"Severity":0,
- "Value":3.4
+ "Value":3.745
},
{
"Direction":"less than",
- "Name":"lower critical",
+ "Name":"lower non critical",
"Label":"vout4",
- "Severity":1,
- "Value":3.135
+ "Severity":0,
+ "Value":2.951
},
{
"Direction":"less than",
- "Name":"lower non critical",
+ "Name":"lower critical",
"Label":"vout4",
- "Severity":0,
- "Value":3.2
+ "Severity":1,
+ "Value":2.724
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout5",
"Severity":1,
- "Value":3.63
+ "Value":3.927
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout5",
"Severity":0,
- "Value":3.4
+ "Value":3.745
},
{
"Direction":"less than",
- "Name":"lower critical",
+ "Name":"lower non critical",
"Label":"vout5",
- "Severity":1,
- "Value":3.135
+ "Severity":0,
+ "Value":2.951
},
{
"Direction":"less than",
- "Name":"lower non critical",
+ "Name":"lower critical",
"Label":"vout5",
- "Severity":0,
- "Value":3.2
+ "Severity":1,
+ "Value":2.724
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout6",
"Severity":1,
- "Value":1.292
+ "Value":1.298
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout6",
"Severity":0,
- "Value":1.23
+ "Value":1.239
},
{
"Direction":"less than",
- "Name":"lower critical",
+ "Name":"lower non critical",
"Label":"vout6",
- "Severity":1,
- "Value":1.117
+ "Severity":0,
+ "Value":1.109
},
{
"Direction":"less than",
- "Name":"lower non critical",
+ "Name":"lower critical",
"Label":"vout6",
- "Severity":0,
- "Value":1.117
+ "Severity":1,
+ "Value":1.109
}
],
"Type":"MAX34440"
@@ -239,13 +239,13 @@
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":105
+ "Value":70
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":100
+ "Value":60
}
],
"Type":"TMP75",
@@ -261,13 +261,13 @@
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":105
+ "Value":70
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":100
+ "Value":60
}
],
"Type":"TMP75",
@@ -277,19 +277,19 @@
{
"Address":"0x48",
"Bus":44,
- "Name":"Mobo_NBM1_ZONE_T",
+ "Name":"CPU0_NBM_ZONE_T",
"Thresholds":[
{
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":110
+ "Value":80
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":108
+ "Value":70
}
],
"Type":"TMP75",
@@ -299,19 +299,19 @@
{
"Address":"0x49",
"Bus":45,
- "Name":"Mobo_NBM2_ZONE_T",
+ "Name":"CPU1_NBM_ZONE_T",
"Thresholds":[
{
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":110
+ "Value":80
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":108
+ "Value":70
}
],
"Type":"TMP75",
@@ -349,13 +349,13 @@
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":90
+ "Value":85
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":85
+ "Value":80
}
],
"Type":"TMP75",
@@ -371,13 +371,13 @@
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":90
+ "Value":85
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":85
+ "Value":80
}
],
"Type":"TMP75",
@@ -393,13 +393,13 @@
"Direction":"greater than",
"Name":"upper critical",
"Severity":1,
- "Value":90
+ "Value":85
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Severity":0,
- "Value":85
+ "Value":80
}
],
"Type":"TMP75",
@@ -421,14 +421,14 @@
"Name":"upper critical",
"Label":"temp1",
"Severity":1,
- "Value":220
+ "Value":105
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"temp1",
"Severity":0,
- "Value":125
+ "Value":100
}
],
"Type":"pmbus",
@@ -498,238 +498,231 @@
"Name":"upper critical",
"Label":"vout1",
"Severity":1,
- "Value":12.6
- },
- {
- "Direction":"less than",
- "Name":"lower critical",
- "Label":"vout1",
- "Severity":1,
- "Value":11.4
+ "Value":12.654
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout1",
"Severity":0,
- "Value":12.4
+ "Value":12.483
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout1",
"Severity":0,
- "Value":11.9
+ "Value":11.856
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout2",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout1",
"Severity":1,
- "Value":6.06
+ "Value":11.343
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout2",
"Severity":1,
- "Value":3.4
+ "Value":6.127
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout2",
"Severity":0,
- "Value":5.25
+ "Value":5.328
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout2",
"Severity":0,
- "Value":4.75
+ "Value":4.695
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout3",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout2",
"Severity":1,
- "Value":3.98
+ "Value":3.397
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout3",
"Severity":1,
- "Value":2.83
+ "Value":4.019
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout3",
"Severity":0,
- "Value":3.465
+ "Value":3.502
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout3",
"Severity":0,
- "Value":3.132
+ "Value":3.079
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout4",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout3",
"Severity":1,
- "Value":5.508
+ "Value":2.773
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout4",
"Severity":1,
- "Value":1.922
+ "Value":5.593
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout4",
"Severity":0,
- "Value":2.938
+ "Value":4.935
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout4",
"Severity":0,
- "Value":2.657
+ "Value":235
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout5",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout4",
"Severity":1,
- "Value":64.9
+ "Value":1.762
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout5",
"Severity":1,
- "Value":36.58
+ "Value":65.175
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout5",
"Severity":0,
- "Value":59.95
+ "Value":60.225
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout5",
"Severity":0,
- "Value":39.875
+ "Value":39.6
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout6",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout5",
"Severity":1,
- "Value":16.685
+ "Value":36.3
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout6",
"Severity":1,
- "Value":8.59
+ "Value":16.872
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout6",
"Severity":0,
- "Value":14.91
+ "Value":15.048
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout6",
"Severity":0,
- "Value":10.011
+ "Value":9.88
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout7",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout6",
"Severity":1,
- "Value":3.98
+ "Value":8.436
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout7",
"Severity":1,
- "Value":2.268
+ "Value":4.018
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout7",
"Severity":0,
- "Value":3.456
+ "Value":3.489
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout7",
"Severity":0,
- "Value":3.132
+ "Value":3.097
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout8",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout7",
"Severity":1,
- "Value":1.805
+ "Value":2.234
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout8",
"Severity":1,
- "Value":0.802
+ "Value":1.829
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout8",
"Severity":0,
- "Value":1.263
+ "Value":1.286
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout8",
"Severity":0,
- "Value":1.145
+ "Value":1.121
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout9",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout8",
"Severity":1,
- "Value":1.805
+ "Value":0.755
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout9",
"Severity":1,
- "Value":0.802
+ "Value":1.805
},
{
"Direction":"greater than",
@@ -746,228 +739,235 @@
"Value":1.145
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout10",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout9",
"Severity":1,
- "Value":8.898
+ "Value":0.802
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout10",
"Severity":1,
- "Value":8.036
+ "Value":9.02
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout10",
"Severity":0,
- "Value":8.938
+ "Value":8.975
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout10",
"Severity":0,
- "Value":8.075
+ "Value":7.983
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout11",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout10",
"Severity":1,
- "Value":5.253
+ "Value":7.938
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout11",
"Severity":1,
- "Value":4.758
+ "Value":5.321
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout11",
"Severity":0,
- "Value":5.143
+ "Value":5.204
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout11",
"Severity":0,
- "Value":4.84
+ "Value":4.792
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout12",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout11",
"Severity":1,
- "Value":2.167
+ "Value":4.704
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout12",
"Severity":1,
- "Value":1.225
+ "Value":2.198
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout12",
"Severity":0,
- "Value":1.884
+ "Value":1.915
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout12",
"Severity":0,
- "Value":1.711
+ "Value":1.680
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout13",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout12",
"Severity":1,
- "Value":1.804
+ "Value":1.193
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout13",
"Severity":1,
- "Value":1.021
+ "Value":1.829
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout13",
"Severity":0,
- "Value":1.575
+ "Value":1.711
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout13",
"Severity":0,
- "Value":1.426
+ "Value":1.404
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout14",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout13",
"Severity":1,
- "Value":2.072
+ "Value":1.003
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout14",
"Severity":1,
- "Value":1.444
+ "Value":2.112
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout14",
"Severity":0,
- "Value":1.884
+ "Value":1.918
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout14",
"Severity":0,
- "Value":1.711
+ "Value":1.672
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout15",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout14",
"Severity":1,
- "Value":2.165
+ "Value":1.408
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout15",
"Severity":1,
- "Value":1.214
+ "Value":2.195
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout15",
"Severity":0,
- "Value":1.883
+ "Value":1.92
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout15",
"Severity":0,
- "Value":1.795
+ "Value":1.666
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout16",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout15",
"Severity":1,
- "Value":1.196
+ "Value":1.176
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout16",
"Severity":1,
- "Value":0.598
+ "Value":1.215
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout16",
"Severity":0,
- "Value":0.823
+ "Value":1.062
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout16",
"Severity":0,
- "Value":0.676
+ "Value":0.649
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout17",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout16",
"Severity":1,
- "Value":3.972
+ "Value":0.578
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout17",
"Severity":1,
- "Value":2.327
+ "Value":4.019
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout17",
"Severity":0,
- "Value":3.455
+ "Value":3.713
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout17",
"Severity":0,
- "Value":3.126
+ "Value":3.079
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout17",
+ "Severity":1,
+ "Value":2.280
}
],
"Type":"ADM1266"
@@ -1134,448 +1134,448 @@
"Name":"upper critical",
"Label":"vout2",
"Severity":1,
- "Value":6.06
- },
- {
- "Direction":"less than",
- "Name":"lower critical",
- "Label":"vout2",
- "Severity":1,
- "Value":3.391
+ "Value":6.178
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout2",
"Severity":0,
- "Value":5.244
+ "Value":5.648
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout2",
"Severity":0,
- "Value":4.741
+ "Value":4.059
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout3",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout2",
"Severity":1,
- "Value":3.009
+ "Value":3.389
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout3",
"Severity":1,
- "Value":0.484
+ "Value":3.08
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout3",
"Severity":0,
- "Value":0.637
+ "Value":2.816
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout3",
"Severity":0,
- "Value":0.566
+ "Value":0.49
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout4",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout3",
"Severity":1,
- "Value":1.901
+ "Value":0.44
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout4",
"Severity":1,
- "Value":0.198
+ "Value":2.006
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout4",
"Severity":0,
- "Value":1.496
+ "Value":1.77
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout4",
"Severity":0,
- "Value":0.404
+ "Value":0.354
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout5",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout4",
"Severity":1,
- "Value":2.165
+ "Value":0.177
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout5",
"Severity":1,
- "Value":1.219
+ "Value":2.355
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout5",
"Severity":0,
- "Value":1.891
+ "Value":2.119
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout5",
"Severity":0,
- "Value":1.713
+ "Value":1.57
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout6",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout5",
"Severity":1,
- "Value":16.685
+ "Value":1.099
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout6",
"Severity":1,
- "Value":8.591
+ "Value":18.33
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout6",
"Severity":0,
- "Value":14.91
+ "Value":16.77
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout6",
"Severity":0,
- "Value":10.011
+ "Value":9.36
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout7",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout6",
"Severity":1,
- "Value":3.974
+ "Value":7.8
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout7",
"Severity":1,
- "Value":2.268
+ "Value":4.212
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout7",
"Severity":0,
- "Value":3.465
+ "Value":3.888
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout7",
"Severity":0,
- "Value":3.132
+ "Value":2.268
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout8",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout7",
"Severity":1,
- "Value":1.805
+ "Value":2.16
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout8",
"Severity":1,
- "Value":0.802
+ "Value":2.055
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout8",
"Severity":0,
- "Value":1.263
+ "Value":1.644
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout8",
"Severity":0,
- "Value":1.145
+ "Value":0.959
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout9",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout8",
"Severity":1,
- "Value":1.805
+ "Value":0.685
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout9",
"Severity":1,
- "Value":0.802
+ "Value":2.055
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout9",
"Severity":0,
- "Value":1.263
+ "Value":1.644
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout9",
"Severity":0,
- "Value":1.145
+ "Value":0.959
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout10",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout9",
"Severity":1,
- "Value":1.196
+ "Value":0.685
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout10",
"Severity":1,
- "Value":0.598
+ "Value":1.416
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout10",
"Severity":0,
- "Value":1.098
+ "Value":1.298
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout10",
"Severity":0,
- "Value":0.755
+ "Value":0.649
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout11",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout10",
"Severity":1,
- "Value":1.196
+ "Value":0.531
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout11",
"Severity":1,
- "Value":0.598
+ "Value":1.416
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout11",
"Severity":0,
- "Value":1.098
+ "Value":1.298
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout11",
"Severity":0,
- "Value":0.755
+ "Value":0.649
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout12",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout11",
"Severity":1,
- "Value":2.167
+ "Value":0.531
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout12",
"Severity":1,
- "Value":1.225
+ "Value":2.433
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout12",
"Severity":0,
- "Value":1.884
+ "Value":2.119
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout12",
"Severity":0,
- "Value":1.711
+ "Value":1.413
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout13",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout12",
"Severity":1,
- "Value":1.804
+ "Value":1.099
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout13",
"Severity":1,
- "Value":1.021
+ "Value":2.06
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout13",
"Severity":0,
- "Value":1.575
+ "Value":1.79
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout13",
"Severity":0,
- "Value":1.426
+ "Value":1.197
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout14",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout13",
"Severity":1,
- "Value":1.901
+ "Value":0.931
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout14",
"Severity":1,
- "Value":0.198
+ "Value":2.124
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout14",
"Severity":0,
- "Value":1.496
+ "Value":1.888
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout14",
"Severity":0,
- "Value":0.404
+ "Value":0.354
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout15",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout14",
"Severity":1,
- "Value":2.165
+ "Value":0.165
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout15",
"Severity":1,
- "Value":1.214
+ "Value":2.433
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout15",
"Severity":0,
- "Value":1.883
+ "Value":2.119
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout15",
"Severity":0,
- "Value":1.795
+ "Value":1.413
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout16",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout15",
"Severity":1,
- "Value":1.196
+ "Value":1.099
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout16",
"Severity":1,
- "Value":0.598
+ "Value":1.375
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout16",
"Severity":0,
- "Value":0.823
+ "Value":1.125
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout16",
"Severity":0,
- "Value":0.676
+ "Value":0.6
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout17",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout16",
"Severity":1,
- "Value":2.165
+ "Value":0.5
},
{
- "Direction":"less than",
- "Name":"lower critical",
+ "Direction":"greater than",
+ "Name":"upper critical",
"Label":"vout17",
"Severity":1,
- "Value":1.219
+ "Value":2.433
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout17",
"Severity":0,
- "Value":1.891
+ "Value":2.119
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout17",
"Severity":0,
- "Value":1.713
+ "Value":1.413
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout17",
+ "Severity":1,
+ "Value":1.099
}
],
"Type":"ADM1266"
@@ -1694,59 +1694,51 @@
"temp11",
"temp12",
"temp13",
- "temp14",
- "pout5",
- "pout3",
- "pout4",
- "pout6",
- "pout7",
- "pout8",
+ "power1",
+ "power2",
+ "power3",
+ "power4",
+ "power5",
+ "vout0",
"vout1",
"vout2",
"vout3",
"vout4",
- "vout5",
- "vout6",
- "temp17",
- "curr1",
- "curr2",
- "curr3",
- "curr4",
- "curr5"
+ "iout1",
+ "iout2",
+ "iout3",
+ "iout4",
+ "iout5"
],
"Type":"AC01_SMPRO",
"temp1_Name":"CPU1_SOC_T",
"temp2_Name":"CPU1_SOC_VRD_T",
"temp3_Name":"CPU1_DIMM_VRD_T",
"temp4_Name":"CPU1_CORE_VRD_T",
- "temp5_Name":"CPU1_DIMMG0_T",
- "temp6_Name":"CPU1_CH0DIMM_T",
- "temp7_Name":"CPU1_CH1DIMM_T",
- "temp8_Name":"CPU1_CH2DIMM_T",
- "temp9_Name":"CPU1_CH3DIMM_T",
- "temp10_Name":"CPU1_DIMMG1_T",
- "temp11_Name":"CPU1_CH4DIMM_T",
- "temp12_Name":"CPU1_CH5DIMM_T",
- "temp13_Name":"CPU1_CH6DIMM_T",
- "temp14_Name":"CPU1_CH7DIMM_T",
- "pout5_Name":"CPU1_CPU_PW",
- "pout3_Name":"CPU1_DIMM_VR1_PW",
- "pout4_Name":"CPU1_DIMM_VR2_PW",
- "pout6_Name":"CPU1_MEM_PW",
- "pout7_Name":"CPU1_RCA_VR_PW",
- "pout8_Name":"CPU1_SOC_TDP_PW",
- "vout1_Name":"CPU1_CPU_VCORE",
- "vout2_Name":"CPU1_SOC_V",
- "vout3_Name":"CPU1_DIMM_VR1_V",
- "vout4_Name":"CPU1_DIMM_VR2_V",
- "vout5_Name":"CPU1_DIMM_DDR_V",
- "vout6_Name":"CPU1_RCA_VR_V",
- "temp17_Name":"CPU1_RCA_VR_T",
- "curr1_Name":"CPU1_CORE_VRD_CU",
- "curr2_Name":"CPU1_SOC_VRD_CU",
- "curr3_Name":"CPU1_DIMM_VR1_CU",
- "curr4_Name":"CPU1_DIMM_VR2_CU",
- "curr5_Name":"CPU1_RCA_VRD_CU",
+ "temp5_Name":"CPU1_CH0DIMM_T",
+ "temp6_Name":"CPU1_CH1DIMM_T",
+ "temp7_Name":"CPU1_CH2DIMM_T",
+ "temp8_Name":"CPU1_CH3DIMM_T",
+ "temp9_Name":"CPU1_CH4DIMM_T",
+ "temp10_Name":"CPU1_CH5DIMM_T",
+ "temp11_Name":"CPU1_CH6DIMM_T",
+ "temp12_Name":"CPU1_CH7DIMM_T",
+ "temp13_Name":"CPU1_RCA_VR_T",
+ "power1_Name":"CPU1_CPU_PW",
+ "power2_Name":"CPU1_SOC_TDP_PW",
+ "power3_Name":"CPU1_DIMM_VR1_PW",
+ "power4_Name":"CPU1_DIMM_VR2_PW",
+ "power5_Name":"CPU1_RCA_VR_PW",
+ "vout0_Name":"CPU1_CPU_VCORE",
+ "vout1_Name":"CPU1_SOC_V",
+ "vout2_Name":"CPU1_DIMM_VR1_V",
+ "vout3_Name":"CPU1_DIMM_VR2_V",
+ "vout4_Name":"CPU1_RCA_VR_V",
+ "iout1_Name":"CPU1_CORE_VRD_CU",
+ "iout2_Name":"CPU1_SOC_VRD_CU",
+ "iout3_Name":"CPU1_DIMM_VR1_CU",
+ "iout4_Name":"CPU1_DIMM_VR2_CU",
+ "iout5_Name":"CPU1_RCA_VRD_CU",
"temp1_Max":255,
"temp2_Max":255,
"temp3_Max":255,
@@ -1760,32 +1752,28 @@
"temp11_Max":255,
"temp12_Max":255,
"temp13_Max":255,
- "temp14_Max":255,
- "pout5_Max":255,
- "pout3_Max":40,
- "pout4_Max":40,
- "pout6_Max":70,
- "pout7_Max":30,
- "pout8_Max":255,
- "vout1_Max":3.2,
- "vout2_Max":3.3,
+ "power1_Max":255,
+ "power2_Max":255,
+ "power3_Max":40,
+ "power4_Max":40,
+ "power5_Max":255,
+ "vout0_Max":3.2,
+ "vout1_Max":3.3,
+ "vout2_Max":3,
"vout3_Max":3,
- "vout4_Max":3,
- "vout5_Max":5,
- "vout6_Max":6,
- "temp17_Max":255,
- "curr1_Max":13,
- "curr2_Max":5,
- "curr3_Max":13,
- "curr4_Max":13,
- "curr5_Max":10,
+ "vout4_Max":7,
+ "iout1_Max":40,
+ "iout2_Max":14,
+ "iout3_Max":20,
+ "iout4_Max":20,
+ "iout5_Max":18,
"Thresholds":[
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"temp1",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1799,7 +1787,7 @@
"Name":"upper critical",
"Label":"temp2",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1813,7 +1801,7 @@
"Name":"upper critical",
"Label":"temp3",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1827,7 +1815,7 @@
"Name":"upper critical",
"Label":"temp4",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1839,23 +1827,9 @@
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"temp5",
- "Severity":1,
- "Value":90
- },
- {
- "Direction":"greater than",
- "Name":"upper non critical",
- "Label":"temp5",
- "Severity":0,
- "Value":100
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
"Label":"temp6",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1869,7 +1843,7 @@
"Name":"upper critical",
"Label":"temp7",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1883,7 +1857,7 @@
"Name":"upper critical",
"Label":"temp8",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1897,7 +1871,7 @@
"Name":"upper critical",
"Label":"temp9",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1911,7 +1885,7 @@
"Name":"upper critical",
"Label":"temp10",
"Severity":1,
- "Value":90
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1925,7 +1899,7 @@
"Name":"upper critical",
"Label":"temp11",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1939,7 +1913,7 @@
"Name":"upper critical",
"Label":"temp12",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1953,7 +1927,7 @@
"Name":"upper critical",
"Label":"temp13",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -1965,184 +1939,142 @@
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"temp14",
+ "Label":"power1",
"Severity":1,
- "Value":105
+ "Value":54
},
{
"Direction":"greater than",
"Name":"upper non critical",
- "Label":"temp14",
+ "Label":"power1",
"Severity":0,
- "Value":100
+ "Value":48
},
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"pout5",
+ "Label":"power3",
"Severity":1,
- "Value":53.815
+ "Value":40
},
{
"Direction":"greater than",
- "Name":"upper non critical",
- "Label":"pout5",
- "Severity":0,
- "Value":47.94
+ "Name":"upper critical",
+ "Label":"power4",
+ "Severity":1,
+ "Value":40
},
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"pout3",
+ "Label":"vout0",
"Severity":1,
- "Value":7.801
+ "Value":1.375
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"pout4",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout0",
"Severity":1,
- "Value":7.801
+ "Value":0.312
},
{
"Direction":"greater than",
- "Name":"upper critical",
- "Label":"pout6",
- "Severity":1,
- "Value":29.987
+ "Name":"upper non critical",
+ "Label":"vout0",
+ "Severity":0,
+ "Value":1.375
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower non critical",
+ "Label":"vout0",
+ "Severity":0,
+ "Value":0.312
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout1",
"Severity":1,
- "Value":1.05
+ "Value":1.032
},
{
"Direction":"less than",
"Name":"lower critical",
"Label":"vout1",
"Severity":1,
- "Value":0.697
+ "Value":0.32
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout1",
"Severity":0,
- "Value":1.05
+ "Value":0.903
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout1",
"Severity":0,
- "Value":0.697
+ "Value":0.45
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout2",
"Severity":1,
- "Value":0.951
+ "Value":1.475
},
{
"Direction":"less than",
"Name":"lower critical",
"Label":"vout2",
"Severity":1,
- "Value":0.549
+ "Value":0.920
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout2",
"Severity":0,
- "Value":0.804
+ "Value":1.357
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout2",
"Severity":0,
- "Value":0.598
+ "Value":1.003
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout3",
"Severity":1,
- "Value":1.254
+ "Value":1.475
},
{
"Direction":"less than",
"Name":"lower critical",
"Label":"vout3",
"Severity":1,
- "Value":1.098
+ "Value":0.920
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout3",
"Severity":0,
- "Value":1.215
+ "Value":1.357
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout3",
"Severity":0,
- "Value":1.147
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout4",
- "Severity":1,
- "Value":1.254
- },
- {
- "Direction":"less than",
- "Name":"lower critical",
- "Label":"vout4",
- "Severity":1,
- "Value":1.098
- },
- {
- "Direction":"greater than",
- "Name":"upper non critical",
- "Label":"vout4",
- "Severity":0,
- "Value":1.215
- },
- {
- "Direction":"less than",
- "Name":"lower non critical",
- "Label":"vout4",
- "Severity":0,
- "Value":1.147
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout5",
- "Severity":1,
- "Value":2.999
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"temp17",
- "Severity":1,
- "Value":105
- },
- {
- "Direction":"greater than",
- "Name":"upper non critical",
- "Label":"temp17",
- "Severity":0,
- "Value":100
+ "Value":1.003
}
]
},
@@ -2171,8 +2103,7 @@
"EntityInstance":15
},
{
- "Name":"CPU1_DIMMG0_T",
- "Type":"AC01_SMPRO",
+ "Name":"CPU1_DIMMG_T",
"EntityId":"0x03",
"EntityInstance":16
},
@@ -2201,12 +2132,6 @@
"EntityInstance":20
},
{
- "Name":"CPU1_DIMMG1_T",
- "Type":"AC01_SMPRO",
- "EntityId":"0x03",
- "EntityInstance":21
- },
- {
"Name":"CPU1_CH4DIMM_T",
"Type":"AC01_SMPRO",
"EntityId":"0x03",
@@ -2250,7 +2175,6 @@
},
{
"Name":"CPU1_MEM_PW",
- "Type":"AC01_SMPRO",
"EntityId":"0x13",
"EntityInstance":41
},
@@ -2292,7 +2216,6 @@
},
{
"Name":"CPU1_DIMM_DDR_V",
- "Type":"AC01_SMPRO",
"EntityId":"0x13",
"EntityInstance":48
},
@@ -2356,59 +2279,51 @@
"temp11",
"temp12",
"temp13",
- "temp14",
- "pout5",
- "pout3",
- "pout4",
- "pout6",
- "pout7",
- "pout8",
+ "power1",
+ "power2",
+ "power3",
+ "power4",
+ "power5",
+ "vout0",
"vout1",
"vout2",
"vout3",
"vout4",
- "vout5",
- "vout6",
- "temp17",
- "curr1",
- "curr2",
- "curr3",
- "curr4",
- "curr5"
+ "iout1",
+ "iout2",
+ "iout3",
+ "iout4",
+ "iout5"
],
"Type":"AC01_SMPRO",
"temp1_Name":"CPU0_SOC_T",
"temp2_Name":"CPU0_SOC_VRD_T",
"temp3_Name":"CPU0_DIMM_VRD_T",
"temp4_Name":"CPU0_CORE_VRD_T",
- "temp5_Name":"CPU0_DIMMG0_T",
- "temp6_Name":"CPU0_CH0DIMM_T",
- "temp7_Name":"CPU0_CH1DIMM_T",
- "temp8_Name":"CPU0_CH2DIMM_T",
- "temp9_Name":"CPU0_CH3DIMM_T",
- "temp10_Name":"CPU0_DIMMG1_T",
- "temp11_Name":"CPU0_CH4DIMM_T",
- "temp12_Name":"CPU0_CH5DIMM_T",
- "temp13_Name":"CPU0_CH6DIMM_T",
- "temp14_Name":"CPU0_CH7DIMM_T",
- "pout5_Name":"CPU0_CPU_PW",
+ "temp5_Name":"CPU0_CH0DIMM_T",
+ "temp6_Name":"CPU0_CH1DIMM_T",
+ "temp7_Name":"CPU0_CH2DIMM_T",
+ "temp8_Name":"CPU0_CH3DIMM_T",
+ "temp9_Name":"CPU0_CH4DIMM_T",
+ "temp10_Name":"CPU0_CH5DIMM_T",
+ "temp11_Name":"CPU0_CH6DIMM_T",
+ "temp12_Name":"CPU0_CH7DIMM_T",
+ "temp13_Name":"CPU0_RCA_VR_T",
+ "power1_Name":"CPU0_CPU_PW",
+ "power2_Name":"CPU0_SOC_TDP_PW",
"pout3_Name":"CPU0_DIMM_VR1_PW",
"pout4_Name":"CPU0_DIMM_VR2_PW",
- "pout6_Name":"CPU0_MEM_PW",
- "pout7_Name":"CPU0_RCA_VR_PW",
- "pout8_Name":"CPU0_SOC_TDP_PW",
- "vout1_Name":"CPU0_CPU_VCORE",
- "vout2_Name":"CPU0_SOC_V",
- "vout3_Name":"CPU0_DIMM_VR1_V",
- "vout4_Name":"CPU0_DIMM_VR2_V",
- "vout5_Name":"CPU0_DIMM_DDR_V",
- "vout6_Name":"CPU0_RCA_VR_V",
- "temp17_Name":"CPU0_RCA_VR_T",
- "curr1_Name":"CPU0_CORE_VRD_CU",
- "curr2_Name":"CPU0_SOC_VRD_CU",
- "curr3_Name":"CPU0_DIMM_VR1_CU",
- "curr4_Name":"CPU0_DIMM_VR2_CU",
- "curr5_Name":"CPU0_RCA_VRD_CU",
+ "pout5_Name":"CPU0_RCA_VR_PW",
+ "vout0_Name":"CPU0_CPU_VCORE",
+ "vout1_Name":"CPU0_SOC_V",
+ "vout2_Name":"CPU0_DIMM_VR1_V",
+ "vout3_Name":"CPU0_DIMM_VR2_V",
+ "vout4_Name":"CPU0_RCA_VR_V",
+ "iout1_Name":"CPU0_CORE_VRD_CU",
+ "iout2_Name":"CPU0_SOC_VRD_CU",
+ "iout3_Name":"CPU0_DIMM_VR1_CU",
+ "iout4_Name":"CPU0_DIMM_VR2_CU",
+ "iout5_Name":"CPU0_RCA_VRD_CU",
"temp1_Max":255,
"temp2_Max":255,
"temp3_Max":255,
@@ -2422,32 +2337,28 @@
"temp11_Max":255,
"temp12_Max":255,
"temp13_Max":255,
- "temp14_Max":255,
- "pout5_Max":350,
- "pout3_Max":40,
- "pout4_Max":40,
- "pout6_Max":80,
- "pout7_Max":30,
- "pout8_Max":255,
- "vout1_Max":3,
+ "power1_Max":350,
+ "power2_Max":250,
+ "power3_Max":40,
+ "power4_Max":80,
+ "power5_Max":255,
+ "vout0_Max":3,
+ "vout1_Max":3.5,
"vout2_Max":3.5,
"vout3_Max":3.5,
- "vout4_Max":3.5,
- "vout5_Max":5,
- "vout6_Max":5,
- "temp17_Max":255,
- "curr1_Max":13,
- "curr2_Max":5,
- "curr3_Max":12,
- "curr4_Max":12,
- "curr5_Max":10,
+ "vout4_Max":5,
+ "iout1_Max":40,
+ "iout2_Max":14,
+ "iout3_Max":20,
+ "iout4_Max":20,
+ "iout5_Max":18,
"Thresholds":[
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"temp1",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2461,7 +2372,7 @@
"Name":"upper critical",
"Label":"temp2",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2475,7 +2386,7 @@
"Name":"upper critical",
"Label":"temp3",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2489,7 +2400,7 @@
"Name":"upper critical",
"Label":"temp4",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2503,21 +2414,21 @@
"Name":"upper critical",
"Label":"temp5",
"Severity":1,
- "Value":90
+ "Value":104.5
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"temp5",
"Severity":0,
- "Value":80
+ "Value":100
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"temp6",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2531,7 +2442,7 @@
"Name":"upper critical",
"Label":"temp7",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2545,7 +2456,7 @@
"Name":"upper critical",
"Label":"temp8",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2559,7 +2470,7 @@
"Name":"upper critical",
"Label":"temp9",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2573,21 +2484,21 @@
"Name":"upper critical",
"Label":"temp10",
"Severity":1,
- "Value":90
+ "Value":104.5
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"temp10",
"Severity":0,
- "Value":80
+ "Value":100
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"temp11",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2601,7 +2512,7 @@
"Name":"upper critical",
"Label":"temp12",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2615,7 +2526,7 @@
"Name":"upper critical",
"Label":"temp13",
"Severity":1,
- "Value":105
+ "Value":104.5
},
{
"Direction":"greater than",
@@ -2627,184 +2538,142 @@
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"temp14",
+ "Label":"power1",
"Severity":1,
- "Value":105
+ "Value":54
},
{
"Direction":"greater than",
"Name":"upper non critical",
- "Label":"temp14",
+ "Label":"power1",
"Severity":0,
- "Value":100
+ "Value":49
},
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"pout5",
+ "Label":"power3",
"Severity":1,
- "Value":299.98
+ "Value":40
},
{
"Direction":"greater than",
- "Name":"upper non critical",
- "Label":"pout5",
- "Severity":0,
- "Value":299.98
+ "Name":"upper critical",
+ "Label":"power4",
+ "Severity":1,
+ "Value":40
},
{
"Direction":"greater than",
"Name":"upper critical",
- "Label":"pout3",
+ "Label":"vout0",
"Severity":1,
- "Value":7.801
+ "Value":1.298
},
{
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"pout4",
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Label":"vout0",
"Severity":1,
- "Value":7.801
+ "Value":0.295
},
{
"Direction":"greater than",
- "Name":"upper critical",
- "Label":"pout6",
- "Severity":1,
- "Value":29.987
+ "Name":"upper non critical",
+ "Label":"vout0",
+ "Severity":0,
+ "Value":1.298
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower non critical",
+ "Label":"vout0",
+ "Severity":0,
+ "Value":0.295
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout1",
"Severity":1,
- "Value":1.05
+ "Value":1.16
},
{
"Direction":"less than",
"Name":"lower critical",
"Label":"vout1",
"Severity":1,
- "Value":0.697
+ "Value":0.34
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout1",
"Severity":0,
- "Value":1.05
+ "Value":1.0
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout1",
"Severity":0,
- "Value":0.697
+ "Value":0.342
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout2",
"Severity":1,
- "Value":0.951
+ "Value":1.57
},
{
"Direction":"less than",
"Name":"lower critical",
"Label":"vout2",
"Severity":1,
- "Value":0.549
+ "Value":0.959
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout2",
"Severity":0,
- "Value":0.804
+ "Value":1.50
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout2",
"Severity":0,
- "Value":0.598
+ "Value":1.06
},
{
"Direction":"greater than",
"Name":"upper critical",
"Label":"vout3",
"Severity":1,
- "Value":1.254
+ "Value":1.57
},
{
"Direction":"less than",
"Name":"lower critical",
"Label":"vout3",
"Severity":1,
- "Value":1.098
+ "Value":0.959
},
{
"Direction":"greater than",
"Name":"upper non critical",
"Label":"vout3",
"Severity":0,
- "Value":1.215
+ "Value":1.507
},
{
"Direction":"less than",
"Name":"lower non critical",
"Label":"vout3",
"Severity":0,
- "Value":1.147
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout4",
- "Severity":1,
- "Value":1.254
- },
- {
- "Direction":"less than",
- "Name":"lower critical",
- "Label":"vout4",
- "Severity":1,
- "Value":1.098
- },
- {
- "Direction":"greater than",
- "Name":"upper non critical",
- "Label":"vout4",
- "Severity":0,
- "Value":1.215
- },
- {
- "Direction":"less than",
- "Name":"lower non critical",
- "Label":"vout4",
- "Severity":0,
- "Value":1.147
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"vout5",
- "Severity":1,
- "Value":2.999
- },
- {
- "Direction":"greater than",
- "Name":"upper critical",
- "Label":"temp17",
- "Severity":1,
- "Value":105
- },
- {
- "Direction":"greater than",
- "Name":"upper non critical",
- "Label":"temp17",
- "Severity":0,
- "Value":100
+ "Value":1.06
}
]
},
@@ -2833,8 +2702,7 @@
"EntityInstance":30
},
{
- "Name":"CPU0_DIMMG0_T",
- "Type":"AC01_SMPRO",
+ "Name":"CPU0_DIMMG_T",
"EntityId":"0x03",
"EntityInstance":31
},
@@ -2863,12 +2731,6 @@
"EntityInstance":35
},
{
- "Name":"CPU0_DIMMG1_T",
- "Type":"AC01_SMPRO",
- "EntityId":"0x03",
- "EntityInstance":36
- },
- {
"Name":"CPU0_CH4DIMM_T",
"Type":"AC01_SMPRO",
"EntityId":"0x03",
@@ -2912,7 +2774,6 @@
},
{
"Name":"CPU0_MEM_PW",
- "Type":"AC01_SMPRO",
"EntityId":"0x13",
"EntityInstance":58
},
@@ -2954,7 +2815,6 @@
},
{
"Name":"CPU0_DIMM_DDR_V",
- "Type":"AC01_SMPRO",
"EntityId":"0x13",
"EntityInstance":65
},
@@ -3002,23 +2862,27 @@
},
{
"Index" : 8,
- "Name" : "Mobo_NBM1_RAW",
+ "Name" : "CPU0_NBM_V",
"Type" : "ADC",
+ "MaxValue": 4.04,
+ "MinValue": 0,
"EntityId" : "0x13",
"EntityInstance" : 72
},
{
"Index" : 9,
- "Name" : "Mobo_NBM2_RAW",
+ "Name" : "CPU1_NBM_V",
"Type" : "ADC",
+ "MaxValue": 4.04,
+ "MinValue": 0,
"EntityId" : "0x13",
"EntityInstance" : 73
},
{
- "Name" : "Mobo_NBM1_T"
+ "Name" : "CPU0_NBM_T"
},
{
- "Name" : "Mobo_NBM2_T"
+ "Name" : "CPU1_NBM_T"
},
{
"AllowedFailures":1,
@@ -3043,20 +2907,20 @@
"Thresholds":[
{
"Direction":"less than",
- "Name":"lower critical",
- "Severity":1,
- "Value":2000
- },
- {
- "Direction":"less than",
"Name":"lower non critical",
"Severity":0,
"Value":1000
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Severity":1,
+ "Value":2000
}
],
"Type":"I2CFan",
"EntityId":"0x1D",
- "EntityInstance":0,
+ "EntityInstance":6,
"Mutable":true
},
{
@@ -3084,20 +2948,20 @@
"Thresholds":[
{
"Direction":"less than",
- "Name":"lower critical",
- "Severity":1,
- "Value":2000
- },
- {
- "Direction":"less than",
"Name":"lower non critical",
"Severity":0,
"Value":1000
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Severity":1,
+ "Value":2000
}
],
"Type":"I2CFan",
"EntityId":"0x1D",
- "EntityInstance":1
+ "EntityInstance":7
},
{
"EntityId":"0x1D",
@@ -3117,7 +2981,7 @@
0
],
"EntityId":"0x1D",
- "EntityInstance":2,
+ "EntityInstance":8,
"Mutable":true
},
"Index":2,
@@ -3127,15 +2991,15 @@
"Thresholds":[
{
"Direction":"less than",
- "Name":"lower critical",
- "Severity":1,
- "Value":2000
- },
- {
- "Direction":"less than",
"Name":"lower non critical",
"Severity":0,
"Value":1000
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Severity":1,
+ "Value":2000
}
],
"Type":"I2CFan",
@@ -3170,20 +3034,20 @@
"Thresholds":[
{
"Direction":"less than",
- "Name":"lower critical",
- "Severity":1,
- "Value":2000
- },
- {
- "Direction":"less than",
"Name":"lower non critical",
"Severity":0,
"Value":1000
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Severity":1,
+ "Value":2000
}
],
"Type":"I2CFan",
"EntityId":"0x1D",
- "EntityInstance":3
+ "EntityInstance":9
},
{
"EntityId":"0x1D",
@@ -3213,20 +3077,20 @@
"Thresholds":[
{
"Direction":"less than",
- "Name":"lower critical",
- "Severity":1,
- "Value":2000
- },
- {
- "Direction":"less than",
"Name":"lower non critical",
"Severity":0,
"Value":1000
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Severity":1,
+ "Value":2000
}
],
"Type":"I2CFan",
"EntityId":"0x1D",
- "EntityInstance":4
+ "EntityInstance":10
},
{
"EntityId":"0x1D",
@@ -3256,20 +3120,20 @@
"Thresholds":[
{
"Direction":"less than",
- "Name":"lower critical",
- "Severity":1,
- "Value":2000
- },
- {
- "Direction":"less than",
"Name":"lower non critical",
"Severity":0,
"Value":1000
+ },
+ {
+ "Direction":"less than",
+ "Name":"lower critical",
+ "Severity":1,
+ "Value":2000
}
],
"Type":"I2CFan",
"EntityId":"0x1D",
- "EntityInstance":5
+ "EntityInstance":11
},
{
"EntityId":"0x1D",
@@ -3278,20 +3142,20 @@
"Name":"REAR_FAN5_PWM",
"Type":"I2CFan"
},
- {
+ {
"Name": "Fan1Zone",
"Type": "Pid.Zone",
"MinThermalOutput": 25,
"FailSafePercent": 100
},
- {
+ {
"Name": "Fan2Zone",
"Type": "Pid.Zone",
"MinThermalOutput": 25,
"FailSafePercent": 100
},
{
- "Name": "REAR_FAN0_1",
+ "Name": "REAR_FAN012",
"Type": "Pid",
"Class": "fan",
"SetPoint": 65.0,
@@ -3309,37 +3173,12 @@
"OutLimitMax": 100.0,
"Inputs": [
"REAR_FAN0_SPEED",
- "REAR_FAN1_SPEED"
- ],
- "Outputs": [
- "REAR_FAN0_PWM",
- "REAR_FAN1_PWM"
- ],
- "Zones": [
- "Fan1Zone"
- ]
- },
- {
- "Name": "REAR_FAN2",
- "Type": "Pid",
- "Class": "fan",
- "SetPoint": 65.0,
- "FFGainCoefficient": 1.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": 0.0,
- "ICoefficient": 0.0,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
+ "REAR_FAN1_SPEED",
"REAR_FAN2_SPEED"
],
"Outputs": [
+ "REAR_FAN0_PWM",
+ "REAR_FAN1_PWM",
"REAR_FAN2_PWM"
],
"Zones": [
@@ -3347,34 +3186,7 @@
]
},
{
- "Name": "REAR_FAN3",
- "Type": "Pid",
- "Class": "fan",
- "SetPoint": 65.0,
- "FFGainCoefficient": 1.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": 0.0,
- "ICoefficient": 0.0,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "REAR_FAN3_SPEED"
- ],
- "Outputs": [
- "REAR_FAN3_PWM"
- ],
- "Zones": [
- "Fan2Zone"
- ]
- },
- {
- "Name": "REAR_FAN4_5",
+ "Name": "REAR_FAN345",
"Type": "Pid",
"Class": "fan",
"SetPoint": 65.0,
@@ -3392,11 +3204,13 @@
"OutLimitMax": 100.0,
"Inputs": [
"REAR_FAN4_SPEED",
- "REAR_FAN5_SPEED"
+ "REAR_FAN5_SPEED",
+ "REAR_FAN3_SPEED"
],
"Outputs": [
"REAR_FAN4_PWM",
- "REAR_FAN5_PWM"
+ "REAR_FAN5_PWM",
+ "REAR_FAN3_PWM"
],
"Zones": [
"Fan2Zone"
@@ -3428,57 +3242,7 @@
]
},
{
- "Name": "CPU0_SOC_VRD_TEMP",
- "Type": "Pid",
- "Class": "temp",
- "SetPoint": 85.0,
- "FFGainCoefficient": 0.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": -2.0,
- "ICoefficient": -0.1,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "CPU0_SOC_VRD_T"
- ],
- "Outputs": [],
- "Zones": [
- "Fan1Zone"
- ]
- },
- {
- "Name": "CPU0_DIMM_VRD_TEMP",
- "Type": "Pid",
- "Class": "temp",
- "SetPoint": 85.0,
- "FFGainCoefficient": 0.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": -2.0,
- "ICoefficient": -0.1,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "CPU0_DIMM_VRD_T"
- ],
- "Outputs": [],
- "Zones": [
- "Fan1Zone"
- ]
- },
- {
- "Name": "CPU0_CORE_VRD_TEMP",
+ "Name": "CPU0_VRD_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 85.0,
@@ -3495,7 +3259,10 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "CPU0_CORE_VRD_T"
+ "CPU0_SOC_VRD_T",
+ "CPU0_DIMM_VRD_T",
+ "CPU0_CORE_VRD_T",
+ "CPU0_RCA_VR_T"
],
"Outputs": [],
"Zones": [
@@ -3503,7 +3270,7 @@
]
},
{
- "Name": "CPU0_DIMMG0_TEMP",
+ "Name": "CPU0_DIMMG_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 60.0,
@@ -3520,32 +3287,7 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "CPU0_DIMMG0_T"
- ],
- "Outputs": [],
- "Zones": [
- "Fan1Zone"
- ]
- },
- {
- "Name": "CPU0_DIMMG1_TEMP",
- "Type": "Pid",
- "Class": "temp",
- "SetPoint": 60.0,
- "FFGainCoefficient": 0.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": -2.0,
- "ICoefficient": -0.1,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "CPU0_DIMMG0_T"
+ "CPU0_DIMMG_T"
],
"Outputs": [],
"Zones": [
@@ -3578,7 +3320,7 @@
]
},
{
- "Name": "CPU1_SOC_VRD_TEMP",
+ "Name": "CPU1_VRD_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 85.0,
@@ -3595,82 +3337,10 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "CPU1_SOC_VRD_T"
- ],
- "Outputs": [],
- "Zones": [
- "Fan2Zone"
- ]
- },
- {
- "Name": "CPU1_DIMM_VRD_TEMP",
- "Type": "Pid",
- "Class": "temp",
- "SetPoint": 85.0,
- "FFGainCoefficient": 0.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": -2.0,
- "ICoefficient": -0.1,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "CPU1_DIMM_VRD_T"
- ],
- "Outputs": [],
- "Zones": [
- "Fan2Zone"
- ]
- },
- {
- "Name": "CPU1_CORE_VRD_TEMP",
- "Type": "Pid",
- "Class": "temp",
- "SetPoint": 85.0,
- "FFGainCoefficient": 0.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": -2.0,
- "ICoefficient": -0.1,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "CPU1_CORE_VRD_T"
- ],
- "Outputs": [],
- "Zones": [
- "Fan2Zone"
- ]
- },
- {
- "Name": "CPU1_DIMMG0_TEMP",
- "Type": "Pid",
- "Class": "temp",
- "SetPoint": 60.0,
- "FFGainCoefficient": 0.0,
- "FFOffCoefficient": 0.0,
- "PCoefficient": -2.0,
- "ICoefficient": -0.1,
- "ILimitMin": 0.0,
- "ILimitMax": 0.0,
- "PositiveHysteresis": 0.0,
- "NegativeHysteresis": 0.0,
- "SlewPos": 0.0,
- "SlewNeg": 0.0,
- "OutLimitMin": 25.0,
- "OutLimitMax": 100.0,
- "Inputs": [
- "CPU1_DIMMG0_T"
+ "CPU1_SOC_VRD_T",
+ "CPU1_DIMM_VRD_T",
+ "CPU1_CORE_VRD_T",
+ "CPU1_RCA_VR_T"
],
"Outputs": [],
"Zones": [
@@ -3678,7 +3348,7 @@
]
},
{
- "Name": "CPU1_DIMMG1_TEMP",
+ "Name": "CPU1_DIMMG_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 60.0,
@@ -3695,7 +3365,7 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "CPU1_DIMMG0_T"
+ "CPU1_DIMMG_T"
],
"Outputs": [],
"Zones": [
@@ -3728,7 +3398,7 @@
]
},
{
- "Name": "Mobo_NBM1_TEMP",
+ "Name": "CPU0_NBM_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 75.0,
@@ -3745,7 +3415,7 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "Mobo_NBM1_T"
+ "CPU0_NBM_T"
],
"Outputs": [],
"Zones": [
@@ -3753,7 +3423,7 @@
]
},
{
- "Name": "Mobo_NBM2_TEMP",
+ "Name": "CPU1_NBM_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 75.0,
@@ -3770,7 +3440,7 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "Mobo_NBM2_T"
+ "CPU1_NBM_T"
],
"Outputs": [],
"Zones": [
@@ -3778,7 +3448,7 @@
]
},
{
- "Name": "Mobo_NBM1_ZONE_TEMP",
+ "Name": "CPU0_NBM_ZONE_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 60.0,
@@ -3795,7 +3465,7 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "Mobo_NBM1_ZONE_T"
+ "CPU0_NBM_ZONE_T"
],
"Outputs": [],
"Zones": [
@@ -3803,7 +3473,7 @@
]
},
{
- "Name": "Mobo_NBM2_ZONE_TEMP",
+ "Name": "CPU1_NBM_ZONE_TEMP",
"Type": "Pid",
"Class": "temp",
"SetPoint": 60.0,
@@ -3820,7 +3490,7 @@
"OutLimitMin": 25.0,
"OutLimitMax": 100.0,
"Inputs": [
- "Mobo_NBM2_ZONE_T"
+ "CPU1_NBM_ZONE_T"
],
"Outputs": [],
"Zones": [
diff --git a/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager_%.bbappend
index 58b52f50b..7daa029eb 100644
--- a/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/meta-fii/meta-kudo/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -1,7 +1,11 @@
FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:"
-SRC_URI_append_kudo = " file://kudo.json"
+SRC_URI_append_kudo = " \
+ file://kudo.json \
+ file://blacklist.json \
+ "
do_install_append_kudo () {
- install -m 0644 -D ${WORKDIR}/kudo.json ${D}/usr/share/entity-manager/configurations/kudo.json
+ install -m 0644 -D ${WORKDIR}/kudo.json ${D}${datadir}/${PN}/configurations/kudo.json
+ install -m 0644 -D ${WORKDIR}/blacklist.json ${D}${datadir}/${PN}/blacklist.json
}
diff --git a/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/kudo_uart_mux_ctrl.sh b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/kudo_uart_mux_ctrl.sh
new file mode 100644
index 000000000..27407783e
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/kudo_uart_mux_ctrl.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright (c) 2020 Ampere Computing LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Ampere Computing LLC mtjade: UART MUX/DEMUX for CPU0 UART0,1,4 and CPU1 UART1
+# Usage: ampere_uartmux_ctrl.sh <CPU UART port number> <UARTx_MODE>
+# <UARTx_MODE> of 1 sets CPU To BSP
+# <UARTx_MODE> of 2 sets SCP1 to SI2
+function set_gpio_ctrl() {
+ echo $1 > /sys/class/gpio/export
+ echo $2 > /sys/class//gpio/gpio$1/direction
+ echo $3 > /sys/class/gpio/gpio$1/value
+ echo $1 > /sys/class/gpio/unexport
+}
+
+
+if [ $# -lt 1 ]; then
+ exit 1
+fi
+
+echo "Ampere UART MUX CTRL UART port $1 to mode" > /dev/ttyS0
+
+case "$1" in
+ ttyS1)
+ set_gpio_ctrl 167 out 1
+ ;;
+ ttyS3)
+ set_gpio_ctrl 161 out 1
+ set_gpio_ctrl 183 out 1
+ set_gpio_ctrl 198 out 0
+ ;;
+ *)
+ echo "Invalid tty passed to $0. Exiting!" > /dev/ttyS0
+ ;;
+esac
+
diff --git a/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/obmc-console@.service b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/obmc-console@.service
new file mode 100644
index 000000000..695eec31c
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/obmc-console@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Phosphor Console Muxer listening on device /dev/%I
+BindsTo=dev-%i.device
+After=dev-%i.device
+StartLimitBurst=3
+StartLimitIntervalSec=300
+
+[Service]
+ExecStartPre=/usr/sbin/kudo_uart_mux_ctrl.sh %i
+ExecStart=/usr/sbin/obmc-console-server --config /etc/obmc-console/server.%i.conf %i
+SyslogIdentifier=obmc-console-server
+Restart=always
+RestartSec=10
+TimeoutStartSec=60
+TimeoutStopSec=60
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS1.conf b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS1.conf
new file mode 100644
index 000000000..1751a0575
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS1.conf
@@ -0,0 +1,2 @@
+baud = 115200
+logfile = /var/log/obmc-console-cpu.log
diff --git a/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS3.conf b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS3.conf
new file mode 100644
index 000000000..c8a9d973e
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console/server.ttyS3.conf
@@ -0,0 +1,3 @@
+baud = 115200
+socket-id = ttyS3
+logfile = /var/log/obmc-console-scp.log
diff --git a/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console_%.bbappend
new file mode 100644
index 000000000..9daae7c86
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/console/obmc-console_%.bbappend
@@ -0,0 +1,41 @@
+FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:"
+RDEPENDS_${PN}_append_kudo = " bash"
+
+# Remove what installed by common recipe
+OBMC_CONSOLE_HOST_TTY = ""
+SYSTEMD_SUBSTITUTIONS_remove_kudo = " OBMC_CONSOLE_HOST_TTY:${OBMC_CONSOLE_HOST_TTY}:${PN}-ssh@.service"
+SYSTEMD_SUBSTITUTIONS_remove_kudo = " OBMC_CONSOLE_HOST_TTY:${OBMC_CONSOLE_HOST_TTY}:${PN}-ssh.socket"
+
+# Declare port spcific conf and service files
+HOST_CONSOLE_TTY = "ttyS1 ttyS3"
+
+CONSOLE_CONF_FMT = "file://server.{0}.conf"
+SRC_URI_append_kudo = " ${@compose_list(d, 'CONSOLE_CONF_FMT', 'HOST_CONSOLE_TTY')}"
+SRC_URI_append_kudo = " file://${BPN}@.service"
+SRC_URI_append_kudo = " file://kudo_uart_mux_ctrl.sh"
+
+SYSTEMD_SERVICE_${PN}_append_kudo = " \
+ ${PN}@.service \
+ "
+
+do_install_append() {
+ for i in ${HOST_CONSOLE_TTY}
+ do
+ install -m 0644 ${WORKDIR}/server.${i}.conf ${D}${sysconfdir}/${BPN}/server.${i}.conf
+ done
+
+ # Deal with files installed by the base package's .bb install function
+ rm -f ${D}${sysconfdir}/${BPN}.conf
+ rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
+
+ # Overwrite base package's obmc-console@.service with our own
+ install -m 0644 ${WORKDIR}/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service
+ install -d ${D}/usr/sbin
+ install -m 0755 ${WORKDIR}/kudo_uart_mux_ctrl.sh ${D}/${sbindir}/kudo_uart_mux_ctrl.sh
+
+}
+
+pkg_postinst_${PN}_append () {
+ systemctl --root=$D enable obmc-console@ttyS1.service
+ systemctl --root=$D enable obmc-console@ttyS3.service
+}
diff --git a/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend b/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend
index 588803b3b..5ec39cde8 100644
--- a/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend
+++ b/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend
@@ -1,7 +1,13 @@
-OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " google-ipmi-sys"
-OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " google-ipmi-i2c"
OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-blobs"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-blobs-binarystore"
OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-ethstats"
OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-flash"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-net"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-host"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-host-postd"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-logging"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-sel-logger"
OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " usb-network"
OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " entity-manager"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " dbus-sensors"
+OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-virtual-sensor"
diff --git a/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json
new file mode 100644
index 000000000..38650a38f
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json
@@ -0,0 +1,5 @@
+[{
+ "blobBaseId": "/skm/hss/",
+ "sysFilePath": "/sys/bus/i2c/devices/i2c-4/i2c-33/33-0055/eeprom",
+ "offsetBytes": 0
+}]
diff --git a/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend
new file mode 100644
index 000000000..f87ac040f
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:"
+SRC_URI_append_kudo = " file://config.json"
+FILES_${PN}_append_kudo = " ${datadir}/binaryblob/config.json"
+
+do_install_append_kudo() {
+ install -d ${D}${datadir}/binaryblob/
+ install ${WORKDIR}/config.json ${D}${datadir}/binaryblob/config.json
+}
diff --git a/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 000000000..5e0eddc71
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:"
+
+#Add sensorhandler.hpp and selutilty.hpp since intel-ipmi-oem requires these libs
+do_install_append_kudo(){
+ install -d ${D}${includedir}/phosphor-ipmi-host
+ install -m 0644 -D ${S}/sensorhandler.hpp ${D}${includedir}/phosphor-ipmi-host
+ install -m 0644 -D ${S}/selutility.hpp ${D}${includedir}/phosphor-ipmi-host
+}
diff --git a/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.service b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.service
new file mode 100644
index 000000000..8d4259441
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=TLA2024 change scale property
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/tla2024-enable.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.sh b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.sh
new file mode 100644
index 000000000..6c5b07aec
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/tla2024-enable.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo 2.000000 > /sys/bus/iio/devices/iio:device1/scale
diff --git a/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json
new file mode 100644
index 000000000..c353e8216
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json
@@ -0,0 +1,394 @@
+[
+ {
+ "Desc":
+ {
+ "Name": "CPU0_NBM_T",
+ "SensorType": "temperature",
+ "MinValue": 0,
+ "MaxValue": 160
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 86,
+ "CriticalLow": 0,
+ "WarningHigh": 85,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "V1",
+ "Desc":
+ {
+ "Name": "CPU0_NBM_V",
+ "SensorType": "voltage"
+ }
+ }
+ ]
+ },
+ "Expression": "(V1 - 2.73) * 100"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU1_NBM_T",
+ "SensorType": "temperature",
+ "MinValue": 0,
+ "MaxValue": 160
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 86,
+ "CriticalLow": 0,
+ "WarningHigh": 85,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "V2",
+ "Desc":
+ {
+ "Name": "CPU1_NBM_V",
+ "SensorType": "voltage"
+ }
+ }
+ ]
+ },
+ "Expression": "(V2 - 2.73) * 100"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU0_DIMMG_T",
+ "SensorType": "temperature",
+ "MinValue": 0,
+ "MaxValue": 255
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 90,
+ "CriticalLow": 0,
+ "WarningHigh": 85,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "CH0",
+ "Desc":
+ {
+ "Name": "CPU0_CH0DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH1",
+ "Desc":
+ {
+ "Name": "CPU0_CH1DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH2",
+ "Desc":
+ {
+ "Name": "CPU0_CH2DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH3",
+ "Desc":
+ {
+ "Name": "CPU0_CH3DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH4",
+ "Desc":
+ {
+ "Name": "CPU0_CH4DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH5",
+ "Desc":
+ {
+ "Name": "CPU0_CH5DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH6",
+ "Desc":
+ {
+ "Name": "CPU0_CH6DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH7",
+ "Desc":
+ {
+ "Name": "CPU0_CH7DIMM_T",
+ "SensorType": "temperature"
+ }
+ }
+ ]
+ },
+ "Expression": "max((CH0 == CH0) ? CH0 : 0,(CH1 == CH1) ? CH1 : 0,(CH2 == CH2) ? CH2 : 0,(CH3 == CH3) ? CH3 : 0,(CH4 == CH4) ? CH4 : 0,(CH5 == CH5) ? CH5 : 0,(CH6 == CH6) ? CH6 : 0,(CH7 == CH7) ? CH7 : 0)"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU1_DIMMG_T",
+ "SensorType": "temperature",
+ "MinValue": 0,
+ "MaxValue": 255
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 90,
+ "CriticalLow": 0,
+ "WarningHigh": 85,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "CH0",
+ "Desc":
+ {
+ "Name": "CPU1_CH0DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH1",
+ "Desc":
+ {
+ "Name": "CPU1_CH1DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH2",
+ "Desc":
+ {
+ "Name": "CPU1_CH2DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH3",
+ "Desc":
+ {
+ "Name": "CPU1_CH3DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH4",
+ "Desc":
+ {
+ "Name": "CPU1_CH4DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH5",
+ "Desc":
+ {
+ "Name": "CPU1_CH5DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH6",
+ "Desc":
+ {
+ "Name": "CPU1_CH6DIMM_T",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "CH7",
+ "Desc":
+ {
+ "Name": "CPU1_CH7DIMM_T",
+ "SensorType": "temperature"
+ }
+ }
+ ]
+ },
+ "Expression": "max((CH0 == CH0) ? CH0 : 0,(CH1 == CH1) ? CH1 : 0,(CH2 == CH2) ? CH2 : 0,(CH3 == CH3) ? CH3 : 0,(CH4 == CH4) ? CH4 : 0,(CH5 == CH5) ? CH5 : 0,(CH6 == CH6) ? CH6 : 0,(CH7 == CH7) ? CH7 : 0)"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_DDR_V",
+ "SensorType": "voltage",
+ "MinValue": 0,
+ "MaxValue": 5
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 2.999,
+ "CriticalLow": 0,
+ "WarningHigh": 0,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "V1",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR1_V",
+ "SensorType": "voltage"
+ }
+ },
+ {
+ "ParamName": "V2",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR2_V",
+ "SensorType": "voltage"
+ }
+ }
+ ]
+ },
+ "Expression": "(V1 + V2) >= 0 ? (V1 + V2) : -1"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_DDR_V",
+ "SensorType": "voltage",
+ "MinValue": 0,
+ "MaxValue": 5
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 2.999,
+ "CriticalLow": 0,
+ "WarningHigh": 0,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "V1",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR1_V",
+ "SensorType": "voltage"
+ }
+ },
+ {
+ "ParamName": "V2",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR2_V",
+ "SensorType": "voltage"
+ }
+ }
+ ]
+ },
+ "Expression": "(V1 + V2) >= 0 ? (V1 + V2) : -1"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU0_MEM_PW",
+ "SensorType": "power",
+ "MinValue": 0,
+ "MaxValue": 80
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 29.987,
+ "CriticalLow": 0,
+ "WarningHigh": 0,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "P1",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR1_PW",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR2_PW",
+ "SensorType": "power"
+ }
+ }
+ ]
+ },
+ "Expression": "(P1 + P2) >= 0 ? (P1 + P2) : -1"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU1_MEM_PW",
+ "SensorType": "power",
+ "MinValue": 0,
+ "MaxValue": 80
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 29.987,
+ "CriticalLow": 0,
+ "WarningHigh": 0,
+ "WarningLow": 0
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "P1",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR1_PW",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR2_PW",
+ "SensorType": "power"
+ }
+ }
+ ]
+ },
+ "Expression": "(P1 + P2) >= 0 ? (P1 + P2) : -1"
+ }
+]
diff --git a/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend
new file mode 100644
index 000000000..43f5f5660
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend
@@ -0,0 +1,21 @@
+FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:"
+
+inherit systemd
+RDEPENDS_${PN} += "bash"
+SYSTEMD_SERVICE_${PN}_append_kudo = " tla2024-enable.service"
+
+SRC_URI_append_kudo = " \
+ file://virtual_sensor_config.json \
+ file://tla2024-enable.service \
+ file://tla2024-enable.sh \
+ "
+FILES_${PN}_append_kudo = " ${bindir}/tla2024-enable.sh"
+
+do_install_append_kudo() {
+ install -d ${D}${datadir}/${PN}
+ install -m 0644 ${WORKDIR}/virtual_sensor_config.json ${D}${datadir}/${PN}/virtual_sensor_config.json
+ install -m 0755 ${WORKDIR}/tla2024-enable.sh ${D}${bindir}/tla2024-enable.sh
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/tla2024-enable.service ${D}${systemd_system_unitdir}/tla2024-enable.service
+}
diff --git a/meta-google/recipes-connectivity/avahi/files/avahi-daemon.conf b/meta-google/recipes-connectivity/avahi/files/avahi-daemon.conf
index 9688ffb39..57520df7f 100644
--- a/meta-google/recipes-connectivity/avahi/files/avahi-daemon.conf
+++ b/meta-google/recipes-connectivity/avahi/files/avahi-daemon.conf
@@ -1,5 +1,5 @@
[server]
-allow-interfaces=mgmt
+allow-interfaces=mgmt,gbmcbr
[publish]
disable-user-service-publishing=yes
diff --git a/meta-google/recipes-core/dropbear/dropbear_%.bbappend b/meta-google/recipes-core/dropbear/dropbear_%.bbappend
index e93eba8b6..0b4349e00 100644
--- a/meta-google/recipes-core/dropbear/dropbear_%.bbappend
+++ b/meta-google/recipes-core/dropbear/dropbear_%.bbappend
@@ -5,13 +5,13 @@ SYSTEMD_AUTO_ENABLE_${PN}_prod = "disable"
FILESEXTRAPATHS_remove_gbmc_bandaid := "${THISDIR}/${PN}:"
SYSTEMD_AUTO_ENABLE_${PN}_bandaid_prod = "enable"
-# Allow SSH to the mgmt node on DEV builds
+# Allow SSH to the gbmc-bridge node on DEV builds
do_install_append_gbmc_dev() {
nftables_dir=${D}${sysconfdir}/nftables
rules=$nftables_dir/50-dropbear-dev.rules
install -d -m0755 $nftables_dir
echo 'table inet filter {' >"$rules"
- echo ' chain mgmt_pub_input {' >>"$rules"
+ echo ' chain gbmc_br_pub_input {' >>"$rules"
echo ' tcp dport 22 accept' >>"$rules"
echo ' }' >>"$rules"
echo '}' >>"$rules"
diff --git a/meta-google/recipes-extended/networking/sslh_git.bb b/meta-google/recipes-extended/networking/sslh_git.bb
index 749ee1d41..b683571c1 100644
--- a/meta-google/recipes-extended/networking/sslh_git.bb
+++ b/meta-google/recipes-extended/networking/sslh_git.bb
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/yrutschle/sslh"
-SRCREV = "b72baa0622ae2d29152dc251d7c21fe80a3052da"
+SRCREV = "517e4ad5b4d57dae396790882bd4629947be1632"
S = "${WORKDIR}/git"
inherit perlnative
diff --git a/meta-google/recipes-google/google-misc/google-misc.inc b/meta-google/recipes-google/google-misc/google-misc.inc
index 95f52613a..85acb9353 100644
--- a/meta-google/recipes-google/google-misc/google-misc.inc
+++ b/meta-google/recipes-google/google-misc/google-misc.inc
@@ -6,7 +6,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRC_URI += "git://github.com/openbmc/google-misc"
-SRCREV = "4c68ffb8b08fa4484824586ef4a981bcfabd38bb"
+SRCREV = "4a0e2e3c10327dac1c923d263929be9a20478b24"
S = "${WORKDIR}/git/subprojects/${GOOGLE_MISC_PROJ}"
inherit meson
diff --git a/meta-google/recipes-google/ncsi/files/50-gbmc-ncsi.rules.in b/meta-google/recipes-google/ncsi/files/50-gbmc-ncsi.rules.in
index 33031f0db..938dca34b 100644
--- a/meta-google/recipes-google/ncsi/files/50-gbmc-ncsi.rules.in
+++ b/meta-google/recipes-google/ncsi/files/50-gbmc-ncsi.rules.in
@@ -3,12 +3,32 @@ table inet filter {
type filter hook input priority 0; policy drop;
iifname != @NCSI_IF@ accept
ct state established accept
+ ip6 daddr ff00::/8 goto ncsi_brd_input
+ ip6 daddr fe80::/64 goto ncsi_legacy_input
+ }
+ chain ncsi_gbmc_br_pub_input {
+ jump gbmc_br_pub_input
+ reject
+ }
+ chain gbmc_br_pub_input {
+ }
+ chain ncsi_legacy_input {
+ jump ncsi_brd_input
tcp dport 3959 accept
udp dport 3959 accept
tcp dport 3967 accept
udp dport 3967 accept
+ }
+ chain ncsi_brd_input {
icmpv6 type nd-neighbor-advert accept
icmpv6 type nd-neighbor-solicit accept
icmpv6 type nd-router-advert accept
}
+ chain ncsi_forward {
+ type filter hook forward priority 0; policy drop;
+ iifname != @NCSI_IF@ accept
+ oifname != gbmcbr drop
+ ip6 daddr fdb5:0481:10ce::/64 drop
+ ip6 saddr fdb5:0481:10ce::/64 drop
+ }
}
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in
new file mode 100644
index 000000000..961da5095
--- /dev/null
+++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in
@@ -0,0 +1,101 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[ -z "${gbmc_ncsi_br_pub_addr_lib-}" ] || return
+
+gbmc_ncsi_br_pub_addr_init=
+gbmc_ncsi_br_pub_addr_lastip=
+
+gbmc_ncsi_br_pub_addr_update() {
+ [ -n "$gbmc_ncsi_br_pub_addr_init" ] || return
+
+ printf 'gBMC Bridge Pub Addr from NCSI: %s\n' \
+ "${gbmc_ncsi_br_pub_addr_lastip:-(deleted)}" >&2
+
+ local pfx_bytes=()
+ if [ -n "$gbmc_ncsi_br_pub_addr_lastip" ]; then
+ ip_to_bytes pfx_bytes "$gbmc_ncsi_br_pub_addr_lastip"
+ # Ensure we don't have more than a /64 address
+ local i
+ for (( i = 8; i < 16; ++i )); do
+ if (( pfx_bytes[$i] != 0 )); then
+ pfx_bytes=()
+ break
+ fi
+ done
+ fi
+
+ local contents='[Network]'$'\n'
+ if (( ${#pfx_bytes[@]} != 0 )); then
+ pfx_bytes[8]=0xfd
+ local stateless_pfx="$(ip_bytes_to_str pfx_bytes)"
+ pfx_bytes[9]=0x01
+ local ncsi_pfx="$(ip_bytes_to_str pfx_bytes)"
+ local here=
+ read -r -d '' here <<EOF
+Address=$ncsi_pfx/128
+IPv6PrefixDelegation=yes
+[IPv6PrefixDelegation]
+RouterLifetimeSec=60
+[IPv6Prefix]
+Prefix=$stateless_pfx/80
+PreferredLifetimeSec=60
+ValidLifetimeSec=60
+[IPv6RoutePrefix]
+Route=$ncsi_pfx/80
+LifetimeSec=60
+[Route]
+Destination=$stateless_pfx/72
+Type=unreachable
+Metric=1024
+EOF
+ contents+="$here"$'\n'
+ fi
+
+ local file
+ for file in /run/systemd/network/{00,}-bmc-gbmcbr.network.d/50-public.conf; do
+ mkdir -p -m 755 "$(dirname "$file")"
+ printf '%s' "$contents" >"$file"
+ done
+
+ # Ensure that systemd-networkd performs a reconfiguration as it doesn't
+ # currently check the mtime of drop-in files.
+ touch -c /lib/systemd/network/*-bmc-gbmcbr.network
+
+ if [ "$(systemctl is-active systemd-networkd)" != 'inactive' ]; then
+ networkctl reload
+ networkctl reconfigure gbmcbr
+ fi
+}
+
+gbmc_ncsi_br_pub_addr_hook() {
+ if [ "$change" = 'init' ]; then
+ gbmc_ncsi_br_pub_addr_init=1
+ gbmc_ncsi_br_pub_addr_update
+ elif [ "$change" = 'addr' -a "$intf" = '@NCSI_IF@' ] &&
+ [ "$scope" = 'global' -a "$fam" = 'inet6' ]; then
+ if [ "$action" = 'add' -a "$ip" != "$gbmc_ncsi_br_pub_addr_lastip" ]; then
+ gbmc_ncsi_br_pub_addr_lastip="$ip"
+ gbmc_ncsi_br_pub_addr_update
+ fi
+ if [ "$action" = 'del' -a "$ip" = "$gbmc_ncsi_br_pub_addr_lastip" ]; then
+ gbmc_ncsi_br_pub_addr_lastip=
+ gbmc_ncsi_br_pub_addr_update
+ fi
+ fi
+}
+
+GBMC_IP_MONITOR_HOOKS+=(gbmc_ncsi_br_pub_addr_hook)
+
+gbmc_ncsi_br_pub_addr_lib=1
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in
new file mode 100644
index 000000000..93d1a4ad2
--- /dev/null
+++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in
@@ -0,0 +1,101 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[ -z "${gbmc_ncsi_nft_lib-}" ] || return
+
+gbmc_ncsi_nft_init=
+gbmc_ncsi_nft_lastip4=
+gbmc_ncsi_nft_lastip6=
+
+gbmc_ncsi_nft_update() {
+ [ -n "$gbmc_ncsi_nft_init" ] || return
+
+ printf 'NCSI firewall for IPv4(%s) IPv6(%s)\n' \
+ "${gbmc_ncsi_nft_lastip4:-(deleted)}" \
+ "${gbmc_ncsi_nft_lastip6:-(deleted)}" >&2
+
+ local contents=
+ contents+='table inet filter {'$'\n'
+ contents+=' chain ncsi_input {'$'\n'
+
+ local ip4="$gbmc_ncsi_nft_lastip4"
+ if [ -n "$ip4" ]; then
+ contents+=" ip daddr $ip4 goto ncsi_legacy_input"$'\n'
+ fi
+
+ local ip6="$gbmc_ncsi_nft_lastip6"
+ if [ -n "$ip6" ]; then
+ contents+=" ip6 daddr $ip6/128 goto ncsi_legacy_input"$'\n'
+
+ local ip_bytes=()
+ ip_to_bytes ip_bytes "$ip6"
+ # If our address has enough spare bits for appending the BMC suffix
+ # then we add a rule that allows the BMC subnet. That is, we need a /64
+ # as input.
+ local i
+ for (( i = 8; i < 16; i++ )); do
+ if (( ip_bytes[$i] != 0 )); then
+ ip_bytes=()
+ break
+ fi
+ done
+ if (( ${#ip_bytes[@]} != 0 )); then
+ ip_bytes[8]=0xfd
+ local pfx="$(ip_bytes_to_str ip_bytes)"
+ contents+=" ip6 saddr != $pfx/72 ip6 daddr"
+ contents+=" $pfx/72 goto ncsi_gbmc_br_pub_input"$'\n'
+ fi
+ fi
+
+ contents+=' }'$'\n'
+ contents+=' chain ncsi_forward {'$'\n'
+ if [ -n "$pfx" ]; then
+ contents+=" ip6 saddr != $pfx/72 ip6 daddr $pfx/72 accept"$'\n'
+ fi
+ contents+=' }'$'\n'
+ contents+='}'$'\n'
+
+ local rfile=/run/nftables/40-gbmc-ncsi-in.rules
+ mkdir -p -m 755 "$(dirname "$rfile")"
+ printf '%s' "$contents" >"$rfile"
+
+ echo 'Restarting nftables' >&2
+ systemctl reset-failed nftables
+ systemctl --no-block restart nftables
+}
+
+gbmc_ncsi_nft_hook() {
+ if [ "$change" = 'init' ]; then
+ gbmc_ncsi_nft_init=1
+ gbmc_ncsi_nft_update
+ elif [ "$change" = 'addr' -a "$intf" = '@NCSI_IF@' -a "$scope" = 'global' ]; then
+ if [ "$fam" = 'inet6' ]; then
+ local -n lastip='gbmc_ncsi_nft_lastip6'
+ else
+ local -n lastip='gbmc_ncsi_nft_lastip4'
+ fi
+ if [ "$action" = 'add' -a "$ip" != "$lastip" ]; then
+ lastip="$ip"
+ gbmc_ncsi_nft_update
+ fi
+ if [ "$action" = 'del' -a "$ip" = "$lastip" ]; then
+ lastip=
+ gbmc_ncsi_nft_update
+ fi
+ fi
+}
+
+GBMC_IP_MONITOR_HOOKS+=(gbmc_ncsi_nft_hook)
+
+gbmc_ncsi_nft_lib=1
diff --git a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
index ecdda2cb6..098819988 100644
--- a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
+++ b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
@@ -9,17 +9,23 @@ SRC_URI += " \
file://50-gbmc-ncsi.rules.in \
file://gbmc-ncsi-sslh.socket.in \
file://gbmc-ncsi-sslh.service \
+ file://gbmc-ncsi-nft.sh.in \
+ file://gbmc-ncsi-br-pub-addr.sh.in \
"
S = "${WORKDIR}"
RDEPENDS_${PN} += " \
+ gbmc-ip-monitor \
ncsid \
nftables-systemd \
sslh \
"
-FILES_${PN} += "${systemd_unitdir}"
+FILES_${PN} += " \
+ ${datadir}/gbmc-ip-monitor \
+ ${systemd_unitdir} \
+ "
SYSTEMD_SERVICE_${PN} += " \
gbmc-ncsi-sslh.service \
@@ -50,7 +56,7 @@ do_install_append() {
nftdir=${D}${sysconfdir}/nftables
install -d -m0755 "$nftdir"
- sed "s,@NCSI_IF@,$if_name," ${WORKDIR}/50-gbmc-ncsi.rules.in \
+ sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/50-gbmc-ncsi.rules.in \
>"$nftdir"/50-gbmc-ncsi.rules
wantdir=${D}${systemd_system_unitdir}/multi-user.target.wants
@@ -58,6 +64,15 @@ do_install_append() {
ln -sv ../ncsid@.service "$wantdir"/ncsid@$if_name.service
install -m 0644 ${WORKDIR}/gbmc-ncsi-sslh.service ${D}${systemd_system_unitdir}
- sed "s,@NCSI_IF@,$if_name," ${WORKDIR}/gbmc-ncsi-sslh.socket.in \
+ sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-sslh.socket.in \
>${D}${systemd_system_unitdir}/gbmc-ncsi-sslh.socket
+
+ mondir=${D}${datadir}/gbmc-ip-monitor/
+ install -d -m0755 $mondir
+ sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-nft.sh.in \
+ >${WORKDIR}/gbmc-ncsi-nft.sh
+ install -m644 ${WORKDIR}/gbmc-ncsi-nft.sh $mondir
+ sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-br-pub-addr.sh.in \
+ >${WORKDIR}/gbmc-ncsi-br-pub-addr.sh
+ install -m644 ${WORKDIR}/gbmc-ncsi-br-pub-addr.sh $mondir
}
diff --git a/meta-google/recipes-google/networking/files/gbmc-ip-monitor.sh b/meta-google/recipes-google/networking/files/gbmc-ip-monitor.sh
index baeff9a85..e64c8675e 100755
--- a/meta-google/recipes-google/networking/files/gbmc-ip-monitor.sh
+++ b/meta-google/recipes-google/networking/files/gbmc-ip-monitor.sh
@@ -114,7 +114,7 @@ trap cleanup HUP INT QUIT ABRT TERM EXIT
return 0 2>/dev/null
while read line; do
- gbmc_ip_monitor_parse_line || continue
+ gbmc_ip_monitor_parse_line "$line" || continue
gbmc_ip_monitor_run_hooks || continue
if [ "$change" = 'init' ]; then
systemd-notify --ready
diff --git a/meta-google/recipes-google/networking/gbmc-bridge.bb b/meta-google/recipes-google/networking/gbmc-bridge.bb
new file mode 100644
index 000000000..37af84baf
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge.bb
@@ -0,0 +1,105 @@
+SUMMARY = "Configures the gbmc bridge and filter rules"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI += " \
+ file://-bmc-gbmcbr.netdev \
+ file://-bmc-gbmcbr.network.in \
+ file://-bmc-gbmcbrdummy.netdev \
+ file://-bmc-gbmcbrdummy.network \
+ file://+-bmc-gbmcbrusb.network \
+ file://ipmi.service.in \
+ file://50-gbmc-br.rules \
+ file://gbmc-br-ula.sh \
+ file://gbmc-br-from-ra.sh \
+ file://gbmc-br-ensure-ra.sh \
+ file://gbmc-br-ensure-ra.service \
+ file://gbmc-br-gw-src.sh \
+ file://gbmc-br-nft.sh \
+ "
+
+FILES_${PN}_append = " \
+ ${datadir}/gbmc-ip-monitor \
+ ${systemd_unitdir}/network \
+ ${sysconfdir}/nftables \
+ ${sysconfdir}/avahi/services \
+ "
+
+RDEPENDS_${PN}_append = " \
+ bash \
+ gbmc-ip-monitor \
+ mstpd-mstpd \
+ network-sh \
+ ndisc6-rdisc6 \
+ "
+
+SYSTEMD_SERVICE_${PN} += "gbmc-br-ensure-ra.service"
+
+GBMC_BR_MAC_ADDR ?= ""
+
+# Generated via https://cd34.com/rfc4193/ based on a MAC from a machine I own
+# and we allocated it downstream. Intended to only be used within a complete
+# system of multiple network endpoints.
+GBMC_ULA_PREFIX = "fdb5:0481:10ce:0"
+
+def mac_to_eui64(mac):
+ if not mac:
+ return ''
+ b = [int(c, 16) for c in mac.split(':')]
+ b[0] ^= 2
+ b.insert(3, 0xfe)
+ b.insert(3, 0xff)
+ idx = range(0, len(b)-1, 2)
+ return ':'.join([format((b[i] << 8) + b[i+1], '04x') for i in idx])
+
+do_install() {
+ netdir=${D}${systemd_unitdir}/network
+ install -d -m0755 $netdir
+
+ if [ ! -z "${GBMC_BR_MAC_ADDR}" ]; then
+ sfx='${@mac_to_eui64(GBMC_BR_MAC_ADDR)}'
+ addr="Address=${GBMC_ULA_PREFIX}:$sfx/64\nAddress=fe80::$sfx/64"
+ sed -i "s,@ADDR@,$addr," ${WORKDIR}/-bmc-gbmcbr.network.in
+ else
+ sed -i '/@ADDR@/d' ${WORKDIR}/-bmc-gbmcbr.network.in
+ fi
+
+ install -m0644 ${WORKDIR}/-bmc-gbmcbr.netdev $netdir/
+ install -m0644 ${WORKDIR}/-bmc-gbmcbr.network.in $netdir/-bmc-gbmcbr.network
+ install -m0644 ${WORKDIR}/-bmc-gbmcbrdummy.netdev $netdir/
+ install -m0644 ${WORKDIR}/-bmc-gbmcbrdummy.network $netdir/
+ install -m0644 ${WORKDIR}/+-bmc-gbmcbrusb.network $netdir/
+
+ nftables_dir=${D}${sysconfdir}/nftables
+ install -d -m0755 "$nftables_dir"
+ install -m0644 ${WORKDIR}/50-gbmc-br.rules $nftables_dir/
+
+ avahi_dir=${D}${sysconfdir}/avahi/services
+ install -d -m 0755 "$avahi_dir"
+ sed -i 's,@MACHINE@,${MACHINE},g' ${WORKDIR}/ipmi.service.in
+ sed -i 's,@EXTRA_ATTRS@,,g' ${WORKDIR}/ipmi.service.in
+ sed 's,@NAME@,bmc,g' ${WORKDIR}/ipmi.service.in >${avahi_dir}/bmc.ipmi.service
+ sed 's,@NAME@,${MACHINE}-bmc,g' ${WORKDIR}/ipmi.service.in >${avahi_dir}/${MACHINE}-bmc.ipmi.service
+
+ mondir=${D}${datadir}/gbmc-ip-monitor
+ install -d -m0755 "$mondir"
+ install -m0644 ${WORKDIR}/gbmc-br-ula.sh "$mondir"/
+ install -m0644 ${WORKDIR}/gbmc-br-from-ra.sh "$mondir"/
+ install -m0644 ${WORKDIR}/gbmc-br-gw-src.sh "$mondir"/
+ install -m0644 ${WORKDIR}/gbmc-br-nft.sh "$mondir"/
+
+ install -d -m0755 ${D}${libexecdir}
+ install -m0755 ${WORKDIR}/gbmc-br-ensure-ra.sh ${D}${libexecdir}/
+ install -d -m0755 ${D}${systemd_system_unitdir}
+ install -m0755 ${WORKDIR}/gbmc-br-ensure-ra.service ${D}${systemd_system_unitdir}/
+}
+
+do_rm_work_prepend() {
+ # HACK: Work around broken do_rm_work not properly calling rm with `--`
+ # It doesn't like filenames that start with `-`
+ rm -rf -- ${WORKDIR}/-*
+}
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/+-bmc-gbmcbrusb.network b/meta-google/recipes-google/networking/gbmc-bridge/+-bmc-gbmcbrusb.network
new file mode 100644
index 000000000..e403334b4
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/+-bmc-gbmcbrusb.network
@@ -0,0 +1,8 @@
+[Match]
+Name=usb*
+[Network]
+Bridge=gbmcbr
+[Bridge]
+# USB speeds tend to be better than 100mbit (100 cost) but worse
+# than 1gbit (10 cost). Generally around 200mbit.
+Cost=85
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev
new file mode 100644
index 000000000..d890ef9ff
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.netdev
@@ -0,0 +1,5 @@
+[NetDev]
+Name=gbmcbr
+Kind=bridge
+[Bridge]
+STP=true
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in
new file mode 100644
index 000000000..c6097bbdb
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbr.network.in
@@ -0,0 +1,9 @@
+[Match]
+Name=gbmcbr
+[Network]
+@ADDR@
+DHCP=false
+IPv6AcceptRA=true
+LLMNR=true
+MulticastDNS=true
+LinkLocalAddressing=ipv6
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.netdev b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.netdev
new file mode 100644
index 000000000..97c725812
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.netdev
@@ -0,0 +1,3 @@
+[NetDev]
+Name=gbmcbrdummy
+Kind=dummy
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.network b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.network
new file mode 100644
index 000000000..7d3f07197
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/-bmc-gbmcbrdummy.network
@@ -0,0 +1,4 @@
+[Match]
+Name=gbmcbrdummy
+[Network]
+Bridge=gbmcbr
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-br.rules b/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-br.rules
new file mode 100644
index 000000000..1a5e6331d
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-br.rules
@@ -0,0 +1,27 @@
+table bridge filter {
+ chain gbmc_br_prerouting {
+ type filter hook prerouting priority 0;
+ iifname != gbmcbr accept
+ # Sometimes our links are over NCSI and we don't want to broadcast
+ # those packets over the entire bridge. They are only relevant P2P.
+ ether type 0x88F8 drop
+ }
+}
+
+table inet filter {
+ chain gbmc_br_input {
+ type filter hook input priority 0; policy drop;
+ iifname != gbmcbr accept
+ jump gbmc_br_int_input
+ jump gbmc_br_pub_input
+ reject
+ }
+ chain gbmc_br_int_input {
+ ip6 daddr ff00::/8 accept
+ ip6 daddr fe80::/64 accept
+ ip6 daddr fdb5:0481:10ce::/64 accept
+ }
+ chain gbmc_br_pub_input {
+ ip6 nexthdr icmpv6 accept
+ }
+}
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.service b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.service
new file mode 100644
index 000000000..7f97cea48
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.service
@@ -0,0 +1,5 @@
+[Service]
+ExecStart=/usr/libexec/gbmc-br-ensure-ra.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.sh
new file mode 100644
index 000000000..60e33d89b
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ensure-ra.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Every 30 seconds, send out an RA so that the kernel will receive a response.
+# This ensures that all BMCs (even ones that think they are routers) get updated
+# information from the other systems on the network.
+w=30
+while true; do
+ start=$SECONDS
+ rdisc6 -m gbmcbr -r 1 -w $(( w * 1000 )) >/dev/null 2>/dev/null
+ # If rdisc6 exits early we still want to wait the full `w` time before
+ # starting again.
+ (( timeout = start + w - SECONDS ))
+ sleep $(( timeout < 0 ? 0 : timeout ))
+done
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh
new file mode 100644
index 000000000..18341fefb
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh
@@ -0,0 +1,96 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[ -z "${gbmc_br_from_ra_lib-}" ] || return
+
+source /usr/share/network/lib.sh || exit
+
+gbmc_br_from_ra_init=
+gbmc_br_from_ra_mac=
+declare -A gbmc_br_from_ra_pfxs=()
+declare -A gbmc_br_from_ra_prev_addrs=()
+
+gbmc_br_from_ra_update() {
+ [ -n "$gbmc_br_from_ra_init" -a -n "$gbmc_br_from_ra_mac" ] || return
+
+ local pfx
+ for pfx in "${!gbmc_br_from_ra_pfxs[@]}"; do
+ local cidr
+ if ! cidr="$(ip_pfx_to_cidr "$pfx")"; then
+ unset 'gbmc_br_from_ra_pfxs[$pfx]'
+ continue
+ fi
+ if (( cidr == 80 )); then
+ local sfx
+ if ! sfx="$(mac_to_eui48 "$gbmc_br_from_ra_mac")"; then
+ unset 'gbmc_br_from_ra_pfxs[$pfx]'
+ continue
+ fi
+ local addr
+ if ! addr="$(ip_pfx_concat "$pfx" "$sfx")"; then
+ unset 'gbmc_br_from_ra_pfxs[$pfx]'
+ continue
+ fi
+ else
+ unset 'gbmc_br_from_ra_pfxs[$pfx]'
+ continue
+ fi
+ local valid="${gbmc_br_from_ra_pfxs["$pfx"]}"
+ if (( valid > 0 )); then
+ if [ -z "${gbmc_br_from_ra_prev_addrs["$addr"]-}" ]; then
+ echo "gBMC Bridge RA Addr Add: $addr" >&2
+ gbmc_br_from_ra_prev_addrs["$addr"]=1
+ fi
+ ip addr replace "$addr" dev gbmcbr noprefixroute
+ else
+ if [ -n "${gbmc_br_from_ra_prev_addrs["$addr"]-}" ]; then
+ echo "gBMC Bridge RA Addr Del: $addr" >&2
+ unset 'gbmc_br_from_ra_prev_addrs[$addr]'
+ fi
+ ip addr del "$addr" dev gbmcbr
+ unset 'gbmc_br_from_ra_pfxs[$pfx]'
+ fi
+ done
+}
+
+gbmc_br_from_ra_hook() {
+ if [ "$change" = 'init' ]; then
+ gbmc_br_from_ra_init=1
+ gbmc_br_from_ra_update
+ elif [[ "$change" == 'route' && "$route" != *' via '* ]] &&
+ [[ "$route" =~ ^(.* dev gbmcbr proto ra .*)( +expires +([^ ]+)sec).*$ ]]; then
+ pfx="${route%% *}"
+ if [ "$action" = 'add' ]; then
+ gbmc_br_from_ra_pfxs["$pfx"]="${BASH_REMATCH[3]}"
+ gbmc_br_from_ra_update
+ elif [ "$action" = 'del' ]; then
+ gbmc_br_from_ra_pfxs["$pfx"]=0
+ gbmc_br_from_ra_update
+ fi
+ elif [ "$change" = 'link' -a "$intf" = 'gbmcbr' ]; then
+ rdisc6 -m gbmcbr -r 1 -w 100 >/dev/null 2>&1
+ if [ "$action" = 'add' -a "$mac" != "$gbmc_br_from_ra_mac" ]; then
+ gbmc_br_from_ra_mac="$mac"
+ gbmc_br_from_ra_update
+ fi
+ if [ "$action" = 'del' -a "$mac" = "$gbmc_br_from_ra_mac" ]; then
+ gbmc_br_from_ra_mac=
+ gbmc_br_from_ra_update
+ fi
+ fi
+}
+
+GBMC_IP_MONITOR_HOOKS+=(gbmc_br_from_ra_hook)
+
+gbmc_br_from_ra_lib=1
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh
new file mode 100644
index 000000000..cfe993f28
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh
@@ -0,0 +1,74 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[ -z "${gbmc_br_gw_src_lib-}" ] || return
+
+source /usr/share/network/lib.sh || exit
+
+gbmc_br_gw_src_ip=
+declare -A gbmc_br_gw_src_routes=()
+
+gbmc_br_gw_src_update() {
+ [ -n "$gbmc_br_gw_src_ip" ] || return
+
+ local route
+ for route in "${!gbmc_br_gw_src_routes[@]}"; do
+ [[ "$route" != *" src $gbmc_br_gw_src_ip "* ]] || continue
+ echo "gBMC Bridge Updating GW source [$gbmc_br_gw_src_ip]: $route" >&2
+ ip route change $route src "$gbmc_br_gw_src_ip"
+ unset 'gbmc_br_gw_src_routes[$route]'
+ done
+}
+
+gbmc_br_gw_src_hook() {
+ # We only want to match default gateway routes that are dynamic
+ # (have an expiration time). These will be updated with our preferred
+ # source.
+ if [[ "$change" == 'route' && "$route" == 'default '*':'* ]]; then
+ if [[ "$route" =~ ^(.*)( +expires +[^ ]+)(.*)$ ]]; then
+ route="${BASH_REMATCH[1]}${BASH_REMATCH[3]}"
+ fi
+ if [ "$action" = 'add' -a -z "${gbmc_br_gw_src_routes["$route"]}" ]; then
+ gbmc_br_gw_src_routes["$route"]=1
+ gbmc_br_gw_src_update
+ elif [ "$action" = 'del' -a -n "${gbmc_br_gw_src_routes["$route"]}" ]; then
+ unset 'gbmc_br_gw_src_routes[$route]'
+ gbmc_br_gw_src_update
+ fi
+ # Match only global IP addresses on the bridge that match the BMC stateless
+ # prefix (<mpfx>:fd00:). So 2002:af4:3480:2248:fd00:6345:3069:9186 would be
+ # matched as the preferred source IP for outoging traffic.
+ elif [ "$change" = 'addr' -a "$intf" = 'gbmcbr' -a "$scope" = 'global' ] &&
+ [[ "$fam" == 'inet6' && "$flags" != *tentative* ]]; then
+ local ip_bytes=()
+ if ! ip_to_bytes ip_bytes "$ip"; then
+ echo "gBMC Bridge Ensure RA Invalid IP: $ip" >&2
+ return 1
+ fi
+ if (( ip_bytes[8] != 0xfd || ip_bytes[9] != 0 )); then
+ return 0
+ fi
+ if [ "$action" = 'add' -a "$ip" != "$gbmc_br_gw_src_ip" ]; then
+ gbmc_br_gw_src_ip="$ip"
+ gbmc_br_gw_src_update
+ fi
+ if [ "$action" = 'del' -a "$ip" = "$gbmc_br_gw_src_ip" ]; then
+ gbmc_br_gw_src_ip=
+ fi
+ fi
+}
+
+GBMC_IP_MONITOR_HOOKS+=(gbmc_br_gw_src_hook)
+
+gbmc_br_gw_src_lib=1
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
new file mode 100644
index 000000000..19b8f64a1
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
@@ -0,0 +1,76 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[ -z "${gbmc_br_nft_lib-}" ] || return
+
+source /usr/share/network/lib.sh || exit
+
+gbmc_br_nft_init=
+gbmc_br_nft_pfx=
+
+gbmc_br_nft_update() {
+ printf 'gBMC Bridge input firewall for %s\n' \
+ "${gbmc_br_nft_pfx:-(deleted)}" >&2
+
+ local contents=
+ contents+='table inet filter {'$'\n'
+ contents+=' chain gbmc_br_int_input {'$'\n'
+ if [ -n "${gbmc_br_nft_pfx-}" ]; then
+ contents+=" ip6 saddr $gbmc_br_nft_pfx"
+ contents+=" ip6 daddr $gbmc_br_nft_pfx accept"$'\n'
+ fi
+ contents+=' }'$'\n'
+ contents+='}'$'\n'
+
+ local rfile=/run/nftables/40-gbmc-br-int.rules
+ mkdir -p -m 755 "$(dirname "$rfile")"
+ printf '%s' "$contents" >"$rfile"
+
+ echo 'Restarting nftables' >&2
+ systemctl reset-failed nftables
+ systemctl --no-block restart nftables
+}
+
+gbmc_br_nft_hook() {
+ if [ "$change" = 'init' ]; then
+ gbmc_br_nft_init=1
+ gbmc_br_nft_update
+ # Match only global IP addresses on the bridge that match the BMC prefix
+ # (<mpfx>:fdxx:). So 2002:af4:3480:2248:fd02:6345:3069:9186 would become
+ # a 2002:af4:3480:2248:fd00/72 rule.
+ elif [ "$change" = 'addr' -a "$intf" = 'gbmcbr' -a "$scope" = 'global' ] &&
+ [[ "$fam" == 'inet6' && "$flags" != *tentative* ]]; then
+ local ip_bytes=()
+ if ! ip_to_bytes ip_bytes "$ip"; then
+ echo "gBMC Bridge NFT Invalid IP: $ip" >&2
+ return 1
+ fi
+ if (( ip_bytes[8] != 0xfd )); then
+ return 0
+ fi
+ local i
+ for (( i=9; i<16; i++ )); do
+ ip_bytes[$i]=0
+ done
+ pfx="$(ip_bytes_to_str ip_bytes)/72"
+ if [ "$action" = "add" -a "$pfx" != "$gbmc_br_nft_pfx" ]; then
+ gbmc_br_nft_pfx="$pfx"
+ gbmc_br_nft_update
+ fi
+ fi
+}
+
+GBMC_IP_MONITOR_HOOKS+=(gbmc_br_nft_hook)
+
+gbmc_br_nft_lib=1
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh
new file mode 100644
index 000000000..8e28d3956
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh
@@ -0,0 +1,71 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[ -z "${gbmc_br_ula_lib-}" ] || return
+
+source /usr/share/network/lib.sh || exit
+
+gbmc_br_ula_init=
+gbmc_br_ula_mac=
+
+gbmc_br_ula_update() {
+ [ -n "$gbmc_br_ula_init" ] || return
+
+ echo "gBMC Bridge ULA MAC: ${gbmc_br_ula_mac:-(deleted)}" >&2
+
+ local addr=
+ contents='[Network]'$'\n'
+ if [ -n "$gbmc_br_ula_mac" ]; then
+ local sfx
+ if sfx="$(mac_to_eui64 "$gbmc_br_ula_mac")" &&
+ addr="$(ip_pfx_concat "fdb5:0481:10ce::/64" "$sfx")"; then
+ contents+="Address=$addr"$'\n'
+ fi
+ fi
+
+ local netfile
+ for netfile in /run/systemd/network/{00,}-bmc-gbmcbr.network.d/60-ula.conf; do
+ mkdir -p -m 755 "$(dirname "$netfile")"
+ printf '%s' "$contents" >"$netfile"
+ done
+
+ # Ensure that systemd-networkd performs a reconfiguration as it doesn't
+ # currently check the mtime of drop-in files.
+ touch -c /lib/systemd/network/*-bmc-gbmcbr.network
+
+ if [ "$(systemctl is-active systemd-networkd)" != 'inactive' ]; then
+ networkctl reload
+ networkctl reconfigure gbmcbr
+ fi
+}
+
+gbmc_br_ula_hook() {
+ if [ "$change" = 'init' ]; then
+ gbmc_br_ula_init=1
+ gbmc_br_ula_update
+ elif [ "$change" = 'link' -a "$intf" = 'gbmcbr' ]; then
+ if [ "$action" = 'add' -a "$mac" != "$gbmc_br_ula_mac" ]; then
+ gbmc_br_ula_mac="$mac"
+ gbmc_br_ula_update
+ fi
+ if [ "$action" = 'del' -a "$mac" = "$gbmc_br_ula_mac" ]; then
+ gbmc_br_ula_mac=
+ gbmc_br_ula_update
+ fi
+ fi
+}
+
+GBMC_IP_MONITOR_HOOKS+=(gbmc_br_ula_hook)
+
+gbmc_br_ula_lib=1
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/ipmi.service.in b/meta-google/recipes-google/networking/gbmc-bridge/ipmi.service.in
new file mode 100644
index 000000000..0b940fa2d
--- /dev/null
+++ b/meta-google/recipes-google/networking/gbmc-bridge/ipmi.service.in
@@ -0,0 +1,11 @@
+<?xml version="1.0" ?>
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+<service-group>
+ <name>@NAME@</name>
+ <service>
+ <type>_ipmi._udp</type>
+ <port>623</port>
+ <txt-record>Machine=@MACHINE@</txt-record>
+ @EXTRA_ATTRS@
+ </service>
+</service-group>
diff --git a/meta-google/recipes-google/networking/gbmc-iperf3.bb b/meta-google/recipes-google/networking/gbmc-iperf3.bb
index 5044e418b..27ebdb7e0 100644
--- a/meta-google/recipes-google/networking/gbmc-iperf3.bb
+++ b/meta-google/recipes-google/networking/gbmc-iperf3.bb
@@ -17,13 +17,13 @@ do_install() {
install -m 0644 ${WORKDIR}/iperf3.service ${D}${systemd_system_unitdir}
}
-# Allow IPERF3 to the mgmt node on DEV builds
+# Allow IPERF3 to run on the gbmcbr node on DEV builds
do_install_append_dev() {
nftables_dir=${D}${sysconfdir}/nftables
rules=$nftables_dir/50-gbmc-iperf3-dev.rules
install -d -m0755 $nftables_dir
echo 'table inet filter {' >"$rules"
- echo ' chain mgmt_pub_input {' >>"$rules"
+ echo ' chain gbmc_br_pub_input {' >>"$rules"
echo ' tcp dport 5201 accept' >>"$rules"
echo ' }' >>"$rules"
echo '}' >>"$rules"
diff --git a/meta-google/recipes-google/networking/network-sh/lib.sh b/meta-google/recipes-google/networking/network-sh/lib.sh
index f37f7196d..b5d9382fc 100644
--- a/meta-google/recipes-google/networking/network-sh/lib.sh
+++ b/meta-google/recipes-google/networking/network-sh/lib.sh
@@ -33,11 +33,11 @@ mac_to_bytes() {
}
mac_to_eui48() {
- local mac_bytes=()
+ local mac_bytes=(0 0 0 0 0 0 0 0 0 0)
mac_to_bytes mac_bytes "$1" || return
# Return the EUI-64 bytes in the IPv6 format
- printf '%02x%02x:%02x%02x:%02x%02x\n' "${mac_bytes[@]}"
+ ip_bytes_to_str mac_bytes
}
mac_to_eui64() {
@@ -47,6 +47,7 @@ mac_to_eui64() {
# Using EUI-64 conversion rules, create the suffix bytes from MAC bytes
# Invert bit-0 of the first byte, and insert 0xfffe in the middle.
local suffix_bytes=(
+ 0 0 0 0 0 0 0 0
$((mac_bytes[0] ^ 1))
${mac_bytes[@]:1:2}
$((0xff)) $((0xfe))
@@ -54,52 +55,239 @@ mac_to_eui64() {
)
# Return the EUI-64 bytes in the IPv6 format
- printf '%02x%02x:%02x%02x:%02x%02x:%02x%02x\n' "${suffix_bytes[@]}"
+ ip_bytes_to_str suffix_bytes
+}
+
+ip_to_bytes() {
+ local -n bytes_out="$1"
+ local str="$2"
+
+ local bytes=()
+ local oldifs="$IFS"
+ # Heuristic for V4 / V6, validity will be checked as it is parsed
+ if [[ "$str" == *.* ]]; then
+ # Ensure we don't start or end with IFS
+ [ "${str:0:1}" != '.' ] || return 1
+ [ "${str: -1}" != '.' ] || return 1
+
+ local v
+ # Split IPv4 address into octets
+ IFS=.
+ for v in $str; do
+ # IPv4 digits are always decimal numbers
+ if ! [[ "$v" =~ ^[0-9]+$ ]]; then
+ IFS="$oldifs"
+ return 1
+ fi
+ # Each octet is a single byte, make sure the number isn't larger
+ if (( v > 0xff )); then
+ IFS="$oldifs"
+ return 1
+ fi
+ bytes+=($v)
+ done
+ # IPv4 addresses must have all 4 bytes present
+ if (( "${#bytes[@]}" != 4 )); then
+ IFS="$oldifs"
+ return 1
+ fi
+ else
+ # Ensure we bound the padding in an outer byte for
+ # IFS splitting to work correctly
+ [ "${str:0:2}" = '::' ] && str="0$str"
+ [ "${str: -2}" = '::' ] && str="${str}0"
+
+ # Ensure we don't start or end with IFS
+ [ "${str:0:1}" != ':' ] || return 1
+ [ "${str: -1}" != ':' ] || return 1
+
+ # Stores the bytes that come before ::, if it exists
+ local bytesBeforePad=()
+ local v
+ # Split the Address into hextets
+ IFS=:
+ for v in $str; do
+ # Handle ::, which translates to an empty string
+ if [ -z "$v" ]; then
+ # Only allow a single :: sequence in an address
+ if (( "${#bytesBeforePad[@]}" > 0 )); then
+ IFS="$oldifs"
+ return 1
+ fi
+ # Store the already parsed upper bytes separately
+ # This allows us to calculate and insert padding
+ bytesBeforePad=("${bytes[@]}")
+ bytes=()
+ continue
+ fi
+ # IPv6 digits are always hex
+ if ! [[ "$v" =~ ^[[:xdigit:]]+$ ]]; then
+ IFS="$oldifs"
+ return 1
+ fi
+ # Ensure the number is no larger than a hextet
+ v="0x$v"
+ if (( v > 0xffff )); then
+ IFS="$oldifs"
+ return 1
+ fi
+ # Split the hextet into 2 bytes
+ bytes+=($(( v >> 8 )))
+ bytes+=($(( v & 0xff )))
+ done
+ # If we have ::, add padding
+ if (( "${#bytesBeforePad[@]}" > 0 )); then
+ # Fill the middle bytes with padding and store in `bytes`
+ while (( "${#bytes[@]}" + "${#bytesBeforePad[@]}" < 16 )); do
+ bytesBeforePad+=(0)
+ done
+ bytes=("${bytesBeforePad[@]}" "${bytes[@]}")
+ fi
+ # IPv6 addresses must have all 16 bytes present
+ if (( "${#bytes[@]}" != 16 )); then
+ IFS="$oldifs"
+ return 1
+ fi
+ fi
+
+ IFS="$oldifs"
+ bytes_out=("${bytes[@]}")
}
-ipv6_pfx_concat() {
+ip_bytes_to_str() {
+ local -n bytes="$1"
+
+ if (( "${#bytes[@]}" == 4 )); then
+ printf '%d.%d.%d.%d\n' "${bytes[@]}"
+ elif (( "${#bytes[@]}" == 16 )); then
+ # Track the starting position of the longest run of 0 hextets (2 bytes)
+ local longest_i=0
+ # Track the size of the longest run of 0 hextets
+ local longest_s=0
+ # The index of the first 0 byte in the current run of zeros
+ local first_zero=0
+ local i
+ # Find the location of the longest run of zero hextets, preferring same
+ # size runs later in the address.
+ for (( i=0; i<=16; i+=2 )); do
+ # Terminate the run of zeros if we are at the end of the array or
+ # have a non-zero hextet
+ if (( i == 16 || bytes[$i] != 0 || bytes[$((i+1))] != 0 )); then
+ local s=$((i - first_zero))
+ if (( s >= longest_s )); then
+ longest_i=$first_zero
+ longest_s=$s
+ fi
+ first_zero=$((i+2))
+ fi
+ done
+ # Build the address string by each hextet
+ for (( i=0; i<16; i+=2 )); do
+ # If we encountered a run of zeros, add the necessary :: at the end
+ # of the string. If not at the end, a single : is added since : is
+ # printed to subsequent hextets already.
+ if (( i == longest_i )); then
+ (( i += longest_s-2 ))
+ printf ':'
+ # End of string needs to be ::
+ if (( i == 14 )); then
+ printf ':'
+ fi
+ else
+ # Prepend : to all hextets except the first for separation
+ if (( i != 0 )); then
+ printf ':'
+ fi
+ printf '%x' $(( (bytes[$i]<<8) | bytes[$(($i+1))]))
+ fi
+ done
+ printf '\n'
+ else
+ echo "Invalid IP Bytes: ${bytes[*]}" >&2
+ return 1
+ fi
+}
+
+ip_pfx_concat() {
local pfx="$1"
local sfx="$2"
- # Validate the prefix
- if ! [[ "$pfx" =~ ^(([0-9a-fA-F]{1,4}:)+):/([0-9]+)$ ]]; then
- echo "Invalid IPv6 prefix: $pfx" >&2
+ # Parse the prefix
+ if ! [[ "$pfx" =~ ^([0-9a-fA-F:.]+)/([0-9]+)$ ]]; then
+ echo "Invalid IP prefix: $pfx" >&2
return 1
fi
local addr="${BASH_REMATCH[1]}"
- local cidr="${BASH_REMATCH[3]}"
+ local cidr="${BASH_REMATCH[2]}"
+
# Ensure prefix doesn't have too many bytes
- local nos="${addr//:/}"
- if (( ${#addr} - ${#nos} > (cidr+7)/16 )); then
- echo "Too many prefix bytes: $pfx" >&2
+ local pfx_bytes=()
+ if ! ip_to_bytes pfx_bytes "$addr"; then
+ echo "Invalid IP prefix: $pfx" >&2
+ return 1
+ fi
+ if (( ${#pfx_bytes[@]}*8 < cidr )); then
+ echo "Prefix CIDR too large" >&2
+ return 1
+ fi
+ # CIDR values might partially divide a byte so we need to mask out
+ # only the part of the byte we want to check for emptiness
+ if (( (pfx_bytes[cidr/8] & ~(~0 << (8-cidr%8))) != 0 )); then
+ echo "Invalid byte $((cidr/8)): $pfx" >&2
return 1
fi
+ local i
+ # Check the rest of the whole bytes to make sure they are empty
+ for (( i=cidr/8+1; i<${#pfx_bytes[@]}; i++ )); do
+ if (( pfx_bytes[$i] != 0 )); then
+ echo "Byte $i not 0: $pfx" >&2
+ return 1
+ fi
+ done
# Validate the suffix
- if ! [[ "$sfx" =~ ^[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4})*$ ]]; then
+ local sfx_bytes=()
+ if ! ip_to_bytes sfx_bytes "$sfx"; then
echo "Invalid IPv6 suffix: $sfx" >&2
return 1
fi
- # Ensure suffix doesn't have too many bytes
- local nos="${sfx//:/}"
- if (( ${#sfx} - ${#nos} >= (128-cidr)/16 )); then
- echo "Too many suffix bytes: $sfx" >&2
+ if (( "${#sfx_bytes[@]}" != "${#pfx_bytes[@]}" )); then
+ echo "Suffix not the same family as prefix: $pfx $sfx" >&2
return 1
fi
-
- local comb="$addr:$sfx"
- local nos="${comb//:/}"
- if (( ${#comb} - ${#nos} == 8 )); then
- comb="$addr$sfx"
+ # Check potential partially divided bytes for emptiness in the upper part
+ # based on the division specified in CIDR.
+ if (( (sfx_bytes[cidr/8] & (~0 << (8-cidr%8))) != 0 )); then
+ echo "Invalid byte $((cidr/8)): $sfx" >&2
+ return 1
fi
- echo "$comb/$cidr"
+ local i
+ # Check the bytes before the CIDR for emptiness to ensure they don't overlap
+ for (( i=0; i<cidr/8; i++ )); do
+ if (( sfx_bytes[$i] != 0 )); then
+ echo "Byte $i not 0: $sfx" >&2
+ return 1
+ fi
+ done
+
+ out_bytes=()
+ for (( i=0; i<${#pfx_bytes[@]}; i++ )); do
+ out_bytes+=($(( pfx_bytes[$i] | sfx_bytes[$i] )))
+ done
+ echo "$(ip_bytes_to_str out_bytes)/$cidr"
}
-ipv6_pfx_to_cidr() {
- [[ "$1" =~ ^[0-9a-fA-F:]+/([0-9]+)$ ]] || return
+ip_pfx_to_cidr() {
+ [[ "$1" =~ ^[0-9a-fA-F:.]+/([0-9]+)$ ]] || return
echo "${BASH_REMATCH[1]}"
}
+normalize_ip() {
+ local ip_bytes=()
+ ip_to_bytes ip_bytes "$1" || return
+ ip_bytes_to_str ip_bytes
+}
+
network_init=1
return 0 2>/dev/null
echo "network is a library, not executed directly" >&2
diff --git a/meta-google/recipes-google/networking/network-sh/test.sh b/meta-google/recipes-google/networking/network-sh/test.sh
index 57387c47c..2803c0978 100755
--- a/meta-google/recipes-google/networking/network-sh/test.sh
+++ b/meta-google/recipes-google/networking/network-sh/test.sh
@@ -21,6 +21,21 @@ else
fi
source lib.sh
+expect_array_numeq() {
+ local -n a1="$1"
+ local -n a2="$2"
+
+ if (( "${#a1[@]}" != "${#a2[@]}" )); then
+ echo " Line ${BASH_LINENO[0]} Array Size ${#a1[@]} != ${#a2[@]}" >&2
+ test_err=1
+ else
+ local i
+ for (( i=0; i < ${#a1[@]}; ++i )); do
+ expect_numeq "${a1[$i]}" "${a2[$i]}"
+ done
+ fi
+}
+
test_mac_to_bytes() {
out=()
expect_err 1 mac_to_bytes out ''
@@ -32,52 +47,154 @@ test_mac_to_bytes() {
expect_err 0 mac_to_bytes out 'a2:0:f:de:0:29'
expected=(0xa2 0 0xf 0xde 0 0x29)
- for (( i=0; i < ${#expected[@]}; ++i )); do
- expect_numeq "${out[$i]}" "${expected[$i]}"
- done
+ expect_array_numeq out expected
}
-test_mac_to_eui_48() {
+test_mac_to_eui48() {
str="$(mac_to_eui48 '12:34:56:78:90:af')" || fail
- expect_streq "$str" '1234:5678:90af'
+ expect_streq "$str" '::1234:5678:90af'
}
-test_eui_64() {
+test_mac_to_eui64() {
str="$(mac_to_eui64 '12:34:56:78:90:af')" || fail
- expect_streq "$str" '1334:56ff:fe78:90af'
+ expect_streq "$str" '::1334:56ff:fe78:90af'
+}
+
+test_ip4_to_bytes() {
+ out=()
+ expect_err 1 ip_to_bytes out ''
+ expect_err 1 ip_to_bytes out '10.0.0.'
+ expect_err 1 ip_to_bytes out '.0.1.1'
+ expect_err 1 ip_to_bytes out '10.0.0'
+ expect_err 1 ip_to_bytes out '10.0..0'
+ expect_err 1 ip_to_bytes out '.10.0.0.0'
+ expect_err 1 ip_to_bytes out '10.0.0.0.'
+ expect_err 1 ip_to_bytes out '10.0.0.256'
+ expect_err 1 ip_to_bytes out '10.0.0.0.256'
+ expect_err 1 ip_to_bytes out '10.0.0.0.1'
+
+ expect_err 0 ip_to_bytes out '10.0.0.1'
+ expected=(10 0 0 1)
+ expect_array_numeq out expected
}
-test_ipv6_pfx_concat() {
+test_ip6_to_bytes() {
+ out=()
+ expect_err 1 ip_to_bytes out ''
+ expect_err 1 ip_to_bytes out ':::'
+ expect_err 1 ip_to_bytes out '::z'
+ expect_err 1 ip_to_bytes out '1::1::1'
+ expect_err 1 ip_to_bytes out '1:1:1'
+ expect_err 1 ip_to_bytes out ':1::1'
+ expect_err 1 ip_to_bytes out '1::1:'
+
+ expect_err 0 ip_to_bytes out '::'
+ expected=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
+ expect_array_numeq out expected
+ out=()
+
+ expect_err 0 ip_to_bytes out '::1'
+ expected=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1)
+ expect_array_numeq out expected
+ out=()
+
+ expect_err 0 ip_to_bytes out 'fd00::'
+ expected=(0xfd 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
+ expect_array_numeq out expected
+ out=()
+
+ expect_err 0 ip_to_bytes out 'fd00:ffee::ddff:22'
+ expected=(0xfd 0 0xff 0xee 0 0 0 0 0 0 0 0 0xdd 0xff 0 0x22)
+ expect_array_numeq out expected
+ out=()
+
+ expect_err 0 ip_to_bytes out '1:2:3:4:5:6:7:8'
+ expected=(0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8)
+ expect_array_numeq out expected
+ out=()
+}
+
+test_ip4_bytes_str() {
+ in=(10 0 255 1)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" '10.0.255.1'
+}
+
+test_ip6_bytes_str() {
+ in=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" '::'
+ in=(0xfd 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" 'fd00::'
+ in=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xfd)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" '::fd'
+ in=(0xfd 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" 'fd01::1'
+ in=(0xfd 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" 'fd01::1:0:0:1'
+ in=(0xfd 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" 'fd01:0:0:1:1::1'
+ in=(0 1 0 1 0xdd 0xdd 0 1 0 1 0 1 0 1 0 1)
+ str="$(ip_bytes_to_str in)" || fail
+ expect_streq "$str" '1:1:dddd:1:1:1:1:1'
+}
+
+test_ip_pfx_concat() {
# Invalid inputs
- expect_err 1 ipv6_pfx_concat 'fd/64' '1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::' '1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01:' '1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::/a0' '1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::/64' ':1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::/64' '::'
+ expect_err 1 ip_pfx_concat 'fd/64' '::1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::' '::1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01:' '::1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::/a0' '::1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::/64' ':1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::/64' ''
+ expect_err 1 ip_pfx_concat 'fd01::/129' '::1'
# Too many address bits
- expect_err 1 ipv6_pfx_concat 'fd01:1:1:1:1::/64' '1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::/64' '1:0:1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::/65' '1:1234:5678:90af'
- expect_err 1 ipv6_pfx_concat 'fd01::/72' '1:1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01:1:1:1:1::/64' '::1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::/64' '::1:0:1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::/79' '::3:1234:5678:90af'
+ expect_err 1 ip_pfx_concat 'fd01::/15' '::3:1234:5678:90af'
+ expect_err 1 ip_pfx_concat '10.0.0.1/31' '0.0.0.0'
- str="$(ipv6_pfx_concat 'fd01::/64' '1')" || fail
+ str="$(ip_pfx_concat '::1/128' '::0')" || fail
+ expect_streq "$str" '::1/128'
+ str="$(ip_pfx_concat 'fd01::/64' '::1')" || fail
expect_streq "$str" 'fd01::1/64'
- str="$(ipv6_pfx_concat 'fd01::/72' '1234:5678:90af')" || fail
+ str="$(ip_pfx_concat 'fd01::/127' '::1')" || fail
+ expect_streq "$str" 'fd01::1/127'
+ str="$(ip_pfx_concat 'fd02::/15' '::1')" || fail
+ expect_streq "$str" 'fd02::1/15'
+ str="$(ip_pfx_concat 'fd01::/72' '::1234:5678:90af')" || fail
expect_streq "$str" 'fd01::1234:5678:90af/72'
- str="$(ipv6_pfx_concat 'fd01:eeee:aaaa:cccc::/64' 'a:1234:5678:90af')" || fail
+ str="$(ip_pfx_concat 'fd01:eeee:aaaa:cccc::/64' '::a:1234:5678:90af')" || fail
expect_streq "$str" 'fd01:eeee:aaaa:cccc:a:1234:5678:90af/64'
+ str="$(ip_pfx_concat 'fd01::fd00:0:0:0/80' '::1')" || fail
+ expect_streq "$str" 'fd01::fd00:0:0:1/80'
+
+ str="$(ip_pfx_concat '10.0.0.0/24' '0.0.0.1')" || fail
+ expect_streq "$str" '10.0.0.1/24'
}
-test_ipv6_pfx_to_cidr() {
- expect_err 1 ipv6_pfx_to_cidr 'z/64'
- expect_err 1 ipv6_pfx_to_cidr '64'
+test_ip_pfx_to_cidr() {
+ expect_err 1 ip_pfx_to_cidr 'z/64'
+ expect_err 1 ip_pfx_to_cidr '64'
- cidr="$(ipv6_pfx_to_cidr 'fd01::/64')" || fail
+ cidr="$(ip_pfx_to_cidr 'fd01::/64')" || fail
expect_numeq "$cidr" 64
- cidr="$(ipv6_pfx_to_cidr 'fd01:eeee:aaaa:cccc:a:1234:5678:90af/128')" || fail
+ cidr="$(ip_pfx_to_cidr 'fd01:eeee:aaaa:cccc:a:1234:5678:90af/128')" || fail
expect_numeq "$cidr" 128
+ cidr="$(ip_pfx_to_cidr '10.0.0.1/24')" || fail
+ expect_numeq "$cidr" 24
+}
+
+test_normalize_ip() {
+ ip="$(normalize_ip 'fd01:1::0:0:1')" || fail
+ expect_streq "$ip" 'fd01:1::1'
}
return 0 2>/dev/null
diff --git a/meta-google/recipes-google/systemd/files/40-gbmc-forward.conf b/meta-google/recipes-google/systemd/files/40-gbmc-forward.conf
new file mode 100644
index 000000000..9f8d1eb50
--- /dev/null
+++ b/meta-google/recipes-google/systemd/files/40-gbmc-forward.conf
@@ -0,0 +1,5 @@
+net.ipv4.ip_forward=1
+net.ipv4.conf.default.forwarding=1
+net.ipv4.conf.all.forwarding=1
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
diff --git a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb
index 011b62edc..29d81f46a 100644
--- a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb
+++ b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb
@@ -10,11 +10,13 @@ S = "${WORKDIR}"
SRC_URI_append = " \
file://firmware-updates.target \
file://firmware-updates-pre.target \
+ file://40-gbmc-forward.conf \
"
FILES_${PN}_append = " \
${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \
${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \
+ ${libdir}/sysctl.d/40-gbmc-forward.conf \
"
FILES_${PN}_append_dev = " \
@@ -28,22 +30,23 @@ SYSTEMD_SERVICE_${PN}_append = " \
# Put coredumps in the journal to ensure they stay in ram
do_install() {
- install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
- printf "[Coredump]\nStorage=journal\n" \
- >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf
+ install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
+ printf "[Coredump]\nStorage=journal\n" \
+ >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf
- install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d
- printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
- >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
+ install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d
+ printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
+ >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
- install -d -m 0755 ${D}${systemd_system_unitdir}
- install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
- install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
+ install -d -m 0755 ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
+ install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
+
+ install -d -m0755 ${D}${libdir}/sysctl.d
+ install -m 0644 ${WORKDIR}/40-gbmc-forward.conf ${D}${libdir}/sysctl.d/
}
do_install_append_dev() {
- install -d -m 0755 ${D}${libdir}/sysctl.d
- printf "kernel.sysrq = 1\n" \
- >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
-
+ printf "kernel.sysrq = 1\n" \
+ >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
}
diff --git a/meta-ibm/conf/machine/p10bmc.conf b/meta-ibm/conf/machine/p10bmc.conf
index 2cab74e4d..58319bf84 100644
--- a/meta-ibm/conf/machine/p10bmc.conf
+++ b/meta-ibm/conf/machine/p10bmc.conf
@@ -5,8 +5,6 @@ SPL_BINARY = "spl/u-boot-spl.bin"
OBMC_POWER_SUPPLY_INSTANCES = "0 1 2 3"
-# TODO remove the MACHINEOVERRIDES when the rainier.conf file is removed.
-MACHINEOVERRIDES =. "p10bmc:"
require conf/machine/include/ast2600.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/openpower.inc
@@ -15,6 +13,7 @@ require conf/distro/include/openpower-virtual-pnor.inc
require conf/distro/include/phosphor-mmc.inc
require conf/distro/include/ibm-mpreboot.inc
require conf/distro/include/ibm-yaml.inc
+DISTRO_FEATURES += "ibm-service-account-policy"
SERIAL_CONSOLES = "115200;ttyS4"
@@ -34,3 +33,23 @@ PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config_df-mrw = \
SKIP_BROKEN_MRW = "1"
IMAGE_FEATURES_remove = "obmc-ikvm"
+
+UBOOT_SIGN_ENABLE = "1"
+SPL_SIGN_ENABLE = "1"
+SOCSEC_SIGN_ENABLE = "1"
+SOCSEC_SIGN_EXTRA_OPTS = "--stack_intersects_verification_region=false"
+SOCSEC_SIGN_KEY ?= "${WORKDIR}/rsa_oem_dss_key.pem"
+
+FIT_HASH_ALG = "sha512"
+FIT_SIGN_ALG = "rsa4096"
+FIT_SIGN_NUMBITS = "4096"
+UBOOT_FITIMAGE_ENABLE = "1"
+UBOOT_FIT_HASH_ALG = "sha512"
+UBOOT_FIT_SIGN_ALG = "rsa4096"
+UBOOT_FIT_SIGN_NUMBITS = "4096"
+
+UBOOT_SIGN_KEYNAME = "rsa_oem_fitimage_key"
+SPL_SIGN_KEYNAME = "rsa_oem_fitimage_key"
+
+UBOOT_SIGN_KEYDIR = "${WORKDIR}"
+SPL_SIGN_KEYDIR = "${WORKDIR}"
diff --git a/meta-ibm/conf/machine/rainier.conf b/meta-ibm/conf/machine/rainier.conf
deleted file mode 120000
index ddfb6ec6d..000000000
--- a/meta-ibm/conf/machine/rainier.conf
+++ /dev/null
@@ -1 +0,0 @@
-p10bmc.conf \ No newline at end of file
diff --git a/meta-ibm/conf/machine/witherspoon-tacoma.conf b/meta-ibm/conf/machine/witherspoon-tacoma.conf
index 9826d55ec..2d696ecd8 100644
--- a/meta-ibm/conf/machine/witherspoon-tacoma.conf
+++ b/meta-ibm/conf/machine/witherspoon-tacoma.conf
@@ -14,6 +14,7 @@ require conf/distro/include/ibm-yaml.inc
require conf/distro/include/openpower-virtual-pnor.inc
require conf/distro/include/phosphor-mmc.inc
require conf/distro/include/ibm-mpreboot.inc
+DISTRO_FEATURES += "ibm-service-account-policy"
SERIAL_CONSOLES = "115200;ttyS4"
diff --git a/meta-ibm/recipes-core/systemd/systemd/journald-size-policy-16MB.conf b/meta-ibm/recipes-core/systemd/systemd/journald-size-policy-16MB.conf
new file mode 100644
index 000000000..a9f1d5723
--- /dev/null
+++ b/meta-ibm/recipes-core/systemd/systemd/journald-size-policy-16MB.conf
@@ -0,0 +1,8 @@
+# This file overrides a default for journald
+#
+# - Set a maximum size for journald in filesystem
+#
+# See journald.conf(5) for details
+
+[Journal]
+SystemMaxUse=16M
diff --git a/meta-ibm/recipes-core/systemd/systemd/journald-size-policy.conf b/meta-ibm/recipes-core/systemd/systemd/journald-size-policy-2MB.conf
index fb84c6734..fb84c6734 100644
--- a/meta-ibm/recipes-core/systemd/systemd/journald-size-policy.conf
+++ b/meta-ibm/recipes-core/systemd/systemd/journald-size-policy-2MB.conf
diff --git a/meta-ibm/recipes-core/systemd/systemd_%.bbappend b/meta-ibm/recipes-core/systemd/systemd_%.bbappend
index a6ef71d29..3e490153d 100644
--- a/meta-ibm/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-ibm/recipes-core/systemd/systemd_%.bbappend
@@ -1,11 +1,11 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append_ibm-ac-server = " file://journald-storage-policy.conf"
SRC_URI_append_ibm-ac-server = " file://systemd-journald-override.conf"
-SRC_URI_append_ibm-ac-server = " file://journald-size-policy.conf"
+SRC_URI_append_ibm-ac-server = " file://journald-size-policy-2MB.conf"
SRC_URI_append_p10bmc = " file://journald-storage-policy.conf"
SRC_URI_append_p10bmc = " file://systemd-journald-override.conf"
-SRC_URI_append_p10bmc = " file://journald-size-policy.conf"
+SRC_URI_append_p10bmc = " file://journald-size-policy-16MB.conf"
FILES_${PN}_append_ibm-ac-server = " ${systemd_unitdir}/journald.conf.d/journald-storage-policy.conf"
FILES_${PN}_append_ibm-ac-server = " ${systemd_system_unitdir}/systemd-journald.service.d/systemd-journald-override.conf"
@@ -18,10 +18,10 @@ FILES_${PN}_append_p10bmc = " ${systemd_unitdir}/journald.conf.d/journald-size-p
do_install_append_ibm-ac-server() {
install -m 644 -D ${WORKDIR}/journald-storage-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-storage-policy.conf
install -m 644 -D ${WORKDIR}/systemd-journald-override.conf ${D}${systemd_system_unitdir}/systemd-journald.service.d/systemd-journald-override.conf
- install -m 644 -D ${WORKDIR}/journald-size-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-size-policy.conf
+ install -m 644 -D ${WORKDIR}/journald-size-policy-2MB.conf ${D}${systemd_unitdir}/journald.conf.d/journald-size-policy.conf
}
do_install_append_p10bmc() {
install -m 644 -D ${WORKDIR}/journald-storage-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-storage-policy.conf
install -m 644 -D ${WORKDIR}/systemd-journald-override.conf ${D}${systemd_system_unitdir}/systemd-journald.service.d/systemd-journald-override.conf
- install -m 644 -D ${WORKDIR}/journald-size-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-size-policy.conf
+ install -m 644 -D ${WORKDIR}/journald-size-policy-16MB.conf ${D}${systemd_unitdir}/journald.conf.d/journald-size-policy.conf
}
diff --git a/meta-ibm/recipes-extended/sudo/sudo_%.bbappend b/meta-ibm/recipes-extended/sudo/sudo_%.bbappend
new file mode 100644
index 000000000..f4254e7ba
--- /dev/null
+++ b/meta-ibm/recipes-extended/sudo/sudo_%.bbappend
@@ -0,0 +1,8 @@
+# Allow passwordless use of sudo
+
+PACKAGECONFIG += "pam-wheel"
+
+do_install_append () {
+ # Allow members of the 'wheel' group to use passwordless sudo
+ sed -i 's/# \(%wheel ALL=(ALL) NOPASSWD: ALL\)/\1/' ${D}${sysconfdir}/sudoers
+}
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/everest/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/everest/config.json
index 74bcfc425..632c76b52 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/everest/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/everest/config.json
@@ -2,8 +2,8 @@
"fans": [
{
"inventory": "/system/chassis/motherboard/fan0",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -12,18 +12,20 @@
"sensors": [
{
"name": "fan0_0",
+ "threshold": 30,
"has_target": true
},
{
"name": "fan0_1",
+ "threshold": 30,
"has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan1",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -32,18 +34,20 @@
"sensors": [
{
"name": "fan1_0",
+ "threshold": 30,
"has_target": true
},
{
"name": "fan1_1",
+ "threshold": 30,
"has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan2",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -52,18 +56,20 @@
"sensors": [
{
"name": "fan2_0",
+ "threshold": 30,
"has_target": true
},
{
"name": "fan2_1",
+ "threshold": 30,
"has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan3",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -72,10 +78,12 @@
"sensors": [
{
"name": "fan3_0",
+ "threshold": 30,
"has_target": true
},
{
"name": "fan3_1",
+ "threshold": 30,
"has_target": false
}
]
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-1s4u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-1s4u/config.json
index 737cb3f3b..eb519d9b4 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-1s4u/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-1s4u/config.json
@@ -2,8 +2,8 @@
"fans": [
{
"inventory": "/system/chassis/motherboard/fan0",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -12,14 +12,15 @@
"sensors": [
{
"name": "fan0_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan1",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -28,14 +29,15 @@
"sensors": [
{
"name": "fan1_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan2",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -44,14 +46,15 @@
"sensors": [
{
"name": "fan2_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan4",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -60,6 +63,7 @@
"sensors": [
{
"name": "fan4_0",
+ "threshold": 30,
"has_target": true
}
]
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-2u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-2u/config.json
index 145e37f38..b4143adba 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-2u/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-2u/config.json
@@ -2,8 +2,8 @@
"fans": [
{
"inventory": "/system/chassis/motherboard/fan0",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -12,20 +12,22 @@
"sensors": [
{
"name": "fan0_0",
- "has_target": true
+ "threshold": 30,
+ "has_target": true,
+ "factor": 0.627,
+ "offset": 750
},
{
"name": "fan0_1",
- "has_target": false,
- "factor": 1.45,
- "offset": -909
+ "threshold": 30,
+ "has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan1",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -34,20 +36,22 @@
"sensors": [
{
"name": "fan1_0",
- "has_target": true
+ "threshold": 30,
+ "has_target": true,
+ "factor": 0.627,
+ "offset": 750
},
{
"name": "fan1_1",
- "has_target": false,
- "factor": 1.45,
- "offset": -909
+ "threshold": 30,
+ "has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan2",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -56,20 +60,22 @@
"sensors": [
{
"name": "fan2_0",
- "has_target": true
+ "threshold": 30,
+ "has_target": true,
+ "factor": 0.627,
+ "offset": 750
},
{
"name": "fan2_1",
- "has_target": false,
- "factor": 1.45,
- "offset": -909
+ "threshold": 30,
+ "has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan3",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -78,20 +84,22 @@
"sensors": [
{
"name": "fan3_0",
- "has_target": true
+ "threshold": 30,
+ "has_target": true,
+ "factor": 0.627,
+ "offset": 750
},
{
"name": "fan3_1",
- "has_target": false,
- "factor": 1.45,
- "offset": -909
+ "threshold": 30,
+ "has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan4",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -100,20 +108,22 @@
"sensors": [
{
"name": "fan4_0",
- "has_target": true
+ "threshold": 30,
+ "has_target": true,
+ "factor": 0.627,
+ "offset": 750
},
{
"name": "fan4_1",
- "has_target": false,
- "factor": 1.45,
- "offset": -909
+ "threshold": 30,
+ "has_target": false
}
]
},
{
"inventory": "/system/chassis/motherboard/fan5",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -122,13 +132,15 @@
"sensors": [
{
"name": "fan5_0",
- "has_target": true
+ "threshold": 30,
+ "has_target": true,
+ "factor": 0.627,
+ "offset": 750
},
{
"name": "fan5_1",
- "has_target": false,
- "factor": 1.45,
- "offset": -909
+ "threshold": 30,
+ "has_target": false
}
]
}
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-4u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-4u/config.json
index 71a489944..1bfb5378b 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-4u/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/p10bmc/rainier-4u/config.json
@@ -2,8 +2,8 @@
"fans": [
{
"inventory": "/system/chassis/motherboard/fan0",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -12,14 +12,15 @@
"sensors": [
{
"name": "fan0_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan1",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -28,14 +29,15 @@
"sensors": [
{
"name": "fan1_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan2",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -44,14 +46,15 @@
"sensors": [
{
"name": "fan2_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan3",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -60,14 +63,15 @@
"sensors": [
{
"name": "fan3_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan4",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -76,14 +80,15 @@
"sensors": [
{
"name": "fan4_0",
+ "threshold": 30,
"has_target": true
}
]
},
{
"inventory": "/system/chassis/motherboard/fan5",
- "functional_delay": 5,
- "allowed_out_of_range_time": 30,
+ "method": "count",
+ "count_interval": 1,
"deviation": 15,
"num_sensors_nonfunc_for_fan_nonfunc": 1,
"monitor_start_delay": 30,
@@ -92,6 +97,7 @@
"sensors": [
{
"name": "fan5_0",
+ "threshold": 30,
"has_target": true
}
]
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/everest/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/everest/config.json
index 439aedcac..928eca25e 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/everest/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/everest/config.json
@@ -6,7 +6,7 @@
{
"type": "gpio",
"key": 15,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/i2c-30/30-0061",
+ "physpath": "/sys/bus/i2c/devices/30-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -28,7 +28,7 @@
{
"type": "gpio",
"key": 14,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/i2c-30/30-0061",
+ "physpath": "/sys/bus/i2c/devices/30-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -50,7 +50,7 @@
{
"type": "gpio",
"key": 13,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/i2c-30/30-0061",
+ "physpath": "/sys/bus/i2c/devices/30-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -72,7 +72,7 @@
{
"type": "gpio",
"key": 12,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/i2c-30/30-0061",
+ "physpath": "/sys/bus/i2c/devices/30-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-1s4u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-1s4u/config.json
index 5bcda88b3..65697e557 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-1s4u/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-1s4u/config.json
@@ -6,7 +6,7 @@
{
"type": "gpio",
"key": 6,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -27,7 +27,7 @@
{
"type": "gpio",
"key": 7,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -48,7 +48,7 @@
{
"type": "gpio",
"key": 8,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -69,7 +69,7 @@
{
"type": "gpio",
"key": 10,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-2u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-2u/config.json
index 726451028..a5cc1bf66 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-2u/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-2u/config.json
@@ -6,7 +6,7 @@
{
"type": "gpio",
"key": 6,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -28,7 +28,7 @@
{
"type": "gpio",
"key": 7,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -50,7 +50,7 @@
{
"type": "gpio",
"key": 8,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -72,7 +72,7 @@
{
"type": "gpio",
"key": 9,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -94,7 +94,7 @@
{
"type": "gpio",
"key": 10,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -116,7 +116,7 @@
{
"type": "gpio",
"key": 11,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-4u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-4u/config.json
index 94e7e69f8..620a32907 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-4u/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/p10bmc/rainier-4u/config.json
@@ -6,7 +6,7 @@
{
"type": "gpio",
"key": 6,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -27,7 +27,7 @@
{
"type": "gpio",
"key": 7,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -48,7 +48,7 @@
{
"type": "gpio",
"key": 8,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -69,7 +69,7 @@
{
"type": "gpio",
"key": 9,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -90,7 +90,7 @@
{
"type": "gpio",
"key": 10,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -111,7 +111,7 @@
{
"type": "gpio",
"key": 11,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+ "physpath": "/sys/bus/i2c/devices/7-0061",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.json
index 36cdae85b..52262fe35 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.json
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.json
@@ -6,7 +6,7 @@
{
"type": "gpio",
"key": 4,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060",
+ "physpath": "/sys/bus/i2c/devices/3-0060",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -28,7 +28,7 @@
{
"type": "gpio",
"key": 5,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060",
+ "physpath": "/sys/bus/i2c/devices/3-0060",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -50,7 +50,7 @@
{
"type": "gpio",
"key": 6,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060",
+ "physpath": "/sys/bus/i2c/devices/3-0060",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
@@ -72,7 +72,7 @@
{
"type": "gpio",
"key": 7,
- "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060",
+ "physpath": "/sys/bus/i2c/devices/3-0060",
"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
},
{
diff --git a/meta-ibm/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-ibm/recipes-phosphor/images/obmc-phosphor-image.bbappend
index 403bfa0cc..57260f06b 100644
--- a/meta-ibm/recipes-phosphor/images/obmc-phosphor-image.bbappend
+++ b/meta-ibm/recipes-phosphor/images/obmc-phosphor-image.bbappend
@@ -5,3 +5,61 @@ OBMC_IMAGE_EXTRA_INSTALL_append_mihawk = " mboxd liberation-fonts uart-render-co
# remove so things fit in available flash space
IMAGE_FEATURES_remove_witherspoon = "obmc-user-mgmt-ldap"
+
+# Optionally configure IBM service accounts
+#
+# To configure your distro, add the following line to its config:
+# DISTRO_FEATURES += "ibm-service-account-policy"
+#
+# The service account policy is as follows:
+# root - The root account remains present. It is needed for internal
+# accounting purposes and for debugging service access.
+# admin - Provides administrative control over the BMC. The role is
+# SystemAdministrator. Admin users have access to interfaces including:
+# Redfish, REST APIs, Web. No access to the BMC via: the BMC's physical
+# console, SSH to the BMC's command line.
+# IPMI access is not granted by default, but admins can authorize
+# themselves and enable the IPMI service.
+# The admin has access to the host console: ssh -p2200 admin@${bmc}.
+# The admin account does not have a home directory.
+# service - Provides IBM service and support representatives (SSRs, formerly
+# known as customer engineers or CEs) access to the BMC. The role is
+# OemIBMServiceAgent. The service user has full admin access, plus access
+# to BMC interfaces intended only to service the BMC and host, including
+# SSH access to the BMC's command line.
+# The service account is not authorized to IPMI because of the inherent
+# security weakness in the IPMI spec and also because the IPMI
+# implementation was not enhanced to use the ACF support.
+# The service account does not have a home directory. The home directory is
+# set to / (the root directory) to allow dropbear ssh connections.
+
+inherit extrausers
+
+# The password hash used here is the traditional 0penBmc password.
+
+#IBM_EXTRA_USERS_PARAMS += " \
+# usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root; \
+# "
+
+# Add group "wheel" (before adding the "service" account).
+IBM_EXTRA_USERS_PARAMS += " \
+ groupadd wheel; \
+ "
+
+# Add the "admin" account.
+IBM_EXTRA_USERS_PARAMS += " \
+ useradd -M -d / --groups priv-admin,redfish,web -s /sbin/nologin admin; \
+ usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' admin; \
+ "
+
+# Add the "service" account.
+IBM_EXTRA_USERS_PARAMS += " \
+ useradd -M -d / --groups priv-admin,redfish,web,wheel service; \
+ usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' service; \
+ "
+
+# This is recipe specific to ensure it takes effect.
+EXTRA_USERS_PARAMS_pn-obmc-phosphor-image += "${@bb.utils.contains('DISTRO_FEATURES', 'ibm-service-account-policy', "${IBM_EXTRA_USERS_PARAMS}", '', d)}"
+
+# The service account needs sudo.
+IMAGE_INSTALL_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ibm-service-account-policy', 'sudo', '', d)}"
diff --git a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json
index bf797d94c..e1c085a3c 100644
--- a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json
+++ b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json
@@ -25,6 +25,28 @@
"/xyz/openbmc_project/sensors/fan_tach/fan0_0",
"/xyz/openbmc_project/sensors/fan_tach/fan0_1"
]
+ },
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan0_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan0_identify"
+ ]
}
]
},
@@ -43,6 +65,28 @@
"/xyz/openbmc_project/sensors/fan_tach/fan1_0",
"/xyz/openbmc_project/sensors/fan_tach/fan1_1"
]
+ },
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan1_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan1_identify"
+ ]
}
]
},
@@ -61,6 +105,28 @@
"/xyz/openbmc_project/sensors/fan_tach/fan2_0",
"/xyz/openbmc_project/sensors/fan_tach/fan2_1"
]
+ },
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan2_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan2_identify"
+ ]
}
]
},
@@ -79,6 +145,28 @@
"/xyz/openbmc_project/sensors/fan_tach/fan3_0",
"/xyz/openbmc_project/sensors/fan_tach/fan3_1"
]
+ },
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan3_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/fan3_identify"
+ ]
}
]
},
@@ -105,7 +193,1002 @@
]
}
]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply0",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply0_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply0_identify"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply1",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply1_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply1_identify"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply2",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply2_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply2_identify"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply3",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply3_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply3_identify"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/planar_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/planar_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/bmc",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/bmc_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/bmc_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/bmc/tod_battery",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/rtc_battery_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/rtc_battery_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm0",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm0_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm0_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm1",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm1_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm1_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm2",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm2_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm2_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm3",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm3_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm3_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm4",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm4_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm4_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm5",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm5_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm5_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm6",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm6_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm6_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm7",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm7_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm7_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm8",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm8_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm8_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm9",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm9_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm9_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm10",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm10_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm10_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm11",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm11_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm11_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm12",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm12_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm12_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm13",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm13_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm13_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm14",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm14_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm14_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/vrm15",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm15_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/vrm15_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/tpm",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/tpm_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/tpm_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/power_distribution",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/power_distribution_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/power_distribution_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu0",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu0_c14_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu0_c14_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu1",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu0_c14_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu0_c14_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu2",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu1_c19_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu1_c19_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu3",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu1_c19_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu1_c19_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu4",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu2_c56_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu2_c56_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu5",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu2_c56_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu2_c56_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu6",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu3_c61_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu3_c61_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu7",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu3_c61_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/cpu3_c61_identify"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/dasd_backplane",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/dasd_backplane_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/dasd_backplane_identify"
+ ]
+ }
+ ]
}
]
}
-
diff --git a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json
index 348cb9755..65f389998 100644
--- a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json
+++ b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json
@@ -272,7 +272,28 @@
"/xyz/openbmc_project/sensors/fan_tach/fan3_0",
"/xyz/openbmc_project/sensors/fan_tach/fan3_1",
"/xyz/openbmc_project/sensors/fan_tach/fan4_0",
- "/xyz/openbmc_project/sensors/fan_tach/fan4_1"
+ "/xyz/openbmc_project/sensors/fan_tach/fan4_1",
+ "/xyz/openbmc_project/sensors/fan_tach/fan5_0",
+ "/xyz/openbmc_project/sensors/fan_tach/fan5_1"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "assembly"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm1",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/tod_battery",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/base_op_panel_blyth",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/lcd_op_panel_hill",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane1",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane2"
]
}
]
@@ -302,6 +323,17 @@
[
"/xyz/openbmc_project/led/groups/powersupply0_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -330,6 +362,17 @@
[
"/xyz/openbmc_project/led/groups/powersupply1_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1590,6 +1633,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot0_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1618,6 +1672,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot1_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1646,6 +1711,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot2_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1674,6 +1750,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot3_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1702,6 +1789,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot4_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1730,6 +1828,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot6_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1758,6 +1867,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot7_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1786,6 +1906,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot8_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1814,6 +1945,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot9_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1842,6 +1984,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot10_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1870,6 +2023,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot11_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2206,6 +2370,17 @@
[
"/xyz/openbmc_project/led/groups/nvme0_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2234,6 +2409,17 @@
[
"/xyz/openbmc_project/led/groups/nvme1_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2262,6 +2448,17 @@
[
"/xyz/openbmc_project/led/groups/nvme2_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2290,6 +2487,17 @@
[
"/xyz/openbmc_project/led/groups/nvme3_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2318,6 +2526,17 @@
[
"/xyz/openbmc_project/led/groups/nvme4_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2346,6 +2565,17 @@
[
"/xyz/openbmc_project/led/groups/nvme5_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2374,6 +2604,17 @@
[
"/xyz/openbmc_project/led/groups/nvme6_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2402,6 +2643,17 @@
[
"/xyz/openbmc_project/led/groups/nvme7_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2430,6 +2682,17 @@
[
"/xyz/openbmc_project/led/groups/nvme8_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2458,6 +2721,17 @@
[
"/xyz/openbmc_project/led/groups/nvme9_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2486,6 +2760,17 @@
[
"/xyz/openbmc_project/led/groups/nvme10_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2514,6 +2799,17 @@
[
"/xyz/openbmc_project/led/groups/nvme11_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2542,6 +2838,17 @@
[
"/xyz/openbmc_project/led/groups/nvme12_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2570,6 +2877,17 @@
[
"/xyz/openbmc_project/led/groups/nvme13_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2598,6 +2916,17 @@
[
"/xyz/openbmc_project/led/groups/nvme14_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2626,6 +2955,17 @@
[
"/xyz/openbmc_project/led/groups/nvme15_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2654,6 +2994,17 @@
[
"/xyz/openbmc_project/led/groups/nvme16_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2682,6 +3033,17 @@
[
"/xyz/openbmc_project/led/groups/nvme17_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2710,6 +3072,17 @@
[
"/xyz/openbmc_project/led/groups/nvme18_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2738,6 +3111,17 @@
[
"/xyz/openbmc_project/led/groups/nvme19_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2766,6 +3150,17 @@
[
"/xyz/openbmc_project/led/groups/nvme20_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2794,6 +3189,17 @@
[
"/xyz/openbmc_project/led/groups/nvme21_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2822,6 +3228,17 @@
[
"/xyz/openbmc_project/led/groups/nvme22_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2850,6 +3267,17 @@
[
"/xyz/openbmc_project/led/groups/nvme23_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
}
diff --git a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json
index 7841a966a..5cda22d66 100644
--- a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json
+++ b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json
@@ -261,7 +261,27 @@
"/xyz/openbmc_project/sensors/fan_tach/fan1_0",
"/xyz/openbmc_project/sensors/fan_tach/fan2_0",
"/xyz/openbmc_project/sensors/fan_tach/fan3_0",
- "/xyz/openbmc_project/sensors/fan_tach/fan4_0"
+ "/xyz/openbmc_project/sensors/fan_tach/fan4_0",
+ "/xyz/openbmc_project/sensors/fan_tach/fan5_0"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "assembly"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm1",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/tod_battery",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/base_op_panel_blyth",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/lcd_op_panel_hill",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane1",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane2"
]
}
]
@@ -291,6 +311,17 @@
[
"/xyz/openbmc_project/led/groups/powersupply0_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -319,6 +350,95 @@
[
"/xyz/openbmc_project/led/groups/powersupply1_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply2",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply2_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply2_identify"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply3",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "fault_inventory_object",
+ "fType": "fault_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply3_fault"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "identify_inventory_object",
+ "fType": "identify_led_group"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/groups/powersupply3_identify"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1579,6 +1699,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot0_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1607,6 +1738,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot1_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1635,6 +1777,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot2_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1663,6 +1816,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot3_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1691,6 +1855,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot4_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1719,6 +1894,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot6_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1747,6 +1933,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot7_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1775,6 +1972,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot8_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1803,6 +2011,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot9_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1831,6 +2050,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot10_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -1859,6 +2089,17 @@
[
"/xyz/openbmc_project/led/groups/pcieslot11_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2195,6 +2436,17 @@
[
"/xyz/openbmc_project/led/groups/nvme0_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2223,6 +2475,17 @@
[
"/xyz/openbmc_project/led/groups/nvme1_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2251,6 +2514,17 @@
[
"/xyz/openbmc_project/led/groups/nvme2_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2279,6 +2553,17 @@
[
"/xyz/openbmc_project/led/groups/nvme3_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2307,6 +2592,17 @@
[
"/xyz/openbmc_project/led/groups/nvme4_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2335,6 +2631,17 @@
[
"/xyz/openbmc_project/led/groups/nvme5_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2363,6 +2670,17 @@
[
"/xyz/openbmc_project/led/groups/nvme6_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2391,6 +2709,17 @@
[
"/xyz/openbmc_project/led/groups/nvme7_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2419,6 +2748,17 @@
[
"/xyz/openbmc_project/led/groups/nvme8_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2447,6 +2787,17 @@
[
"/xyz/openbmc_project/led/groups/nvme9_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2475,6 +2826,17 @@
[
"/xyz/openbmc_project/led/groups/nvme10_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2503,6 +2865,17 @@
[
"/xyz/openbmc_project/led/groups/nvme11_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2531,6 +2904,17 @@
[
"/xyz/openbmc_project/led/groups/nvme12_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2559,6 +2943,17 @@
[
"/xyz/openbmc_project/led/groups/nvme13_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2587,6 +2982,17 @@
[
"/xyz/openbmc_project/led/groups/nvme14_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2615,6 +3021,17 @@
[
"/xyz/openbmc_project/led/groups/nvme15_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2643,6 +3060,17 @@
[
"/xyz/openbmc_project/led/groups/nvme16_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2671,6 +3099,17 @@
[
"/xyz/openbmc_project/led/groups/nvme17_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2699,6 +3138,17 @@
[
"/xyz/openbmc_project/led/groups/nvme18_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2727,6 +3177,17 @@
[
"/xyz/openbmc_project/led/groups/nvme19_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2755,6 +3216,17 @@
[
"/xyz/openbmc_project/led/groups/nvme20_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2783,6 +3255,17 @@
[
"/xyz/openbmc_project/led/groups/nvme21_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2811,6 +3294,17 @@
[
"/xyz/openbmc_project/led/groups/nvme22_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
},
@@ -2839,6 +3333,17 @@
[
"/xyz/openbmc_project/led/groups/nvme23_identify"
]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "chassis"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
}
]
}
diff --git a/meta-ibm/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-ibm/recipes-phosphor/network/phosphor-network_%.bbappend
index cf88f2282..a79dae669 100644
--- a/meta-ibm/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-ibm/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -4,7 +4,7 @@ SRC_URI += " file://ncsi-netlink.service"
SYSTEMD_SERVICE_${PN} += " ncsi-netlink.service"
FILES_${PN} += "${datadir}/network/*.json"
-EXTRA_OECONF += "--enable-sync-mac"
+PACKAGECONFIG_append = " sync-mac"
install_network_configuration(){
install -d ${D}${systemd_system_unitdir}
diff --git a/meta-ibm/recipes-phosphor/power/phosphor-power_%.bbappend b/meta-ibm/recipes-phosphor/power/phosphor-power_%.bbappend
index c8084b39e..c2f5b2cc5 100644
--- a/meta-ibm/recipes-phosphor/power/phosphor-power_%.bbappend
+++ b/meta-ibm/recipes-phosphor/power/phosphor-power_%.bbappend
@@ -11,6 +11,10 @@ EXTRA_OEMESON_append_mihawk = " -Dpower_sequencer=mihawk-cpld"
DEPENDS_append_ibm-ac-server = " power-sequencer"
DEPENDS_append_p10bmc = " power-sequencer"
+PACKAGECONFIG_append_ibm-ac-server = " monitor"
+PACKAGECONFIG_append_swift = " monitor"
+PACKAGECONFIG_append_mihawk = " monitor"
+
do_install_append(){
install -D ${WORKDIR}/psu.json ${D}${datadir}/phosphor-power/psu.json
}
diff --git a/meta-intel-openbmc/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb b/meta-intel-openbmc/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb
index 3a86b5657..9466b22a8 100755
--- a/meta-intel-openbmc/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb
+++ b/meta-intel-openbmc/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a4edad4aed50f39a66d098d74b265b"
SRC_URI = "git://github.com/openbmc/intel-ipmi-oem"
-SRCREV = "01fbd0176c403feb29bf2a9ddd17469d0a27c3ef"
+SRCREV = "fb9f1aa1ea3c944fbba17b51ab26264af1c67a25"
S = "${WORKDIR}/git"
PV = "0.1+git${SRCPV}"
diff --git a/meta-intel-openbmc/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb b/meta-intel-openbmc/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb
index 20df1185b..0d6bfd367 100644
--- a/meta-intel-openbmc/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb
+++ b/meta-intel-openbmc/meta-common/recipes-phosphor/leds/intel-led-manager-config-native.bb
@@ -1,8 +1,8 @@
SUMMARY = "Phosphor LED Group Management for Intel"
PR = "r1"
-inherit native
inherit obmc-phosphor-utils
+inherit native
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
diff --git a/meta-lenovo/meta-hr630/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-lenovo/meta-hr630/recipes-phosphor/network/phosphor-network_%.bbappend
index ac2c4ccd3..7d3b0eddf 100644
--- a/meta-lenovo/meta-hr630/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-lenovo/meta-hr630/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -1,6 +1,4 @@
#"Copyright (c) 2019-present Lenovo
#Licensed under BSD-3, see COPYING.BSD file for details."
-
-FILESEXTRAPATHS_prepend_hr630 := "${THISDIR}/${PN}:"
-
-EXTRA_OECONF_append_hr630 = "--disable-link-local-autoconfiguration"
+PACKAGECONFIG_remove_hr630 = "default-link-local-autoconf"
+PACKAGECONFIG_remove_hr630 = "default-ipv6-accept-ra"
diff --git a/meta-lenovo/meta-hr855xg2/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-lenovo/meta-hr855xg2/recipes-phosphor/network/phosphor-network_%.bbappend
index 0c4285949..88d07339b 100644
--- a/meta-lenovo/meta-hr855xg2/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-lenovo/meta-hr855xg2/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -1,6 +1,4 @@
#"Copyright (c) 2019-present Lenovo
#Licensed under BSD-3, see COPYING.BSD file for details."
-
-FILESEXTRAPATHS_prepend_hr855xg2 := "${THISDIR}/${PN}:"
-
-EXTRA_OECONF_append_hr855xg2 = " --disable-link-local-autoconfiguration"
+PACKAGECONFIG_remove_hr855xg2 = "default-link-local-autoconf"
+PACKAGECONFIG_remove_hr855xg2 = "default-ipv6-accept-ra"
diff --git a/meta-nuvoton/MAINTAINERS b/meta-nuvoton/MAINTAINERS
index 3698cf2e6..4207abdfe 100644
--- a/meta-nuvoton/MAINTAINERS
+++ b/meta-nuvoton/MAINTAINERS
@@ -45,3 +45,8 @@ START OF MAINTAINERS LIST
M: Benjamin Fair <benjaminfair@google.com> <benjaminfair!>
R: Fran Hsu <fran.hsu@quantatw.com> <franhsu!>
R: Tomer Maimon <tmaimon77@gmail.com>
+R: Tyrone Ting <kfting@nuvoton.com>
+R: Joseph Liu <kwliu@nuvoton.com>
+R: Samuel Jiang <chyishian.jiang@gmail.com>
+R: Stanley Chu <yschu@nuvoton.com>
+R: George Hung <george.hung@quantatw.com>
diff --git a/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb
index 3a06a3e4d..efaabff37 100644
--- a/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb
+++ b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb
@@ -1,6 +1,6 @@
KBRANCH ?= "dev-5.10"
-LINUX_VERSION ?= "5.10.23"
+LINUX_VERSION ?= "5.10.30"
-SRCREV="395847787d8f955f03bcb350ed9f852346fcda4d"
+SRCREV="4c64c5ceebe8210bb838e74500077a0e944ca825"
require linux-nuvoton.inc
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CPC-Baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CPC-Baseboard.json
index 0346c3f90..e9c91e425 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CPC-Baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CPC-Baseboard.json
@@ -34,6 +34,16 @@
"Type": "ADC"
},
{
+ "BusConfig": [
+ {
+ "BusNum": 9,
+ "BusType": "BUS_CONFIG_I2C"
+ }
+ ],
+ "Name": "ASD",
+ "Type": "ASD"
+ },
+ {
"Index": 3,
"Name": "P105_PCH_AUX",
"Thresholds": [
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json
index 3b7c531ff..10ac69963 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json
@@ -34,6 +34,16 @@
"Type": "ADC"
},
{
+ "BusConfig": [
+ {
+ "BusNum": 9,
+ "BusType": "BUS_CONFIG_I2C"
+ }
+ ],
+ "Name": "ASD",
+ "Type": "ASD"
+ },
+ {
"Index": 3,
"Name": "P105_PCH_AUX",
"Thresholds": [
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json
index 23869e812..acecd3fcd 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json
@@ -34,6 +34,16 @@
"Type": "ADC"
},
{
+ "BusConfig": [
+ {
+ "BusNum": 9,
+ "BusType": "BUS_CONFIG_I2C"
+ }
+ ],
+ "Name": "ASD",
+ "Type": "ASD"
+ },
+ {
"Index": 3,
"Name": "P105_PCH_AUX",
"Thresholds": [
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 dfb11d89a..0705ab3de 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 ada80beb48d974f101201745657d10e72fe30b9c Mon Sep 17 00:00:00 2001
+From 041ad6cfc3d379c8e4fd271e7f9e3d8ea6ee61ac 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
@@ -36,7 +36,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
old mode 100755
new mode 100644
-index e9d994737949..d2ad5968775e
+index 786042cd8340..df844065cd4f
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -684,7 +684,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
@@ -288,10 +288,10 @@ index ee775ce5d264..8c985532afb4 100644
{
efi_restore_gd();
diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
-index 518f41b558d3..8023397cff58 100644
+index 6258b337bc3d..ffcb110c3ae3 100644
--- a/arch/arm/mach-aspeed/ast2600/Kconfig
+++ b/arch/arm/mach-aspeed/ast2600/Kconfig
-@@ -51,6 +51,13 @@ config TARGET_SLT_AST2600
+@@ -32,10 +32,18 @@ config TARGET_SLT_AST2600
help
SLT-AST2600 is Aspeed SLT board for AST2600 chip.
@@ -304,9 +304,7 @@ index 518f41b558d3..8023397cff58 100644
+
endchoice
- config ASPEED_SECBOOT_BL2
-@@ -71,5 +78,6 @@ source "board/aspeed/ncsi_ast2600a0/Kconfig"
- source "board/aspeed/ncsi_ast2600a1/Kconfig"
+ source "board/aspeed/evb_ast2600/Kconfig"
source "board/aspeed/fpga_ast2600/Kconfig"
source "board/aspeed/slt_ast2600/Kconfig"
+source "board/aspeed/ast2600_intel/Kconfig"
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0002-AST2600-Enable-host-searial-port-clock-configuration.patch
index 915b0197f..cd09ab4f0 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0002-AST2600-Enable-host-searial-port-clock-configuration.patch
@@ -1,4 +1,4 @@
-From c2e2496dfd8cde56e32274b11968185a77f40736 Mon Sep 17 00:00:00 2001
+From 816ae827f387922e31281c8b10988870ce9e0294 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Tue, 10 Dec 2019 14:58:10 +0800
Subject: [PATCH] AST2600: Enable host searial port clock configuration in
@@ -14,14 +14,14 @@ by default is 24Mhz.
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
---
- board/aspeed/ast2600_intel/intel.c | 35 +++++++++++++++++++++++++++++++++++
+ board/aspeed/ast2600_intel/intel.c | 35 ++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index a02e246d0d81..eb9b3959625e 100644
+index 4a40a050c3da..d1ac8651ac6c 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -36,9 +36,44 @@ int gpio_abort(void)
+@@ -39,9 +39,44 @@ int gpio_abort(void)
}
#define SCU_BASE 0x1E6E2000
@@ -67,5 +67,5 @@ index a02e246d0d81..eb9b3959625e 100644
return 0;
}
--
-2.7.4
+2.17.1
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 326f36df1..a036b91fc 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 3195e1ec2d772d5e4c16ae5b60c294086cfc17be Mon Sep 17 00:00:00 2001
+From fdb55afe15fdbba33782d01a77bbf994470f40b4 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
@@ -9,12 +9,12 @@ Both kernel and u-boot work at the area /dev/mtd/u-boot-env
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- common/board_r.c | 13 ++++++++++---
+ common/board_r.c | 11 +++++++++--
include/configs/aspeed-common.h | 11 ++++++++++-
- 2 files changed, 20 insertions(+), 4 deletions(-)
+ 2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/common/board_r.c b/common/board_r.c
-index 472987d5d52f..b665d0e30262 100644
+index 472987d5d52f..434c0df45c85 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -433,10 +433,17 @@ static int should_load_env(void)
@@ -22,8 +22,6 @@ index 472987d5d52f..b665d0e30262 100644
{
/* initialize environment */
- if (should_load_env())
-- env_relocate();
-- else
+ if (should_load_env()) {
+ /*
+ * try again, in case the environment failed to load the first
@@ -31,7 +29,8 @@ index 472987d5d52f..b665d0e30262 100644
+ */
+ if (!gd->env_valid)
+ env_init();
-+ env_relocate();
+ env_relocate();
+- else
+ } else {
set_default_env(NULL, 0);
+ }
@@ -39,10 +38,10 @@ index 472987d5d52f..b665d0e30262 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 cdbffc97a223..6065ec58db0a 100644
+index 8718b50f9ebe..70590067dbcf 100644
--- a/include/configs/aspeed-common.h
+++ b/include/configs/aspeed-common.h
-@@ -65,9 +65,18 @@
+@@ -73,9 +73,18 @@
#endif
#ifndef CONFIG_ENV_OFFSET
@@ -63,5 +62,5 @@ index cdbffc97a223..6065ec58db0a 100644
/*
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch
index d5bd4a2b1..ec4b6be09 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch
@@ -1,4 +1,4 @@
-From c1561193296d04dd8bd06adca43edac814058367 Mon Sep 17 00:00:00 2001
+From 0732dd21869418b4d437b8d1aef239d5348fc94d Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Fri, 3 Jan 2020 12:52:29 +0800
Subject: [PATCH] Enable interrupt in u-boot.
@@ -14,18 +14,18 @@ Testedby:
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- Kconfig | 14 +++
+ Kconfig | 14 ++
arch/arm/lib/stack.c | 9 ++
- arch/arm/lib/vectors.S | 30 +++++-
+ arch/arm/lib/vectors.S | 30 ++++-
board/aspeed/ast2600_intel/ast-espi.c | 3 +-
- board/aspeed/ast2600_intel/ast-irq.c | 185 +++++++++++++++++-----------------
+ board/aspeed/ast2600_intel/ast-irq.c | 185 +++++++++++++-------------
board/aspeed/ast2600_intel/ast-irq.h | 8 --
board/aspeed/ast2600_intel/intel.c | 1 -
7 files changed, 145 insertions(+), 105 deletions(-)
delete mode 100644 board/aspeed/ast2600_intel/ast-irq.h
diff --git a/Kconfig b/Kconfig
-index 305b265ed713..a6f68cd13d54 100644
+index c3dfa8de47c8..b62bcdbccf1e 100644
--- a/Kconfig
+++ b/Kconfig
@@ -239,6 +239,20 @@ config BUILD_TARGET
@@ -551,10 +551,10 @@ index 9957f2baa7ff..000000000000
-
-#endif
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index ac108c3a066c..22a377d2cb77 100644
+index 14a20b27e178..d03a446846bc 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -209,7 +209,6 @@ static void timer_handler(void *regs)
+@@ -239,7 +239,6 @@ static void timer_handler(void *regs)
printf("+");
}
@@ -563,5 +563,5 @@ index ac108c3a066c..22a377d2cb77 100644
{
/* This is called before relocation; beware! */
--
-2.7.4
+2.17.1
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 720d165c5..612a104b5 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 fd0768e6a63a25fdc87596036a5cbf82a88a1eb6 Mon Sep 17 00:00:00 2001
+From ddd0ebfaf667f2fd36ed2f8d2d8456dbc6acdaa8 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
@@ -37,10 +37,10 @@ index 9a15e204f83b..1f14753056ee 100644
};
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
-index 3b0a910d3fca..d6b949170570 100644
+index 5882eab2e3fc..42546f4d222a 100644
--- a/drivers/mtd/spi/spi-nor-ids.c
+++ b/drivers/mtd/spi/spi-nor-ids.c
-@@ -164,7 +164,12 @@ const struct flash_info spi_nor_ids[] = {
+@@ -189,7 +189,12 @@ const struct flash_info spi_nor_ids[] = {
{ INFO("n25q256ax1", 0x20bb19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
{ INFO("n25q512a", 0x20bb20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
{ INFO("n25q512ax3", 0x20ba20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
@@ -51,11 +51,11 @@ index 3b0a910d3fca..d6b949170570 100644
+ * back(Note:- Certain other chips having same name(n25q00) but different part number has no issues).
+ */
+ { INFO("n25q00", 0x20ba21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | NO_CHIP_ERASE) },
+ { INFO("mt25ql02g", 0x20ba22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
{ 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) },
- #endif
diff --git a/drivers/spi/aspeed_spi.c b/drivers/spi/aspeed_spi.c
-index 18d4c2fa098e..6efb8c4e3c65 100644
+index f93200f8f67e..8ac6e40524fe 100644
--- a/drivers/spi/aspeed_spi.c
+++ b/drivers/spi/aspeed_spi.c
@@ -17,6 +17,9 @@
@@ -68,13 +68,13 @@ index 18d4c2fa098e..6efb8c4e3c65 100644
struct aspeed_spi_regs {
u32 conf; /* 0x00 CE Type Setting */
-@@ -1037,6 +1040,19 @@ static int aspeed_spi_bind(struct udevice *bus)
+@@ -1059,6 +1062,19 @@ static int aspeed_spi_bind(struct udevice *bus)
return 0;
}
+static int aspeed_get_max_freq(void)
+{
-+ u32 rev_id = readl(ASPEED_REVISION_ID);
++ u32 rev_id = readl(ASPEED_REVISION_ID0);
+
+ /*Limit max spi frequency less than 50MHz on AST2600-A0 due
+ * to FWSPICLK signal quality issue.
@@ -88,7 +88,7 @@ index 18d4c2fa098e..6efb8c4e3c65 100644
static int aspeed_spi_probe(struct udevice *bus)
{
struct resource res_regs, res_ahb;
-@@ -1067,7 +1083,7 @@ static int aspeed_spi_probe(struct udevice *bus)
+@@ -1089,7 +1105,7 @@ static int aspeed_spi_probe(struct udevice *bus)
clk_free(&hclk);
priv->max_hz = dev_read_u32_default(bus, "spi-max-frequency",
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 2a2d1054a..c4b8a00ef 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 6f9d529b616ce84271ccd2584b9bcd8d13ab57de Mon Sep 17 00:00:00 2001
+From 844e425a503c56bd84dbfe5396c5f8f9b4284e6d 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 | 26 ++++++++++++++++++++++---
- 1 file changed, 23 insertions(+), 3 deletions(-)
+ arch/arm/mach-aspeed/ast2600/platform.S | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index f193c66cd04b..997670b66bdc 100644
+index f96ef1f0dac4..3b6f91a60c3d 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -44,7 +44,9 @@
@@ -25,7 +25,7 @@ index f193c66cd04b..997670b66bdc 100644
#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)
-@@ -173,6 +175,26 @@ do_primary_core_setup:
+@@ -175,6 +177,26 @@ do_primary_core_setup:
/* unlock system control unit */
scu_unlock
@@ -52,7 +52,7 @@ index f193c66cd04b..997670b66bdc 100644
/* identify AST2600 A0/A1 */
ldr r0, =AST_SCU_REV_ID
ldr r0, [r0]
-@@ -262,19 +284,17 @@ skip_fill_wip_bit:
+@@ -277,7 +299,6 @@ skip_fill_wip_bit:
ldr r1, =AST_FMC_WDT1_CTRL_MODE
str r0, [r1]
@@ -60,12 +60,7 @@ index f193c66cd04b..997670b66bdc 100644
/* disable UART-based SoC Debug Interface UART5 and P2A bridge*/
ldr r0, =AST_SCU_DEBUG_CTRL
ldr r1, [r0]
- orr r1, #0x03
- str r1, [r0]
--
-+
- /* disable UART-based SoC Debug Interface UART1 and LPC2AHB bridge */
- ldr r0, =AST_SCU_DEBUG_CTRL2
+@@ -289,7 +310,6 @@ skip_fill_wip_bit:
ldr r1, [r0]
orr r1, #0x0A
str r1, [r0]
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 f47092eaa..a506f3028 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 f1bfa10fefa992c7032e0c32647543bb2a8dc90f Mon Sep 17 00:00:00 2001
+From f545610f26089e78e71469e9006e3337670af0f4 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,7 +17,7 @@ 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 997670b66bdc..6b447845fe26 100644
+index 3b6f91a60c3d..eac52db538b0 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -57,6 +57,12 @@
@@ -33,10 +33,10 @@ index 997670b66bdc..6b447845fe26 100644
#define AST_GPIO_BASE (0x1E780000)
#define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
-@@ -229,6 +235,18 @@ wait_lock:
- b 1f
+@@ -244,6 +250,18 @@ wait_lock:
+ bne 2f
- 0:
+ 1:
+ /* disable DMA arbitration on MAC1 (A1 bug) */
+ ldr r0, =AST_MAC1_CTRL2
+ ldr r1, [r0]
@@ -49,7 +49,7 @@ index 997670b66bdc..6b447845fe26 100644
+ orr r1, #0x18000000
+ str r1, [r0]
+
- /* LPC/eSPI mode selection (A1 only) */
+ /* LPC/eSPI mode selection by SW (AST2600/AST2620 A1 only) */
ldr r0, =AST_GPIOYZ_DATA_VALUE
ldr r0, [r0]
--
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0010-Fix-timer-support.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0010-Fix-timer-support.patch
index cf13a17f2..e998ae42f 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0010-Fix-timer-support.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0010-Fix-timer-support.patch
@@ -1,4 +1,4 @@
-From bd4eb78dc71529342e5d0b784731c412cf747acc Mon Sep 17 00:00:00 2001
+From 97fc99c77c68ec6b71354786f94a80a26adde389 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Mon, 20 Apr 2020 10:42:05 -0700
Subject: [PATCH] Fix timer support
@@ -10,8 +10,8 @@ commit adds the timer interrupt flag clearing logic.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- board/aspeed/ast2600_intel/ast-timer.c | 69 ++++++++++++++++++++--------------
- board/aspeed/ast2600_intel/intel.c | 13 ++++---
+ board/aspeed/ast2600_intel/ast-timer.c | 69 +++++++++++++++-----------
+ board/aspeed/ast2600_intel/intel.c | 13 ++---
2 files changed, 48 insertions(+), 34 deletions(-)
diff --git a/board/aspeed/ast2600_intel/ast-timer.c b/board/aspeed/ast2600_intel/ast-timer.c
@@ -120,10 +120,10 @@ index cf8c69aba5d3..d98ec9238e15 100644
+ AST_TIMER_BASE + TIMER_CONTROL);
}
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 47e5ad21d66d..befeaff0a953 100644
+index ebf883144418..7c005fb323e6 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -219,16 +219,14 @@ void enable_onboard_tpm(void)
+@@ -249,16 +249,14 @@ void enable_onboard_tpm(void)
AST_GPIO_BASE | GPIO_000);
}
@@ -142,7 +142,7 @@ index 47e5ad21d66d..befeaff0a953 100644
arch_interrupt_init_early();
set_gpio_default_state();
-@@ -243,11 +241,9 @@ int board_early_init_f(void)
+@@ -273,11 +271,9 @@ int board_early_init_f(void)
return 0;
}
@@ -154,7 +154,7 @@ index 47e5ad21d66d..befeaff0a953 100644
enable_onboard_tpm();
-@@ -255,8 +251,13 @@ int board_early_init_r(void)
+@@ -285,8 +281,13 @@ int board_early_init_r(void)
}
extern void espi_init(void);
@@ -169,5 +169,5 @@ index 47e5ad21d66d..befeaff0a953 100644
return 0;
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0011-KCS-driver-support-in-uBoot.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0011-KCS-driver-support-in-uBoot.patch
index f446d797a..6a37f7b72 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0011-KCS-driver-support-in-uBoot.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0011-KCS-driver-support-in-uBoot.patch
@@ -1,4 +1,4 @@
-From 1fbd857e2ff5396ea057f686cbd01c6db4328316 Mon Sep 17 00:00:00 2001
+From b26b11483b006f603e0134551bfb1238e0980972 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Mon, 20 Apr 2020 11:08:22 -0700
Subject: [PATCH] KCS driver support in uBoot
@@ -29,8 +29,8 @@ Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
board/aspeed/ast2600_intel/Makefile | 1 +
- board/aspeed/ast2600_intel/ast-kcs.c | 418 +++++++++++++++++++++++++++++++++++
- board/aspeed/ast2600_intel/ast-kcs.h | 112 ++++++++++
+ board/aspeed/ast2600_intel/ast-kcs.c | 418 +++++++++++++++++++++++++++
+ board/aspeed/ast2600_intel/ast-kcs.h | 112 +++++++
board/aspeed/ast2600_intel/intel.c | 4 +
4 files changed, 535 insertions(+)
create mode 100644 board/aspeed/ast2600_intel/ast-kcs.c
@@ -588,10 +588,10 @@ index 000000000000..e9b949eccf69
+ u8 data_out[MAX_KCS_PKT_SIZE];
+};
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index befeaff0a953..6ac24beb930b 100644
+index 7c005fb323e6..b3d2fb313561 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -251,6 +251,7 @@ int board_early_init_r(void)
+@@ -281,6 +281,7 @@ int board_early_init_r(void)
}
extern void espi_init(void);
@@ -599,7 +599,7 @@ index befeaff0a953..6ac24beb930b 100644
extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
void *cookie);
int board_late_init(void)
-@@ -260,6 +261,9 @@ int board_late_init(void)
+@@ -290,6 +291,9 @@ int board_late_init(void)
timer_enable(0, ONE_SEC_IN_USEC, timer_callback, (void *)0);
espi_init();
@@ -610,5 +610,5 @@ index befeaff0a953..6ac24beb930b 100644
}
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0013-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0013-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch
index 7d7b450a8..04baccf66 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0013-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0013-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch
@@ -1,4 +1,4 @@
-From 2d0a3aff4c4aa3a764958579ed10a3aab43a7d8a Mon Sep 17 00:00:00 2001
+From e027384b44aff330375477556eed10c326ad1c48 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Mon, 27 Apr 2020 12:40:01 -0700
Subject: [PATCH] Add a workaround to cover UART interrupt bug in AST2600 A0
@@ -13,10 +13,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 6ac24beb930b..ad5ab7632447 100644
+index b3d2fb313561..0d1ce69b6e53 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
-@@ -221,7 +221,19 @@ void enable_onboard_tpm(void)
+@@ -251,7 +251,19 @@ void enable_onboard_tpm(void)
static void timer_callback(void *cookie)
{
@@ -37,7 +37,7 @@ index 6ac24beb930b..ad5ab7632447 100644
}
int board_early_init_f(void)
-@@ -256,9 +268,13 @@ extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
+@@ -286,9 +298,13 @@ extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
void *cookie);
int board_late_init(void)
{
@@ -54,5 +54,5 @@ index 6ac24beb930b..ad5ab7632447 100644
if (read_ffuj())
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-system-reset-status-support.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-system-reset-status-support.patch
index 89a8808eb..1b0d4d95b 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-system-reset-status-support.patch
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0016-Add-system-reset-status-support.patch
@@ -1,4 +1,4 @@
-From 0a2511d407ad9294b8c08f5228d85e042c104aaa Mon Sep 17 00:00:00 2001
+From ea8f8aa37182b66893ac9afcbbb4d5043b3b4166 Mon Sep 17 00:00:00 2001
From: Yong Li <yong.b.li@linux.intel.com>
Date: Tue, 9 Apr 2019 14:42:05 +0800
Subject: [PATCH] Add system reset status support
@@ -13,12 +13,12 @@ Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
arch/arm/mach-aspeed/ast2600/scu_info.c | 4 ++
- board/aspeed/ast2600_intel/intel.c | 65 +++++++++++++++++++++++++++++++++
+ board/aspeed/ast2600_intel/intel.c | 65 +++++++++++++++++++++++++
include/asm-generic/global_data.h | 3 ++
3 files changed, 72 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/scu_info.c b/arch/arm/mach-aspeed/ast2600/scu_info.c
-index 2ee88b4dd39b..2cc6c3652bab 100644
+index fe26f743c0ca..18514c812018 100644
--- a/arch/arm/mach-aspeed/ast2600/scu_info.c
+++ b/arch/arm/mach-aspeed/ast2600/scu_info.c
@@ -9,6 +9,8 @@
@@ -30,7 +30,7 @@ index 2ee88b4dd39b..2cc6c3652bab 100644
/* SoC mapping Table */
#define SOC_ID(str, rev) { .name = str, .rev_id = rev, }
-@@ -237,6 +239,8 @@ void aspeed_print_sysrst_info(void)
+@@ -263,6 +265,8 @@ void aspeed_print_sysrst_info(void)
writel(SYS_EXT_RESET, ASPEED_SYS_RESET_CTRL);
}
}
@@ -40,7 +40,7 @@ index 2ee88b4dd39b..2cc6c3652bab 100644
#define SOC_FW_INIT_DRAM BIT(7)
diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
-index 05872b439361..95e5492009d7 100644
+index 0d1ce69b6e53..849e81ff3fef 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -5,6 +5,7 @@
@@ -51,7 +51,7 @@ index 05872b439361..95e5492009d7 100644
/* use GPIOC0 on intel boards */
#define FFUJ_GPIO "gpio@1e78000016"
-@@ -274,6 +275,65 @@ int board_early_init_r(void)
+@@ -292,6 +293,65 @@ int board_early_init_r(void)
return 0;
}
@@ -117,7 +117,7 @@ index 05872b439361..95e5492009d7 100644
extern void espi_init(void);
extern void kcs_init(void);
extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler,
-@@ -283,12 +343,17 @@ int board_late_init(void)
+@@ -301,12 +361,17 @@ int board_late_init(void)
#define SCU_014 0x014 /* Silicon Revision ID */
#define REV_ID_AST2600A0 0x05000303 /* AST2600 A0 */
#define ONE_MSEC_IN_USEC 1000
@@ -150,5 +150,5 @@ index 78dcf40bff48..fa51e384520f 100644
#endif
--
-2.7.4
+2.17.1
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 da69791ea..66a1b564e 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 1333a1ff082cbaec4a44cefaf84d1bcc03ba1510 Mon Sep 17 00:00:00 2001
+From 2f4d7260a4ab0eb33d1145cd640019aa1fa1414a 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 6b447845fe26..55b867ff1b17 100644
+index eac52db538b0..cf709aaa5d98 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -210,6 +210,12 @@ do_primary_core_setup:
+@@ -212,6 +212,12 @@ do_primary_core_setup:
bne 0f
@@ -29,10 +29,10 @@ index 6b447845fe26..55b867ff1b17 100644
/* tune up CPU clocks (A0 only) */
ldr r0, =AST_SCU_HW_STRAP1
ldr r1, [r0]
-@@ -235,6 +241,17 @@ wait_lock:
- b 1f
+@@ -250,6 +256,17 @@ wait_lock:
+ bne 2f
- 0:
+ 1:
+ /* set VGA memory size to 16MB (A1 only) */
+ ldr r0, =AST_SCU_HW_STRAP1_CLR
+ movw r1, #0x4000
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 ea7650f8b..26c83f8d6 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 a56e138569ce7b37285d4c2f2b4ef4082ab2a283 Mon Sep 17 00:00:00 2001
+From 783ef5212c5efc0561361fd779f1be3b047aee74 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,7 +61,7 @@ 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 55b867ff1b17..cd8a57edd76b 100644
+index cf709aaa5d98..027265593f03 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -63,6 +63,14 @@
@@ -79,10 +79,10 @@ index 55b867ff1b17..cd8a57edd76b 100644
#define AST_GPIO_BASE (0x1E780000)
#define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
-@@ -277,6 +285,20 @@ wait_lock:
+@@ -292,6 +300,20 @@ wait_lock:
str r1, [r0]
- 1:
+ 2:
+ /* disable eSPI, LPC and PWM resets on WDT1 reset */
+ ldr r0, =AST_WDT1_RESET_MASK2
+ ldr r1, [r0]
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 da7889be6..e62403413 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 473b1990ecb578b6dc5d3347dc0ab8f7d5609137 Mon Sep 17 00:00:00 2001
+From 385629a99a8d07182812264f2868d5f85fb711e0 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,7 +20,7 @@ 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 cd8a57edd76b..08f33a9f1a17 100644
+index 027265593f03..e57bd325277f 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -64,6 +64,9 @@
@@ -33,7 +33,7 @@ index cd8a57edd76b..08f33a9f1a17 100644
#define AST_WDT1_RESET_MASK1 (AST_WDT1_BASE + 0x01C)
#define AST_WDT1_RESET_MASK2 (AST_WDT1_BASE + 0x020)
-@@ -313,6 +316,18 @@ wait_lock:
+@@ -328,6 +331,18 @@ wait_lock:
ldr r1, =AST_SCU_CA7_PARITY_CHK
str r0, [r1]
@@ -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 1793a9e1f560..2ba5e5d65f4a 100644
+index a8f5b6158241..69dfc7f21698 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -20,6 +20,7 @@
@@ -161,7 +161,7 @@ index 1793a9e1f560..2ba5e5d65f4a 100644
#include "sf_internal.h"
-@@ -425,6 +426,10 @@ static int spi_nor_wait_till_ready_with_timeout(struct spi_nor *nor,
+@@ -429,6 +430,10 @@ static int spi_nor_wait_till_ready_with_timeout(struct spi_nor *nor,
unsigned long timebase;
int ret;
@@ -300,12 +300,12 @@ index c2dc3cf548d2..811ead41bb95 100644
return 0;
}
diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
-index 255901ff0ea8..0797cd4febed 100755
+index 70590067dbcf..0eaf76b50b39 100644
--- a/include/configs/aspeed-common.h
+++ b/include/configs/aspeed-common.h
-@@ -18,6 +18,8 @@
- #define CONFIG_IPADDR 192.168.0.45
- #define CONFIG_SERVERIP 192.168.0.81
+@@ -20,6 +20,8 @@
+
+ #define CONFIG_STANDALONE_LOAD_ADDR 0x83000000
+#define CONFIG_HW_WATCHDOG
+
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 23fc22ea7..1191a6077 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 5ca28a9259d084440879be48ef4b4d6716794281 Mon Sep 17 00:00:00 2001
+From 438ff3a8db6718bb137dccaafa707f8275407742 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
@@ -12,11 +12,11 @@ to be reset so that Host functionality would be intact.
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
---
- arch/arm/mach-aspeed/ast2600/platform.S | 11 +++++++++++
- 1 file changed, 11 insertions(+)
+ arch/arm/mach-aspeed/ast2600/platform.S | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
-index ecc9fd33d1..8c40515b76 100644
+index bdc0884de1bd..d7115c96f117 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -39,6 +39,8 @@
@@ -28,14 +28,15 @@ index ecc9fd33d1..8c40515b76 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)
-@@ -285,6 +287,15 @@ wait_lock:
+@@ -303,6 +305,16 @@ wait_lock:
str r1, [r0]
- 1:
+ 2:
+ /* SCU060:EXTRST1# reset mask selection */
+ ldr r0, =AST_SCU_EXTRST_SEL1
+ ldr r1, =0x6FF1FF5
+ str r1, [r0]
++
+ /* SCU070:EXTRST2# reset mask selection */
+ ldr r0, =AST_SCU_EXTRST_SEL2
+ ldr r1, =0x3FFFFF7
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-Enable-PCIe-L1-support.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0026-Enable-PCIe-L1-support.patch
index 8cc95174f..b01b96e16 100644
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-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 1f95d121b4a11444bffd0494bcfff1986e0905b6 Mon Sep 17 00:00:00 2001
+From 8534fb50dfe7c4e1c042843ded54c4ed23ee7bc2 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,10 +11,10 @@ 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 cd8a57edd76b..ecc9fd33d125 100644
+index d7115c96f117..803ff94c4fc0 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
-@@ -299,6 +299,20 @@ wait_lock:
+@@ -329,6 +329,20 @@ wait_lock:
bic r1, r2
str r1, [r0]
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
new file mode 100644
index 000000000..ac7262f2c
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0030-Add-Aspeed-PWM-uclass-driver.patch
@@ -0,0 +1,576 @@
+From b68b7c30fa3331642e321d150017d431d8cf6f6d 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
+
+This commit adds Aspeed PWM uclass driver to set default FAN speed
+in u-boot.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/dts/ast2600-intel.dts | 11 ++
+ arch/arm/dts/ast2600.dtsi | 88 ++++++++++++
+ board/aspeed/ast2600_intel/intel.c | 49 +++++++
+ 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(-)
+ 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
+--- a/arch/arm/dts/ast2600-intel.dts
++++ b/arch/arm/dts/ast2600-intel.dts
+@@ -53,6 +53,17 @@
+ };
+ };
+
++&pwm {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
++ &pinctrl_pwm2_default &pinctrl_pwm3_default
++ &pinctrl_pwm4_default &pinctrl_pwm5_default
++ &pinctrl_pwm12g1_default &pinctrl_pwm13g1_default
++ &pinctrl_pwm14g1_default &pinctrl_pwm15g1_default>;
++};
++
+ &gpio0 {
+ status = "okay";
+ };
+diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi
+index e619f7118886..44ec6655fee7 100644
+--- a/arch/arm/dts/ast2600.dtsi
++++ b/arch/arm/dts/ast2600.dtsi
+@@ -265,6 +265,14 @@
+ #size-cells = <1>;
+ ranges;
+
++ pwm: pwm-controller@1e610000 {
++ compatible = "aspeed,ast2600-pwm";
++ reg = <0x1e610000 0x100>;
++ clocks = <&scu ASPEED_CLK_AHB>;
++ resets = <&rst ASPEED_RESET_PWM>;
++ status = "disabled";
++ };
++
+ syscon: syscon@1e6e2000 {
+ compatible = "aspeed,g6-scu", "syscon", "simple-mfd";
+ reg = <0x1e6e2000 0x1000>;
+@@ -1589,6 +1597,86 @@
+ groups = "PWM7";
+ };
+
++ pinctrl_pwm8g1_default: pwm8g1_default {
++ function = "PWM8G1";
++ groups = "PWM8G1";
++ };
++
++ pinctrl_pwm9g1_default: pwm9g1_default {
++ function = "PWM9G1";
++ groups = "PWM9G1";
++ };
++
++ pinctrl_pwm10g1_default: pwm10g1_default {
++ function = "PWM10G1";
++ groups = "PWM10G1";
++ };
++
++ pinctrl_pwm11g1_default: pwm11g1_default {
++ function = "PWM11G1";
++ groups = "PWM11G1";
++ };
++
++ pinctrl_pwm12g1_default: pwm12g1_default {
++ function = "PWM12G1";
++ groups = "PWM12G1";
++ };
++
++ pinctrl_pwm13g1_default: pwm13g1_default {
++ function = "PWM13G1";
++ groups = "PWM13G1";
++ };
++
++ pinctrl_pwm14g1_default: pwm14g1_default {
++ function = "PWM14G1";
++ groups = "PWM14G1";
++ };
++
++ pinctrl_pwm15g1_default: pwm15g1_default {
++ function = "PWM15G1";
++ groups = "PWM15G1";
++ };
++
++ pinctrl_pwm8g0_default: pwm8g0_default {
++ function = "PWM8G0";
++ groups = "PWM8G0";
++ };
++
++ pinctrl_pwm9g0_default: pwm9g0_default {
++ function = "PWM9G0";
++ groups = "PWM9G0";
++ };
++
++ pinctrl_pwm10g0_default: pwm10g0_default {
++ function = "PWM10G0";
++ groups = "PWM10G0";
++ };
++
++ pinctrl_pwm11g0_default: pwm11g0_default {
++ function = "PWM11G0";
++ groups = "PWM11G0";
++ };
++
++ pinctrl_pwm12g0_default: pwm12g0_default {
++ function = "PWM12G0";
++ groups = "PWM12G0";
++ };
++
++ pinctrl_pwm13g0_default: pwm13g0_default {
++ function = "PWM13G0";
++ groups = "PWM13G0";
++ };
++
++ pinctrl_pwm14g0_default: pwm14g0_default {
++ function = "PWM14G0";
++ groups = "PWM14G0";
++ };
++
++ pinctrl_pwm15g0_default: pwm15g0_default {
++ function = "PWM15G0";
++ groups = "PWM15G0";
++ };
++
+ pinctrl_rgmii1_default: rgmii1_default {
+ function = "RGMII1";
+ groups = "RGMII1";
+diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
+index ec6b70ae6659..11b8d4dd8360 100644
+--- a/board/aspeed/ast2600_intel/intel.c
++++ b/board/aspeed/ast2600_intel/intel.c
+@@ -8,6 +8,7 @@
+ #include <led.h>
+ #include <malloc.h>
+ #include <wdt.h>
++#include <pwm.h>
+
+ #define SYS_PWR_RESET_FLAG BIT(0) /* from scu_info.c */
+ #define WATCHDOG_RESET_BIT BIT(20)
+@@ -426,6 +427,53 @@ static void mailbox_init(void)
+ }
+ }
+
++struct pwm_setting {
++ uint channel;
++ uint duty_pct;
++};
++
++static void pwm_init(void)
++{
++#define NSEC_PER_SEC 1000000000L
++#define PWM_TARGET_FREQ 25000
++#define PWM_TICK_NS (NSEC_PER_SEC / PWM_TARGET_FREQ)
++#define PWM_TICK_1PCT_NS (PWM_TICK_NS / 100)
++ const struct pwm_setting settings[] = {
++ {0, 65},
++ {1, 65},
++ {2, 65},
++ {3, 65},
++ {4, 65},
++ {5, 65},
++ {12, 65},
++ {13, 65},
++ {14, 65},
++ {15, 65},
++ };
++ struct udevice *dev;
++ int ret, setting_size, i;
++
++ ret = uclass_first_device(UCLASS_PWM, &dev);
++ if (ret) {
++ debug("Can't find PWM controller: %d\n", ret);
++ return;
++ }
++
++ setting_size = sizeof(settings) / sizeof(settings[0]);
++
++ for (i = 0; i < setting_size; i++) {
++ ret = pwm_set_config(dev, settings[i].channel, PWM_TICK_NS,
++ settings[i].duty_pct * PWM_TICK_1PCT_NS);
++ if (!ret) {
++ ret = pwm_set_enable(dev, settings[i].channel, true);
++ if (ret)
++ debug("PWM enabling failed: %d\n", ret);
++ } else {
++ debug("PWM configure failed: %d\n", ret);
++ }
++ }
++}
++
+ int board_early_init_f(void)
+ {
+ /* This is called before relocation; beware! */
+@@ -613,6 +661,7 @@ int board_late_init(void)
+ timer_callback, (void *)1);
+ #endif
+
++ pwm_init();
+ espi_init();
+
+ /* Add reset reason to bootargs */
+diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2600.c b/drivers/pinctrl/aspeed/pinctrl_ast2600.c
+index 8a77a5d31556..980667f84e30 100644
+--- a/drivers/pinctrl/aspeed/pinctrl_ast2600.c
++++ b/drivers/pinctrl/aspeed/pinctrl_ast2600.c
+@@ -326,6 +326,110 @@ static struct aspeed_sig_desc pcie1rc_link[] = {
+ { 0x500, BIT(24), 0 }, //dedicate rc reset
+ };
+
++static struct aspeed_sig_desc pwm0[] = {
++ { 0x41C, BIT(16), 0 },
++};
++
++static struct aspeed_sig_desc pwm1[] = {
++ { 0x41C, BIT(17), 0 },
++};
++
++static struct aspeed_sig_desc pwm2[] = {
++ { 0x41C, BIT(18), 0 },
++};
++
++static struct aspeed_sig_desc pwm3[] = {
++ { 0x41C, BIT(19), 0 },
++};
++
++static struct aspeed_sig_desc pwm4[] = {
++ { 0x41C, BIT(20), 0 },
++};
++
++static struct aspeed_sig_desc pwm5[] = {
++ { 0x41C, BIT(21), 0 },
++};
++
++static struct aspeed_sig_desc pwm6[] = {
++ { 0x41C, BIT(22), 0 },
++};
++
++static struct aspeed_sig_desc pwm7[] = {
++ { 0x41C, BIT(23), 0 },
++};
++
++static struct aspeed_sig_desc pwm8g1[] = {
++ { 0x41C, BIT(24), 0 },
++};
++
++static struct aspeed_sig_desc pwm9g1[] = {
++ { 0x41C, BIT(25), 0 },
++};
++
++static struct aspeed_sig_desc pwm10g1[] = {
++ { 0x41C, BIT(26), 0 },
++};
++
++static struct aspeed_sig_desc pwm11g1[] = {
++ { 0x41C, BIT(27), 0 },
++};
++
++static struct aspeed_sig_desc pwm12g1[] = {
++ { 0x41C, BIT(28), 0 },
++};
++
++static struct aspeed_sig_desc pwm13g1[] = {
++ { 0x41C, BIT(29), 0 },
++};
++
++static struct aspeed_sig_desc pwm14g1[] = {
++ { 0x41C, BIT(30), 0 },
++};
++
++static struct aspeed_sig_desc pwm15g1[] = {
++ { 0x41C, BIT(31), 0 },
++};
++
++static struct aspeed_sig_desc pwm8g0[] = {
++ { 0x414, BIT(8), 1 },
++ { 0x4B4, BIT(8), 0 },
++};
++
++static struct aspeed_sig_desc pwm9g0[] = {
++ { 0x414, BIT(9), 1 },
++ { 0x4B4, BIT(9), 0 },
++};
++
++static struct aspeed_sig_desc pwm10g0[] = {
++ { 0x414, BIT(10), 1 },
++ { 0x4B4, BIT(10), 0 },
++};
++
++static struct aspeed_sig_desc pwm11g0[] = {
++ { 0x414, BIT(11), 1 },
++ { 0x4B4, BIT(11), 0 },
++};
++
++static struct aspeed_sig_desc pwm12g0[] = {
++ { 0x414, BIT(12), 1 },
++ { 0x4B4, BIT(12), 0 },
++};
++
++static struct aspeed_sig_desc pwm13g0[] = {
++ { 0x414, BIT(13), 1 },
++ { 0x4B4, BIT(13), 0 },
++};
++
++static struct aspeed_sig_desc pwm14g0[] = {
++ { 0x414, BIT(14), 1 },
++ { 0x4B4, BIT(14), 0 },
++};
++
++static struct aspeed_sig_desc pwm15g0[] = {
++ { 0x414, BIT(15), 1 },
++ { 0x4B4, BIT(15), 0 },
++};
++
+ static const struct aspeed_group_config ast2600_groups[] = {
+ { "MAC1LINK", ARRAY_SIZE(mac1_link), mac1_link },
+ { "MAC2LINK", ARRAY_SIZE(mac2_link), mac2_link },
+@@ -383,7 +487,31 @@ static const struct aspeed_group_config ast2600_groups[] = {
+ { "USB2AH", ARRAY_SIZE(usb2ah_link), usb2ah_link },
+ { "USB2BH", ARRAY_SIZE(usb2bh_link), usb2bh_link },
+ { "PCIE0RC", ARRAY_SIZE(pcie0rc_link), pcie0rc_link },
+- { "PCIE1RC", ARRAY_SIZE(pcie1rc_link), pcie1rc_link },
++ { "PCIE1RC", ARRAY_SIZE(pcie1rc_link), pcie1rc_link },
++ { "PWM0", ARRAY_SIZE(pwm0), pwm0 },
++ { "PWM1", ARRAY_SIZE(pwm1), pwm1 },
++ { "PWM2", ARRAY_SIZE(pwm2), pwm2 },
++ { "PWM3", ARRAY_SIZE(pwm3), pwm3 },
++ { "PWM4", ARRAY_SIZE(pwm4), pwm4 },
++ { "PWM5", ARRAY_SIZE(pwm5), pwm5 },
++ { "PWM6", ARRAY_SIZE(pwm6), pwm6 },
++ { "PWM7", ARRAY_SIZE(pwm7), pwm7 },
++ { "PWM8G1", ARRAY_SIZE(pwm8g1), pwm8g1 },
++ { "PWM9G1", ARRAY_SIZE(pwm9g1), pwm9g1 },
++ { "PWM10G1", ARRAY_SIZE(pwm10g1), pwm10g1 },
++ { "PWM11G1", ARRAY_SIZE(pwm11g1), pwm11g1 },
++ { "PWM12G1", ARRAY_SIZE(pwm12g1), pwm12g1 },
++ { "PWM13G1", ARRAY_SIZE(pwm13g1), pwm13g1 },
++ { "PWM14G1", ARRAY_SIZE(pwm14g1), pwm14g1 },
++ { "PWM15G1", ARRAY_SIZE(pwm15g1), pwm15g1 },
++ { "PWM8G0", ARRAY_SIZE(pwm8g0), pwm8g0 },
++ { "PWM9G0", ARRAY_SIZE(pwm9g0), pwm9g0 },
++ { "PWM10G0", ARRAY_SIZE(pwm10g0), pwm10g0 },
++ { "PWM11G0", ARRAY_SIZE(pwm11g0), pwm11g0 },
++ { "PWM12G0", ARRAY_SIZE(pwm12g0), pwm12g0 },
++ { "PWM13G0", ARRAY_SIZE(pwm13g0), pwm13g0 },
++ { "PWM14G0", ARRAY_SIZE(pwm14g0), pwm14g0 },
++ { "PWM15G0", ARRAY_SIZE(pwm15g0), pwm15g0 },
+ };
+
+ static int ast2600_pinctrl_get_groups_count(struct udevice *dev)
+diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
+index 2984b7976637..95e82ee5ddf6 100644
+--- a/drivers/pwm/Kconfig
++++ b/drivers/pwm/Kconfig
+@@ -50,3 +50,11 @@ config PWM_SUNXI
+ help
+ This PWM is found on H3, A64 and other Allwinner SoCs. It supports a
+ programmable period and duty cycle. A 16-bit counter is used.
++
++config PWM_ASPEED
++ bool "Enable support for the Aspeed AST2600 PWM"
++ depends on DM_PWM
++ depends on ASPEED_AST2600
++ help
++ This PWM is found on Aspeed AST2600 SoC. It supports a programmable
++ period and duty cycle. A 16-bit counter is used.
+diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
+index a837c35ed2e3..770b054c3f3b 100644
+--- a/drivers/pwm/Makefile
++++ b/drivers/pwm/Makefile
+@@ -16,3 +16,4 @@ obj-$(CONFIG_PWM_ROCKCHIP) += rk_pwm.o
+ obj-$(CONFIG_PWM_SANDBOX) += sandbox_pwm.o
+ obj-$(CONFIG_PWM_TEGRA) += tegra_pwm.o
+ obj-$(CONFIG_PWM_SUNXI) += sunxi_pwm.o
++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
+--- /dev/null
++++ b/drivers/pwm/aspeed_pwm.c
+@@ -0,0 +1,172 @@
++// SPDX-License-Identifier: GPL
++// Copyright (c) 2021 Intel Corporation
++
++#include <asm/io.h>
++#include <linux/bitfield.h>
++#include <clk.h>
++#include <common.h>
++#include <dm.h>
++#include <linux/ioport.h>
++#include <pwm.h>
++#include <reset.h>
++#include <asm/arch/scu_ast2600.h>
++
++#define NSEC_PER_SEC 1000000000L
++
++#define ASPEED_PWM_CTRL 0x00 /* PWM0 General Register */
++#define ASPEED_PWM_CTRL_CH(x) (((x) * 0x10) + ASPEED_PWM_CTRL)
++#define PWM_LOAD_AS_WDT BIT(19)
++#define PWM_DUTY_LOAD_AS_WDT_EN BIT(18)
++#define PWM_DUTY_SYNC_DIS BIT(17)
++#define PWM_CLK_ENABLE BIT(16)
++#define PWM_LEVEL_OUTPUT BIT(15)
++#define PWM_INVERSE BIT(14)
++#define PWM_OPEN_DRAIN_EN BIT(13)
++#define PWM_PIN_EN BIT(12)
++#define PWM_CLK_DIV_H_MASK GENMASK(11, 8)
++#define PWM_CLK_DIV_L_MASK GENMASK(7, 0)
++
++#define ASPEED_PWM_DUTY_CYCLE 0x04 /* PWM0 Duty Cycle Register */
++#define ASPEED_PWM_DUTY_CYCLE_CH(x) (((x) * 0x10) + ASPEED_PWM_DUTY_CYCLE)
++#define PWM_PERIOD_MASK GENMASK(31, 24)
++#define PWM_RISING_FALLING_AS_WDT_MASK GENMASK(23, 16)
++#define PWM_RISING_POINT_MASK GENMASK(15, 8)
++#define PWM_FALLING_POINT_MASK GENMASK(7, 0)
++
++#define PWM_PERIOD_MAX 255
++
++struct aspeed_pwm_priv {
++ void __iomem *base;
++ ulong clk_freq;
++ u32 clk_tick_ns;
++};
++
++static int aspeed_pwm_set_config(struct udevice *dev, uint channel,
++ uint period_ns, uint duty_ns)
++{
++ struct aspeed_pwm_priv *priv = dev_get_priv(dev);
++ u8 div_h, div_l, period_value, falling_point, rising_point;
++ u32 ctrl_value, duty_value, tick_ns;
++
++ /*
++ * We currently avoid using 64bit arithmetic by using the
++ * fact that anything faster than 1Hz is easily representable
++ * by 32bits.
++ */
++ if (period_ns > NSEC_PER_SEC)
++ return -ERANGE;
++
++ for (div_l = 0; div_l <= 0xff; div_l++) {
++ for (div_h = 0; div_h <= 0xf; div_h++) {
++ tick_ns = priv->clk_tick_ns * BIT(div_h) * (div_l + 1);
++ if (tick_ns * PWM_PERIOD_MAX >= period_ns)
++ break;
++ }
++ if (tick_ns * PWM_PERIOD_MAX >= period_ns)
++ break;
++ }
++
++ if (period_ns / tick_ns > PWM_PERIOD_MAX)
++ return -ERANGE;
++
++ ctrl_value = FIELD_PREP(PWM_CLK_DIV_H_MASK, div_h) |
++ FIELD_PREP(PWM_CLK_DIV_L_MASK, div_l);
++ period_value = period_ns / tick_ns;
++ falling_point = 0;
++ rising_point = duty_ns / tick_ns;
++ duty_value = FIELD_PREP(PWM_PERIOD_MASK, period_value) |
++ FIELD_PREP(PWM_RISING_POINT_MASK, rising_point) |
++ FIELD_PREP(PWM_FALLING_POINT_MASK, falling_point);
++
++ clrsetbits_le32(priv->base + ASPEED_PWM_DUTY_CYCLE_CH(channel),
++ PWM_PERIOD_MASK | PWM_RISING_POINT_MASK |
++ PWM_FALLING_POINT_MASK, duty_value);
++ clrsetbits_le32(priv->base + ASPEED_PWM_CTRL_CH(channel),
++ PWM_CLK_DIV_H_MASK | PWM_CLK_DIV_L_MASK, ctrl_value);
++
++ return 0;
++}
++
++static int aspeed_pwm_set_enable(struct udevice *dev, uint channel, bool enable)
++{
++ struct aspeed_pwm_priv *priv = dev_get_priv(dev);
++
++ debug("%s: Enable '%s' channel %u\n", __func__, dev->name, channel);
++
++ clrsetbits_le32(priv->base + ASPEED_PWM_CTRL_CH(channel),
++ PWM_CLK_ENABLE | PWM_PIN_EN,
++ enable ? PWM_CLK_ENABLE | PWM_PIN_EN : 0);
++
++ return 0;
++}
++
++static int aspeed_pwm_ofdata_to_platdata(struct udevice *dev)
++{
++ struct aspeed_pwm_priv *priv = dev_get_priv(dev);
++ struct resource res_regs;
++ int ret;
++
++ ret = dev_read_resource(dev, 0, &res_regs);
++ if (ret < 0)
++ return ret;
++
++ priv->base = (void __iomem *)res_regs.start;
++
++ return 0;
++}
++
++static int aspeed_pwm_probe(struct udevice *dev)
++{
++ struct aspeed_pwm_priv *priv = dev_get_priv(dev);
++ struct reset_ctl reset_ctl;
++ struct clk hclk;
++ int ret;
++
++ ret = clk_get_by_index(dev, 0, &hclk);
++ if (ret) {
++ pr_err("%s: could not get clock: %d\n", dev->name, ret);
++ return ret;
++ }
++
++ priv->clk_freq = clk_get_rate(&hclk);
++ priv->clk_tick_ns = NSEC_PER_SEC / priv->clk_freq;
++ (void) clk_free(&hclk);
++
++ ret = reset_get_by_index(dev, 0, &reset_ctl);
++ if (ret) {
++ pr_err("%s: Failed to get reset signal: %d\n", dev->name, ret);
++ return ret;
++ }
++
++ ret = reset_assert(&reset_ctl);
++ if (!ret) {
++ mdelay(10);
++ ret = reset_deassert(&reset_ctl);
++ }
++
++ return ret;
++}
++
++static const struct pwm_ops aspeed_pwm_ops = {
++ .set_config = aspeed_pwm_set_config,
++ .set_enable = aspeed_pwm_set_enable,
++};
++
++static const struct udevice_id aspeed_pwm_ids[] = {
++ { .compatible = "aspeed,ast2600-pwm" },
++ { }
++};
++
++U_BOOT_DRIVER(aspeed_pwm) = {
++ .name = "aspeed_pwm",
++ .id = UCLASS_PWM,
++ .of_match = aspeed_pwm_ids,
++ .ops = &aspeed_pwm_ops,
++ .ofdata_to_platdata = aspeed_pwm_ofdata_to_platdata,
++ .priv_auto_alloc_size = sizeof(struct aspeed_pwm_priv),
++ .probe = aspeed_pwm_probe,
++};
++
++MODULE_AUTHOR("Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>");
++MODULE_LICENSE("GPL");
++MODULE_DESCRIPTION("Aspeed AST2600 PWM Driver");
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0031-Add-a-workaround-to-fix-AST2600-A0-booting-issue.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0031-Add-a-workaround-to-fix-AST2600-A0-booting-issue.patch
new file mode 100644
index 000000000..9444dde99
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0031-Add-a-workaround-to-fix-AST2600-A0-booting-issue.patch
@@ -0,0 +1,32 @@
+From 58ed1cb4ac3229b484c983a2e4982fad13da0e06 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Fri, 21 May 2021 17:24:13 -0700
+Subject: [PATCH] Add a workaround to fix AST2600 A0 booting issue
+
+AST2600 A0 doesn't boot with 88KB SRAM setting so this commit adds
+a workaround which pins SRAM size to 64KB to make A0 able to boot.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/include/asm/arch-aspeed/platform.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/arm/include/asm/arch-aspeed/platform.h b/arch/arm/include/asm/arch-aspeed/platform.h
+index f016bdaba3e7..192e3b977a34 100644
+--- a/arch/arm/include/asm/arch-aspeed/platform.h
++++ b/arch/arm/include/asm/arch-aspeed/platform.h
+@@ -53,7 +53,11 @@
+ #define ASPEED_MAC_COUNT 4
+ #define ASPEED_DRAM_BASE 0x80000000
+ #define ASPEED_SRAM_BASE 0x10000000
++#if 1 /* AST2600 A0 doesn't boot with 88K setting so pin SRAM size to 64K */
++#define ASPEED_SRAM_SIZE 0x10000
++#else
+ #define ASPEED_SRAM_SIZE 0x16000
++#endif
+ #define ASPEED_FMC_CS0_BASE 0x20000000
+ #else
+ #err "No define for platform.h"
+--
+2.17.1
+
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 1ac02608b..e61f3de1e 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
@@ -12,6 +12,8 @@ CONFIG_CMD_IRQ=y
CONFIG_ENV_SIZE=0x10000
CONFIG_ENV_OFFSET=0x2400000
CONFIG_BOARD_LATE_INIT=y
+CONFIG_DM_PWM=y
+CONFIG_PWM_ASPEED=y
CONFIG_TARGET_EVB_AST2600A1=n
CONFIG_PHY_NCSI=n
CONFIG_CMD_USB=n
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 29d938c6e..dd03c1f17 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
@@ -7,7 +7,7 @@ FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:"
SRC_URI_append_intel-ast2600 = " \
file://intel.cfg \
file://0001-Add-ast2600-intel-as-a-new-board.patch \
- file://0021-AST2600-Enable-host-searial-port-clock-configuration.patch \
+ file://0002-AST2600-Enable-host-searial-port-clock-configuration.patch \
file://0003-ast2600-intel-layout-environment-addr.patch \
file://0004-AST2600-Adjust-default-GPIO-settings.patch \
file://0005-Ast2600-Enable-interrupt-in-u-boot.patch \
@@ -30,10 +30,12 @@ SRC_URI_append_intel-ast2600 = " \
file://0023-Add-WDT-to-u-boot-to-cover-booting-failures.patch \
file://0024-fix-SUS_WARN-handling-logic.patch \
file://0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch \
- file://0025-Enable-PCIe-L1-support.patch \
+ file://0026-Enable-PCIe-L1-support.patch \
file://0027-ast2600-Add-Mailbox-init-function.patch \
file://0028-Improve-randomness-of-mac-address-generation.patch \
file://0029-Set-UART-routing-in-lowlevel_init.patch \
+ file://0030-Add-Aspeed-PWM-uclass-driver.patch \
+ file://0031-Add-a-workaround-to-fix-AST2600-A0-booting-issue.patch \
"
# CVE-2020-10648 vulnerability fix
@@ -57,12 +59,6 @@ SRC_URI_append_intel-ast2600 = " \
file://0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch \
"
-# CVE-2019-13104 vulnerability fix
-FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13104:"
-SRC_URI_append_intel-ast2600 = " \
- file://0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch \
- "
-
# CVE-2019-13105 vulnerability fix
FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13105:"
SRC_URI_append_intel-ast2600 = " \
@@ -70,6 +66,12 @@ SRC_URI_append_intel-ast2600 = " \
file://0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch \
"
+# CVE-2019-13104 vulnerability fix
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13104:"
+SRC_URI_append_intel-ast2600 = " \
+ file://0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch \
+ "
+
# CVE-2019-13106 vulnerability fix
FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13106:"
SRC_URI_append_intel-ast2600 = " \
@@ -95,5 +97,7 @@ PFR_SRC_URI = " \
SRC_URI_append_intel-ast2600 += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', PFR_SRC_URI, '', d)}"
do_install_append () {
+ install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
install -m 0644 ${WORKDIR}/fw_env.config ${S}/tools/env/fw_env.config
}
+RDEPENDS_${PN} = "udev-aspeed-mtd-partitions"
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend
index 2e230c2a2..c73fd75cc 100644..120000
--- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend
@@ -1,18 +1 @@
-COMPATIBLE_MACHINE = "intel-ast2600"
-FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:"
-
-SRC_URI_append_intel-ast2600 = " \
- file://intel.cfg \
- file://0001-Add-ast2600-intel-as-a-new-board.patch \
- file://0003-ast2600-intel-layout-environment-addr.patch \
- "
-PFR_SRC_URI = " \
- file://0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch \
- "
-SRC_URI_append_intel-ast2600 += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', PFR_SRC_URI, '', d)}"
-
-do_install_append () {
- install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
- install -m 0644 ${WORKDIR}/fw_env.config ${S}/tools/env/fw_env.config
-}
-RDEPENDS_${PN} = "udev-aspeed-mtd-partitions"
+u-boot-aspeed-sdk_%.bbappend \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch b/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
deleted file mode 100644
index 6bb6d9c82..000000000
--- a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From b8f84bd39485d3977625c9a8b8e8cff5d23be56f Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Thu, 27 Feb 2014 09:05:02 +0800
-Subject: [PATCH] dbus: clear guid_from_server if send_negotiate_unix_fd
- failed
-
-Upstream-Status: Submitted
-
-bus-test dispatch test failed with below information:
- ./bus/bus-test: Running message dispatch test
- Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
- Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService'
- 6363: assertion failed "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0" file "dbus-auth.c" line 1545 function process_ok
- ./bus/bus-test(_dbus_print_backtrace+0x29) [0x80cb969]
- ./bus/bus-test(_dbus_abort+0x14) [0x80cfb44]
- ./bus/bus-test(_dbus_real_assert+0x53) [0x80b52c3]
- ./bus/bus-test() [0x80e24da]
- ./bus/bus-test(_dbus_auth_do_work+0x388) [0x80e3848]
- ./bus/bus-test() [0x80aea49]
- ./bus/bus-test() [0x80affde]
- ./bus/bus-test(_dbus_transport_handle_watch+0xb1) [0x80ad841]
- ./bus/bus-test(_dbus_connection_handle_watch+0x104) [0x8089174]
- ./bus/bus-test(dbus_watch_handle+0xd8) [0x80b15e8]
- ./bus/bus-test(_dbus_loop_iterate+0x4a9) [0x80d1509]
- ./bus/bus-test(bus_test_run_clients_loop+0x5d) [0x808129d]
- ./bus/bus-test() [0x806cab0]
- ./bus/bus-test() [0x806e0ca]
- ./bus/bus-test() [0x806da6f]
- ./bus/bus-test(_dbus_test_oom_handling+0x18c) [0x80b5c8c]
- ./bus/bus-test() [0x806f723]
- ./bus/bus-test(bus_dispatch_test+0x3c) [0x8071aac]
- ./bus/bus-test(main+0x1b7) [0x805acc7]
- /lib/libc.so.6(__libc_start_main+0xf3) [0x45f919b3]
- ./bus/bus-test() [0x805ae39]
-
-The stack is below:
- #0 0xffffe425 in __kernel_vsyscall ()
- #1 0x45fa62d6 in raise () from /lib/libc.so.6
- #2 0x45fa9653 in abort () from /lib/libc.so.6
- #3 0x080cfb65 in _dbus_abort () at dbus-sysdeps.c:94
- #4 0x080b52c3 in _dbus_real_assert (condition=0,
- condition_text=condition_text@entry=0x8117a38 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
- file=file@entry=0x8117273 "dbus-auth.c", line=line@entry=1545,
- func=func@entry=0x8117f8e <__FUNCTION__.3492> "process_ok")
- data=0x8157290) at dbus-connection.c:1515
- #0 0x00000033fee353e9 in raise () from /lib64/libc.so.6
- #1 0x00000033fee38508 in abort () from /lib64/libc.so.6
- #2 0x000000000047d585 in _dbus_abort () at dbus-sysdeps.c:94
- #3 0x0000000000466486 in _dbus_real_assert (condition=<optimized out>,
- condition_text=condition_text@entry=0x4c2988 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
- file=file@entry=0x4c21a5 "dbus-auth.c", line=line@entry=1546,
- func=func@entry=0x4c2fce <__FUNCTION__.3845> "process_ok")
- at dbus-internals.c:931
- #4 0x000000000048d424 in process_ok (args_from_ok=0x7fffffffe480,
- auth=0x6ff340) at dbus-auth.c:1546
- #5 handle_client_state_waiting_for_data (auth=0x6ff340,
- command=<optimized out>, args=0x7fffffffe480) at dbus-auth.c:1996
- #6 0x000000000048e789 in process_command (auth=0x6ff340) at dbus-auth.c:2208
- #7 _dbus_auth_do_work (auth=0x6ff340) at dbus-auth.c:2458
- #8 0x000000000046091d in do_authentication (
- transport=transport@entry=0x6ffaa0, do_reading=do_reading@entry=1,
- do_writing=do_writing@entry=0,
- auth_completed=auth_completed@entry=0x7fffffffe55c)
- at dbus-transport-socket.c:442
- #9 0x0000000000461d08 in socket_handle_watch (transport=0x6ffaa0,
- watch=0x6f4190, flags=1) at dbus-transport-socket.c:921
- #10 0x000000000045fa3a in _dbus_transport_handle_watch (transport=0x6ffaa0,
-
-Once send_negotiate_unix_fd failed, this failure will happen, since
-auth->guid_from_server has been set to some value before
-send_negotiate_unix_fd. send_negotiate_unix_fd failure will lead to
-this auth be handled by process_ok again, but this auth->guid_from_server
-is not zero.
-
-So we should clear auth->guid_from_server if send_negotiate_unix_fd failed
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- dbus/dbus-auth.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
-index d2c37a7..37b45c6 100644
---- a/dbus/dbus-auth.c
-+++ b/dbus/dbus-auth.c
-@@ -1571,8 +1571,13 @@ process_ok(DBusAuth *auth,
- _dbus_verbose ("Got GUID '%s' from the server\n",
- _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server));
-
-- if (auth->unix_fd_possible)
-- return send_negotiate_unix_fd(auth);
-+ if (auth->unix_fd_possible) {
-+ if (!send_negotiate_unix_fd(auth)) {
-+ _dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0);
-+ return FALSE;
-+ }
-+ return TRUE;
-+ }
-
- _dbus_verbose("Not negotiating unix fd passing, since not possible\n");
- return send_begin (auth);
---
-1.7.10.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/dbus-1.init b/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/dbus-1.init
deleted file mode 100644
index 90e167e57..000000000
--- a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/dbus-1.init
+++ /dev/null
@@ -1,123 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: dbus
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 1
-# Short-Description: D-Bus systemwide message bus
-# Description: D-Bus is a simple interprocess messaging system, used
-# for sending messages between applications.
-### END INIT INFO
-#
-# -*- coding: utf-8 -*-
-# Debian init.d script for D-BUS
-# Copyright © 2003 Colin Walters <walters@debian.org>
-
-# set -e
-
-# Source function library.
-. /etc/init.d/functions
-
-DAEMON=@bindir@/dbus-daemon
-NAME=dbus
-DAEMONUSER=messagebus # must match /usr/share/dbus-1/system.conf
-PIDFILE=/var/run/dbus/pid # must match /usr/share/dbus-1/system.conf
-UUIDDIR=/var/lib/dbus
-DESC="system message bus"
-EVENTDIR=/etc/dbus-1/event.d
-
-test -x $DAEMON || exit 0
-
-# Source defaults file; edit that file to configure this script.
-ENABLED=1
-PARAMS=""
-if [ -e /etc/default/dbus ]; then
- . /etc/default/dbus
-fi
-
-test "$ENABLED" != "0" || exit 0
-
-start_it_up()
-{
- mkdir -p "`dirname $PIDFILE`"
- if [ -e $PIDFILE ]; then
- PIDDIR=/proc/$(cat $PIDFILE)
- if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
- echo "$DESC already started; not starting."
- else
- echo "Removing stale PID file $PIDFILE."
- rm -f $PIDFILE
- fi
- fi
-
- if [ ! -d $UUIDDIR ]; then
- mkdir -p $UUIDDIR
- chown $DAEMONUSER $UUIDDIR
- chgrp $DAEMONUSER $UUIDDIR
- fi
-
- dbus-uuidgen --ensure
-
- echo -n "Starting $DESC: "
- start-stop-daemon -o --start --quiet --pidfile $PIDFILE \
- --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
- echo "$NAME."
- if [ -d $EVENTDIR ]; then
- run-parts --arg=start $EVENTDIR
- fi
-}
-
-shut_it_down()
-{
- if [ -d $EVENTDIR ]; then
- # TODO: --reverse when busybox supports it
- run-parts --arg=stop $EVENTDIR
- fi
- echo -n "Stopping $DESC: "
- start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \
- --user $DAEMONUSER
- # We no longer include these arguments so that start-stop-daemon
- # can do its job even given that we may have been upgraded.
- # We rely on the pidfile being sanely managed
- # --exec $DAEMON -- --system $PARAMS
- echo "$NAME."
- rm -f $PIDFILE
-}
-
-reload_it()
-{
- echo -n "Reloading $DESC config: "
- dbus-send --print-reply --system --type=method_call \
- --dest=org.freedesktop.DBus \
- / org.freedesktop.DBus.ReloadConfig > /dev/null
- # hopefully this is enough time for dbus to reload it's config file.
- echo "done."
-}
-
-case "$1" in
- start)
- start_it_up
- ;;
- stop)
- shut_it_down
- ;;
- status)
- status $DAEMON
- exit $?
- ;;
- reload|force-reload)
- reload_it
- ;;
- restart)
- shut_it_down
- sleep 1
- start_it_up
- ;;
- *)
- echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|reload|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/tmpdir.patch b/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/tmpdir.patch
deleted file mode 100644
index bf086e178..000000000
--- a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus/tmpdir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 23 Jun 2011 13:52:09 +0200
-Subject: [PATCH] buildsys: hardcode socketdir to /tmp
-
-the TMPDIR env var isn't always pointing to the right target path
-
-Upstream-Status: Inappropriate [embedded]
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
-Original comment:
-
- avoid to check tmp dir at build time. instead uses hard coded /tmp here
- comment added by Kevin Tian <kevin.tian@intel.com>
----
- configure.ac | 11 +----------
- 1 files changed, 1 insertions(+), 10 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 408054b..6d26180 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1483,16 +1483,7 @@ AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
- AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY",
- [Full path to the launch helper test program in the builddir])
-
--#### Find socket directories
--if ! test -z "$TMPDIR" ; then
-- DEFAULT_SOCKET_DIR=$TMPDIR
--elif ! test -z "$TEMP" ; then
-- DEFAULT_SOCKET_DIR=$TEMP
--elif ! test -z "$TMP" ; then
-- DEFAULT_SOCKET_DIR=$TMP
--else
-- DEFAULT_SOCKET_DIR=/tmp
--fi
-+DEFAULT_SOCKET_DIR=/tmp
-
- DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'`
-
---
-1.6.6.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus_%.bbappend
deleted file mode 100644
index 288c80f06..000000000
--- a/meta-openbmc-mods/meta-common/recipes-core/dbus/dbus_%.bbappend
+++ /dev/null
@@ -1,11 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-PV = "1.12.18"
-
-SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://dbus-1.init \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- "
-SRC_URI[md5sum] = "4ca570c281be35d0b30ab83436712242"
-SRC_URI[sha256sum] = "64cf4d70840230e5e9bc784d153880775ab3db19d656ead8a0cb9c0ab5a95306"
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 ead001a7c..38426e81d 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 = "eba19a3b122a39ef2b5dbda49b418a202f78a48d"
+SRCREV = "9f5b47a5844023719b84855cb6c554271c95ee4a"
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 d1aa797a1..628352f2c 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
@@ -2,4 +2,4 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PF
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
EXTRA_OECMAKE += "-DUSING_ENTITY_MANAGER_DECORATORS=OFF"
SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git"
-SRCREV = "01fbd0176c403feb29bf2a9ddd17469d0a27c3ef"
+SRCREV = "fb9f1aa1ea3c944fbba17b51ab26264af1c67a25"
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend
index 5e3751ded..6d16fe190 100644
--- a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend
@@ -1,8 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI = "git://github.com/openbmc/sdbusplus.git;nobranch=1"
-SRCREV = "95874d930f0bcc8390cd47ab3bb1e5e46db45278"
SRC_URI += " \
file://0001-Revert-server-Check-return-code-for-sd_bus_add_objec.patch \
"
-
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
index f42119baa..7172e7a00 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 = "2b6d595e3ea89597b3bebbf545eb7d3c0a1224a8"
+SRCREV = "d0bc9c46e217fd923ccad4719d8701b25e3c0523"
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0003-Fix-keyboard-and-mouse-input-events-dropping-issue.patch b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0003-Fix-keyboard-and-mouse-input-events-dropping-issue.patch
deleted file mode 100644
index 43600ac8a..000000000
--- a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0003-Fix-keyboard-and-mouse-input-events-dropping-issue.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 0c0b7b5da551c99161bda98820a529ba29cbaac1 Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
-Date: Wed, 21 Aug 2019 16:52:30 -0700
-Subject: [PATCH] Fix keyboard and mouse input events dropping issue
-
-Restarting of HID input devices causes input events dropping issue
-which is critical for BMC KVM uses. For an example, user can't enter
-to BIOS by doing keep pressing 'F2' or 'Del' key because of this issue.
-
-To fix the issue, this commit removes the input device restarting
-logic and refines error log journaling logic using errno checking.
-
-Tested:
- 1. Open BMCweb -> Server control -> KVM.
- 2. Make a host reset and keep pressing 'F2' key.
- 3. Was able to enter to BIOS using the key press.
-
-Change-Id: Iec1bfad1d9e5825858844cab658bbfa3e6bc24f6
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
----
- ikvm_input.cpp | 58 +++++++---------------------------------------------------
- ikvm_input.hpp | 4 ----
- ikvm_video.cpp | 3 +--
- 3 files changed, 8 insertions(+), 57 deletions(-)
-
-diff --git a/ikvm_input.cpp b/ikvm_input.cpp
-index d95e6313f62c..df12f2715585 100644
---- a/ikvm_input.cpp
-+++ b/ikvm_input.cpp
-@@ -23,9 +23,9 @@ using namespace phosphor::logging;
- using namespace sdbusplus::xyz::openbmc_project::Common::File::Error;
-
- Input::Input(const std::string& kbdPath, const std::string& ptrPath) :
-- pointerError(false), sendKeyboard(false), sendPointer(false),
-- keyboardFd(-1), pointerFd(-1), keyboardReport{0}, pointerReport{0},
-- keyboardPath(kbdPath), pointerPath(ptrPath)
-+ sendKeyboard(false), sendPointer(false), keyboardFd(-1), pointerFd(-1),
-+ keyboardReport{0}, pointerReport{0}, keyboardPath(kbdPath),
-+ pointerPath(ptrPath)
- {
- if (!keyboardPath.empty())
- {
-@@ -156,36 +156,6 @@ void Input::pointerEvent(int buttonMask, int x, int y, rfbClientPtr cl)
- rfbDefaultPtrAddEvent(buttonMask, x, y, cl);
- }
-
--void Input::restart()
--{
-- if (!keyboardPath.empty() && keyboardFd < 0)
-- {
-- keyboardFd = open(keyboardPath.c_str(), O_RDWR | O_CLOEXEC);
-- if (keyboardFd < 0)
-- {
-- log<level::ERR>("Failed to open input device",
-- entry("PATH=%s", keyboardPath.c_str()),
-- entry("ERROR=%s", strerror(errno)));
-- }
--
-- sendKeyboard = false;
-- }
--
-- if (!pointerPath.empty() && pointerFd < 0)
-- {
-- pointerFd = open(pointerPath.c_str(), O_RDWR | O_CLOEXEC | O_NONBLOCK);
-- if (pointerFd < 0)
-- {
-- log<level::ERR>("Failed to open input device",
-- entry("PATH=%s", pointerPath.c_str()),
-- entry("ERROR=%s", strerror(errno)));
-- }
--
-- pointerError = false;
-- sendPointer = false;
-- }
--}
--
- void Input::sendWakeupPacket()
- {
- uint8_t wakeupReport[KEY_REPORT_LENGTH] = {0};
-@@ -459,13 +429,10 @@ bool Input::writeKeyboard(const uint8_t *report)
- {
- if (write(keyboardFd, report, KEY_REPORT_LENGTH) != KEY_REPORT_LENGTH)
- {
-- log<level::ERR>("Failed to write keyboard report",
-- entry("ERROR=%s", strerror(errno)));
--
-- if (errno == ESHUTDOWN)
-+ if (errno != ESHUTDOWN && errno != EAGAIN)
- {
-- close(keyboardFd);
-- keyboardFd = -1;
-+ log<level::ERR>("Failed to write keyboard report",
-+ entry("ERROR=%s", strerror(errno)));
- }
-
- return false;
-@@ -478,23 +445,12 @@ void Input::writePointer(const uint8_t *report)
- {
- if (write(pointerFd, report, PTR_REPORT_LENGTH) != PTR_REPORT_LENGTH)
- {
-- if (!pointerError)
-+ if (errno != ESHUTDOWN && errno != EAGAIN)
- {
- log<level::ERR>("Failed to write pointer report",
- entry("ERROR=%s", strerror(errno)));
-- pointerError = true;
-- }
--
-- if (errno == ESHUTDOWN)
-- {
-- close(pointerFd);
-- pointerFd = -1;
- }
- }
-- else
-- {
-- pointerError = false;
-- }
- }
-
- } // namespace ikvm
-diff --git a/ikvm_input.hpp b/ikvm_input.hpp
-index 953333263e2d..2adc7c106755 100644
---- a/ikvm_input.hpp
-+++ b/ikvm_input.hpp
-@@ -48,8 +48,6 @@ class Input
- */
- static void pointerEvent(int buttonMask, int x, int y, rfbClientPtr cl);
-
-- /* @brief Re-opens USB device in case the endpoint shutdown */
-- void restart();
- /* @brief Sends a wakeup data packet to the USB input device */
- void sendWakeupPacket();
- /* @brief Sends an HID report to the USB input device */
-@@ -90,8 +88,6 @@ class Input
- bool writeKeyboard(const uint8_t *report);
- void writePointer(const uint8_t *report);
-
-- /* @brief Indicates whether or not a pointer report error has occurred */
-- bool pointerError;
- /* @brief Indicates whether or not to send a keyboard report */
- bool sendKeyboard;
- /* @brief Indicates whether or not to send a pointer report */
-diff --git a/ikvm_video.cpp b/ikvm_video.cpp
-index 6a5aa6c10927..7bd4b4eb6c98 100644
---- a/ikvm_video.cpp
-+++ b/ikvm_video.cpp
-@@ -163,10 +163,9 @@ bool Video::needsResize()
- restart();
- return false;
- }
-- else if (timingsError)
-+ else
- {
- timingsError = false;
-- input.restart();
- }
-
- if (timings.bt.width != width || timings.bt.height != height)
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0004-Connect-HID-gadget-device-dynamically.patch b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0004-Connect-HID-gadget-device-dynamically.patch
deleted file mode 100644
index 0fe93c604..000000000
--- a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0004-Connect-HID-gadget-device-dynamically.patch
+++ /dev/null
@@ -1,494 +0,0 @@
-From 9a0f78ab773b33fd0445b23358097ddcd175a58f Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Wed, 22 Jul 2020 23:39:18 -0700
-Subject: [PATCH] Connect HID gadget device dynamically
-
-Connecting HID gadget device statically from the beginning of this
-service causes an issue on WHLK test. To prevent the issue, this
-commit changes the HID gadget device handling as dynamic so that
-the HID gadget device can be connected when this service has at
-least one KVM client.
-
-Tested: /dev/hidg0 and /dev/hidg1 created only when at least one
-KVM client is connected.
-
-Change-Id: I5f6596b9e4e297fb6b507000499fc041460659f7
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- create_usbhid.sh | 278 ++++++++++++++++++++++++--------------------
- ikvm_input.cpp | 64 +++++++++-
- ikvm_input.hpp | 14 +++
- ikvm_server.cpp | 2 +
- start-ipkvm.service | 2 +-
- 5 files changed, 230 insertions(+), 130 deletions(-)
-
-diff --git a/create_usbhid.sh b/create_usbhid.sh
-index 656299102d7f..d1fa4e036bbe 100644
---- a/create_usbhid.sh
-+++ b/create_usbhid.sh
-@@ -1,135 +1,157 @@
- #!/bin/sh
-
--new_directory="/sys/kernel/config/usb_gadget/obmc_hid"
-+hid_conf_directory="/sys/kernel/config/usb_gadget/obmc_hid"
-+dev_name="1e6a0000.usb-vhub"
-
--if [ -e "${new_directory}" ]; then
-- exit 0
--fi
-+create_hid() {
-+ # create gadget
-+ mkdir "${hid_conf_directory}"
-+ cd "${hid_conf_directory}"
-+
-+ # add basic information
-+ echo 0x0100 > bcdDevice
-+ echo 0x0200 > bcdUSB
-+ echo 0x0104 > idProduct # Multifunction Composite Gadget
-+ echo 0x1d6b > idVendor # Linux Foundation
-+
-+ # create English locale
-+ mkdir strings/0x409
-+
-+ echo "OpenBMC" > strings/0x409/manufacturer
-+ echo "virtual_input" > strings/0x409/product
-+ echo "OBMC0001" > strings/0x409/serialnumber
-+
-+ # Create HID keyboard function
-+ mkdir functions/hid.0
-+
-+ echo 1 > functions/hid.0/protocol # 1: keyboard
-+ echo 8 > functions/hid.0/report_length
-+ echo 1 > functions/hid.0/subclass
-+
-+ # Binary HID keyboard descriptor
-+ # 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
-+ # 0x09, 0x06, // USAGE (Keyboard)
-+ # 0xa1, 0x01, // COLLECTION (Application)
-+ # 0x05, 0x07, // USAGE_PAGE (Keyboard)
-+ # 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
-+ # 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
-+ # 0x15, 0x00, // LOGICAL_MINIMUM (0)
-+ # 0x25, 0x01, // LOGICAL_MAXIMUM (1)
-+ # 0x75, 0x01, // REPORT_SIZE (1)
-+ # 0x95, 0x08, // REPORT_COUNT (8)
-+ # 0x81, 0x02, // INPUT (Data,Var,Abs)
-+ # 0x95, 0x01, // REPORT_COUNT (1)
-+ # 0x75, 0x08, // REPORT_SIZE (8)
-+ # 0x81, 0x03, // INPUT (Data,Var,Abs)
-+ # 0x95, 0x05, // REPORT_COUNT (5)
-+ # 0x75, 0x01, // REPORT_SIZE (1)
-+ # 0x05, 0x08, // USAGE_PAGE (LEDs)
-+ # 0x19, 0x01, // USAGE_MINIMUM (Num Lock)
-+ # 0x29, 0x05, // USAGE_MAXIMUM (Kana)
-+ # 0x91, 0x02, // OUTPUT (Data,Var,Abs)
-+ # 0x95, 0x01, // REPORT_COUNT (1)
-+ # 0x75, 0x03, // REPORT_SIZE (3)
-+ # 0x91, 0x03, // OUTPUT (Cnst,Var,Abs)
-+ # 0x95, 0x06, // REPORT_COUNT (6)
-+ # 0x75, 0x08, // REPORT_SIZE (8)
-+ # 0x15, 0x00, // LOGICAL_MINIMUM (0)
-+ # 0x25, 0x65, // LOGICAL_MAXIMUM (101)
-+ # 0x05, 0x07, // USAGE_PAGE (Keyboard)
-+ # 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
-+ # 0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application)
-+ # 0x81, 0x00, // INPUT (Data,Ary,Abs)
-+ # 0xc0 // END_COLLECTION
-+ echo -ne '\x05\x01\x09\x06\xa1\x01\x05\x07\x19\xe0\x29\xe7\x15\x00\x25\x01\x75\x01\x95\x08\x81\x02\x95\x01\x75\x08\x81\x03\x95\x05\x75\x01\x05\x08\x19\x01\x29\x05\x91\x02\x95\x01\x75\x03\x91\x03\x95\x06\x75\x08\x15\x00\x25\x65\x05\x07\x19\x00\x29\x65\x81\x00\xc0' > functions/hid.0/report_desc
-+
-+ # Create HID mouse function
-+ mkdir functions/hid.1
-+
-+ echo 2 > functions/hid.1/protocol # 2: mouse
-+ echo 5 > functions/hid.1/report_length
-+ echo 1 > functions/hid.1/subclass
-+
-+ # Binary HID mouse descriptor (absolute coordinate)
-+ # 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
-+ # 0x09, 0x02, // USAGE (Mouse)
-+ # 0xa1, 0x01, // COLLECTION (Application)
-+ # 0x09, 0x01, // USAGE (Pointer)
-+ # 0xa1, 0x00, // COLLECTION (Physical)
-+ # 0x05, 0x09, // USAGE_PAGE (Button)
-+ # 0x19, 0x01, // USAGE_MINIMUM (Button 1)
-+ # 0x29, 0x03, // USAGE_MAXIMUM (Button 3)
-+ # 0x15, 0x00, // LOGICAL_MINIMUM (0)
-+ # 0x25, 0x01, // LOGICAL_MAXIMUM (1)
-+ # 0x95, 0x03, // REPORT_COUNT (3)
-+ # 0x75, 0x01, // REPORT_SIZE (1)
-+ # 0x81, 0x02, // INPUT (Data,Var,Abs)
-+ # 0x95, 0x01, // REPORT_COUNT (1)
-+ # 0x75, 0x05, // REPORT_SIZE (5)
-+ # 0x81, 0x03, // INPUT (Cnst,Var,Abs)
-+ # 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
-+ # 0x09, 0x30, // USAGE (X)
-+ # 0x09, 0x31, // USAGE (Y)
-+ # 0x35, 0x00, // PHYSICAL_MINIMUM (0)
-+ # 0x46, 0xff, 0x7f, // PHYSICAL_MAXIMUM (32767)
-+ # 0x15, 0x00, // LOGICAL_MINIMUM (0)
-+ # 0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767)
-+ # 0x65, 0x11, // UNIT (SI Lin:Distance)
-+ # 0x55, 0x00, // UNIT_EXPONENT (0)
-+ # 0x75, 0x10, // REPORT_SIZE (16)
-+ # 0x95, 0x02, // REPORT_COUNT (2)
-+ # 0x81, 0x02, // INPUT (Data,Var,Abs)
-+ # 0xc0, // END_COLLECTION
-+ # 0xc0 // END_COLLECTION
-+ echo -ne '\x05\x01\x09\x02\xa1\x01\x09\x01\xa1\x00\x05\x09\x19\x01\x29\x03\x15\x00\x25\x01\x95\x03\x75\x01\x81\x02\x95\x01\x75\x05\x81\x03\x05\x01\x09\x30\x09\x31\x35\x00\x46\xff\x7f\x15\x00\x26\xff\x7f\x65\x11\x55\x00\x75\x10\x95\x02\x81\x02\xc0\xc0' > functions/hid.1/report_desc
-+
-+ # Create configuration
-+ mkdir configs/c.1
-+ mkdir configs/c.1/strings/0x409
-+
-+ echo 0x80 > configs/c.1/bmAttributes
-+ echo 200 > configs/c.1/MaxPower
-+ echo "" > configs/c.1/strings/0x409/configuration
-+
-+ # Link HID functions to configuration
-+ ln -s functions/hid.0 configs/c.1
-+ ln -s functions/hid.1 configs/c.1
-+}
-+
-+connect_hid() {
-+ if ! [[ `cat UDC` =~ "${dev_name}:p" ]]; then
-+ i=0
-+ num_ports=5
-+ base_usb_dir="/sys/bus/platform/devices/${dev_name}/${dev_name}:p"
-+ while [ $i -lt $num_ports ]; do
-+ port=$(($i + 1))
-+ i=$port
-+ if [ ! -e "${base_usb_dir}${port}/gadget/suspended" ]; then
-+ break
-+ fi
-+ done
-+ echo "${dev_name}:p${port}" > UDC
-+ fi
-+}
-+
-+disconnect_hid() {
-+ if [[ `cat UDC` =~ "${dev_name}:p" ]]; then
-+ echo "" > UDC
-+ fi
-+}
-
--# create gadget
- original_directory="$(pwd)"
--mkdir "${new_directory}"
--cd "${new_directory}"
--
--# add basic information
--echo 0x0100 > bcdDevice
--echo 0x0200 > bcdUSB
--echo 0x0104 > idProduct # Multifunction Composite Gadget
--echo 0x1d6b > idVendor # Linux Foundation
--
--# create English locale
--mkdir strings/0x409
--
--echo "OpenBMC" > strings/0x409/manufacturer
--echo "virtual_input" > strings/0x409/product
--echo "OBMC0001" > strings/0x409/serialnumber
--
--# Create HID keyboard function
--mkdir functions/hid.0
--
--echo 1 > functions/hid.0/protocol # 1: keyboard
--echo 8 > functions/hid.0/report_length
--echo 1 > functions/hid.0/subclass
--
--# Binary HID keyboard descriptor
--# 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
--# 0x09, 0x06, // USAGE (Keyboard)
--# 0xa1, 0x01, // COLLECTION (Application)
--# 0x05, 0x07, // USAGE_PAGE (Keyboard)
--# 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
--# 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
--# 0x15, 0x00, // LOGICAL_MINIMUM (0)
--# 0x25, 0x01, // LOGICAL_MAXIMUM (1)
--# 0x75, 0x01, // REPORT_SIZE (1)
--# 0x95, 0x08, // REPORT_COUNT (8)
--# 0x81, 0x02, // INPUT (Data,Var,Abs)
--# 0x95, 0x01, // REPORT_COUNT (1)
--# 0x75, 0x08, // REPORT_SIZE (8)
--# 0x81, 0x03, // INPUT (Data,Var,Abs)
--# 0x95, 0x05, // REPORT_COUNT (5)
--# 0x75, 0x01, // REPORT_SIZE (1)
--# 0x05, 0x08, // USAGE_PAGE (LEDs)
--# 0x19, 0x01, // USAGE_MINIMUM (Num Lock)
--# 0x29, 0x05, // USAGE_MAXIMUM (Kana)
--# 0x91, 0x02, // OUTPUT (Data,Var,Abs)
--# 0x95, 0x01, // REPORT_COUNT (1)
--# 0x75, 0x03, // REPORT_SIZE (3)
--# 0x91, 0x03, // OUTPUT (Cnst,Var,Abs)
--# 0x95, 0x06, // REPORT_COUNT (6)
--# 0x75, 0x08, // REPORT_SIZE (8)
--# 0x15, 0x00, // LOGICAL_MINIMUM (0)
--# 0x25, 0x65, // LOGICAL_MAXIMUM (101)
--# 0x05, 0x07, // USAGE_PAGE (Keyboard)
--# 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
--# 0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application)
--# 0x81, 0x00, // INPUT (Data,Ary,Abs)
--# 0xc0 // END_COLLECTION
--echo -ne '\x05\x01\x09\x06\xa1\x01\x05\x07\x19\xe0\x29\xe7\x15\x00\x25\x01\x75\x01\x95\x08\x81\x02\x95\x01\x75\x08\x81\x03\x95\x05\x75\x01\x05\x08\x19\x01\x29\x05\x91\x02\x95\x01\x75\x03\x91\x03\x95\x06\x75\x08\x15\x00\x25\x65\x05\x07\x19\x00\x29\x65\x81\x00\xc0' > functions/hid.0/report_desc
--
--# Create HID mouse function
--mkdir functions/hid.1
--
--echo 2 > functions/hid.1/protocol # 2: mouse
--echo 5 > functions/hid.1/report_length
--echo 1 > functions/hid.1/subclass
--
--# Binary HID mouse descriptor (absolute coordinate)
--# 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
--# 0x09, 0x02, // USAGE (Mouse)
--# 0xa1, 0x01, // COLLECTION (Application)
--# 0x09, 0x01, // USAGE (Pointer)
--# 0xa1, 0x00, // COLLECTION (Physical)
--# 0x05, 0x09, // USAGE_PAGE (Button)
--# 0x19, 0x01, // USAGE_MINIMUM (Button 1)
--# 0x29, 0x03, // USAGE_MAXIMUM (Button 3)
--# 0x15, 0x00, // LOGICAL_MINIMUM (0)
--# 0x25, 0x01, // LOGICAL_MAXIMUM (1)
--# 0x95, 0x03, // REPORT_COUNT (3)
--# 0x75, 0x01, // REPORT_SIZE (1)
--# 0x81, 0x02, // INPUT (Data,Var,Abs)
--# 0x95, 0x01, // REPORT_COUNT (1)
--# 0x75, 0x05, // REPORT_SIZE (5)
--# 0x81, 0x03, // INPUT (Cnst,Var,Abs)
--# 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
--# 0x09, 0x30, // USAGE (X)
--# 0x09, 0x31, // USAGE (Y)
--# 0x35, 0x00, // PHYSICAL_MINIMUM (0)
--# 0x46, 0xff, 0x7f, // PHYSICAL_MAXIMUM (32767)
--# 0x15, 0x00, // LOGICAL_MINIMUM (0)
--# 0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767)
--# 0x65, 0x11, // UNIT (SI Lin:Distance)
--# 0x55, 0x00, // UNIT_EXPONENT (0)
--# 0x75, 0x10, // REPORT_SIZE (16)
--# 0x95, 0x02, // REPORT_COUNT (2)
--# 0x81, 0x02, // INPUT (Data,Var,Abs)
--# 0xc0, // END_COLLECTION
--# 0xc0 // END_COLLECTION
--echo -ne '\x05\x01\x09\x02\xa1\x01\x09\x01\xa1\x00\x05\x09\x19\x01\x29\x03\x15\x00\x25\x01\x95\x03\x75\x01\x81\x02\x95\x01\x75\x05\x81\x03\x05\x01\x09\x30\x09\x31\x35\x00\x46\xff\x7f\x15\x00\x26\xff\x7f\x65\x11\x55\x00\x75\x10\x95\x02\x81\x02\xc0\xc0' > functions/hid.1/report_desc
--
--# Create configuration
--mkdir configs/c.1
--mkdir configs/c.1/strings/0x409
--
--echo 0x80 > configs/c.1/bmAttributes
--echo 200 > configs/c.1/MaxPower
--echo "" > configs/c.1/strings/0x409/configuration
--
--# Link HID functions to configuration
--ln -s functions/hid.0 configs/c.1
--ln -s functions/hid.1 configs/c.1
--
--# Enable gadget
--dev_name="1e6a0000.usb-vhub"
--i=0
--num_ports=5
--base_usb_dir="/sys/bus/platform/devices/${dev_name}/${dev_name}:p"
--while [ $i -lt $num_ports ]; do
-- port=$(($i + 1))
-- i=$port
-- if [ ! -e "${base_usb_dir}${port}/gadget/suspended" ]; then
-- break
-- fi
--done
--echo "${dev_name}:p${port}" > UDC
-+
-+if [ ! -e "${hid_conf_directory}" ]; then
-+ create_hid
-+else
-+ cd "${hid_conf_directory}"
-+fi
-+
-+if [ "$1" = "connect" ]; then
-+ connect_hid
-+elif [ "$1" = "disconnect" ]; then
-+ disconnect_hid
-+else
-+ echo "Invalid option: $1. Use 'connect' or 'disconnect'."
-+fi
-
- cd "${original_directory}"
-diff --git a/ikvm_input.cpp b/ikvm_input.cpp
-index df12f2715585..c4cce5088461 100644
---- a/ikvm_input.cpp
-+++ b/ikvm_input.cpp
-@@ -16,6 +16,8 @@
-
- #include "scancodes.hpp"
-
-+namespace fs = std::filesystem;
-+
- namespace ikvm
- {
-
-@@ -27,6 +29,54 @@ Input::Input(const std::string& kbdPath, const std::string& ptrPath) :
- keyboardReport{0}, pointerReport{0}, keyboardPath(kbdPath),
- pointerPath(ptrPath)
- {
-+ hidUdcStream.exceptions(std::ofstream::failbit | std::ofstream::badbit);
-+ hidUdcStream.open(hidUdcPath, std::ios::out | std::ios::app);
-+}
-+
-+Input::~Input()
-+{
-+ if (keyboardFd >= 0)
-+ {
-+ close(keyboardFd);
-+ }
-+
-+ if (pointerFd >= 0)
-+ {
-+ close(pointerFd);
-+ }
-+
-+ disconnect();
-+ hidUdcStream.close();
-+}
-+
-+void Input::connect()
-+{
-+ try
-+ {
-+ for (const auto& port : fs::directory_iterator(usbVirtualHubPath))
-+ {
-+ if (fs::is_directory(port) && !fs::is_symlink(port) &&
-+ !fs::exists(port.path() / "gadget/suspended"))
-+ {
-+ const std::string portId = port.path().filename();
-+ hidUdcStream << portId << std::endl;
-+ break;
-+ }
-+ }
-+ }
-+ catch (fs::filesystem_error& e)
-+ {
-+ log<level::ERR>("Failed to search USB virtual hub port",
-+ entry("ERROR=%s", e.what()));
-+ return;
-+ }
-+ catch (std::ofstream::failure& e)
-+ {
-+ log<level::ERR>("Failed to connect HID gadget",
-+ entry("ERROR=%s", e.what()));
-+ return;
-+ }
-+
- if (!keyboardPath.empty())
- {
- keyboardFd = open(keyboardPath.c_str(), O_RDWR | O_CLOEXEC);
-@@ -56,16 +106,28 @@ Input::Input(const std::string& kbdPath, const std::string& ptrPath) :
- }
- }
-
--Input::~Input()
-+void Input::disconnect()
- {
- if (keyboardFd >= 0)
- {
- close(keyboardFd);
-+ keyboardFd = -1;
- }
-
- if (pointerFd >= 0)
- {
- close(pointerFd);
-+ pointerFd = -1;
-+ }
-+
-+ try
-+ {
-+ hidUdcStream << "" << std::endl;
-+ }
-+ catch (std::ofstream::failure& e)
-+ {
-+ log<level::ERR>("Failed to disconnect HID gadget",
-+ entry("ERROR=%s", e.what()));
- }
- }
-
-diff --git a/ikvm_input.hpp b/ikvm_input.hpp
-index 2adc7c106755..aae7cefbef6e 100644
---- a/ikvm_input.hpp
-+++ b/ikvm_input.hpp
-@@ -2,6 +2,8 @@
-
- #include <rfb/rfb.h>
-
-+#include <filesystem>
-+#include <fstream>
- #include <map>
- #include <string>
-
-@@ -29,6 +31,10 @@ class Input
- Input(Input&&) = default;
- Input& operator=(Input&&) = default;
-
-+ /* @brief Connects HID gadget to host */
-+ void connect();
-+ /* @brief Disconnects HID gadget from host */
-+ void disconnect();
- /*
- * @brief RFB client key event handler
- *
-@@ -72,6 +78,12 @@ class Input
- 0x04, // left alt
- 0x40 // right alt
- };
-+ /* @brief Path to the HID gadget UDC */
-+ static constexpr const char* hidUdcPath =
-+ "/sys/kernel/config/usb_gadget/obmc_hid/UDC";
-+ /* @brief Path to the USB virtual hub */
-+ static constexpr const char* usbVirtualHubPath =
-+ "/sys/bus/platform/devices/1e6a0000.usb-vhub";
- /*
- * @brief Translates a RFB-specific key code to HID modifier bit
- *
-@@ -109,6 +121,8 @@ class Input
- * of which keys are down
- */
- std::map<int, int> keysDown;
-+ /* @brief Handle of the HID gadget UDC */
-+ std::ofstream hidUdcStream;
- };
-
- } // namespace ikvm
-diff --git a/ikvm_server.cpp b/ikvm_server.cpp
-index ebeaef049d04..1c2e981b7a72 100644
---- a/ikvm_server.cpp
-+++ b/ikvm_server.cpp
-@@ -178,6 +178,7 @@ void Server::clientGone(rfbClientPtr cl)
-
- if (server->numClients-- == 1)
- {
-+ server->input.disconnect();
- rfbMarkRectAsModified(server->server, 0, 0, server->video.getWidth(),
- server->video.getHeight());
- }
-@@ -193,6 +194,7 @@ enum rfbNewClientAction Server::newClient(rfbClientPtr cl)
- cl->clientFramebufferUpdateRequestHook = clientFramebufferUpdateRequest;
- if (!server->numClients++)
- {
-+ server->input.connect();
- server->pendingResize = false;
- server->frameCounter = 0;
- }
-diff --git a/start-ipkvm.service b/start-ipkvm.service
-index 5f945b329a26..60234b231da3 100644
---- a/start-ipkvm.service
-+++ b/start-ipkvm.service
-@@ -4,7 +4,7 @@ ConditionPathIsMountPoint=/sys/kernel/config
-
- [Service]
- Restart=always
--ExecStartPre=/usr/bin/create_usbhid.sh
-+ExecStartPre=/usr/bin/create_usbhid.sh disconnect
- ExecStart=/usr/bin/obmc-ikvm -v /dev/video0 -k /dev/hidg0 -p /dev/hidg1
-
- [Install]
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0005-Refine-HID-report-writing-logic.patch b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0005-Refine-HID-report-writing-logic.patch
deleted file mode 100644
index 5293f3f27..000000000
--- a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm/0005-Refine-HID-report-writing-logic.patch
+++ /dev/null
@@ -1,295 +0,0 @@
-From 68885eb4d056b8343c567c48ece7e875feb28fc0 Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Thu, 30 Jul 2020 00:29:19 -0700
-Subject: [PATCH] Refine HID report writing logic
-
-Blocking write on the keyboard HID device causes screen freezing
-during turning off the host power. To fix this issue, this commit
-refines the logic using non-blocking write. As a side effect,
-non-blocking write introduces event dropping when kernel HID driver
-returns -EAGAIN when the driver is in busy state so this commit also
-adds retry logic to cover the case.
-
-Tested: Didn't see the screen freezing issue.
-
-Change-Id: Ibd95f567c49f448cd053948c14c006de17c52420
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- ikvm_input.cpp | 106 ++++++++++++++++++++++++++++++++----------------
- ikvm_input.hpp | 13 +++---
- ikvm_server.cpp | 2 -
- 3 files changed, 79 insertions(+), 42 deletions(-)
-
-diff --git a/ikvm_input.cpp b/ikvm_input.cpp
-index c4cce5088461..480db3c094bc 100644
---- a/ikvm_input.cpp
-+++ b/ikvm_input.cpp
-@@ -25,9 +25,8 @@ using namespace phosphor::logging;
- using namespace sdbusplus::xyz::openbmc_project::Common::File::Error;
-
- Input::Input(const std::string& kbdPath, const std::string& ptrPath) :
-- sendKeyboard(false), sendPointer(false), keyboardFd(-1), pointerFd(-1),
-- keyboardReport{0}, pointerReport{0}, keyboardPath(kbdPath),
-- pointerPath(ptrPath)
-+ keyboardFd(-1), pointerFd(-1), keyboardReport{0}, pointerReport{0},
-+ keyboardPath(kbdPath), pointerPath(ptrPath)
- {
- hidUdcStream.exceptions(std::ofstream::failbit | std::ofstream::badbit);
- hidUdcStream.open(hidUdcPath, std::ios::out | std::ios::app);
-@@ -79,7 +78,8 @@ void Input::connect()
-
- if (!keyboardPath.empty())
- {
-- keyboardFd = open(keyboardPath.c_str(), O_RDWR | O_CLOEXEC);
-+ keyboardFd = open(keyboardPath.c_str(),
-+ O_RDWR | O_CLOEXEC | O_NONBLOCK);
- if (keyboardFd < 0)
- {
- log<level::ERR>("Failed to open input device",
-@@ -135,6 +135,12 @@ void Input::keyEvent(rfbBool down, rfbKeySym key, rfbClientPtr cl)
- {
- Server::ClientData* cd = (Server::ClientData*)cl->clientData;
- Input* input = cd->input;
-+ bool sendKeyboard = false;
-+
-+ if (input->keyboardFd < 0)
-+ {
-+ return;
-+ }
-
- if (down)
- {
-@@ -150,7 +156,7 @@ void Input::keyEvent(rfbBool down, rfbKeySym key, rfbClientPtr cl)
- {
- input->keyboardReport[i] = sc;
- input->keysDown.insert(std::make_pair(key, i));
-- input->sendKeyboard = true;
-+ sendKeyboard = true;
- break;
- }
- }
-@@ -163,7 +169,7 @@ void Input::keyEvent(rfbBool down, rfbKeySym key, rfbClientPtr cl)
- if (mod)
- {
- input->keyboardReport[0] |= mod;
-- input->sendKeyboard = true;
-+ sendKeyboard = true;
- }
- }
- }
-@@ -175,7 +181,7 @@ void Input::keyEvent(rfbBool down, rfbKeySym key, rfbClientPtr cl)
- {
- input->keyboardReport[it->second] = 0;
- input->keysDown.erase(it);
-- input->sendKeyboard = true;
-+ sendKeyboard = true;
- }
- else
- {
-@@ -184,10 +190,15 @@ void Input::keyEvent(rfbBool down, rfbKeySym key, rfbClientPtr cl)
- if (mod)
- {
- input->keyboardReport[0] &= ~mod;
-- input->sendKeyboard = true;
-+ sendKeyboard = true;
- }
- }
- }
-+
-+ if (sendKeyboard)
-+ {
-+ input->writeKeyboard(input->keyboardReport);
-+ }
- }
-
- void Input::pointerEvent(int buttonMask, int x, int y, rfbClientPtr cl)
-@@ -197,6 +208,11 @@ void Input::pointerEvent(int buttonMask, int x, int y, rfbClientPtr cl)
- Server* server = (Server*)cl->screen->screenData;
- const Video& video = server->getVideo();
-
-+ if (input->pointerFd < 0)
-+ {
-+ return;
-+ }
-+
- input->pointerReport[0] = ((buttonMask & 0x4) >> 1) |
- ((buttonMask & 0x2) << 1) | (buttonMask & 0x1);
-
-@@ -214,8 +230,8 @@ void Input::pointerEvent(int buttonMask, int x, int y, rfbClientPtr cl)
- memcpy(&input->pointerReport[3], &yy, 2);
- }
-
-- input->sendPointer = true;
- rfbDefaultPtrAddEvent(buttonMask, x, y, cl);
-+ input->writePointer(input->pointerReport);
- }
-
- void Input::sendWakeupPacket()
-@@ -249,23 +265,6 @@ void Input::sendWakeupPacket()
- }
- }
-
--void Input::sendReport()
--{
-- if (sendKeyboard && keyboardFd >= 0)
-- {
-- writeKeyboard(keyboardReport);
--
-- sendKeyboard = false;
-- }
--
-- if (sendPointer && pointerFd >= 0)
-- {
-- writePointer(pointerReport);
--
-- sendPointer = false;
-- }
--}
--
- uint8_t Input::keyToMod(rfbKeySym key)
- {
- uint8_t mod = 0;
-@@ -489,14 +488,35 @@ uint8_t Input::keyToScancode(rfbKeySym key)
-
- bool Input::writeKeyboard(const uint8_t *report)
- {
-- if (write(keyboardFd, report, KEY_REPORT_LENGTH) != KEY_REPORT_LENGTH)
-+ std::unique_lock<std::mutex> lk(keyMutex);
-+ uint retryCount = HID_REPORT_RETRY_MAX;
-+
-+ while (retryCount > 0)
- {
-- if (errno != ESHUTDOWN && errno != EAGAIN)
-+ if (write(keyboardFd, report, KEY_REPORT_LENGTH) == KEY_REPORT_LENGTH)
- {
-- log<level::ERR>("Failed to write keyboard report",
-- entry("ERROR=%s", strerror(errno)));
-+ break;
-+ }
-+
-+ if (errno != EAGAIN)
-+ {
-+ if (errno != ESHUTDOWN)
-+ {
-+ log<level::ERR>("Failed to write keyboard report",
-+ entry("ERROR=%s", strerror(errno)));
-+ }
-+
-+ break;
- }
-
-+ lk.unlock();
-+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
-+ lk.lock();
-+ retryCount--;
-+ }
-+
-+ if (!retryCount || errno)
-+ {
- return false;
- }
-
-@@ -505,13 +525,31 @@ bool Input::writeKeyboard(const uint8_t *report)
-
- void Input::writePointer(const uint8_t *report)
- {
-- if (write(pointerFd, report, PTR_REPORT_LENGTH) != PTR_REPORT_LENGTH)
-+ std::unique_lock<std::mutex> lk(ptrMutex);
-+ uint retryCount = HID_REPORT_RETRY_MAX;
-+
-+ while (retryCount > 0)
- {
-- if (errno != ESHUTDOWN && errno != EAGAIN)
-+ if (write(pointerFd, report, PTR_REPORT_LENGTH) == PTR_REPORT_LENGTH)
- {
-- log<level::ERR>("Failed to write pointer report",
-- entry("ERROR=%s", strerror(errno)));
-+ break;
-+ }
-+
-+ if (errno != EAGAIN)
-+ {
-+ if (errno != ESHUTDOWN)
-+ {
-+ log<level::ERR>("Failed to write pointer report",
-+ entry("ERROR=%s", strerror(errno)));
-+ }
-+
-+ break;
- }
-+
-+ lk.unlock();
-+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
-+ lk.lock();
-+ retryCount--;
- }
- }
-
-diff --git a/ikvm_input.hpp b/ikvm_input.hpp
-index aae7cefbef6e..558251d673cc 100644
---- a/ikvm_input.hpp
-+++ b/ikvm_input.hpp
-@@ -5,6 +5,7 @@
- #include <filesystem>
- #include <fstream>
- #include <map>
-+#include <mutex>
- #include <string>
-
- namespace ikvm
-@@ -56,8 +57,6 @@ class Input
-
- /* @brief Sends a wakeup data packet to the USB input device */
- void sendWakeupPacket();
-- /* @brief Sends an HID report to the USB input device */
-- void sendReport();
-
- private:
- static constexpr int NUM_MODIFIER_BITS = 4;
-@@ -84,6 +83,8 @@ class Input
- /* @brief Path to the USB virtual hub */
- static constexpr const char* usbVirtualHubPath =
- "/sys/bus/platform/devices/1e6a0000.usb-vhub";
-+ /* @brief Retry limit for writing an HID report */
-+ static constexpr int HID_REPORT_RETRY_MAX = 5;
- /*
- * @brief Translates a RFB-specific key code to HID modifier bit
- *
-@@ -100,10 +101,6 @@ class Input
- bool writeKeyboard(const uint8_t *report);
- void writePointer(const uint8_t *report);
-
-- /* @brief Indicates whether or not to send a keyboard report */
-- bool sendKeyboard;
-- /* @brief Indicates whether or not to send a pointer report */
-- bool sendPointer;
- /* @brief File descriptor for the USB keyboard device */
- int keyboardFd;
- /* @brief File descriptor for the USB mouse device */
-@@ -123,6 +120,10 @@ class Input
- std::map<int, int> keysDown;
- /* @brief Handle of the HID gadget UDC */
- std::ofstream hidUdcStream;
-+ /* @brief Mutex for sending keyboard reports */
-+ std::mutex keyMutex;
-+ /* @brief Mutex for sending pointer reports */
-+ std::mutex ptrMutex;
- };
-
- } // namespace ikvm
-diff --git a/ikvm_server.cpp b/ikvm_server.cpp
-index 0736d1f55f73..7be99e4379d1 100644
---- a/ikvm_server.cpp
-+++ b/ikvm_server.cpp
-@@ -79,8 +79,6 @@ void Server::run()
-
- if (server->clientHead)
- {
-- input.sendReport();
--
- frameCounter++;
- if (pendingResize && frameCounter > video.getFrameRate())
- {
---
-2.17.1
-
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 9ea9e1a4e..0d2c589ae 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,10 +1,4 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
#SRC_URI = "git://github.com/openbmc/obmc-ikvm"
-SRCREV = "861337e8ec92767c4c88237ec5db494a2a67fa8d"
-
-SRC_URI += " \
- file://0003-Fix-keyboard-and-mouse-input-events-dropping-issue.patch \
- file://0004-Connect-HID-gadget-device-dynamically.patch \
- file://0005-Refine-HID-report-writing-logic.patch \
- "
+SRCREV = "673ac2eb1117a7d692460f808f1d947495d033db"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
index ed4ab4930..d8436709b 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "HSBP Manager"
DESCRIPTION = "HSBP Manager monitors HSBPs through SMBUS"
SRC_URI = "git://github.com/openbmc/s2600wf-misc.git"
-SRCREV = "291d6388e0b770e89091935bc4edc7f371874666"
+SRCREV = "52639bebada24990c3514786d65598dc5557477a"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
@@ -12,7 +12,8 @@ SYSTEMD_SERVICE_${PN} = "hsbp-manager.service"
DEPENDS = "boost \
i2c-tools \
- sdbusplus"
+ sdbusplus \
+ libgpiod"
S = "${WORKDIR}/git/hsbp-manager"
inherit cmake systemd
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
index 482738d25..ab41db601 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
@@ -2,7 +2,7 @@ SUMMARY = "Power supply manager for Intel based platform"
DESCRIPTION = "Power supply manager which include PSU Cold Redundancy service"
SRC_URI = "git://github.com/Intel-BMC/psu-manager.git;protocol=ssh"
-SRCREV = "d14c350c2dfcf9da3e6088ef29a8c5be4e40079b"
+SRCREV = "139981b813f2d480ca55f60e6b129d55d6adcbc3"
S = "${WORKDIR}/git"
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 fa591872a..44cee7361 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 = "2285be4fd22709c1dcfba10c2c604528353b428a"
+SRCREV = "d23b84a7eb2be944b12e6539cf627f595b299fda"
S = "${WORKDIR}/git"
@@ -28,7 +28,7 @@ DEPENDS += " \
i2c-tools \
"
-EXTRA_OECMAKE="-DYOCTO=1"
+EXTRA_OECMAKE="-DYOCTO=1 -DIPMI_BLOB=0"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'smbios-no-dimm', d)}"
PACKAGECONFIG[smbios-no-dimm] = "-DDIMM_DBUS=OFF, -DDIMM_DBUS=ON"
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch
new file mode 100644
index 000000000..b7823ce14
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch
@@ -0,0 +1,60 @@
+From 0d202fb06b873c5e258658462ac4fc01a673fd83 Mon Sep 17 00:00:00 2001
+From: Zhikui Ren <zhikui.ren@intel.com>
+Date: Mon, 11 Jan 2021 16:31:36 -0800
+Subject: [PATCH] Die_CPU: filter first zero from GetTemp
+
+Peci command GetTemp can return 0 during CPU reset.
+It does not have a have completion code either.
+Discard the first zero reading and return -ENODATA.
+Consecutive zeros will be returned so that real hot
+condition will still be detected and logged but possibly delayed
+by the sensor polling period, which is normally 500ms-1s.
+
+Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
+---
+ drivers/hwmon/peci-cputemp.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c
+index b633ea545644..19002f02bd91 100644
+--- a/drivers/hwmon/peci-cputemp.c
++++ b/drivers/hwmon/peci-cputemp.c
+@@ -15,6 +15,7 @@
+
+ struct temp_group {
+ struct peci_sensor_data die;
++ u32 die_raw_prev;
+ struct peci_sensor_data dts;
+ struct peci_sensor_data tcontrol;
+ struct peci_sensor_data tthrottle;
+@@ -129,6 +130,7 @@ static int get_die_temp(struct peci_cputemp *priv)
+ {
+ struct peci_get_temp_msg msg;
+ int ret;
++ bool discard = false;
+
+ if (!peci_sensor_need_update(&priv->temp.die))
+ return 0;
+@@ -139,6 +141,19 @@ static int get_die_temp(struct peci_cputemp *priv)
+ if (ret)
+ return ret;
+
++ /* GET_TEMP command does not have cc and can return zero during
++ * cpu reset. Treat the first zero reading as data not available.
++ * Consecutive zeros will be returned so true hot condition
++ * is not be missed.
++ */
++ if (msg.temp_raw == 0 && priv->temp.die_raw_prev != 0) {
++ pr_err("peci-cputemp_die: discard first 0 reading from GetTemp\n");
++ discard = true;
++ }
++ priv->temp.die_raw_prev = msg.temp_raw;
++ if (discard)
++ return -ENODATA;
++
+ /* Note that the tjmax should be available before calling it */
+ priv->temp.die.value = priv->temp.tjmax.value +
+ (msg.temp_raw * 1000 / 64);
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch
new file mode 100644
index 000000000..aab6c3cea
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch
@@ -0,0 +1,64 @@
+From 68db4c74c43d4042b0b32bcd133121ab39b9b310 Mon Sep 17 00:00:00 2001
+From: Zhikui Ren <zhikui.ren@intel.com>
+Date: Tue, 2 Feb 2021 14:49:28 -0800
+Subject: [PATCH] DTS_CPU: filter first zero from RdPkgConfig 10
+
+Peci command GetPkgConfig 10 can return 0 (hot) with cc 0x40
+after cpu reset. Once pcode run time image is loaded
+and it returns 0x8000 as DTS margin data not ready
+Discard the first zero reading and return -ENODATA.
+Consecutive zeros will be returned so that real hot
+condition will still be detected and logged but possibly delayed
+by the sensor polling period, which is normally one second.
+
+Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
+---
+ drivers/hwmon/peci-cputemp.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c
+index 19002f02bd91..e1860779aa66 100644
+--- a/drivers/hwmon/peci-cputemp.c
++++ b/drivers/hwmon/peci-cputemp.c
+@@ -17,6 +17,7 @@ struct temp_group {
+ struct peci_sensor_data die;
+ u32 die_raw_prev;
+ struct peci_sensor_data dts;
++ u32 dts_raw_prev;
+ struct peci_sensor_data tcontrol;
+ struct peci_sensor_data tthrottle;
+ struct peci_sensor_data tjmax;
+@@ -168,6 +169,7 @@ static int get_dts(struct peci_cputemp *priv)
+ s32 dts_margin;
+ u8 pkg_cfg[4];
+ int ret;
++ bool discard = false;
+
+ if (!peci_sensor_need_update(&priv->temp.dts))
+ return 0;
+@@ -181,6 +183,22 @@ static int get_dts(struct peci_cputemp *priv)
+
+ dts_margin = le16_to_cpup((__le16 *)pkg_cfg);
+
++ /* There is a small window (500us) for read dts_margin (RdPkgConfig 10)
++ * to return cc 0x40, and dts_margin of 0 after cpu reset, before runtime
++ * image is loaded to set it to 0x8000 (dts reading not ready).
++ * DTS sensor is polled by user application at a slower rate than this window.
++ * Treat the first zero reading as data not available.
++ * Consecutive zeros will be returned so true hot condition
++ * is not be missed.
++ */
++ if (dts_margin == 0 && priv->temp.dts_raw_prev != 0) {
++ pr_err("peci-cputemp_dts: discard first 0 reading from RdPkgConfig 10\n");
++ discard = true;
++ }
++ priv->temp.dts_raw_prev = dts_margin;
++ if (discard)
++ return -ENODATA;
++
+ /**
+ * Processors return a value of DTS reading in 10.6 format
+ * (10 bits signed decimal, 6 bits fractional).
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
index 591e86160..54e182386 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,10 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+LINUX_VERSION = "5.10.30"
+
KBRANCH = "dev-5.10-intel"
KSRC = "git://github.com/Intel-BMC/linux;protocol=ssh;branch=${KBRANCH}"
# Include this as a comment only for downstream auto-bump
# SRC_URI = "git://github.com/Intel-BMC/linux;protocol=ssh;branch=dev-5.10-intel"
-SRCREV="faadf371d041eb0d2c8b1d4cc729f19cf53e6a92"
+SRCREV="0785121bf4894ebecd9a6efc82331894fefd6c82"
do_compile_prepend(){
# device tree compiler flags
@@ -17,6 +19,8 @@ SRC_URI += " \
file://0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch \
file://0003-Fix-libmctp-build-error.patch \
file://0004-Add-a-quick-fix-to-resolve-USB-gadget-DMA-issue.patch \
+ file://1003-Die_CPU-filter-first-zero-from-GetTemp.patch \
+ file://1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch \
"
SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0005-128MB-flashmap-for-PFR.patch', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
index 6bfe783af..428d4a67e 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch
@@ -1,4 +1,4 @@
-From 07bba51a168b769563a649f1c0f3a9126f480e57 Mon Sep 17 00:00:00 2001
+From 24bac5f6660ec5e5ea15c0f062dc4a08fbc0e876 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Thu, 2 Apr 2020 17:06:07 +0530
Subject: [PATCH] Adding channel specific privilege to network
@@ -26,7 +26,7 @@ Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
4 files changed, 271 insertions(+), 1 deletion(-)
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
-index c47a759..d7a4168 100644
+index 607e658..e2b2da9 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -45,6 +45,10 @@ constexpr auto PROPERTY_INTERFACE = "org.freedesktop.DBus.Properties";
@@ -48,7 +48,7 @@ index c47a759..d7a4168 100644
// Emit deferred signal.
if (emitSignal)
-@@ -1148,5 +1153,124 @@ std::string EthernetInterface::defaultGateway6(std::string gateway)
+@@ -1175,5 +1180,124 @@ std::string EthernetInterface::defaultGateway6(std::string gateway)
manager.writeToConfigurationFile();
return gw;
}
@@ -174,7 +174,7 @@ index c47a759..d7a4168 100644
} // namespace network
} // namespace phosphor
diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
-index e2418a2..60fd272 100644
+index 8e28b51..ebba151 100644
--- a/ethernet_interface.hpp
+++ b/ethernet_interface.hpp
@@ -2,11 +2,14 @@
@@ -192,7 +192,7 @@ index e2418a2..60fd272 100644
#include <sdbusplus/server/object.hpp>
#include <string>
#include <xyz/openbmc_project/Collection/DeleteAll/server.hpp>
-@@ -23,7 +26,8 @@ using Ifaces = sdbusplus::server::object::object<
+@@ -33,7 +36,8 @@ using Ifaces = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Network::server::MACAddress,
sdbusplus::xyz::openbmc_project::Network::IP::server::Create,
sdbusplus::xyz::openbmc_project::Network::Neighbor::server::CreateStatic,
@@ -202,7 +202,7 @@ index e2418a2..60fd272 100644
using IP = sdbusplus::xyz::openbmc_project::Network::server::IP;
-@@ -31,11 +35,14 @@ using EthernetInterfaceIntf =
+@@ -41,11 +45,14 @@ using EthernetInterfaceIntf =
sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface;
using MacAddressIntf =
sdbusplus::xyz::openbmc_project::Network::server::MACAddress;
@@ -217,10 +217,10 @@ index e2418a2..60fd272 100644
class Manager; // forward declaration of network manager.
-@@ -233,6 +240,14 @@ class EthernetInterface : public Ifaces
- */
+@@ -244,6 +251,14 @@ class EthernetInterface : public Ifaces
std::string defaultGateway6(std::string gateway) override;
+ using EthernetInterfaceIntf::dhcpEnabled;
+ /** @brief sets the channel maxium privilege.
+ * @param[in] value - Channel privilege which needs to be set on the
+ * system.
@@ -229,10 +229,10 @@ index e2418a2..60fd272 100644
+ std::string maxPrivilege(std::string value) override;
+
+ using ChannelAccessIntf::maxPrivilege;
- using EthernetInterfaceIntf::dHCPEnabled;
using EthernetInterfaceIntf::interfaceName;
using EthernetInterfaceIntf::linkUp;
-@@ -356,6 +371,26 @@ class EthernetInterface : public Ifaces
+ using EthernetInterfaceIntf::nicEnabled;
+@@ -366,6 +381,26 @@ class EthernetInterface : public Ifaces
* @returns true/false value if the address is static
*/
bool originIsManuallyAssigned(IP::AddressOrigin origin);
@@ -260,7 +260,7 @@ index e2418a2..60fd272 100644
} // namespace network
diff --git a/network_manager.cpp b/network_manager.cpp
-index c55c9bb..50ff908 100644
+index 881b767..847852f 100644
--- a/network_manager.cpp
+++ b/network_manager.cpp
@@ -36,6 +36,13 @@ extern std::unique_ptr<Timer> restartTimer;
@@ -380,10 +380,10 @@ index c55c9bb..50ff908 100644
bool Manager::createDefaultNetworkFiles(bool force)
diff --git a/network_manager.hpp b/network_manager.hpp
-index 6815d3f..96e20a6 100644
+index 227955c..9f5b7a9 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
-@@ -151,6 +151,12 @@ class Manager : public details::VLANCreateIface
+@@ -155,6 +155,12 @@ class Manager : public details::VLANCreateIface
return (interfaces.find(intf) != interfaces.end());
}
@@ -396,7 +396,7 @@ index 6815d3f..96e20a6 100644
protected:
/** @brief Persistent sdbusplus DBus bus connection. */
sdbusplus::bus::bus& bus;
-@@ -173,6 +179,9 @@ class Manager : public details::VLANCreateIface
+@@ -177,6 +183,9 @@ class Manager : public details::VLANCreateIface
/** @brief Network Configuration directory. */
fs::path confDir;
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 3540e93b4..3877adabd 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,9 +3,10 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
DEPENDS += "nlohmann-json boost"
SRC_URI = "git://github.com/openbmc/phosphor-networkd"
-SRCREV = "ee5b2c9469a56205567a8b1b120ecf34fc9f5ef4"
+SRCREV = "de433b74ec5bce22043ea44c55e83d9be3dc5372"
-SRC_URI += "file://0003-Adding-channel-specific-privilege-to-network.patch \
+SRC_URI += " file://0003-Adding-channel-specific-privilege-to-network.patch \
"
EXTRA_OECONF_append = " --enable-nic-ethtool=yes"
+EXTRA_OECONF_append = " --enable-ipv6-accept-ra=yes"
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check
index 2578785b4..68678e420 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check
@@ -107,6 +107,10 @@ while read IFACE UBDEV; do
if [ $error -ne 0 ] && [ $first_error_seen -eq 0 ]; then
first_error_seen=$error
fi
+ else
+ # Disable netipmid if present because eth(x) is not present
+ /bin/systemctl disable "phosphor-ipmi-net@$IFACE.socket"
+ /bin/systemctl disable "phosphor-ipmi-net@$IFACE.service"
fi
done <<-END_CONF
eth0 eth1addr
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch
index 8682e2cad..b44220e4b 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Entity-manager-Add-support-to-update-assetTag.patch
@@ -1,4 +1,4 @@
-From ff5dbca96d12b1c2aaaec0bb891125990af3f218 Mon Sep 17 00:00:00 2001
+From 7ae5ebc43755631c1756bbc1e89b41f2a1da138c Mon Sep 17 00:00:00 2001
From: mansijos <mansi.joshi@intel.com>
Date: Tue, 6 Apr 2021 02:12:56 +0530
Subject: [PATCH] Entity-manager: Add support to update assetTag
@@ -15,14 +15,14 @@ The new value is preserved after BMC resets.
Change-Id: If7fbfd8325488280f500ab0e2c8b38475813cc3f
Signed-off-by: mansijos <mansi.joshi@intel.com>
---
- src/EntityManager.cpp | 92 +++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 88 insertions(+), 4 deletions(-)
+ src/EntityManager.cpp | 93 +++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 89 insertions(+), 4 deletions(-)
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
-index 932b6f9..67b8f95 100644
+index 7cfcc6e..bf5e175 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
-@@ -47,9 +47,17 @@ constexpr const char* lastConfiguration = "/tmp/configuration/last.json";
+@@ -48,9 +48,17 @@ constexpr const char* lastConfiguration = "/tmp/configuration/last.json";
constexpr const char* currentConfiguration = "/var/configuration/system.json";
constexpr const char* globalSchema = "global.json";
constexpr const int32_t MAX_MAPPER_DEPTH = 0;
@@ -40,7 +40,7 @@ index 932b6f9..67b8f95 100644
struct cmp_str
{
bool operator()(const char* a, const char* b) const
-@@ -575,6 +583,43 @@ void addArrayToDbus(const std::string& name, const nlohmann::json& array,
+@@ -576,6 +584,43 @@ void addArrayToDbus(const std::string& name, const nlohmann::json& array,
}
}
@@ -84,7 +84,7 @@ index 932b6f9..67b8f95 100644
template <typename PropertyType>
void addProperty(const std::string& propertyName, const PropertyType& value,
sdbusplus::asio::dbus_interface* iface,
-@@ -589,9 +634,18 @@ void addProperty(const std::string& propertyName, const PropertyType& value,
+@@ -590,9 +635,18 @@ void addProperty(const std::string& propertyName, const PropertyType& value,
}
iface->register_property(
propertyName, value,
@@ -104,7 +104,7 @@ index 932b6f9..67b8f95 100644
val = newVal;
if (!setJsonFromPointer(jsonPointerString, val,
systemConfiguration))
-@@ -989,6 +1043,9 @@ void postToDbus(const nlohmann::json& newConfiguration,
+@@ -990,6 +1044,9 @@ void postToDbus(const nlohmann::json& newConfiguration,
populateInterfaceFromJson(systemConfiguration, jsonPointerPath,
boardIface, boardValues, objServer);
jsonPointerPath += "/";
@@ -114,7 +114,7 @@ index 932b6f9..67b8f95 100644
// iterate through board properties
for (auto& boardField : boardValues.items())
{
-@@ -998,9 +1055,28 @@ void postToDbus(const nlohmann::json& newConfiguration,
+@@ -999,9 +1056,28 @@ void postToDbus(const nlohmann::json& newConfiguration,
createInterface(objServer, boardName, boardField.key(),
boardKeyOrig);
@@ -146,18 +146,19 @@ index 932b6f9..67b8f95 100644
}
}
-@@ -1349,6 +1425,10 @@ void PerformScan::run()
- continue;
+@@ -1357,6 +1433,11 @@ void PerformScan::run()
+ {
+ continue; // non-numeric replacement
}
-
++
+ nlohmann::json recordVal = *recordPtr;
+ // Save the dbus path info of the device
+ recordVal[foundObject]["Path"] = std::get<1>(*itr);
+
- int index = std::stoi(
- nameIt->get<std::string>().substr(indexIdx),
- nullptr, 0);
-@@ -1421,6 +1501,10 @@ void PerformScan::run()
+ usedNames.insert(nameIt.value());
+ auto usedIt = std::find(indexes.begin(),
+ indexes.end(), index);
+@@ -1434,6 +1515,10 @@ void PerformScan::run()
}
}
@@ -169,5 +170,5 @@ index 932b6f9..67b8f95 100644
{
std::cerr << "Duplicates found, replacing "
--
-2.17.1
+2.30.2
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 9d891c620..a7448a84b 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,11 +1,10 @@
# this is here just to bump faster than upstream
# SRC_URI = "git://github.com/openbmc/entity-manager.git"
-SRCREV = "1694ef625a1075599e40faa695a40d61ccd91095"
+SRCREV = "cda147301b0fa7eac99eee3a7565604dbd6f74dd"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI += " file://0001-Improve-initialization-of-I2C-sensors.patch \
- file://0002-Entity-manager-Add-support-to-update-assetTag.patch \
+SRC_URI += " file://0002-Entity-manager-Add-support-to-update-assetTag.patch \
file://0003-Add-logs-to-fwVersionIsSame.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch
new file mode 100644
index 000000000..6af0a5702
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch
@@ -0,0 +1,39 @@
+From 6b4071c12bdcc3bd20e72a7bd2eed19ff14b97af Mon Sep 17 00:00:00 2001
+From: Zhikui Ren <zhikui.ren@intel.com>
+Date: Wed, 12 May 2021 19:11:08 -0700
+Subject: [PATCH] allow dbus sensors without thresholds
+
+catch dbus exceptions when query for thresholds interfaces.
+log messages and continue.
+
+Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
+---
+ dbus/dbusconfiguration.cpp | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
+index 55151d3..fd7a138 100644
+--- a/dbus/dbusconfiguration.cpp
++++ b/dbus/dbusconfiguration.cpp
+@@ -286,13 +286,15 @@ void populatePidInfo(
+ {
+ interface = thresholds::criticalInterface;
+ }
+- const std::string& path = sensorConfig.at(info.inputs.front()).readPath;
+
+- DbusHelper helper(sdbusplus::bus::new_system());
+- std::string service = helper.getService(interface, path);
+ double reading = 0;
+ try
+ {
++ const std::string& path = sensorConfig.at(info.inputs.front()).readPath;
++
++ DbusHelper helper(sdbusplus::bus::new_system());
++ std::string service = helper.getService(interface, path);
++
+ helper.getProperty(service, path, interface, *thresholdProperty,
+ reading);
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
index ab1cd3742..cdefe246f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -5,6 +5,10 @@ SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service"
EXTRA_OECONF = "--enable-configure-dbus=yes"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git"
-SRCREV = "cb4c1a27574a7fe121a851ae7ba67aec254a1129"
+SRCREV = "18d5bb18dcb4ebf7340b0b7a0b39daa887d530ce"
+
+SRC_URI += "\
+ file://0001-allow-dbus-sensors-without-thresholds.patch \
+ "
FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"
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 cfaa077eb..0a47e3278 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 df1281792f6886b41c99919e8197c2c2d369d0ca Mon Sep 17 00:00:00 2001
+From 6ce336adafd723319befc4ce918ba67a0ad3492c 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
@@ -12,19 +12,19 @@ Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
---
activation.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++-
- meson.build | 1 +
+ meson.build | 2 ++
meson_options.txt | 3 +++
static/flash.cpp | 42 ++++++++++++++++++++++++++++++++++++++++--
ubi/flash.cpp | 9 +++------
- 5 files changed, 91 insertions(+), 9 deletions(-)
+ 5 files changed, 92 insertions(+), 9 deletions(-)
diff --git a/activation.cpp b/activation.cpp
-index eb57587..901caf3 100644
+index c82e297..d690a39 100644
--- a/activation.cpp
+++ b/activation.cpp
-@@ -92,7 +92,50 @@ auto Activation::activation(Activations value) -> Activations
- value ==
- softwareServer::Activation::Activations::ActivatingAsStandbySpare)
+@@ -88,7 +88,50 @@ auto Activation::activation(Activations value) -> Activations
+
+ if (value == softwareServer::Activation::Activations::Activating)
{
+#ifdef FWUPD_SCRIPT
+ if (!activationProgress)
@@ -53,7 +53,7 @@ index eb57587..901caf3 100644
+ }
+ else if (activationProgress->progress() == 100)
+ {
-+ log<level::ERR>("[Jennifer] progress == 100...");
++ log<level::ERR>("progress == 100...");
+ if (!redundancyPriority)
+ {
+ redundancyPriority =
@@ -73,7 +73,7 @@ index eb57587..901caf3 100644
#ifdef HOST_BIOS_UPGRADE
auto purpose = parent.versions.find(versionId)->second->purpose();
if (purpose == VersionPurpose::Host)
-@@ -115,7 +158,6 @@ auto Activation::activation(Activations value) -> Activations
+@@ -111,7 +154,6 @@ auto Activation::activation(Activations value) -> Activations
return softwareServer::Activation::activation(value);
}
#endif
@@ -81,7 +81,7 @@ index eb57587..901caf3 100644
auto versionStr = parent.versions.find(versionId)->second->version();
if (!minimum_ship_level::verify(versionStr))
-@@ -179,6 +221,7 @@ auto Activation::activation(Activations value) -> Activations
+@@ -175,6 +217,7 @@ auto Activation::activation(Activations value) -> Activations
return softwareServer::Activation::activation(
softwareServer::Activation::Activations::Active);
#endif
@@ -90,19 +90,20 @@ index eb57587..901caf3 100644
else
{
diff --git a/meson.build b/meson.build
-index 0a7a6a6..5990168 100644
+index a6ebcc4..5c79009 100644
--- a/meson.build
+++ b/meson.build
-@@ -57,6 +57,7 @@ conf.set('WANT_SIGNATURE_VERIFY', \
- get_option('verify-signature').enabled() or \
+@@ -59,6 +59,8 @@ conf.set('WANT_SIGNATURE_VERIFY', \
get_option('verify-full-signature').enabled())
conf.set('WANT_SIGNATURE_FULL_VERIFY', get_option('verify-full-signature').enabled())
-+conf.set('FWUPD_SCRIPT', get_option('fwupd-script').enabled())
++conf.set('FWUPD_SCRIPT', get_option('fwupd-script').enabled())
++
# Configurable variables
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 355773c..f0c8730 100644
+index 0877798..da257b7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,6 +25,9 @@ option('verify-signature', type: 'feature',
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch
index 49bdc138f..e1a7f1746 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch
@@ -1,4 +1,4 @@
-From 030f918b90ea45104bccf68082c2d634c6694238 Mon Sep 17 00:00:00 2001
+From 51fd06346ff492d5d4862886cb34e024d05edb45 Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
Date: Tue, 13 Aug 2019 22:43:12 +0530
Subject: [PATCH] PFR images support in phosphor-software-manager
@@ -12,34 +12,20 @@ tested PFR image uploads and updates
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
---
- activation.cpp | 2 +-
item_updater.cpp | 7 +-
- meson.build | 7 +-
+ meson.build | 8 +-
meson_options.txt | 3 +
- pfr_image_manager.cpp | 217 ++++++++++++++++++++++++++++++++++++++++++
- pfr_image_manager.hpp | 75 +++++++++++++++
- 6 files changed, 306 insertions(+), 5 deletions(-)
+ pfr_image_manager.cpp | 218 ++++++++++++++++++++++++++++++++++++++++++
+ pfr_image_manager.hpp | 76 +++++++++++++++
+ 5 files changed, 308 insertions(+), 4 deletions(-)
create mode 100644 pfr_image_manager.cpp
create mode 100644 pfr_image_manager.hpp
-diff --git a/activation.cpp b/activation.cpp
-index bad17b8..3363230 100644
---- a/activation.cpp
-+++ b/activation.cpp
-@@ -119,7 +119,7 @@ auto Activation::activation(Activations value) -> Activations
- }
- else if (activationProgress->progress() == 100)
- {
-- log<level::ERR>("[Jennifer] progress == 100...");
-+ log<level::INFO>("progress == 100...");
- if (!redundancyPriority)
- {
- redundancyPriority =
diff --git a/item_updater.cpp b/item_updater.cpp
-index df8595c..694975f 100644
+index 81fc01f..60e7d23 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
-@@ -64,10 +64,10 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
+@@ -65,10 +65,10 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
auto value = SVersion::convertVersionPurposeFromString(
std::get<std::string>(property.second));
if (value == VersionPurpose::BMC ||
@@ -52,7 +38,7 @@ index df8595c..694975f 100644
{
purpose = value;
}
-@@ -399,6 +399,7 @@ void ItemUpdater::deleteAll()
+@@ -414,6 +414,7 @@ void ItemUpdater::deleteAll()
ItemUpdater::ActivationStatus
ItemUpdater::validateSquashFSImage(const std::string& filePath)
{
@@ -60,7 +46,7 @@ index df8595c..694975f 100644
bool valid = true;
// Record the images which are being updated
-@@ -416,7 +417,7 @@ ItemUpdater::ActivationStatus
+@@ -431,7 +432,7 @@ ItemUpdater::ActivationStatus
return ItemUpdater::ActivationStatus::invalid;
}
}
@@ -69,37 +55,27 @@ index df8595c..694975f 100644
return ItemUpdater::ActivationStatus::ready;
}
-@@ -690,8 +691,8 @@ void ItemUpdater::freeSpace(Activation& caller)
- // Failed activations don't have priority, assign them a large value
- // for sorting purposes.
- auto priority = 999;
-- if ((iter.second.get()->activation() ==
-- server::Activation::Activations::Active)&&
-+ if ((iter.second.get()->activation() ==
-+ server::Activation::Activations::Active) &&
- iter.second->redundancyPriority.get())
- {
- priority = iter.second->redundancyPriority.get()->priority();
diff --git a/meson.build b/meson.build
-index 08d6f71..c61d59f 100644
+index 5c79009..e33998d 100644
--- a/meson.build
+++ b/meson.build
-@@ -55,6 +55,7 @@ conf.set('MMC_LAYOUT', get_option('bmc-layout').contains('mmc'))
- conf.set('HOST_BIOS_UPGRADE', get_option('host-bios-upgrade').enabled())
- conf.set('WANT_SIGNATURE_VERIFY', get_option('verify-signature').enabled())
+@@ -60,6 +60,7 @@ conf.set('WANT_SIGNATURE_VERIFY', \
+ conf.set('WANT_SIGNATURE_FULL_VERIFY', get_option('verify-full-signature').enabled())
+
conf.set('FWUPD_SCRIPT', get_option('fwupd-script').enabled())
+conf.set('PFR_UPDATE', get_option('pfr-update').enabled())
-
+
# Configurable variables
conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed'))
-@@ -195,12 +196,16 @@ executable(
+@@ -205,12 +206,17 @@ executable(
install: true
)
-
+
+image_manager_source = files('image_manager.cpp')
+if get_option('pfr-update').enabled()
+ image_manager_source = files('pfr_image_manager.cpp')
+endif
++
executable(
'phosphor-version-software-manager',
image_error_cpp,
@@ -111,22 +87,22 @@ index 08d6f71..c61d59f 100644
'watch.cpp',
dependencies: [deps, ssl],
diff --git a/meson_options.txt b/meson_options.txt
-index 4f7e62a..1593502 100644
+index da257b7..2204e04 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -25,6 +25,9 @@ option('verify-signature', type: 'feature',
+@@ -28,6 +28,9 @@ option('verify-full-signature', type: 'feature',
option('fwupd-script', type: 'feature',
description: 'Enable fwupd script support.')
-
+
+option('pfr-update', type: 'feature',
-+ description: 'Enable fwupd script support.')
++ description: 'Enable PFR image support.')
+
# Variables
option(
'active-bmc-max-allowed', type: 'integer',
diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
new file mode 100644
-index 0000000..242a6ca
+index 0000000..fec1e94
--- /dev/null
+++ b/pfr_image_manager.cpp
@@ -0,0 +1,218 @@
@@ -350,7 +326,7 @@ index 0000000..242a6ca
+} // namespace phosphor
diff --git a/pfr_image_manager.hpp b/pfr_image_manager.hpp
new file mode 100644
-index 0000000..c6ee6a4
+index 0000000..b9a5822
--- /dev/null
+++ b/pfr_image_manager.hpp
@@ -0,0 +1,76 @@
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch
deleted file mode 100644
index 156e6fe7c..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From f6022e25d0b47af502522913773e589fcdd1568e Mon Sep 17 00:00:00 2001
-From: Vikram Bodireddy <vikram.bodireddy@intel.com>
-Date: Sun, 5 Jul 2020 00:54:57 +0530
-Subject: [PATCH] Fix for RedudancyPriority in item_updater
-
-This fixes accessing RedudancyPriority property for the
-activated image in item_updater. The downloaded image object
-is not actually associated with RedudancyPriority before and
-after activation. There exists no RedundancyPriority property
-for downloaded image, accessing it causing a crash in
-item_updater.
-
-Tested: Tested for coredumps during Seamless firmware update.
-
-Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
-
----
- item_updater.cpp | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/item_updater.cpp b/item_updater.cpp
-index c3a846d..b299b4d 100644
---- a/item_updater.cpp
-+++ b/item_updater.cpp
-@@ -690,8 +690,9 @@ void ItemUpdater::freeSpace(Activation& caller)
- // Failed activations don't have priority, assign them a large value
- // for sorting purposes.
- auto priority = 999;
-- if (iter.second.get()->activation() ==
-- server::Activation::Activations::Active)
-+ if ((iter.second.get()->activation() ==
-+ server::Activation::Activations::Active)&&
-+ iter.second->redundancyPriority.get())
- {
- priority = iter.second->redundancyPriority.get()->priority();
- }
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
index 63e0aff25..decea878f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
@@ -13,7 +13,6 @@ SRC_URI += " \
file://0007-Adding-StandBySpare-for-firmware-activation.patch \
file://0008-item_updater-update-the-bmc_active-objectPath.patch \
file://0009-Add-ApplyOptions-D-bus-property-under-Software.patch \
- file://0011-Fix-for-RedudancyPriority-in-item_updater.patch \
file://0013-remove-image-file-on-pre-script-failures.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch
index 193461baf..a76990262 100755
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch
@@ -1,4 +1,4 @@
-From 10cb7cb14974725a29b3ead4c543ca5e58234c07 Mon Sep 17 00:00:00 2001
+From d5f2e8b00bc5f8a727a1ef678941c4993c3ea7a6 Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
Date: Wed, 18 Nov 2020 17:14:41 +0530
Subject: [PATCH] Firmware update configuration changes
@@ -39,23 +39,21 @@ Tested:
- Successfully ran redfish validater with no new errors.
-Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
-
-%% original patch: 0001-Firmware-update-configuration-changes.patch
-
Change-Id: I44e1743fd76aa37c7b8affa49a3e05f808187037
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
Signed-off-by: Helen Huang <he.huang@intel.com>
+Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
- redfish-core/lib/update_service.hpp | 339 ++++++++++++++++--
+ redfish-core/lib/update_service.hpp | 338 ++++++++++++++++--
static/redfish/v1/$metadata/index.xml | 3 +
.../JsonSchemas/OemUpdateService/index.json | 69 ++++
.../redfish/v1/schema/OemUpdateService_v1.xml | 40 +++
- 4 files changed, 421 insertions(+), 30 deletions(-)
+ 4 files changed, 421 insertions(+), 29 deletions(-)
create mode 100644 static/redfish/v1/JsonSchemas/OemUpdateService/index.json
create mode 100644 static/redfish/v1/schema/OemUpdateService_v1.xml
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
-index 6d44171..8eda265 100644
+index ca1234f..0a9f81a 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -32,6 +32,17 @@ static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateErrorMatcher;
@@ -76,7 +74,7 @@ index 6d44171..8eda265 100644
static void cleanUp()
{
-@@ -40,27 +51,119 @@ static void cleanUp()
+@@ -40,28 +51,120 @@ static void cleanUp()
fwUpdateErrorMatcher = nullptr;
}
static void activateImage(const std::string& objPath,
@@ -201,12 +199,13 @@ index 6d44171..8eda265 100644
// Note that asyncResp can be either a valid pointer or nullptr. If nullptr
// then no asyncResp updates will occur
- static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
-+ const std::vector<std::string> imgUriTargets,
- sdbusplus::message::message& m,
- const crow::Request& req)
+ static void
+ softwareInterfaceAdded(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const std::vector<std::string> imgUriTargets,
+ sdbusplus::message::message& m,
+ const crow::Request& req)
{
-@@ -73,22 +176,24 @@ static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
+@@ -74,22 +177,24 @@ static void
m.read(objPath, interfacesProperties);
@@ -235,7 +234,7 @@ index 6d44171..8eda265 100644
BMCWEB_LOG_DEBUG << "error msg = "
<< errorCode.message();
if (asyncResp)
-@@ -115,7 +220,7 @@ static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
+@@ -116,7 +221,7 @@ static void
// is added
fwAvailableTimer = nullptr;
@@ -244,7 +243,7 @@ index 6d44171..8eda265 100644
if (asyncResp)
{
std::shared_ptr<task::TaskData> task =
-@@ -247,8 +352,7 @@ static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
+@@ -248,8 +353,7 @@ static void
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetObject", objPath.str,
@@ -254,17 +253,16 @@ index 6d44171..8eda265 100644
}
}
}
-@@ -257,7 +361,8 @@ static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
- // then no asyncResp updates will occur
+@@ -259,7 +363,7 @@ static void
static void monitorForSoftwareAvailable(
- const std::shared_ptr<AsyncResp>& asyncResp, const crow::Request& req,
-- const std::string& url, int timeoutTimeSeconds = 10)
-+ const std::string& url, const std::vector<std::string>& imgUriTargets,
-+ int timeoutTimeSeconds = 10)
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const crow::Request& req, const std::string& url,
+- int timeoutTimeSeconds = 10)
++ const std::vector<std::string>& imgUriTargets, int timeoutTimeSeconds = 10)
{
// Only allow one FW update at a time
if (fwUpdateInProgress != false)
-@@ -297,9 +402,10 @@ static void monitorForSoftwareAvailable(
+@@ -299,9 +403,10 @@ static void monitorForSoftwareAvailable(
}
});
@@ -277,7 +275,7 @@ index 6d44171..8eda265 100644
};
fwUpdateInProgress = true;
-@@ -475,12 +581,15 @@ class UpdateServiceActionsSimpleUpdate : public Node
+@@ -477,12 +582,15 @@ class UpdateServiceActionsSimpleUpdate : public Node
std::string fwFile = imageURI.substr(separator + 1);
BMCWEB_LOG_DEBUG << "Server: " << tftpServer + " File: " << fwFile;
@@ -294,7 +292,7 @@ index 6d44171..8eda265 100644
// TFTP can take up to 10 minutes depending on image size and
// connection speed. Return to caller as soon as the TFTP operation
-@@ -514,7 +623,8 @@ class UpdateServiceActionsSimpleUpdate : public Node
+@@ -516,7 +624,8 @@ class UpdateServiceActionsSimpleUpdate : public Node
class UpdateService : public Node
{
public:
@@ -304,37 +302,38 @@ index 6d44171..8eda265 100644
{
entityPrivileges = {
{boost::beast::http::verb::get, {{"Login"}}},
-@@ -526,6 +636,8 @@ class UpdateService : public Node
+@@ -528,6 +637,8 @@ class UpdateService : public Node
}
private:
+ std::vector<std::string> httpPushUriTargets;
+ bool httpPushUriTargetBusy;
- void doGet(crow::Response& res, const crow::Request&,
- const std::vector<std::string>&) override
+ void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const crow::Request&, const std::vector<std::string>&) override
{
-@@ -536,6 +648,8 @@ class UpdateService : public Node
- res.jsonValue["Description"] = "Service for Software Update";
- res.jsonValue["Name"] = "Update Service";
- res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService";
-+ res.jsonValue["HttpPushUriTargets"] = httpPushUriTargets;
-+ res.jsonValue["HttpPushUriTargetsBusy"] = httpPushUriTargetBusy;
+@@ -538,6 +649,9 @@ class UpdateService : public Node
+ asyncResp->res.jsonValue["Description"] = "Service for Software Update";
+ asyncResp->res.jsonValue["Name"] = "Update Service";
+ asyncResp->res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService";
++ asyncResp->res.jsonValue["HttpPushUriTargets"] = httpPushUriTargets;
++ asyncResp->res.jsonValue["HttpPushUriTargetsBusy"] =
++ httpPushUriTargetBusy;
// UpdateService cannot be disabled
- res.jsonValue["ServiceEnabled"] = true;
- res.jsonValue["FirmwareInventory"] = {
-@@ -585,6 +699,31 @@ class UpdateService : public Node
+ asyncResp->res.jsonValue["ServiceEnabled"] = true;
+ asyncResp->res.jsonValue["FirmwareInventory"] = {
+@@ -587,6 +701,32 @@ class UpdateService : public Node
"/xyz/openbmc_project/software/apply_time",
"org.freedesktop.DBus.Properties", "Get",
"xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime");
+
+ // Get the ApplyOptions value
+ crow::connections::systemBus->async_method_call(
-+ [aResp](const boost::system::error_code ec,
-+ const std::variant<bool> applyOption) {
++ [asyncResp](const boost::system::error_code ec,
++ const std::variant<bool> applyOption) {
+ if (ec)
+ {
+ BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-+ messages::internalError(aResp->res);
++ messages::internalError(asyncResp->res);
+ return;
+ }
+
@@ -342,10 +341,11 @@ index 6d44171..8eda265 100644
+
+ if (b)
+ {
-+ aResp->res.jsonValue["Oem"]["ApplyOptions"]["@odata.type"] =
++ asyncResp->res
++ .jsonValue["Oem"]["ApplyOptions"]["@odata.type"] =
+ "#OemUpdateService.ApplyOptions";
-+ aResp->res.jsonValue["Oem"]["ApplyOptions"]["ClearConfig"] =
-+ *b;
++ asyncResp->res
++ .jsonValue["Oem"]["ApplyOptions"]["ClearConfig"] = *b;
+ }
+ },
+ "xyz.openbmc_project.Software.BMC.Updater",
@@ -353,21 +353,20 @@ index 6d44171..8eda265 100644
+ "Get", "xyz.openbmc_project.Software.ApplyOptions", "ClearConfig");
}
- void doPatch(crow::Response& res, const crow::Request& req,
-@@ -595,12 +734,61 @@ class UpdateService : public Node
- std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+ void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+@@ -596,12 +736,61 @@ class UpdateService : public Node
+ BMCWEB_LOG_DEBUG << "doPatch...";
std::optional<nlohmann::json> pushUriOptions;
-- if (!json_util::readJson(req, res, "HttpPushUriOptions",
-- pushUriOptions))
+ std::optional<std::vector<std::string>> imgTargets;
+ std::optional<bool> imgTargetBusy;
+ std::optional<nlohmann::json> oemProps;
+
-+ if (!json_util::readJson(req, res, "HttpPushUriOptions", pushUriOptions,
-+ "HttpPushUriTargets", imgTargets,
-+ "HttpPushUriTargetsBusy", imgTargetBusy, "Oem",
-+ oemProps))
+ if (!json_util::readJson(req, asyncResp->res, "HttpPushUriOptions",
+- pushUriOptions))
++ pushUriOptions, "HttpPushUriTargets",
++ imgTargets, "HttpPushUriTargetsBusy",
++ imgTargetBusy, "Oem", oemProps))
{
+ BMCWEB_LOG_DEBUG << "UpdateService doPatch: Invalid request body";
return;
@@ -377,7 +376,7 @@ index 6d44171..8eda265 100644
+ {
+ std::optional<nlohmann::json> applyOptions;
+
-+ if (!json_util::readJson(*oemProps, res, "ApplyOptions",
++ if (!json_util::readJson(*oemProps, asyncResp->res, "ApplyOptions",
+ applyOptions))
+ {
+ return;
@@ -386,8 +385,8 @@ index 6d44171..8eda265 100644
+ if (applyOptions)
+ {
+ std::optional<bool> clearConfig;
-+ if (!json_util::readJson(*applyOptions, res, "ClearConfig",
-+ clearConfig))
++ if (!json_util::readJson(*applyOptions, asyncResp->res,
++ "ClearConfig", clearConfig))
+ {
+ return;
+ }
@@ -418,7 +417,7 @@ index 6d44171..8eda265 100644
if (pushUriOptions)
{
std::optional<nlohmann::json> pushUriApplyTime;
-@@ -665,6 +853,98 @@ class UpdateService : public Node
+@@ -666,6 +855,98 @@ class UpdateService : public Node
}
}
}
@@ -516,9 +515,9 @@ index 6d44171..8eda265 100644
+ }
}
- void doPost(crow::Response& res, const crow::Request& req,
-@@ -675,8 +955,8 @@ class UpdateService : public Node
- std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+ void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+@@ -675,8 +956,8 @@ class UpdateService : public Node
+ BMCWEB_LOG_DEBUG << "doPost...";
// Setup callback for when new software detected
- monitorForSoftwareAvailable(asyncResp, req,
@@ -528,7 +527,7 @@ index 6d44171..8eda265 100644
std::string filepath(
"/tmp/images/" +
-@@ -761,7 +1041,7 @@ class SoftwareInventoryCollection : public Node
+@@ -759,7 +1040,7 @@ class SoftwareInventoryCollection : public Node
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTree",
"/xyz/openbmc_project/software", static_cast<int32_t>(0),
@@ -537,7 +536,7 @@ index 6d44171..8eda265 100644
}
};
-@@ -943,7 +1223,7 @@ class SoftwareInventory : public Node
+@@ -940,7 +1221,7 @@ class SoftwareInventory : public Node
},
obj.second[0].first, obj.first,
"org.freedesktop.DBus.Properties", "GetAll",
@@ -546,7 +545,7 @@ index 6d44171..8eda265 100644
}
if (!found)
{
-@@ -964,8 +1244,7 @@ class SoftwareInventory : public Node
+@@ -961,8 +1242,7 @@ class SoftwareInventory : public Node
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTree", "/",
@@ -557,19 +556,19 @@ index 6d44171..8eda265 100644
};
diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml
-index 514f3dd..c068d4f 100644
+index 9d9fd1f..6cbc0d1 100644
--- a/static/redfish/v1/$metadata/index.xml
+++ b/static/redfish/v1/$metadata/index.xml
-@@ -2142,6 +2142,9 @@
- <edmx:Reference Uri="/redfish/v1/schema/OemManager_v1.xml">
- <edmx:Include Namespace="OemManager"/>
+@@ -2145,6 +2145,9 @@
+ <edmx:Reference Uri="/redfish/v1/schema/OemComputerSystem_v1.xml">
+ <edmx:Include Namespace="OemComputerSystem"/>
</edmx:Reference>
+ <edmx:Reference Uri="/redfish/v1/schema/OemUpdateService_v1.xml">
+ <edmx:Include Namespace="OemUpdateService"/>
+ </edmx:Reference>
- <edmx:Reference Uri="/redfish/v1/schema/OemCrashdump_v1.xml">
- <edmx:Include Namespace="OemCrashdump.v1_0_0"/>
- </edmx:Reference>
+ <edmx:Reference Uri="/redfish/v1/schema/OemVirtualMedia_v1.xml">
+ <edmx:Include Namespace="OemVirtualMedia"/>
+ <edmx:Include Namespace="OemVirtualMedia.v1_0_0"/>
diff --git a/static/redfish/v1/JsonSchemas/OemUpdateService/index.json b/static/redfish/v1/JsonSchemas/OemUpdateService/index.json
new file mode 100644
index 0000000..74e39cd
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch
deleted file mode 100644
index 54f00aa39..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch
+++ /dev/null
@@ -1,547 +0,0 @@
-From d340953bc925ff8535c5a8fac54db24b243ba8ad Mon Sep 17 00:00:00 2001
-From: AppaRao Puli <apparao.puli@linux.intel.com>
-Date: Mon, 19 Oct 2020 13:21:42 +0530
-Subject: [PATCH] EventService: https client support
-
-Add https client support for push style
-eventing. Using this BMC can push the event
-logs/telemetry data to event listener over
-secure http channel.
-
-Tested:
- - Created subscription with https destination
- url. Using SubmitTestEvent action set the
- event and can see event on event listener.
- - Validator passed.
-
-Change-Id: I44c3918b39baa2eb5fddda9d635f99aa280a422a
-Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
-Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
----
- http/http_client.hpp | 370 +++++++++++++-----
- .../include/event_service_manager.hpp | 2 +-
- 2 files changed, 267 insertions(+), 105 deletions(-)
-
-diff --git a/http/http_client.hpp b/http/http_client.hpp
-index 5c7b13f..d782dee 100644
---- a/http/http_client.hpp
-+++ b/http/http_client.hpp
-@@ -31,12 +31,17 @@ namespace crow
- {
-
- static constexpr uint8_t maxRequestQueueSize = 50;
-+static constexpr unsigned int httpReadBodyLimit = 1024;
-
- enum class ConnState
- {
- initialized,
-+ resolveInProgress,
-+ resolveFailed,
-+ resolved,
- connectInProgress,
- connectFailed,
-+ sslHandshakeInProgress,
- connected,
- sendInProgress,
- sendFailed,
-@@ -50,53 +55,124 @@ enum class ConnState
- class HttpClient : public std::enable_shared_from_this<HttpClient>
- {
- private:
-+ boost::asio::ip::tcp::resolver resolver;
-+ boost::asio::ssl::context ctx{boost::asio::ssl::context::tlsv12_client};
- boost::beast::tcp_stream conn;
-+ std::optional<boost::beast::ssl_stream<boost::beast::tcp_stream&>> sslConn;
- boost::asio::steady_timer timer;
-- boost::beast::flat_buffer buffer;
-+ boost::beast::flat_static_buffer<httpReadBodyLimit> buffer;
-+ std::optional<
-+ boost::beast::http::response_parser<boost::beast::http::string_body>>
-+ parser;
- boost::beast::http::request<boost::beast::http::string_body> req;
-- boost::beast::http::response<boost::beast::http::string_body> res;
- boost::asio::ip::tcp::resolver::results_type endpoint;
-- std::vector<std::pair<std::string, std::string>> headers;
-+ boost::beast::http::fields fields;
- std::queue<std::string> requestDataQueue;
-- ConnState state;
- std::string subId;
- std::string host;
- std::string port;
- std::string uri;
-+ bool useSsl;
- uint32_t retryCount;
- uint32_t maxRetryAttempts;
- uint32_t retryIntervalSecs;
- std::string retryPolicyAction;
- bool runningTimer;
-+ ConnState state;
-+
-+ void doResolve()
-+ {
-+ BMCWEB_LOG_DEBUG << "Trying to resolve: " << host << ":" << port;
-+ if (state == ConnState::resolveInProgress)
-+ {
-+ return;
-+ }
-+ state = ConnState::resolveInProgress;
-+ // TODO: Use async_resolver. boost asio example
-+ // code as is crashing with async_resolve().
-+ try
-+ {
-+ endpoint = resolver.resolve(host, port);
-+ }
-+ catch (const std::exception& e)
-+ {
-+ BMCWEB_LOG_ERROR << "Failed to resolve hostname: " << host << " - "
-+ << e.what();
-+ state = ConnState::resolveFailed;
-+ checkQueue();
-+ return;
-+ }
-+ state = ConnState::resolved;
-+ checkQueue();
-+ }
-
- void doConnect()
- {
-- if (state == ConnState::connectInProgress)
-+ if (useSsl)
-+ {
-+ sslConn.emplace(conn, ctx);
-+ }
-+
-+ if ((state == ConnState::connectInProgress) ||
-+ (state == ConnState::sslHandshakeInProgress))
- {
- return;
- }
- state = ConnState::connectInProgress;
-
- BMCWEB_LOG_DEBUG << "Trying to connect to: " << host << ":" << port;
-- // Set a timeout on the operation
-+
-+ auto respHandler =
-+ [self(shared_from_this())](const boost::beast::error_code ec,
-+ const boost::asio::ip::tcp::resolver::
-+ results_type::endpoint_type& ep) {
-+ if (ec)
-+ {
-+ BMCWEB_LOG_ERROR << "Connect " << ep
-+ << " failed: " << ec.message();
-+ self->state = ConnState::connectFailed;
-+ self->checkQueue();
-+ return;
-+ }
-+ BMCWEB_LOG_DEBUG << "Connected to: " << ep;
-+ if (self->sslConn)
-+ {
-+ self->performHandshake();
-+ }
-+ else
-+ {
-+ self->state = ConnState::connected;
-+ self->checkQueue();
-+ }
-+ };
-+
- conn.expires_after(std::chrono::seconds(30));
-- conn.async_connect(endpoint, [self(shared_from_this())](
-- const boost::beast::error_code& ec,
-- const boost::asio::ip::tcp::resolver::
-- results_type::endpoint_type& ep) {
-- if (ec)
-- {
-- BMCWEB_LOG_ERROR << "Connect " << ep
-- << " failed: " << ec.message();
-- self->state = ConnState::connectFailed;
-- self->checkQueue();
-- return;
-- }
-- self->state = ConnState::connected;
-- BMCWEB_LOG_DEBUG << "Connected to: " << ep;
-+ conn.async_connect(endpoint, std::move(respHandler));
-+ }
-+
-+ void performHandshake()
-+ {
-+ if (state == ConnState::sslHandshakeInProgress)
-+ {
-+ return;
-+ }
-+ state = ConnState::sslHandshakeInProgress;
-+
-+ sslConn->async_handshake(
-+ boost::asio::ssl::stream_base::client,
-+ [self(shared_from_this())](const boost::beast::error_code ec) {
-+ if (ec)
-+ {
-+ BMCWEB_LOG_ERROR << "SSL handshake failed: "
-+ << ec.message();
-+ self->doCloseAndCheckQueue(ConnState::connectFailed);
-+ return;
-+ }
-+ self->state = ConnState::connected;
-+ BMCWEB_LOG_DEBUG << "SSL Handshake successfull";
-
-- self->checkQueue();
-- });
-+ self->checkQueue();
-+ });
- }
-
- void sendMessage(const std::string& data)
-@@ -107,100 +183,170 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
- }
- state = ConnState::sendInProgress;
-
-- BMCWEB_LOG_DEBUG << __FUNCTION__ << "(): " << host << ":" << port;
-+ BMCWEB_LOG_DEBUG << host << ":" << port;
-
-- req.version(static_cast<int>(11)); // HTTP 1.1
-- req.target(uri);
-- req.method(boost::beast::http::verb::post);
--
-- // Set headers
-- for (const auto& [key, value] : headers)
-+ req = {};
-+ for (const auto& field : fields)
- {
-- req.set(key, value);
-+ req.set(field.name_string(), field.value());
- }
- req.set(boost::beast::http::field::host, host);
-+ req.set(boost::beast::http::field::content_type, "text/plain");
-+
-+ req.version(static_cast<int>(11)); // HTTP 1.1
-+ req.target(uri);
-+ req.method(boost::beast::http::verb::post);
- req.keep_alive(true);
-
- req.body() = data;
- req.prepare_payload();
-
-- // Set a timeout on the operation
-- conn.expires_after(std::chrono::seconds(30));
-+ auto respHandler = [self(shared_from_this())](
-+ const boost::beast::error_code ec,
-+ const std::size_t& bytesTransferred) {
-+ if (ec)
-+ {
-+ BMCWEB_LOG_ERROR << "sendMessage() failed: " << ec.message();
-+ self->doCloseAndCheckQueue(ConnState::sendFailed);
-+ return;
-+ }
-+ BMCWEB_LOG_DEBUG << "sendMessage() bytes transferred: "
-+ << bytesTransferred;
-+ boost::ignore_unused(bytesTransferred);
-
-- // Send the HTTP request to the remote host
-- boost::beast::http::async_write(
-- conn, req,
-- [self(shared_from_this())](const boost::beast::error_code& ec,
-- const std::size_t& bytesTransferred) {
-- if (ec)
-- {
-- BMCWEB_LOG_ERROR << "sendMessage() failed: "
-- << ec.message();
-- self->state = ConnState::sendFailed;
-- self->checkQueue();
-- return;
-- }
-- BMCWEB_LOG_DEBUG << "sendMessage() bytes transferred: "
-- << bytesTransferred;
-- boost::ignore_unused(bytesTransferred);
-+ self->recvMessage();
-+ };
-
-- self->recvMessage();
-- });
-+ conn.expires_after(std::chrono::seconds(30));
-+ if (sslConn)
-+ {
-+ boost::beast::http::async_write(*sslConn, req,
-+ std::move(respHandler));
-+ }
-+ else
-+ {
-+ boost::beast::http::async_write(conn, req, std::move(respHandler));
-+ }
- }
-
- void recvMessage()
- {
-- // Receive the HTTP response
-- boost::beast::http::async_read(
-- conn, buffer, res,
-- [self(shared_from_this())](const boost::beast::error_code& ec,
-- const std::size_t& bytesTransferred) {
-+ auto respHandler = [self(shared_from_this())](
-+ const boost::beast::error_code ec,
-+ const std::size_t& bytesTransferred) {
-+ if (ec && ec != boost::beast::http::error::partial_message)
-+ {
-+ BMCWEB_LOG_ERROR << "recvMessage() failed: " << ec.message();
-+ self->doCloseAndCheckQueue(ConnState::recvFailed);
-+ return;
-+ }
-+ BMCWEB_LOG_DEBUG << "recvMessage() bytes transferred: "
-+ << bytesTransferred;
-+ boost::ignore_unused(bytesTransferred);
-+
-+ // TODO: check for return status code and perform
-+ // retry if fails(Ex: 40x). Take action depending on
-+ // retry policy.
-+ BMCWEB_LOG_DEBUG << "recvMessage() data: "
-+ << self->parser->get().body();
-+
-+ // Send is successful, Lets remove data from queue
-+ // check for next request data in queue.
-+ self->requestDataQueue.pop();
-+
-+ // Transfer ownership of the response
-+ self->parser->release();
-+
-+ // TODO: Implement the keep-alive connections.
-+ // Most of the web servers close connection abruptly
-+ // and might be reason due to which its observed that
-+ // stream_truncated(Next read) or partial_message
-+ // errors. So for now, closing connection and re-open
-+ // for all cases.
-+ self->doCloseAndCheckQueue(ConnState::closed);
-+ };
-+
-+ parser.emplace(std::piecewise_construct, std::make_tuple());
-+ parser->body_limit(httpReadBodyLimit);
-+ // Since these are all push style eventing, we are not
-+ // bothered about response parsing.
-+ parser->skip(true);
-+ buffer.consume(buffer.size());
-+
-+ conn.expires_after(std::chrono::seconds(30));
-+ if (sslConn)
-+ {
-+ boost::beast::http::async_read(*sslConn, buffer, *parser,
-+ std::move(respHandler));
-+ }
-+ else
-+ {
-+ boost::beast::http::async_read(conn, buffer, *parser,
-+ std::move(respHandler));
-+ }
-+ }
-+
-+ void doCloseAndCheckQueue(const ConnState setState = ConnState::closed)
-+ {
-+ if (sslConn)
-+ {
-+ conn.expires_after(std::chrono::seconds(30));
-+ sslConn->async_shutdown([self = shared_from_this(),
-+ setState{std::move(setState)}](
-+ const boost::system::error_code ec) {
- if (ec)
- {
-- BMCWEB_LOG_ERROR << "recvMessage() failed: "
-- << ec.message();
-- self->state = ConnState::recvFailed;
-- self->checkQueue();
-- return;
-+ // Many https server closes connection abruptly
-+ // i.e witnout close_notify. More details are at
-+ // https://github.com/boostorg/beast/issues/824
-+ if (ec == boost::asio::ssl::error::stream_truncated)
-+ {
-+ BMCWEB_LOG_ERROR
-+ << "doCloseAndCheckQueue(): Connection "
-+ "closed by server. ";
-+ }
-+ else
-+ {
-+ BMCWEB_LOG_ERROR << "doCloseAndCheckQueue() failed: "
-+ << ec.message();
-+ }
- }
-- BMCWEB_LOG_DEBUG << "recvMessage() bytes transferred: "
-- << bytesTransferred;
-- boost::ignore_unused(bytesTransferred);
--
-- // Discard received data. We are not interested.
-- BMCWEB_LOG_DEBUG << "recvMessage() data: " << self->res;
--
-- // Send is successful, Lets remove data from queue
-- // check for next request data in queue.
-- self->requestDataQueue.pop();
-- self->state = ConnState::idle;
-+ else
-+ {
-+ BMCWEB_LOG_DEBUG << "Connection closed gracefully...";
-+ }
-+ self->conn.cancel();
-+ self->state = setState;
- self->checkQueue();
- });
-- }
--
-- void doClose()
-- {
-- boost::beast::error_code ec;
-- conn.socket().shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec);
--
-- state = ConnState::closed;
-- // not_connected happens sometimes so don't bother reporting it.
-- if (ec && ec != boost::beast::errc::not_connected)
-+ }
-+ else
- {
-- BMCWEB_LOG_ERROR << "shutdown failed: " << ec.message();
-- return;
-+ boost::beast::error_code ec;
-+ conn.expires_after(std::chrono::seconds(30));
-+ conn.socket().shutdown(boost::asio::ip::tcp::socket::shutdown_both,
-+ ec);
-+ if (ec)
-+ {
-+ BMCWEB_LOG_ERROR << "doCloseAndCheckQueue() failed: "
-+ << ec.message();
-+ }
-+ else
-+ {
-+ BMCWEB_LOG_DEBUG << "Connection closed gracefully...";
-+ }
-+
-+ conn.close();
-+ state = setState;
-+ checkQueue();
- }
-- BMCWEB_LOG_DEBUG << "Connection closed gracefully";
-+ return;
- }
-
- void checkQueue(const bool newRecord = false)
- {
- if (requestDataQueue.empty())
- {
-- // TODO: Having issue in keeping connection alive. So lets close if
-- // nothing to be transferred.
-- doClose();
--
- BMCWEB_LOG_DEBUG << "requestDataQueue is empty\n";
- return;
- }
-@@ -232,6 +378,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
- }
-
- if ((state == ConnState::connectFailed) ||
-+ (state == ConnState::resolveFailed) ||
- (state == ConnState::sendFailed) ||
- (state == ConnState::recvFailed))
- {
-@@ -256,14 +403,18 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
- << " seconds. RetryCount = " << retryCount;
- timer.expires_after(std::chrono::seconds(retryIntervalSecs));
- timer.async_wait(
-- [self = shared_from_this()](const boost::system::error_code&) {
-+ [self = shared_from_this()](boost::system::error_code) {
- self->runningTimer = false;
- self->connStateCheck();
- });
- return;
- }
-- // reset retry count.
-- retryCount = 0;
-+
-+ if (state == ConnState::idle)
-+ {
-+ // State idle means, previous attempt is successful.
-+ retryCount = 0;
-+ }
- connStateCheck();
-
- return;
-@@ -273,15 +424,21 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
- {
- switch (state)
- {
-+ case ConnState::initialized:
-+ case ConnState::resolveFailed:
-+ case ConnState::connectFailed:
-+ doResolve();
-+ break;
- case ConnState::connectInProgress:
-+ case ConnState::resolveInProgress:
-+ case ConnState::sslHandshakeInProgress:
- case ConnState::sendInProgress:
- case ConnState::suspended:
- case ConnState::terminated:
- // do nothing
- break;
-- case ConnState::initialized:
- case ConnState::closed:
-- case ConnState::connectFailed:
-+ case ConnState::resolved:
- case ConnState::sendFailed:
- case ConnState::recvFailed:
- {
-@@ -297,22 +454,22 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
- sendMessage(data);
- break;
- }
-+ default:
-+ break;
- }
- }
-
- public:
- explicit HttpClient(boost::asio::io_context& ioc, const std::string& id,
- const std::string& destIP, const std::string& destPort,
-- const std::string& destUri) :
-- conn(ioc),
-- timer(ioc), subId(id), host(destIP), port(destPort), uri(destUri),
-- retryCount(0), maxRetryAttempts(5), retryIntervalSecs(0),
-- retryPolicyAction("TerminateAfterRetries"), runningTimer(false)
-- {
-- boost::asio::ip::tcp::resolver resolver(ioc);
-- endpoint = resolver.resolve(host, port);
-- state = ConnState::initialized;
-- }
-+ const std::string& destUri,
-+ const bool inUseSsl = true) :
-+ resolver(ioc),
-+ conn(ioc), timer(ioc), subId(id), host(destIP), port(destPort),
-+ uri(destUri), useSsl(inUseSsl), retryCount(0), maxRetryAttempts(5),
-+ retryPolicyAction("TerminateAfterRetries"), runningTimer(false),
-+ state(ConnState::initialized)
-+ {}
-
- void sendData(const std::string& data)
- {
-@@ -337,7 +494,12 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
- void setHeaders(
- const std::vector<std::pair<std::string, std::string>>& httpHeaders)
- {
-- headers = httpHeaders;
-+ // Set headers
-+ for (const auto& [key, value] : httpHeaders)
-+ {
-+ // TODO: Validate the header fileds before assign.
-+ fields.set(key, value);
-+ }
- }
-
- void setRetryConfig(const uint32_t retryAttempts,
-diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 54dafb4..f68ae1d 100644
---- a/redfish-core/include/event_service_manager.hpp
-+++ b/redfish-core/include/event_service_manager.hpp
-@@ -387,7 +387,7 @@ class Subscription
- {
- conn = std::make_shared<crow::HttpClient>(
- crow::connections::systemBus->get_io_context(), id, host, port,
-- path);
-+ path, (uriProto == "https" ? true : false));
- }
-
- Subscription(const std::shared_ptr<boost::beast::tcp_stream>& adaptor) :
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch
index a9c46f487..d962d3872 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch
@@ -1,4 +1,4 @@
-From a76314cd29f5cbcf19142b7120c5bf83358910fd Mon Sep 17 00:00:00 2001
+From b5e4edfc26eec245427d3435de9acaa9363ae836 Mon Sep 17 00:00:00 2001
From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Date: Mon, 28 Dec 2020 18:55:57 +0000
Subject: [PATCH] managers: add attributes for Manager.CommandShell
@@ -32,26 +32,36 @@ Response:
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
---
- redfish-core/lib/managers.hpp | 6 ++++++
- 1 file changed, 6 insertions(+)
+ redfish-core/lib/managers.hpp | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
-index 6347caf..c401ca9 100644
+index 67f8d99..dcbc347 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
-@@ -1767,6 +1767,12 @@ class Manager : public Node
- res.jsonValue["SerialConsole"]["MaxConcurrentSessions"] = 15;
- res.jsonValue["SerialConsole"]["ConnectTypesSupported"] = {"IPMI",
- "SSH"};
+@@ -1830,6 +1830,13 @@ class Manager : public Node
+ asyncResp->res.jsonValue["SerialConsole"]["MaxConcurrentSessions"] = 15;
+ asyncResp->res.jsonValue["SerialConsole"]["ConnectTypesSupported"] = {
+ "IPMI", "SSH"};
++
+ // Fill in CommandShell info
-+ res.jsonValue["CommandShell"]["ServiceEnabled"] = true;
-+ res.jsonValue["CommandShell"]["MaxConcurrentSessions"] = 4;
-+ res.jsonValue["CommandShell"]["ConnectTypesSupported"] = {"SSH",
-+ "IPMI"};
++ asyncResp->res.jsonValue["CommandShell"]["ServiceEnabled"] = true;
++ asyncResp->res.jsonValue["CommandShell"]["MaxConcurrentSessions"] = 4;
++ asyncResp->res.jsonValue["CommandShell"]["ConnectTypesSupported"] = {
++ "SSH", "IPMI"};
+
#ifdef BMCWEB_ENABLE_KVM
// Fill in GraphicalConsole info
- res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
+ asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
+@@ -2272,7 +2279,7 @@ class Manager : public Node
+ }
+
+ std::string uuid;
+-};
++}; // namespace redfish
+
+ class ManagerCollection : public Node
+ {
--
2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-recommended-fixes-by-crypto-review-team.patch
index 5ffc259c0..5ffc259c0 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-recommended-fixes-by-crypto-review-team.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0037-Add-state-sensor-messages-to-the-registry.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0015-Add-state-sensor-messages-to-the-registry.patch
index b171a8b2c..b171a8b2c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0037-Add-state-sensor-messages-to-the-registry.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0015-Add-state-sensor-messages-to-the-registry.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0016-Fix-bmcweb-crashes-if-socket-directory-not-present.patch
index bc023839f..bc023839f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0016-Fix-bmcweb-crashes-if-socket-directory-not-present.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0017-Add-msg-registry-for-subscription-related-actions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0017-Add-msg-registry-for-subscription-related-actions.patch
new file mode 100644
index 000000000..d0cfd1c44
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0017-Add-msg-registry-for-subscription-related-actions.patch
@@ -0,0 +1,81 @@
+From 7282ab7756cdb8c844bef9affd8a8e894828678c Mon Sep 17 00:00:00 2001
+From: Ayushi Smriti <smriti.ayushi@intel.com>
+Date: Mon, 10 May 2021 12:32:30 +0530
+Subject: [PATCH] Add msg registry for subscription related actions
+
+For subscription event message log purpose, added message registry
+entry for event service subscription related actions- add, update
+and delete.
+
+Tested:
+ - Message registry entry appears in the log for the corresponding
+ subscription action.
+
+Signed-off-by: AppaRao Puli <apparao.puli@intel.com>
+Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
+---
+ .../registries/openbmc_message_registry.hpp | 41 ++++++++++++++++++-
+ 1 file changed, 40 insertions(+), 1 deletion(-)
+
+diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp
+index e12a138..2f981db 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, 190> registry = {
++constexpr std::array<MessageEntry, 193> registry = {
+ MessageEntry{
+ "ADDDCCorrectable",
+ {
+@@ -417,6 +417,45 @@ constexpr std::array<MessageEntry, 190> registry = {
+ {},
+ "None.",
+ }},
++ MessageEntry{"EventSubscriptionAdded",
++ {
++ "Indicates that an Event subscription with specific "
++ "id was added.",
++ "Event subscription with id %1 was added.",
++ "OK",
++ "OK",
++ 1,
++ {
++ "string",
++ },
++ "None.",
++ }},
++ MessageEntry{"EventSubscriptionRemoved",
++ {
++ "Indicates that an Event subscription with specific "
++ "id was removed.",
++ "Event subscription with id %1 was removed.",
++ "OK",
++ "OK",
++ 1,
++ {
++ "string",
++ },
++ "None.",
++ }},
++ MessageEntry{"EventSubscriptionUpdated",
++ {
++ "Indicates that an Event subscription with specific "
++ " id was updated.",
++ "Event subscription with id %1 was updated.",
++ "OK",
++ "OK",
++ 1,
++ {
++ "string",
++ },
++ "None.",
++ }},
+ MessageEntry{"FanInserted",
+ {
+ "Indicates that a system fan has been inserted.",
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch
deleted file mode 100644
index f02e5e1a4..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-comparison-for-proxy-legacy-mode.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 7cde56820505a4f750cc67caa0dc9300688f3fd9 Mon Sep 17 00:00:00 2001
-From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
-Date: Tue, 13 Apr 2021 15:16:43 +0200
-Subject: [PATCH] Fix comparison for proxy/legacy mode
-
-After sdbusplus made available string path wrapper VM code has been
-updated to use it. This makes legacy mode unusable as appropriate
-change introduced a problem with comparison of DBus object path, which
-is now fixed.
-
-Tested:
-After applying this fix, legacy mode has InsertMedia action enabled
-again.
-
-Change-Id: I062994f23b77cb7ab9c4421f296a65a80b9ce896
-Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
----
- redfish-core/lib/virtual_media.hpp | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index 365290b..dda73d8 100644
---- a/redfish-core/lib/virtual_media.hpp
-+++ b/redfish-core/lib/virtual_media.hpp
-@@ -274,10 +274,22 @@ static void getVmData(const std::shared_ptr<AsyncResp>& aResp,
- continue;
- }
-
-+ auto mode = item.first.parent_path();
-+ auto type = mode.parent_path();
-+ if (mode.filename().empty() || type.filename().empty())
-+ {
-+ continue;
-+ }
-+
-+ if (type.filename() != "VirtualMedia")
-+ {
-+ continue;
-+ }
-+
- aResp->res.jsonValue = vmItemTemplate(name, resName);
-
- // Check if dbus path is Legacy type
-- if (thispath.find("VirtualMedia/Legacy") != std::string::npos)
-+ if (mode.filename() == "Legacy")
- {
- aResp->res.jsonValue["Actions"]["#VirtualMedia.InsertMedia"]
- ["target"] =
---
-2.26.2
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch
index b2627644b..9cf4653d6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch
@@ -1,4 +1,4 @@
-From c645c011bb3ea2a2aaf52560cb9fcc461d048cae Mon Sep 17 00:00:00 2001
+From 72c273ae74bb6add062b89f59ebeee4d4eb7e523 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Fri, 4 Sep 2020 19:24:25 +0800
Subject: [PATCH] Define Redfish interface "/Registries/Bios" and enable
@@ -228,16 +228,16 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
---
redfish-core/include/redfish.hpp | 2 +
.../include/registries/bios_registry.hpp | 31 ++
- redfish-core/lib/bios.hpp | 503 ++++++++++++++++++
+ redfish-core/lib/bios.hpp | 501 ++++++++++++++++++
redfish-core/lib/message_registries.hpp | 9 +-
- 4 files changed, 544 insertions(+), 1 deletion(-)
+ 4 files changed, 542 insertions(+), 1 deletion(-)
create mode 100644 redfish-core/include/registries/bios_registry.hpp
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
-index 5d5eb7b..a8e5cf2 100644
+index db58d60..298ebb8 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
-@@ -157,6 +157,8 @@ class RedfishService
+@@ -156,6 +156,8 @@ class RedfishService
nodes.emplace_back(std::make_unique<SystemActionsReset>(app));
nodes.emplace_back(std::make_unique<SystemResetActionInfo>(app));
nodes.emplace_back(std::make_unique<BiosService>(app));
@@ -285,7 +285,7 @@ index 0000000..88ef782
+} // namespace redfish::message_registries::bios
\ No newline at end of file
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
-index 2c31077..5f8c91b 100644
+index 0917cc7..cb2b74d 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -3,8 +3,140 @@
@@ -429,7 +429,7 @@ index 2c31077..5f8c91b 100644
/**
* BiosService class supports handle get method for bios.
*/
-@@ -35,6 +167,377 @@ class BiosService : public Node
+@@ -33,6 +165,375 @@ class BiosService : public Node
// Get the ActiveSoftwareImage and SoftwareImages
fw_util::populateFirmwareInformation(asyncResp, fw_util::biosPurpose,
"", true);
@@ -532,10 +532,9 @@ index 2c31077..5f8c91b 100644
+ }
+
+ private:
-+ void doGet(crow::Response& res, const crow::Request&,
-+ const std::vector<std::string>&) override
++ void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request&, const std::vector<std::string>&) override
+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
+ asyncResp->res.jsonValue["@odata.id"] =
+ "/redfish/v1/Systems/system/Bios/Settings";
+ asyncResp->res.jsonValue["@odata.type"] = "#Bios.v1_1_0.Bios";
@@ -641,10 +640,9 @@ index 2c31077..5f8c91b 100644
+ }
+
+ private:
-+ void doGet(crow::Response& res, const crow::Request&,
-+ const std::vector<std::string>&) override
++ void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request&, const std::vector<std::string>&) override
+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
+ asyncResp->res.jsonValue["@odata.id"] =
+ "/redfish/v1/Registries/BiosAttributeRegistry/"
+ "BiosAttributeRegistry";
@@ -808,7 +806,7 @@ index 2c31077..5f8c91b 100644
};
/**
diff --git a/redfish-core/lib/message_registries.hpp b/redfish-core/lib/message_registries.hpp
-index 77fc10e..0caf01c 100644
+index 455bf70..7afbfc2 100644
--- a/redfish-core/lib/message_registries.hpp
+++ b/redfish-core/lib/message_registries.hpp
@@ -18,6 +18,7 @@
@@ -831,9 +829,9 @@ index 77fc10e..0caf01c 100644
{{"@odata.id", "/redfish/v1/Registries/ResourceEvent"}},
+ {{"@odata.id", "/redfish/v1/Registries/BiosAttributeRegistry"}},
{{"@odata.id", "/redfish/v1/Registries/OpenBMC"}}}}};
-
- res.end();
-@@ -118,6 +120,11 @@ class MessageRegistryFile : public Node
+ }
+ };
+@@ -116,6 +118,11 @@ class MessageRegistryFile : public Node
header = &message_registries::resource_event::header;
url = message_registries::resource_event::url;
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0002-BaseBiosTable-Add-support-for-PATCH-operation.patch
index 6f3794478..21a21e8db 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0002-BaseBiosTable-Add-support-for-PATCH-operation.patch
@@ -1,4 +1,4 @@
-From ad2b1c83bd9cb1bb6eb86bebd1867b0172e5a7a8 Mon Sep 17 00:00:00 2001
+From 9c498d683be59ce25dd0124ba7ec5e026c59bbbf Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Wed, 23 Dec 2020 16:50:45 +0800
Subject: [PATCH] BaseBiosTable: Add support for PATCH operation
@@ -26,11 +26,11 @@ backend and that updates the BaseBiosTable.
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
---
- redfish-core/lib/bios.hpp | 94 ++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 93 insertions(+), 1 deletion(-)
+ redfish-core/lib/bios.hpp | 93 ++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 92 insertions(+), 1 deletion(-)
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
-index 5f8c91b..cf76fe0 100644
+index cb2b74d..860a643 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -96,6 +96,29 @@ static std::string mapAttrTypeToRedfish(const std::string_view typeDbus)
@@ -63,7 +63,7 @@ index 5f8c91b..cf76fe0 100644
static std::string mapBoundTypeToRedfish(const std::string_view typeDbus)
{
std::string ret;
-@@ -262,7 +285,9 @@ class BiosSettings : public Node
+@@ -260,7 +283,9 @@ class BiosSettings : public Node
BiosSettings(App& app) :
Node(app, "/redfish/v1/Systems/system/Bios/Settings")
{
@@ -74,16 +74,15 @@ index 5f8c91b..cf76fe0 100644
}
private:
-@@ -359,6 +384,73 @@ class BiosSettings : public Node
+@@ -356,6 +381,72 @@ class BiosSettings : public Node
"/xyz/openbmc_project/bios_config/manager",
std::array<const char*, 0>());
}
+
-+ void doPatch(crow::Response& res, const crow::Request& req,
++ void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request& req,
+ const std::vector<std::string>&) override
+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
-+
+ nlohmann::json inpJson;
+
+ if (!redfish::json_util::readJson(req, asyncResp->res, "data", inpJson))
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch
index 7e4e2e8d8..5a24996a0 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch
@@ -1,4 +1,4 @@
-From a78eecb032eefeb84da3ec042700a40f55ae8f10 Mon Sep 17 00:00:00 2001
+From 4e85ce8a5f34038c289504855d21ebfa3d6b94f0 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Wed, 23 Dec 2020 22:47:56 +0800
Subject: [PATCH] Add support to ResetBios action
@@ -10,16 +10,15 @@ POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios
Change-Id: I5e5fbdd70d4a3ce3b976cc2eb0a7d9a2a3adb124
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
-
---
- redfish-core/lib/bios.hpp | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
+ redfish-core/lib/bios.hpp | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
-index cf76fe0..7b6fc3d 100644
+index 860a643..1eb7bef 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
-@@ -643,7 +643,7 @@ class BiosReset : public Node
+@@ -638,7 +638,7 @@ class BiosReset : public Node
Node(app, "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/")
{
entityPrivileges = {
@@ -28,13 +27,13 @@ index cf76fe0..7b6fc3d 100644
}
private:
-@@ -655,19 +655,23 @@ class BiosReset : public Node
- const std::vector<std::string>&) override
+@@ -649,19 +649,24 @@ class BiosReset : public Node
+ void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const crow::Request&, const std::vector<std::string>&) override
{
- auto asyncResp = std::make_shared<AsyncResp>(res);
--
+ std::string resetFlag =
+ "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag.FactoryDefaults";
+
crow::connections::systemBus->async_method_call(
[asyncResp](const boost::system::error_code ec) {
if (ec)
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0004-Add-support-to-ChangePassword-action.patch
index 976292197..e87995aca 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0004-Add-support-to-ChangePassword-action.patch
@@ -1,4 +1,4 @@
-From ede8454491b554c2494a61f42993fa2e39b4d865 Mon Sep 17 00:00:00 2001
+From 0ce94f6caf5d76d7f1abc71f6f8f7dc320517984 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Wed, 23 Dec 2020 14:41:23 +0800
Subject: [PATCH] Add support to ChangePassword action
@@ -37,10 +37,10 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
2 files changed, 71 insertions(+)
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
-index a8e5cf2..dabf78e 100644
+index 298ebb8..4418c3d 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
-@@ -160,6 +160,7 @@ class RedfishService
+@@ -159,6 +159,7 @@ class RedfishService
nodes.emplace_back(std::make_unique<BiosSettings>(app));
nodes.emplace_back(std::make_unique<BiosAttributeRegistry>(app));
nodes.emplace_back(std::make_unique<BiosReset>(app));
@@ -49,10 +49,10 @@ index a8e5cf2..dabf78e 100644
nodes.emplace_back(std::make_unique<VirtualMedia>(app));
nodes.emplace_back(std::make_unique<VirtualMediaCollection>(app));
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
-index 7b6fc3d..61b396b 100644
+index 1eb7bef..12ec472 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
-@@ -186,6 +186,9 @@ class BiosService : public Node
+@@ -184,6 +184,9 @@ class BiosService : public Node
asyncResp->res.jsonValue["Actions"]["#Bios.ResetBios"] = {
{"target",
"/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios"}};
@@ -62,7 +62,7 @@ index 7b6fc3d..61b396b 100644
// Get the ActiveSoftwareImage and SoftwareImages
fw_util::populateFirmwareInformation(asyncResp, fw_util::biosPurpose,
-@@ -674,4 +677,71 @@ class BiosReset : public Node
+@@ -669,4 +672,71 @@ class BiosReset : public Node
std::variant<std::string>(resetFlag));
}
};
@@ -87,14 +87,14 @@ index 7b6fc3d..61b396b 100644
+ * Function handles POST method request.
+ * Analyzes POST body message before sends Reset request data to D-Bus.
+ */
-+ void doPost(crow::Response& res, const crow::Request& req,
++ void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request& req,
+ const std::vector<std::string>&) override
+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
+ std::string currentPassword, newPassword, userName;
-+ if (!json_util::readJson(req, res, "NewPassword", newPassword,
-+ "OldPassword", currentPassword, "PasswordName",
-+ userName))
++ if (!json_util::readJson(req, asyncResp->res, "NewPassword",
++ newPassword, "OldPassword", currentPassword,
++ "PasswordName", userName))
+ {
+ return;
+ }
@@ -120,8 +120,8 @@ index 7b6fc3d..61b396b 100644
+ [asyncResp](const boost::system::error_code ec) {
+ if (ec)
+ {
-+ BMCWEB_LOG_CRITICAL << "Failed in doPost(BiosChangePassword) "
-+ << ec;
++ BMCWEB_LOG_CRITICAL
++ << "Failed in doPost(BiosChangePassword) " << ec;
+ messages::internalError(asyncResp->res);
+ return;
+ }
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0005-Fix-remove-bios-user-pwd-change-option-via-Redfish.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0005-Fix-remove-bios-user-pwd-change-option-via-Redfish.patch
new file mode 100644
index 000000000..75a78abb4
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0005-Fix-remove-bios-user-pwd-change-option-via-Redfish.patch
@@ -0,0 +1,44 @@
+From fedcdb7887b4d934ee763d75f7988825300c5cef Mon Sep 17 00:00:00 2001
+From: Ayushi Smriti <smriti.ayushi@intel.com>
+Date: Thu, 6 May 2021 11:56:38 +0530
+Subject: [PATCH] Fix:remove bios user pwd change option via Redfish
+
+BMC should not provide user bios setup password change option via
+Redfish as per bios security requirements. Only Admin BIOS setup
+password is supported.
+
+Added check for the password name action parameter and
+do not allow if it has User Password value from redfish side.
+
+Tested: sent POST query in redfish on URI:
+https://<ip>/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword
+error occurs for UserPassword parameter and allows for AdminPassword.
+
+Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
+---
+ redfish-core/lib/bios.hpp | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
+index 12ec472..0416934 100644
+--- a/redfish-core/lib/bios.hpp
++++ b/redfish-core/lib/bios.hpp
+@@ -722,6 +722,15 @@ class BiosChangePassword : public Node
+ "PasswordName");
+ return;
+ }
++
++ // In Intel BIOS, we are not supporting user password in BIOS setup
++ if (userName == "UserPassword")
++ {
++ messages::actionParameterUnknown(asyncResp->res, "ChangePassword",
++ "PasswordName");
++ return;
++ }
++
+ crow::connections::systemBus->async_method_call(
+ [asyncResp](const boost::system::error_code ec) {
+ if (ec)
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0001-EventService-Fix-retry-handling-for-http-client.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0001-EventService-Fix-retry-handling-for-http-client.patch
index b46d30149..bda893a81 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0001-EventService-Fix-retry-handling-for-http-client.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0001-EventService-Fix-retry-handling-for-http-client.patch
@@ -1,7 +1,7 @@
-From ae55e89c14ea5abef0895409c956f5f4c38f330f Mon Sep 17 00:00:00 2001
+From 3d6c3b3e91c04ff8f10bff49bcf2a7d7206c53df Mon Sep 17 00:00:00 2001
From: Sunitha Harish <sunithaharish04@gmail.com>
Date: Fri, 19 Feb 2021 13:38:31 +0530
-Subject: [PATCH 1/2] EventService : Fix retry handling for http-client
+Subject: [PATCH] EventService : Fix retry handling for http-client
When the event send/receive is failed, the bmcweb does not handle
the failure to tear-down the complete connection and start a fresh
@@ -23,17 +23,22 @@ Tested by:
- Generate an event and see the same is received at the listener's console
- Update the listner to change the keep-alive to true/false and
observe the http-client connection states at bmcweb
+ - Changed listener client to return non success HTTP status code
+ and observed retry logic gets trigrred in http-client.
+ - Gave wrong fqdn and observed async resolve failure and retry logc.
+ - Stopped listener after connect and verified timeouts on http-client
+ side.
Change-Id: Ibb45691f139916ba2954da37beda9d4f91c7cef3
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
- http/http_client.hpp | 289 ++++++++++--------
+ http/http_client.hpp | 288 ++++++++++--------
.../include/event_service_manager.hpp | 2 +-
- 2 files changed, 163 insertions(+), 128 deletions(-)
+ 2 files changed, 162 insertions(+), 128 deletions(-)
diff --git a/http/http_client.hpp b/http/http_client.hpp
-index 992ac2b..d116f6d 100644
+index 992ac2b..feabbba 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -34,22 +34,28 @@ namespace crow
@@ -67,7 +72,7 @@ index 992ac2b..d116f6d 100644
};
class HttpClient : public std::enable_shared_from_this<HttpClient>
-@@ -58,11 +64,14 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -58,11 +64,13 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
crow::async_resolve::Resolver resolver;
boost::beast::tcp_stream conn;
boost::asio::steady_timer timer;
@@ -80,13 +85,12 @@ index 992ac2b..d116f6d 100644
+ std::optional<
+ boost::beast::http::response_parser<boost::beast::http::string_body>>
+ parser;
-+ boost::asio::ip::tcp::endpoint endpoint;
+ boost::circular_buffer_space_optimized<std::string> requestDataQueue{};
+ std::vector<boost::asio::ip::tcp::endpoint> endPoints;
ConnState state;
std::string subId;
std::string host;
-@@ -76,12 +85,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -76,12 +84,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
void doResolve()
{
@@ -99,7 +103,7 @@ index 992ac2b..d116f6d 100644
BMCWEB_LOG_DEBUG << "Trying to resolve: " << host << ":" << port;
auto respHandler =
-@@ -89,78 +93,56 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -89,78 +92,56 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
const boost::beast::error_code ec,
const std::vector<boost::asio::ip::tcp::endpoint>&
endpointList) {
@@ -191,7 +195,7 @@ index 992ac2b..d116f6d 100644
// Send the HTTP request to the remote host
boost::beast::http::async_write(
conn, req,
-@@ -171,7 +153,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -171,7 +152,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
BMCWEB_LOG_ERROR << "sendMessage() failed: "
<< ec.message();
self->state = ConnState::sendFailed;
@@ -200,7 +204,7 @@ index 992ac2b..d116f6d 100644
return;
}
BMCWEB_LOG_DEBUG << "sendMessage() bytes transferred: "
-@@ -184,9 +166,18 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -184,9 +165,17 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
void recvMessage()
{
@@ -208,8 +212,7 @@ index 992ac2b..d116f6d 100644
+
+ parser.emplace(std::piecewise_construct, std::make_tuple());
+ parser->body_limit(httpReadBodyLimit);
-+ // Since these are all push style eventing, we are not
-+ // bothered about response body parsing.
++
+ // Check only for the response header
+ parser->skip(true);
+
@@ -220,7 +223,7 @@ index 992ac2b..d116f6d 100644
[self(shared_from_this())](const boost::beast::error_code& ec,
const std::size_t& bytesTransferred) {
if (ec)
-@@ -194,30 +185,46 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -194,30 +183,47 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
BMCWEB_LOG_ERROR << "recvMessage() failed: "
<< ec.message();
self->state = ConnState::recvFailed;
@@ -257,7 +260,8 @@ index 992ac2b..d116f6d 100644
+ // enabled
+ self->state = ConnState::abortConnection;
+ }
-+ // Transfer ownership of the response
++
++ // Returns ownership of the parsed message
+ self->parser->release();
+
+ self->handleConnState();
@@ -275,7 +279,7 @@ index 992ac2b..d116f6d 100644
// not_connected happens sometimes so don't bother reporting it.
if (ec && ec != boost::beast::errc::not_connected)
{
-@@ -225,112 +232,139 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -225,112 +231,139 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
return;
}
BMCWEB_LOG_DEBUG << "Connection closed gracefully";
@@ -369,7 +373,7 @@ index 992ac2b..d116f6d 100644
- retryCount = 0;
- connStateCheck();
+ runningTimer = true;
-
++
+ retryCount++;
+
+ BMCWEB_LOG_DEBUG << "Attempt retry after " << retryIntervalSecs
@@ -384,7 +388,7 @@ index 992ac2b..d116f6d 100644
+ // sending the event as per the retry policy
+ }
+ self->runningTimer = false;
-+
+
+ // Lets close connection and start from resolve.
+ self->doClose();
+ });
@@ -469,7 +473,7 @@ index 992ac2b..d116f6d 100644
}
}
-@@ -339,37 +373,38 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -339,37 +372,38 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
const std::string& destIP, const std::string& destPort,
const std::string& destUri) :
conn(ioc),
@@ -526,10 +530,10 @@ index 992ac2b..d116f6d 100644
void setRetryConfig(const uint32_t retryAttempts,
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 148c703..bffa68f 100644
+index fa4e41a..c999121 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -412,7 +412,7 @@ class Subscription
+@@ -423,7 +423,7 @@ class Subscription
reqHeaders.emplace_back(std::pair(key, val));
}
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0002-EventService-https-client-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0002-EventService-https-client-support.patch
index b1f61c6fd..7cbb406a5 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0002-EventService-https-client-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0002-EventService-https-client-support.patch
@@ -1,7 +1,7 @@
-From 579fda953ec991b4e7f9d7194b08f6aa103fa0ec Mon Sep 17 00:00:00 2001
+From 5f19e5c8ebc5cb0ce331e4ef841526995b6bdb2e Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Mon, 22 Feb 2021 17:07:47 +0000
-Subject: [PATCH 2/2] EventService: https client support
+Subject: [PATCH] EventService: https client support
Add https client support for push style
eventing. Using this BMC can push the event
@@ -17,12 +17,12 @@ Tested:
Change-Id: I44c3918b39baa2eb5fddda9d635f99aa280a422a
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
- http/http_client.hpp | 255 ++++++++++++------
+ http/http_client.hpp | 257 ++++++++++++------
.../include/event_service_manager.hpp | 2 +-
- 2 files changed, 175 insertions(+), 82 deletions(-)
+ 2 files changed, 176 insertions(+), 83 deletions(-)
diff --git a/http/http_client.hpp b/http/http_client.hpp
-index d116f6d..cebc857 100644
+index feabbba..aaf1b2d 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -20,6 +20,7 @@
@@ -52,7 +52,7 @@ index d116f6d..cebc857 100644
boost::asio::steady_timer timer;
boost::beast::flat_static_buffer<httpReadBodyLimit> buffer;
boost::beast::http::request<boost::beast::http::string_body> req;
-@@ -112,23 +117,52 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -111,23 +116,52 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
void doConnect()
{
state = ConnState::connectInProgress;
@@ -113,7 +113,7 @@ index d116f6d..cebc857 100644
self->state = ConnState::connected;
self->handleConnState();
});
-@@ -136,106 +170,159 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -135,106 +169,159 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
void sendMessage(const std::string& data)
{
@@ -207,15 +207,15 @@ index d116f6d..cebc857 100644
+ // Abort the connection since server is not keep-alive enabled
+ self->state = ConnState::abortConnection;
+ }
-+ // Transfer ownership of the response
++
++ // Returns ownership of the parsed message
+ self->parser->release();
+
+ self->handleConnState();
+ };
parser.emplace(std::piecewise_construct, std::make_tuple());
parser->body_limit(httpReadBodyLimit);
- // Since these are all push style eventing, we are not
- // bothered about response body parsing.
+
// Check only for the response header
parser->skip(true);
+ conn.expires_after(std::chrono::seconds(30));
@@ -296,7 +296,8 @@ index d116f6d..cebc857 100644
+ self->state = ConnState::closed;
+ self->handleConnState();
}
-- // Transfer ownership of the response
+-
+- // Returns ownership of the parsed message
- self->parser->release();
-
- self->handleConnState();
@@ -344,7 +345,7 @@ index d116f6d..cebc857 100644
}
}
-@@ -302,6 +389,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -301,6 +388,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
{
case ConnState::resolveInProgress:
case ConnState::connectInProgress:
@@ -352,7 +353,7 @@ index d116f6d..cebc857 100644
case ConnState::sendInProgress:
case ConnState::recvInProgress:
case ConnState::closeInProgress:
-@@ -333,6 +421,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -332,6 +420,7 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
}
case ConnState::resolveFailed:
case ConnState::connectFailed:
@@ -360,7 +361,7 @@ index d116f6d..cebc857 100644
case ConnState::sendFailed:
case ConnState::recvFailed:
case ConnState::retry:
-@@ -371,7 +460,8 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -370,7 +459,8 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
public:
explicit HttpClient(boost::asio::io_context& ioc, const std::string& id,
const std::string& destIP, const std::string& destPort,
@@ -370,7 +371,7 @@ index d116f6d..cebc857 100644
conn(ioc),
timer(ioc), req(boost::beast::http::verb::post, destUri, 11),
state(ConnState::initialized), subId(id), host(destIP), port(destPort),
-@@ -384,8 +474,11 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
+@@ -383,8 +473,11 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
req.keep_alive(true);
requestDataQueue.set_capacity(maxRequestQueueSize);
@@ -384,10 +385,10 @@ index d116f6d..cebc857 100644
{
if ((state == ConnState::suspended) || (state == ConnState::terminated))
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index bffa68f..1e6f496 100644
+index c999121..267c857 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -387,7 +387,7 @@ class Subscription
+@@ -398,7 +398,7 @@ class Subscription
{
conn = std::make_shared<crow::HttpClient>(
crow::connections::systemBus->get_io_context(), id, host, port,
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch
index 0d31fbc72..cd59ed94d 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch
@@ -1,7 +1,7 @@
-From e93a6a02b0fba3371144d474422fadacc3f25fde Mon Sep 17 00:00:00 2001
+From 0c531d959364192697290c1489d5f7b1bdd7a665 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Fri, 12 Mar 2021 18:53:25 +0000
-Subject: [PATCH 4/6] Add Server-Sent-Events support
+Subject: [PATCH] Add Server-Sent-Events support
Server-Sent Events is a standard describing how servers can
initiate data transmission towards clients once an initial
@@ -24,13 +24,13 @@ Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
http/http_connection.hpp | 14 +-
http/http_response.hpp | 7 +-
- http/routing.hpp | 70 ++++++++++
+ http/routing.hpp | 71 ++++++++++
http/server_sent_event.hpp | 279 +++++++++++++++++++++++++++++++++++++
- 4 files changed, 364 insertions(+), 6 deletions(-)
+ 4 files changed, 365 insertions(+), 6 deletions(-)
create mode 100644 http/server_sent_event.hpp
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
-index 4482f8d..2c8bf40 100644
+index 6172b3a..fc9fc60 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -326,7 +326,7 @@ class Connection :
@@ -63,7 +63,7 @@ index 4482f8d..2c8bf40 100644
// delete lambda with self shared_ptr
// to enable connection destruction
diff --git a/http/http_response.hpp b/http/http_response.hpp
-index cd00ec8..ffd6dda 100644
+index 7965704..29c56e1 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -13,10 +13,15 @@ namespace crow
@@ -93,7 +93,7 @@ index cd00ec8..ffd6dda 100644
// In case of a JSON object, set the Content-Type header
void jsonMode()
diff --git a/http/routing.hpp b/http/routing.hpp
-index 65c7b70..0824939 100644
+index dd07523..7ddc6b0 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -6,6 +6,7 @@
@@ -104,7 +104,7 @@ index 65c7b70..0824939 100644
#include "sessions.hpp"
#include "utility.hpp"
#include "websocket.hpp"
-@@ -390,6 +391,67 @@ class WebSocketRule : public BaseRule
+@@ -398,6 +399,68 @@ class WebSocketRule : public BaseRule
std::function<void(crow::websocket::Connection&)> errorHandler;
};
@@ -119,10 +119,11 @@ index 65c7b70..0824939 100644
+ void validate() override
+ {}
+
-+ void handle(const Request&, Response& res, const RoutingParams&) override
++ void handle(const Request&,
++ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const RoutingParams&) override
+ {
-+ res.result(boost::beast::http::status::not_found);
-+ res.end();
++ asyncResp->res.result(boost::beast::http::status::not_found);
+ }
+
+ void handleUpgrade(const Request& req, Response&,
@@ -172,7 +173,7 @@ index 65c7b70..0824939 100644
template <typename T>
struct RuleParameterTraits
{
-@@ -402,6 +464,14 @@ struct RuleParameterTraits
+@@ -410,6 +473,14 @@ struct RuleParameterTraits
return *p;
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
index 02d28833f..37609c154 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
@@ -1,7 +1,7 @@
-From 698d2615c5bc30ab7f89f11ed5659df8bf248ea0 Mon Sep 17 00:00:00 2001
+From bcb80fc9a86555c74b56b5b37615601d3fbfae31 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Tue, 16 Mar 2021 15:37:24 +0000
-Subject: [PATCH 5/6] Add SSE style subscription support to eventservice
+Subject: [PATCH] Add SSE style subscription support to eventservice
This commit adds the SSE style eventservice subscription
style event. Using this, end user can subscribe for
@@ -23,16 +23,16 @@ Change-Id: I7f4b7a34974080739c4ba968ed570489af0474de
---
http/http_connection.hpp | 2 +-
include/eventservice_sse.hpp | 75 +++++
- .../include/event_service_manager.hpp | 77 ++++-
+ .../include/event_service_manager.hpp | 109 +++++--
redfish-core/include/server_sent_events.hpp | 291 ------------------
redfish-core/lib/event_service.hpp | 4 +-
src/webserver_main.cpp | 2 +
- 6 files changed, 149 insertions(+), 302 deletions(-)
+ 6 files changed, 163 insertions(+), 320 deletions(-)
create mode 100644 include/eventservice_sse.hpp
delete mode 100644 redfish-core/include/server_sent_events.hpp
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
-index 2c8bf40..1ab776c 100644
+index fc9fc60..3afb4da 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -350,7 +350,7 @@ class Connection :
@@ -126,7 +126,7 @@ index 0000000..6c98e6e
+} // namespace eventservice_sse
+} // namespace redfish
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 5821e2e..f4d57c2 100644
+index fa4e41a..ac644c1 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -23,13 +23,15 @@
@@ -146,7 +146,7 @@ index 5821e2e..f4d57c2 100644
#include <cstdlib>
#include <ctime>
#include <fstream>
-@@ -46,9 +48,13 @@ using EventServiceConfig = std::tuple<bool, uint32_t, uint32_t>;
+@@ -46,9 +48,27 @@ using EventServiceConfig = std::tuple<bool, uint32_t, uint32_t>;
static constexpr const char* eventFormatType = "Event";
static constexpr const char* metricReportFormatType = "MetricReport";
@@ -157,11 +157,50 @@ index 5821e2e..f4d57c2 100644
+static constexpr const uint8_t maxNoOfSubscriptions = 20;
+static constexpr const uint8_t maxNoOfSSESubscriptions = 10;
+
- #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
- static std::optional<boost::asio::posix::stream_descriptor> inotifyConn;
- static constexpr const char* redfishEventLogDir = "/var/log";
-@@ -391,11 +397,9 @@ class Subscription
- path, uriProto);
++#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
++static std::optional<boost::asio::posix::stream_descriptor> inotifyConn;
++static constexpr const char* redfishEventLogDir = "/var/log";
++static constexpr const char* redfishEventLogFile = "/var/log/redfish";
++static constexpr const size_t iEventSize = sizeof(inotify_event);
++static int inotifyFd = -1;
++static int dirWatchDesc = -1;
++static int fileWatchDesc = -1;
++
++// <ID, timestamp, RedfishLogId, registryPrefix, MessageId, MessageArgs>
++using EventLogObjectsType =
++ std::tuple<std::string, std::string, std::string, std::string, std::string,
++ std::vector<std::string>>;
++
+ namespace message_registries
+ {
+ inline boost::beast::span<const MessageEntry>
+@@ -68,24 +88,6 @@ inline boost::beast::span<const MessageEntry>
+ }
+ return boost::beast::span<const MessageEntry>(openbmc::registry);
+ }
+-} // namespace message_registries
+-
+-#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
+-static std::optional<boost::asio::posix::stream_descriptor> inotifyConn;
+-static constexpr const char* redfishEventLogDir = "/var/log";
+-static constexpr const char* redfishEventLogFile = "/var/log/redfish";
+-static constexpr const size_t iEventSize = sizeof(inotify_event);
+-static int inotifyFd = -1;
+-static int dirWatchDesc = -1;
+-static int fileWatchDesc = -1;
+-
+-// <ID, timestamp, RedfishLogId, registryPrefix, MessageId, MessageArgs>
+-using EventLogObjectsType =
+- std::tuple<std::string, std::string, std::string, std::string, std::string,
+- std::vector<std::string>>;
+-
+-namespace message_registries
+-{
+ static const Message*
+ getMsgFromRegistry(const std::string& messageKey,
+ const boost::beast::span<const MessageEntry>& registry)
+@@ -401,11 +403,9 @@ class Subscription
+ path);
}
- Subscription(const std::shared_ptr<boost::beast::tcp_stream>& adaptor) :
@@ -175,7 +214,7 @@ index 5821e2e..f4d57c2 100644
~Subscription() = default;
-@@ -420,7 +424,7 @@ class Subscription
+@@ -430,7 +430,7 @@ class Subscription
if (sseConn != nullptr)
{
@@ -184,7 +223,7 @@ index 5821e2e..f4d57c2 100644
}
}
-@@ -510,6 +514,7 @@ class Subscription
+@@ -520,6 +520,7 @@ class Subscription
this->sendEvent(
msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
@@ -192,7 +231,7 @@ index 5821e2e..f4d57c2 100644
}
#endif
-@@ -565,14 +570,39 @@ class Subscription
+@@ -590,14 +591,39 @@ class Subscription
return eventSeqNum;
}
@@ -233,7 +272,7 @@ index 5821e2e..f4d57c2 100644
};
static constexpr const bool defaultEnabledState = true;
-@@ -963,6 +993,8 @@ class EventServiceManager
+@@ -988,6 +1014,8 @@ class EventServiceManager
subValue->updateRetryConfig(retryAttempts, retryTimeoutInterval);
subValue->updateRetryPolicy();
@@ -242,7 +281,7 @@ index 5821e2e..f4d57c2 100644
return id;
}
-@@ -987,11 +1019,40 @@ class EventServiceManager
+@@ -1012,11 +1040,40 @@ class EventServiceManager
}
}
@@ -581,7 +620,7 @@ index 578fa19..0000000
-
-} // namespace crow
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
-index be6f04d..1875ec9 100644
+index 64a2009..7c9bb7a 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -34,8 +34,6 @@ static constexpr const std::array<const char*, 1> supportedResourceTypes = {
@@ -603,7 +642,7 @@ index be6f04d..1875ec9 100644
{{"@odata.id", "/redfish/v1/EventService/Subscriptions"}}},
{"Actions",
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
-index 902c32b..c871faa 100644
+index 902c32b..d4bd48c 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -5,6 +5,7 @@
@@ -614,14 +653,14 @@ index 902c32b..c871faa 100644
#include <hostname_monitor.hpp>
#include <ibm/management_console_rest.hpp>
#include <image_upload.hpp>
-@@ -83,6 +84,7 @@ int main(int /*argc*/, char** /*argv*/)
+@@ -81,6 +82,7 @@ int main(int /*argc*/, char** /*argv*/)
+ #endif
+
#ifdef BMCWEB_ENABLE_REDFISH
++ redfish::eventservice_sse::requestRoutes(app);
redfish::requestRoutes(app);
redfish::RedfishService redfish(app);
-+ redfish::eventservice_sse::requestRoutes(app);
- // Create EventServiceManager instance and initialize Config
- redfish::EventServiceManager::getInstance();
--
2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
index 4d99b2754..16e8affa5 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,7 +1,7 @@
-From 82185c52ae6e27cc1e086654a3b7d10e63ecc783 Mon Sep 17 00:00:00 2001
+From dda3c7a46391ef88e7c6a6f61fba7fe9133336bf Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Wed, 17 Mar 2021 01:16:50 +0000
-Subject: [PATCH 6/6] Add EventService SSE filter support
+Subject: [PATCH] Add EventService SSE filter support
This commit implements the Event Service SSE stream
filters support. As per redfish specification:
@@ -35,9 +35,9 @@ 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 | 4 -
+ redfish-core/lib/event_service.hpp | 5 -
redfish-core/src/error_messages.cpp | 26 +++++
- 5 files changed, 130 insertions(+), 8 deletions(-)
+ 5 files changed, 130 insertions(+), 9 deletions(-)
diff --git a/include/eventservice_sse.hpp b/include/eventservice_sse.hpp
index 6c98e6e..ff72c4d 100644
@@ -171,7 +171,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 f4d57c2..567fb9c 100644
+index ac644c1..3661fed 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 =
@@ -180,24 +180,25 @@ index f4d57c2..567fb9c 100644
+static constexpr const std::array<const char*, 2> supportedEvtFormatTypes = {
+ eventFormatType, metricReportFormatType};
-+static constexpr const std::array<const char*, 3> supportedRegPrefixes = {
-+ "Base", "OpenBMC", "Task"};
++static constexpr const std::array<const char*, 2> supportedRegPrefixes = {
++ "OpenBMC", "TaskEvent"};
+
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
static std::optional<boost::asio::posix::stream_descriptor> inotifyConn;
static constexpr const char* redfishEventLogDir = "/var/log";
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
-index 1875ec9..4d1ac9f 100644
+index 7c9bb7a..297a4ea 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
-@@ -19,10 +19,6 @@
+@@ -18,11 +18,6 @@
+
namespace redfish
{
-
+-
-static constexpr const std::array<const char*, 2> supportedEvtFormatTypes = {
- eventFormatType, metricReportFormatType};
-static constexpr const std::array<const char*, 3> supportedRegPrefixes = {
-- "Base", "OpenBMC", "Task"};
+- "Base", "OpenBMC", "TaskEvent"};
static constexpr const std::array<const char*, 3> supportedRetryPolicies = {
"TerminateAfterRetries", "SuspendRetries", "RetryForever"};
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch
new file mode 100644
index 000000000..0b12671e5
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch
@@ -0,0 +1,132 @@
+From 0a1390428fd6f5651669f4306f6105d33a24453c Mon Sep 17 00:00:00 2001
+From: Ayushi Smriti <smriti.ayushi@intel.com>
+Date: Mon, 10 May 2021 13:03:37 +0530
+Subject: [PATCH] EventService: Log events for subscription actions
+
+Log redfish event for below 3 actions
+ - Add new subscription
+ - Update existing subscription properties
+ - Delete existing subscription
+in order to notify the subscribed clients on the subscription related
+information.
+
+Modified method name accordingly to indicate the clear purpose and
+added updateSubscription method with subscription id param
+to log event for subscription update.
+
+Tested:
+ - Performed all the above actions and verified the redfish event
+ messages are logged.
+
+Change-Id: I528293e55b1f3401bc2bb09c11c63ae985fbfedb
+Signed-off-by: AppaRao Puli <apparao.puli@intel.com>
+Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
+---
+ .../include/event_service_manager.hpp | 35 ++++++++++++++++---
+ redfish-core/lib/event_service.hpp | 2 +-
+ 2 files changed, 32 insertions(+), 5 deletions(-)
+
+diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
+index 9952ef1..2b957ea 100644
+--- a/redfish-core/include/event_service_manager.hpp
++++ b/redfish-core/include/event_service_manager.hpp
+@@ -22,6 +22,7 @@
+ #include "registries/task_event_message_registry.hpp"
+
+ #include <sys/inotify.h>
++#include <systemd/sd-journal.h>
+
+ #include <boost/asio/io_context.hpp>
+ #include <boost/beast/core/span.hpp>
+@@ -800,7 +801,7 @@ class EventServiceManager
+ return;
+ }
+
+- void updateSubscriptionData()
++ void persistSubscriptionData()
+ {
+ // Persist the config and subscription data.
+ nlohmann::json jsonData;
+@@ -897,7 +898,7 @@ class EventServiceManager
+
+ if (updateConfig)
+ {
+- updateSubscriptionData();
++ persistSubscriptionData();
+ }
+
+ if (updateRetryCfg)
+@@ -992,7 +993,7 @@ class EventServiceManager
+
+ if (updateFile)
+ {
+- updateSubscriptionData();
++ persistSubscriptionData();
+ }
+
+ #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
+@@ -1007,6 +1008,13 @@ class EventServiceManager
+
+ // Set Subscription ID for back trace
+ subValue->setSubscriptionId(id);
++
++ /* Log event for subscription addition */
++ sd_journal_send("MESSAGE=Event subscription added(Id: %s)", id.c_str(),
++ "PRIORITY=%i", LOG_INFO, "REDFISH_MESSAGE_ID=%s",
++ "OpenBMC.0.1.EventSubscriptionAdded",
++ "REDFISH_MESSAGE_ARGS=%s", id.c_str(), NULL);
++
+ return id;
+ }
+
+@@ -1027,7 +1035,14 @@ class EventServiceManager
+ {
+ subscriptionsMap.erase(obj);
+ updateNoOfSubscribersCount();
+- updateSubscriptionData();
++
++ persistSubscriptionData();
++ /* Log event for subscription delete. */
++ sd_journal_send("MESSAGE=Event subscription removed.(Id = %s)",
++ id.c_str(), "PRIORITY=%i", LOG_INFO,
++ "REDFISH_MESSAGE_ID=%s",
++ "OpenBMC.0.1.EventSubscriptionRemoved",
++ "REDFISH_MESSAGE_ARGS=%s", id.c_str(), NULL);
+ }
+ }
+
+@@ -1049,6 +1064,18 @@ class EventServiceManager
+ }
+ }
+
++ void updateSubscription(const std::string& id)
++ {
++ persistSubscriptionData();
++
++ /* Log event for subscription update. */
++ sd_journal_send("MESSAGE=Event subscription updated.(Id = %s)",
++ id.c_str(), "PRIORITY=%i", LOG_INFO,
++ "REDFISH_MESSAGE_ID=%s",
++ "OpenBMC.0.1.EventSubscriptionUpdated",
++ "REDFISH_MESSAGE_ARGS=%s", id.c_str(), NULL);
++ }
++
+ size_t getNumberOfSubscriptions()
+ {
+ return subscriptionsMap.size();
+diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
+index 297a4ea..ed4955e 100644
+--- a/redfish-core/lib/event_service.hpp
++++ b/redfish-core/lib/event_service.hpp
+@@ -616,7 +616,7 @@ class EventDestination : public Node
+ subValue->updateRetryPolicy();
+ }
+
+- EventServiceManager::getInstance().updateSubscriptionData();
++ EventServiceManager::getInstance().updateSubscription(params[0]);
+ }
+
+ void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README
index 3954e89c1..ae010dafb 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/README
@@ -4,16 +4,16 @@ thee gets merged upstream.
Upstream revision information:
- EventService : Fix retry handling for http-client
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40731/18
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40731/20
- EventService: https client support
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/31735/38
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/31735/39
- Add Server-Sent-Events support
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41258/5
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41258/6
- Add SSE style subscription support to eventservice
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41319/5
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41319/6
- Add EventService SSE filter support
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41349/2
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/41349/3
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/0003-Add-support-for-MetricDefinition-scheme.patch
index 03feec633..8b08c6c5e 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/0003-Add-support-for-MetricDefinition-scheme.patch
@@ -1,7 +1,7 @@
-From b6ccf463b4cfb8df4a904f06c5f4852029a96c50 Mon Sep 17 00:00:00 2001
-From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
-Date: Tue, 15 Dec 2020 12:28:17 +0100
-Subject: [PATCH 3/4] Add support for MetricDefinition scheme
+From d664a145a96a642597c74819c183410d4a04fce0 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
@@ -23,16 +23,16 @@ Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00
---
redfish-core/include/redfish.hpp | 3 +
.../include/utils/telemetry_utils.hpp | 2 +
- redfish-core/lib/metric_definition.hpp | 283 ++++++++++++++++++
+ redfish-core/lib/metric_definition.hpp | 335 ++++++++++++++++++
redfish-core/lib/telemetry_service.hpp | 2 +
- 4 files changed, 290 insertions(+)
+ 4 files changed, 342 insertions(+)
create mode 100644 redfish-core/lib/metric_definition.hpp
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
-index aad28ac..dfcb8cd 100644
+index 7a14969..d280a86 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
-@@ -25,6 +25,7 @@
+@@ -26,6 +26,7 @@
#include "../lib/managers.hpp"
#include "../lib/memory.hpp"
#include "../lib/message_registries.hpp"
@@ -40,7 +40,7 @@ index aad28ac..dfcb8cd 100644
#include "../lib/metric_report.hpp"
#include "../lib/metric_report_definition.hpp"
#include "../lib/network_protocol.hpp"
-@@ -215,6 +216,8 @@ class RedfishService
+@@ -219,6 +220,8 @@ class RedfishService
nodes.emplace_back(std::make_unique<HypervisorResetActionInfo>(app));
nodes.emplace_back(std::make_unique<TelemetryService>(app));
@@ -50,7 +50,7 @@ index aad28ac..dfcb8cd 100644
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 0a3af5f..54b5133 100644
+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
@@ -64,12 +64,13 @@ index 0a3af5f..54b5133 100644
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..f9c7779
+index 0000000..515fe86
--- /dev/null
+++ b/redfish-core/lib/metric_definition.hpp
-@@ -0,0 +1,283 @@
+@@ -0,0 +1,335 @@
+#pragma once
+
++#include "async_resp.hpp"
+#include "node.hpp"
+#include "sensors.hpp"
+#include "utils/telemetry_utils.hpp"
@@ -80,150 +81,138 @@ index 0000000..f9c7779
+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, const std::shared_ptr<AsyncResp>& asyncResp)
++inline void getChassisNames(F&& cb)
+{
+ const std::array<const char*, 2> interfaces = {
+ "xyz.openbmc_project.Inventory.Item.Board",
+ "xyz.openbmc_project.Inventory.Item.Chassis"};
+
+ crow::connections::systemBus->async_method_call(
-+ [asyncResp,
-+ callback = std::move(cb)](const boost::system::error_code ec,
-+ std::vector<std::string>& chassis) {
++ [callback = std::move(cb)](const boost::system::error_code ec,
++ const std::vector<std::string>& chassis) {
++ std::vector<std::string> chassisNames;
++
+ if (ec)
+ {
-+ messages::internalError(asyncResp->res);
-+ BMCWEB_LOG_DEBUG << "DBus call error: " << ec.value();
++ callback(ec, chassisNames);
+ return;
+ }
+
-+ std::vector<std::string> chassisNames;
+ chassisNames.reserve(chassis.size());
-+ for (const auto& path : chassis)
++ for (const std::string& path : chassis)
+ {
+ sdbusplus::message::object_path dbusPath = path;
+ std::string name = dbusPath.filename();
+ if (name.empty())
+ {
-+ messages::internalError(asyncResp->res);
-+ BMCWEB_LOG_ERROR << "Invalid chassis: " << dbusPath.str;
++ callback(boost::system::errc::make_error_code(
++ boost::system::errc::invalid_argument),
++ chassisNames);
+ return;
+ }
+ chassisNames.emplace_back(std::move(name));
+ }
+
-+ callback(chassisNames);
++ callback(ec, chassisNames);
+ },
+ "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths",
+ "/xyz/openbmc_project/inventory", 0, interfaces);
+}
++
+} // namespace utils
+
+namespace telemetry
+{
+
-+class MetricDefinitionCollectionReduce
++void addMembers(crow::Response& res,
++ const boost::container::flat_map<std::string, std::string>& el)
+{
-+ public:
-+ MetricDefinitionCollectionReduce(
-+ const std::shared_ptr<AsyncResp>& asyncResp) :
-+ asyncResp{asyncResp}
-+ {}
-+
-+ ~MetricDefinitionCollectionReduce()
++ for (const auto& [_, dbusSensor] : el)
+ {
-+ if (asyncResp->res.result() != boost::beast::http::status::ok)
++ sdbusplus::message::object_path path(dbusSensor);
++ sdbusplus::message::object_path parentPath = path.parent_path();
++ std::string type = parentPath.filename();
++ if (type.empty())
+ {
-+ return;
++ BMCWEB_LOG_ERROR << "Received invalid DBus Sensor Path = "
++ << dbusSensor;
++ continue;
+ }
+
-+ nlohmann::json& members = asyncResp->res.jsonValue["Members"];
-+ members = nlohmann::json::array();
++ nlohmann::json& members = res.jsonValue["Members"];
+
-+ for (const std::string& type : dbusTypes)
-+ {
-+ members.push_back(
-+ {{"@odata.id", telemetry::metricDefinitionUri + type}});
-+ }
-+ asyncResp->res.jsonValue["Members@odata.count"] = members.size();
-+ }
++ const std::string odataId =
++ telemetry::metricDefinitionUri + std::move(type);
+
-+ void insert(const boost::container::flat_map<std::string, std::string>& el)
-+ {
-+ for (const auto& [_, dbusSensor] : el)
-+ {
-+ sdbusplus::message::object_path path(dbusSensor);
-+ sdbusplus::message::object_path parentPath = path.parent_path();
-+ std::string type = parentPath.filename();
-+ if (type.empty())
-+ {
-+ BMCWEB_LOG_ERROR << "Received invalid DBus Sensor Path = "
-+ << dbusSensor;
-+ continue;
-+ }
++ 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;
++ });
+
-+ dbusTypes.insert(std::move(type));
-+ }
-+ }
-+
-+ private:
-+ const std::shared_ptr<AsyncResp> asyncResp;
-+ boost::container::flat_set<std::string> dbusTypes;
-+};
-+
-+class MetricDefinitionReduce
-+{
-+ public:
-+ MetricDefinitionReduce(const std::shared_ptr<AsyncResp>& asyncResp,
-+ const std::string& id) :
-+ id(id),
-+ pattern{'/' + id + '/'}, asyncResp{asyncResp}
-+ {}
-+ ~MetricDefinitionReduce()
-+ {
-+ if (asyncResp->res.result() != boost::beast::http::status::ok)
-+ {
-+ return;
-+ }
-+ if (redfishSensors.empty())
++ if (it == members.end())
+ {
-+ messages::resourceNotFound(asyncResp->res, "MetricDefinition", id);
-+ return;
++ members.push_back({{"@odata.id", odataId}});
+ }
+
-+ asyncResp->res.jsonValue["MetricProperties"] = redfishSensors;
-+ asyncResp->res.jsonValue["Id"] = id;
-+ asyncResp->res.jsonValue["Name"] = id;
-+ asyncResp->res.jsonValue["@odata.id"] =
-+ telemetry::metricDefinitionUri + id;
-+ 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["Units"] = sensors::toReadingUnits(id);
-+ }
-+
-+ void insert(const boost::container::flat_map<std::string, std::string>& el)
-+ {
-+ for (const auto& [redfishSensor, dbusSensor] : el)
-+ {
-+ if (dbusSensor.find(pattern) != std::string::npos)
-+ {
-+ redfishSensors.push_back(redfishSensor);
-+ }
-+ }
++ res.jsonValue["Members@odata.count"] = members.size();
+ }
++}
+
-+ private:
-+ const std::string id;
-+ const std::string pattern;
-+ const std::shared_ptr<AsyncResp> asyncResp;
-+ std::vector<std::string> redfishSensors;
-+};
+} // namespace telemetry
+
+class MetricDefinitionCollection : public Node
@@ -242,52 +231,83 @@ index 0000000..f9c7779
+ }
+
+ private:
-+ void doGet(crow::Response& res, const crow::Request&,
-+ const std::vector<std::string>&) override
++ void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request&, const std::vector<std::string>&) override
+ {
-+ res.jsonValue["@odata.type"] = "#MetricDefinitionCollection."
-+ "MetricDefinitionCollection";
-+ res.jsonValue["@odata.id"] =
++ asyncResp->res.jsonValue["@odata.type"] = "#MetricDefinitionCollection."
++ "MetricDefinitionCollection";
++ asyncResp->res.jsonValue["@odata.id"] =
+ "/redfish/v1/TelemetryService/MetricDefinitions";
-+ res.jsonValue["Name"] = "Metric Definition Collection";
-+ res.jsonValue["Members"] = nlohmann::json::array();
-+ res.jsonValue["Members@odata.count"] = 0;
++ asyncResp->res.jsonValue["Name"] = "Metric Definition Collection";
++ 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);
++ };
+
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
+ utils::getChassisNames(
-+ [asyncResp](const std::vector<std::string>& chassisNames) {
-+ auto collectionReduce = std::make_shared<
-+ telemetry::MetricDefinitionCollectionReduce>(asyncResp);
++ [handleRetrieveUriToDbusMap = std::move(handleRetrieveUriToDbusMap),
++ asyncResp](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, _] : sensors::dbus::paths)
+ {
-+ BMCWEB_LOG_INFO << "Chassis: " << chassisName
-+ << " sensor: " << sensorNode;
-+ retrieveUriToDbusMap(
-+ chassisName, sensorNode.data(),
-+ [asyncResp, collectionReduce](
-+ 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;
-+ }
-+ collectionReduce->insert(uriToDbus);
-+ });
++ BMCWEB_LOG_DEBUG << "Chassis: " << chassisName
++ << " sensor: " << sensorNode;
++ retrieveUriToDbusMap(chassisName, sensorNode.data(),
++ handleRetrieveUriToDbusMap);
+ }
+ }
-+ },
-+ asyncResp);
++ });
+ }
+};
+
++namespace telemetry
++{
++
++void addMetricProperty(
++ utils::AsyncRespWithFinalizer& asyncResp, const std::string& id,
++ const boost::container::flat_map<std::string, std::string>& el)
++{
++ nlohmann::json& metricProperties =
++ asyncResp.res.jsonValue["MetricProperties"];
++
++ for (const auto& [redfishSensor, dbusSensor] : el)
++ {
++ std::string sensorId;
++ if (dbus::utility::getNthStringFromPath(dbusSensor, 3, sensorId))
++ {
++ if (sensorId == id)
++ {
++ metricProperties.push_back(redfishSensor);
++ }
++ }
++ }
++}
++
++} // namespace telemetry
++
+class MetricDefinition : public Node
+{
+ public:
@@ -305,65 +325,97 @@ index 0000000..f9c7779
+ }
+
+ private:
-+ void doGet(crow::Response& res, const crow::Request&,
++ void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request&,
+ const std::vector<std::string>& params) override
+ {
-+ auto asyncResp = std::make_shared<AsyncResp>(res);
++ auto telemetryAsyncResp =
++ std::make_shared<utils::AsyncRespWithFinalizer>(asyncResp);
++
+ if (params.size() != 1)
+ {
-+ messages::internalError(asyncResp->res);
++ messages::internalError(telemetryAsyncResp->res);
+ return;
+ }
+
+ const std::string& id = params[0];
++ telemetryAsyncResp->setFinalizer([id](crow::Response& res) {
++ if (res.jsonValue["MetricProperties"].empty())
++ {
++ messages::resourceNotFound(res, "MetricDefinition", id);
++ }
++ });
++
++ 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);
++ };
++
+ utils::getChassisNames(
-+ [asyncResp, id](const std::vector<std::string>& chassisNames) {
-+ auto definitionGather =
-+ std::make_shared<telemetry::MetricDefinitionReduce>(
-+ asyncResp, id);
++ [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;
++ }
++
+ for (const std::string& chassisName : chassisNames)
+ {
+ for (const auto& [sensorNode, dbusPaths] :
+ sensors::dbus::paths)
+ {
-+ retrieveUriToDbusMap(
-+ chassisName, sensorNode.data(),
-+ [asyncResp, definitionGather](
-+ 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;
-+ }
-+ definitionGather->insert(uriToDbus);
-+ });
++ retrieveUriToDbusMap(chassisName, sensorNode.data(),
++ handleRetrieveUriToDbusMap);
+ }
+ }
-+ },
-+ asyncResp);
++ });
+ }
+};
+
+} // namespace redfish
diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp
-index 61ca891..a8c8b03 100644
+index 9ec0737..de9c800 100644
--- a/redfish-core/lib/telemetry_service.hpp
+++ b/redfish-core/lib/telemetry_service.hpp
@@ -32,6 +32,8 @@ class TelemetryService : public Node
- res.jsonValue["Id"] = "TelemetryService";
- res.jsonValue["Name"] = "Telemetry Service";
+ asyncResp->res.jsonValue["Id"] = "TelemetryService";
+ asyncResp->res.jsonValue["Name"] = "Telemetry Service";
-+ res.jsonValue["MetricDefinitions"]["@odata.id"] =
++ asyncResp->res.jsonValue["MetricDefinitions"]["@odata.id"] =
+ "/redfish/v1/TelemetryService/MetricDefinitions";
- res.jsonValue["MetricReportDefinitions"]["@odata.id"] =
+ asyncResp->res.jsonValue["MetricReportDefinitions"]["@odata.id"] =
"/redfish/v1/TelemetryService/MetricReportDefinitions";
- res.jsonValue["MetricReports"]["@odata.id"] =
+ asyncResp->res.jsonValue["MetricReports"]["@odata.id"] =
--
2.17.1
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/0004-Sync-Telmetry-service-with-EventService.patch
index f2ebce6e3..4119045f1 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/0004-Sync-Telmetry-service-with-EventService.patch
@@ -1,7 +1,7 @@
-From efcd128a3d66fce33200fd4211ba5abf13a81375 Mon Sep 17 00:00:00 2001
+From 0ed9ff4f37e7d3ea81073ad35acd530730104033 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 4/4] Sync Telmetry service with EventService
+Subject: [PATCH] Sync Telmetry service with EventService
Synced the latest changes in Telemetry service with Event Service
code. Now assembling MetricReport is covered in single place in
@@ -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 148c703..27e41e3 100644
+index c3c110a..dc99cda 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 148c703..27e41e3 100644
#include "node.hpp"
#include "registries.hpp"
#include "registries/base_message_registry.hpp"
-@@ -512,47 +513,32 @@ class Subscription
+@@ -529,47 +530,32 @@ class Subscription
}
#endif
@@ -92,7 +92,7 @@ index 148c703..27e41e3 100644
this->sendEvent(
msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
}
-@@ -1348,75 +1334,6 @@ class EventServiceManager
+@@ -1421,75 +1407,6 @@ class EventServiceManager
}
#endif
@@ -168,7 +168,7 @@ index 148c703..27e41e3 100644
void unregisterMetricReportSignal()
{
if (matchTelemetryMonitor)
-@@ -1436,9 +1353,11 @@ class EventServiceManager
+@@ -1509,9 +1426,11 @@ class EventServiceManager
}
BMCWEB_LOG_DEBUG << "Metrics report signal - Register";
@@ -183,7 +183,7 @@ index 148c703..27e41e3 100644
matchTelemetryMonitor = std::make_shared<sdbusplus::bus::match::match>(
*crow::connections::systemBus, matchStr,
-@@ -1449,10 +1368,43 @@ class EventServiceManager
+@@ -1522,10 +1441,43 @@ class EventServiceManager
return;
}
@@ -232,14 +232,14 @@ index 148c703..27e41e3 100644
}
diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
-index 9caf4a3..e79a41c 100644
+index ad15a05..18a6dcc 100644
--- a/redfish-core/lib/metric_report.hpp
+++ b/redfish-core/lib/metric_report.hpp
@@ -31,16 +31,14 @@ inline nlohmann::json toMetricValues(const Readings& readings)
return metricValues;
}
--inline void fillReport(const std::shared_ptr<AsyncResp>& asyncResp,
+-inline void fillReport(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& id,
+inline bool fillReport(nlohmann::json& json, const std::string& id,
const std::variant<TimestampReadings>& var)
@@ -258,7 +258,7 @@ index 9caf4a3..e79a41c 100644
telemetry::metricReportDefinitionUri + id;
const TimestampReadings* timestampReadings =
-@@ -48,14 +46,14 @@ inline void fillReport(const std::shared_ptr<AsyncResp>& asyncResp,
+@@ -48,14 +46,14 @@ inline void fillReport(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
if (!timestampReadings)
{
BMCWEB_LOG_ERROR << "Property type mismatch or property is missing";
@@ -277,7 +277,7 @@ index 9caf4a3..e79a41c 100644
}
} // namespace telemetry
-@@ -146,7 +144,11 @@ class MetricReport : public Node
+@@ -145,7 +143,11 @@ class MetricReport : public Node
return;
}
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 46128f7ae..20c93c08e 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,8 @@ 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/60
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/72
- Sync Telmetry service with EventService
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/26
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/30
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0038-Revert-Disable-nbd-proxy-from-the-build.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0001-Revert-Disable-nbd-proxy-from-the-build.patch
index 3e3f69d1c..3e3f69d1c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0038-Revert-Disable-nbd-proxy-from-the-build.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0001-Revert-Disable-nbd-proxy-from-the-build.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0002-bmcweb-handle-device-or-resource-busy-exception.patch
index 01c1c858c..01c1c858c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0002-bmcweb-handle-device-or-resource-busy-exception.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Add-ConnectedVia-property-to-virtual-media-item-temp.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0003-Add-ConnectedVia-property-to-virtual-media-item-temp.patch
index ec6d70df1..41c1c9836 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Add-ConnectedVia-property-to-virtual-media-item-temp.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0003-Add-ConnectedVia-property-to-virtual-media-item-temp.patch
@@ -1,4 +1,4 @@
-From 4af788655c5b5a5fae4d85b365a70dc619810fe0 Mon Sep 17 00:00:00 2001
+From d303bfdd6778c43096401ff78fab70f9041cd4cf Mon Sep 17 00:00:00 2001
From: Karol Wachowski <karol.wachowski@intel.com>
Date: Thu, 11 Feb 2021 08:35:41 +0000
Subject: [PATCH] Add ConnectedVia property to virtual media item template
@@ -12,10 +12,10 @@ Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
1 file changed, 1 insertion(+)
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index 188248a..80e7315 100644
+index c45fed2..aa7c639 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
-@@ -192,6 +192,7 @@ static nlohmann::json vmItemTemplate(const std::string& name,
+@@ -193,6 +193,7 @@ static nlohmann::json vmItemTemplate(const std::string& name,
item["@odata.id"] =
"/redfish/v1/Managers/" + name + "/VirtualMedia/" + resName;
item["@odata.type"] = "#VirtualMedia.v1_3_0.VirtualMedia";
@@ -23,3 +23,6 @@ index 188248a..80e7315 100644
item["Name"] = "Virtual Removable Media";
item["Id"] = resName;
item["WriteProtected"] = true;
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch
index c9a4119a1..3a9e67217 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Invalid-status-code-from-InsertMedia-REST-methods.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch
@@ -1,9 +1,8 @@
-
-From 1bbabe4ecdeea20da809b9f1d8e194683629517c Mon Sep 17 00:00:00 2001
+From 805641a2d189da9befc05168f51cef76da1ba326 Mon Sep 17 00:00:00 2001
From: Alicja Rybak <alicja.rybak@intel.com>
Date: Tue, 20 Apr 2021 16:32:37 +0200
-Subject: [PATCH] Invalid status code from InsertMedia REST methods GET, PUT,
- DELETE, PATCH in proxy mode
+Subject: [PATCH] Invalid status code from InsertMedia REST methods GET,
+ PUT, DELETE, PATCH in proxy mode
Add handlers for GET, PUT, DELETE, PATCH method and function that
checks which mode is used and set suitable status code:
@@ -12,14 +11,14 @@ Not allowed for Legacy and Not found for Proxy.
Change-Id: Ib4c0a3e9a2a8853caa74c59239d9fcfed99c5e8b
Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
---
- redfish-core/lib/virtual_media.hpp | 154 +++++++++++++++++++++++++++++
- 1 file changed, 154 insertions(+)
+ redfish-core/lib/virtual_media.hpp | 155 +++++++++++++++++++++++++++++
+ 1 file changed, 155 insertions(+)
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index 8353ce7..66bf220 100644
+index aa7c639..3e28164 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
-@@ -530,6 +530,160 @@ class VirtualMediaActionInsertMedia : public Node
+@@ -548,6 +548,161 @@ class VirtualMediaActionInsertMedia : public Node
return true;
}
@@ -28,15 +27,13 @@ index 8353ce7..66bf220 100644
+ * and sets suitable response code for unsupported REST method.
+ *
+ */
-+ void CheckProxyMode(crow::Response& res,
++ void CheckProxyMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+ const crow::Request& req,
+ const std::vector<std::string>& params)
+ {
-+ auto aResp = std::make_shared<AsyncResp>(res);
-+
+ if (params.size() != 2)
+ {
-+ messages::internalError(res);
++ messages::internalError(aResp->res);
+ return;
+ }
+
@@ -45,7 +42,8 @@ index 8353ce7..66bf220 100644
+
+ if (params[0] != "bmc")
+ {
-+ messages::resourceNotFound(res, "VirtualMedia.Insert", resName);
++ messages::resourceNotFound(aResp->res, "VirtualMedia.Insert",
++ resName);
+
+ return;
+ }
@@ -58,8 +56,7 @@ index 8353ce7..66bf220 100644
+ {
+ BMCWEB_LOG_ERROR << "ObjectMapper::GetObject call failed: "
+ << ec;
-+ aResp->res.result(
-+ boost::beast::http::status::not_found);
++ aResp->res.result(boost::beast::http::status::not_found);
+
+ return;
+ }
@@ -109,9 +106,8 @@ index 8353ce7..66bf220 100644
+ BMCWEB_LOG_DEBUG << "InsertMedia only allowed "
+ "with POST method "
+ "in legacy mode";
-+ aResp->res.result(
-+ boost::beast::http::status::
-+ method_not_allowed);
++ aResp->res.result(boost::beast::http::status::
++ method_not_allowed);
+
+ return;
+ }
@@ -144,39 +140,46 @@ index 8353ce7..66bf220 100644
+ /**
+ * @brief Function handles GET method request.
+ */
-+ void doGet(crow::Response& res, const crow::Request& req,
-+ const std::vector<std::string>& params) override
++ void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request& req,
++ const std::vector<std::string>& params) override
+ {
-+ CheckProxyMode(res, req, params);
++ CheckProxyMode(asyncResp, req, params);
+ }
+
+ /**
+ * @brief Function handles PATCH method request.
+ */
-+ void doPatch(crow::Response& res, const crow::Request& req,
-+ const std::vector<std::string>& params) override
++ void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request& req,
++ const std::vector<std::string>& params) override
+ {
-+ CheckProxyMode(res, req, params);
++ CheckProxyMode(asyncResp, req, params);
+ }
+
+ /**
+ * @brief Function handles PUT method request.
+ */
-+ void doPut(crow::Response& res, const crow::Request& req,
-+ const std::vector<std::string>& params) override
++ void doPut(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request& req,
++ const std::vector<std::string>& params) override
+ {
-+ CheckProxyMode(res, req, params);
++ CheckProxyMode(asyncResp, req, params);
+ }
+
+ /**
+ * @brief Function handles DELETE method request.
+ */
-+ void doDelete(crow::Response& res, const crow::Request& req,
-+ const std::vector<std::string>& params) override
++ void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const crow::Request& req,
++ const std::vector<std::string>& params) override
+ {
-+ CheckProxyMode(res, req, params);
++ CheckProxyMode(asyncResp, req, params);
+ }
+
/**
* @brief Function handles POST method request.
*
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Set-Inserted-redfish-property-for-not-inserted-resou.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0005-Set-Inserted-redfish-property-for-not-inserted-resou.patch
index eaba041d5..3d80aeb20 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-Set-Inserted-redfish-property-for-not-inserted-resou.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0005-Set-Inserted-redfish-property-for-not-inserted-resou.patch
@@ -1,4 +1,4 @@
-From dab4adbf211b6867f86fcf6080b34a0e41f6f4a1 Mon Sep 17 00:00:00 2001
+From 89ca38dbc3433b3b734a20068e599809f3bd7b90 Mon Sep 17 00:00:00 2001
From: Karol Wachowski <karol.wachowski@intel.com>
Date: Tue, 23 Feb 2021 15:53:16 +0000
Subject: [PATCH] Set Inserted redfish property for not inserted resources
@@ -11,10 +11,10 @@ Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index 188248a..f477f63 100644
+index 3e28164..4c475b7 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
-@@ -95,6 +95,7 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface,
+@@ -96,6 +96,7 @@ static void
BMCWEB_LOG_DEBUG << "Value Active not found";
return;
}
@@ -22,7 +22,7 @@ index 188248a..f477f63 100644
const std::string* endpointIdValue =
std::get_if<std::string>(&endpointIdProperty->second);
-@@ -106,7 +107,6 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface,
+@@ -107,7 +108,6 @@ static void
aResp->res.jsonValue["Oem"]["OpenBMC"]["WebSocketEndpoint"] =
*endpointIdValue;
aResp->res.jsonValue["TransferProtocolType"] = "OEM";
@@ -30,7 +30,7 @@ index 188248a..f477f63 100644
if (*activeValue == true)
{
aResp->res.jsonValue["ConnectedVia"] = "Applet";
-@@ -137,7 +137,6 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface,
+@@ -138,7 +138,6 @@ static void
}
aResp->res.jsonValue["Image"] = *imageUrlValue;
@@ -38,3 +38,6 @@ index 188248a..f477f63 100644
aResp->res.jsonValue["TransferProtocolType"] =
getTransferProtocolTypeFromUri(*imageUrlValue);
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0006-Bmcweb-handle-permission-denied-exception.patch
index 074718349..efce3e72c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-Bmcweb-handle-permission-denied-exception.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0006-Bmcweb-handle-permission-denied-exception.patch
@@ -1,4 +1,4 @@
-From 81f2c022b22ef75990f30e5ba5bfd4ba5bd41754 Mon Sep 17 00:00:00 2001
+From e7018ea9e3ad1a17e096aec3717a4764c3feac2e Mon Sep 17 00:00:00 2001
From: Alicja Rybak <alicja.rybak@intel.com>
Date: Wed, 14 Apr 2021 16:26:59 +0200
Subject: [PATCH] Bmcweb handle permission denied exception
@@ -17,10 +17,10 @@ Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
1 file changed, 8 insertions(+)
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index 365290b..bbdc91b 100644
+index 4c475b7..8151ac0 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
-@@ -900,6 +900,10 @@ class VirtualMediaActionInsertMedia : public Node
+@@ -1073,6 +1073,10 @@ class VirtualMediaActionInsertMedia : public Node
{
messages::resourceInUse(asyncResp->res);
}
@@ -31,7 +31,7 @@ index 365290b..bbdc91b 100644
else
{
messages::internalError(asyncResp->res);
-@@ -1092,6 +1096,10 @@ class VirtualMediaActionEjectMedia : public Node
+@@ -1267,6 +1271,10 @@ class VirtualMediaActionEjectMedia : public Node
{
messages::resourceInUse(asyncResp->res);
}
@@ -42,3 +42,6 @@ index 365290b..bbdc91b 100644
else
{
messages::internalError(asyncResp->res);
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0007-Fix-unmounting-image-in-proxy-mode.patch
index acfd9225b..88fa89465 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-Fix-unmounting-image-in-proxy-mode.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0007-Fix-unmounting-image-in-proxy-mode.patch
@@ -1,4 +1,4 @@
-From 9493bb8e2f5c708e187313c86e6033de5f103c51 Mon Sep 17 00:00:00 2001
+From 6f4b5fc1879f39b0f5fee0838f0ecbc481275d5e Mon Sep 17 00:00:00 2001
From: Alicja Rybak <alicja.rybak@intel.com>
Date: Fri, 23 Apr 2021 17:35:52 +0200
Subject: [PATCH] Fix unmounting image in proxy mode.
@@ -16,10 +16,10 @@ Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
-index 7b90e90..fa7f647 100644
+index 3b28823..897bcf2 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
-@@ -428,9 +428,9 @@ inline void requestRoutes(App& app)
+@@ -439,9 +439,9 @@ inline void requestRoutes(App& app)
BMCWEB_LOG_DEBUG << "No session to close";
return;
}
@@ -30,3 +30,6 @@ index 7b90e90..fa7f647 100644
})
.onmessage([](crow::websocket::Connection& conn,
const std::string& data, bool) {
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0008-Fix-VM-NBDPROXY-build-issue-with-AsyncResp.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0008-Fix-VM-NBDPROXY-build-issue-with-AsyncResp.patch
new file mode 100644
index 000000000..c188b2105
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0008-Fix-VM-NBDPROXY-build-issue-with-AsyncResp.patch
@@ -0,0 +1,37 @@
+From d31d913a8c5dbacf6a36407532cf777852099ced Mon Sep 17 00:00:00 2001
+From: AppaRao Puli <apparao.puli@linux.intel.com>
+Date: Sun, 2 May 2021 11:07:16 +0000
+Subject: [PATCH] Fix VM NBDPROXY build issue with AsyncResp
+
+8d1b46d7 moves bmcweb to using AsyncResp everywhere, and not have
+each individual handler creating its own object.
+
+This commit fixes the build failure when enabling virtual media
+compile flag(BMCWEB_ENABLE_VM_NBDPROXY). This is caused by above
+mentioned recent change.
+
+Tested:
+ - Build is successful with enabled virtual media flag.
+
+Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
+Change-Id: I363a41a08fae9dc05b3553695b96ffd26948f696
+---
+ redfish-core/lib/virtual_media.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
+index 685ee5c..99542c4 100644
+--- a/redfish-core/lib/virtual_media.hpp
++++ b/redfish-core/lib/virtual_media.hpp
+@@ -635,7 +635,7 @@ class VirtualMediaActionInsertMedia : public Node
+ }
+
+ bool paramsValid = validateParams(
+- asyncResp->res, imageUrl, inserted,
++ asyncResp, imageUrl, inserted,
+ transferMethod, transferProtocolType);
+
+ if (paramsValid == false)
+--
+2.17.1
+
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 d9b32f5ae..7e9d42228 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 = "dab0604af234bdd5010407031a01343d6c242edf"
+SRCREV = "2ebb9683287cf6b1a2f2cc3c077bd99aceefa8dd"
DEPENDS += "boost-url"
RDEPENDS_${PN} += "phosphor-nslcd-authority-cert-config"
@@ -14,20 +14,33 @@ GROUPADD_PARAM_${PN} = "web; redfish "
SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \
file://0002-Use-chip-id-based-UUID-for-Service-Root.patch \
- file://0004-bmcweb-handle-device-or-resource-busy-exception.patch \
- file://0006-Define-Redfish-interface-Registries-Bios.patch \
- file://0007-BIOS-config-Add-support-for-PATCH-operation.patch \
- file://0008-Add-support-to-ResetBios-action.patch \
- file://0009-Add-support-to-ChangePassword-action.patch \
file://0010-managers-add-attributes-for-Manager.CommandShell.patch \
- file://0034-recommended-fixes-by-crypto-review-team.patch \
file://0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch \
file://0012-Log-RedFish-event-for-Invalid-login-attempt.patch \
file://0013-Add-UART-routing-logic-into-host-console-connection-.patch \
+ file://0014-recommended-fixes-by-crypto-review-team.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 \
"
-# Temporary downstream mirror of upstream patch to enable feature in Intel builds.
-SRC_URI += "file://0037-Add-state-sensor-messages-to-the-registry.patch \
+# OOB Bios Config:
+SRC_URI += "file://biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch \
+ file://biosconfig/0002-BaseBiosTable-Add-support-for-PATCH-operation.patch \
+ file://biosconfig/0003-Add-support-to-ResetBios-action.patch \
+ file://biosconfig/0004-Add-support-to-ChangePassword-action.patch \
+ file://biosconfig/0005-Fix-remove-bios-user-pwd-change-option-via-Redfish.patch \
+"
+
+# Virtual Media: Backend code is not upstreamed so downstream only patches.
+SRC_URI += "file://vm/0001-Revert-Disable-nbd-proxy-from-the-build.patch \
+ file://vm/0002-bmcweb-handle-device-or-resource-busy-exception.patch \
+ file://vm/0003-Add-ConnectedVia-property-to-virtual-media-item-temp.patch \
+ file://vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch \
+ file://vm/0005-Set-Inserted-redfish-property-for-not-inserted-resou.patch \
+ file://vm/0006-Bmcweb-handle-permission-denied-exception.patch \
+ file://vm/0007-Fix-unmounting-image-in-proxy-mode.patch \
+ file://vm/0008-Fix-VM-NBDPROXY-build-issue-with-AsyncResp.patch \
"
# EventService: Temporary pulled to downstream. See eventservice\README for details
@@ -36,26 +49,12 @@ SRC_URI += "file://eventservice/0001-EventService-Fix-retry-handling-for-http-cl
file://eventservice/0004-Add-Server-Sent-Events-support.patch \
file://eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch \
file://eventservice/0006-Add-EventService-SSE-filter-support.patch \
+ file://eventservice/0007-EventService-Log-events-for-subscription-actions.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://0001-Add-ConnectedVia-property-to-virtual-media-item-temp.patch \
- file://0002-Invalid-status-code-from-InsertMedia-REST-methods.patch \
- file://0003-Set-Inserted-redfish-property-for-not-inserted-resou.patch \
- file://0004-Bmcweb-handle-permission-denied-exception.patch \
- file://0005-Fix-unmounting-image-in-proxy-mode.patch \
-"
-
-SRC_URI += "file://0038-Revert-Disable-nbd-proxy-from-the-build.patch \
- file://0039-Fix-comparison-for-proxy-legacy-mode.patch \
-"
-
-# Fix to avoid bmcweb crash on VM mount
-SRC_URI += "file://0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch \
+SRC_URI += " file://telemetry/0003-Add-support-for-MetricDefinition-scheme.patch \
+ file://telemetry/0004-Sync-Telmetry-service-with-EventService.patch \
"
# Temporary fix: Move it to service file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
index 656207de6..73fb214a2 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -36,6 +36,7 @@
"name" : "eth0",
"is_valid" : true,
"active_sessions" : 0,
+ "is_management_nic" : true,
"channel_info" : {
"medium_type" : "lan-802.3",
"protocol_type" : "ipmb-1.0",
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
index cc9f2d025..a84352929 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -11,7 +11,7 @@ SMM_DEVICE = "ipmi_kcs4"
SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
SRC_URI = "git://github.com/openbmc/kcsbridge.git"
-SRCREV = "3b170152ddc967f270939f4c351be987c451f0ca"
+SRCREV = "03e6defcbca99c9c00cd37c4afb1d2b415a92acd"
SRC_URI += "file://99-ipmi-kcs.rules"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
index 7fe91fd1f..56b581ce7 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 = "d4a4bed525f79c39705fa526b20ab663bb2c2069"
+SRCREV = "7b645018775b85a0c61148e592d951841809eef9"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
new file mode 100644
index 000000000..83fd20bdb
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
@@ -0,0 +1,13 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+RDEPENDS_${PN}_remove = "clear-once"
+
+do_compile_prepend(){
+ install -m 0644 ${STAGING_DATADIR_NATIVE}/${PN}/led.yaml ${S}
+}
+
+do_install_append(){
+ rm -f ${S}/led.yaml
+}
+
+
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 6c930876f..6881a8065 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 = "37ea118aa8653cc6220c4fd6da0224f0797f4bdc"
+SRCREV = "807b80296c9793900f46ba5675e5e739fc18dafd"
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 ee6fd12ee..67b7d2b42 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "0b73929a2116d9e1386e7e95190787bed7e715a8"
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 b9d3c0ca4..7527e949d 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
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 afe199192..f9c2adcb5 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
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 96582c76e..78244d0ba 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "e850d4ad2f72698e51f0a95bb949aa7a6055ccd6"
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 c36c0d926..055b9b7e4 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
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 8a73394e5..2f0e2c8e7 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 = "832c63d3db86788859f4afb911840f5ba100d230"
+SRCREV = "f3ba26e5fd3542d3c30b1069c4c1439a637f42ba"
S = "${WORKDIR}/git"
PV = "1.0+git${SRCPV}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
index 4a2a33878..3d747004a 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "0b73929a2116d9e1386e7e95190787bed7e715a8"
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 134cd9fdd..1ad639ba1 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 = "196f057fe8efea8080ec71ad4159df0675dd6a4c"
+SRCREV = "5ee1b657ccfc61f4dac4a4d59da62a781065b0ad"
S = "${WORKDIR}/git/pmci_launcher"
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
new file mode 100644
index 000000000..fb38b0348
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0006-CPUSensor-create-RequirediTempSensor-if-defined.patch
@@ -0,0 +1,234 @@
+From f516fc884fcbc03bf560b4ef975ad236232bd1e6 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
+
+When BMC fails to talk to CPU through PECI, no
+CPU sensors are created. Fan speed control only boost
+fan when input sensor is not available. It does not
+have the knowledge of which sensors are expected to
+be present and can't treat "missing" sensor as failed one.
+The failure on PECI goes unnoticed and we can have a thermal
+run away.
+
+Query sensor config for RequiredTempSensor for any present
+CPUs. Create a CPU sensor that is not available.
+This sensor will be replaced by a normal CPU sensor when
+peci detect the CPU and associated hwmon file is discovered.
+
+This is an initial patch that target to address the particular
+failure case. More work will follow to support a more generic
+"Required" sensor config.
+
+Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
+---
+ include/CPUSensor.hpp | 9 ++++++
+ src/CPUSensor.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++
+ src/CPUSensorMain.cpp | 54 ++++++++++++++++++++++++++++-----
+ 3 files changed, 124 insertions(+), 8 deletions(-)
+
+diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
+index 29b8209..5d09e4e 100644
+--- a/include/CPUSensor.hpp
++++ b/include/CPUSensor.hpp
+@@ -26,6 +26,15 @@ class CPUSensor : public Sensor
+ std::vector<thresholds::Threshold>&& thresholds,
+ const std::string& configuration, int cpuId, bool show,
+ double dtsOffset);
++
++ // Create a CPUSensor without a path to sensor value
++ CPUSensor(const std::string& objectType,
++ sdbusplus::asio::object_server& objectServer,
++ std::shared_ptr<sdbusplus::asio::connection>& conn,
++ boost::asio::io_service& io, const std::string& sensorName,
++ std::vector<thresholds::Threshold>&& thresholdsIn,
++ const std::string& sensorConfiguration);
++
+ ~CPUSensor() override;
+ 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
+--- a/src/CPUSensor.cpp
++++ b/src/CPUSensor.cpp
+@@ -99,6 +99,75 @@ CPUSensor::CPUSensor(const std::string& path, const std::string& objectType,
+ setupRead();
+ }
+
++// Create a dummy "not available" CPUSensor
++// This is used to indicate a missing required sensor for
++// other services like fan control
++CPUSensor::CPUSensor(const std::string& objectType,
++ sdbusplus::asio::object_server& objectServer,
++ std::shared_ptr<sdbusplus::asio::connection>& conn,
++ boost::asio::io_service& io, const std::string& sensorName,
++ 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),
++ objServer(objectServer), inputDev(io), waitTimer(io),
++ privTcontrol(std::numeric_limits<double>::quiet_NaN()), dtsOffset(0),
++ show(true), pollTime(CPUSensor::sensorPollMs), minMaxReadCounter(0)
++{
++ // assume it is a temperature sensor for now
++ // support for other type can be added later
++ std::string interfacePath =
++ "/xyz/openbmc_project/sensors/temperature/" + name;
++ const char* units = sensor_paths::unitDegreesC;
++ minValue = -128;
++ maxValue = 127;
++
++ sensorInterface = objectServer.add_interface(
++ interfacePath, "xyz.openbmc_project.Sensor.Value");
++
++ sensorInterface->register_property("Unit", units);
++ sensorInterface->register_property("MaxValue", maxValue);
++ sensorInterface->register_property("MinValue", minValue);
++ sensorInterface->register_property(
++ "Value", value, [&](const double& newValue, double& oldValue) {
++ return setSensorValue(newValue, oldValue);
++ });
++ if (!sensorInterface->initialize())
++ {
++ std::cerr << "error initializing value interface\n";
++ }
++
++ if (!availableInterface)
++ {
++ availableInterface = std::make_shared<sdbusplus::asio::dbus_interface>(
++ conn, sensorInterface->get_object_path(), availableInterfaceName);
++ availableInterface->register_property(
++ "Available", false, [this](const bool propIn, bool& old) {
++ if (propIn == old)
++ {
++ return 1;
++ }
++ old = propIn;
++ if (!propIn)
++ {
++ updateValue(std::numeric_limits<double>::quiet_NaN());
++ }
++ return 1;
++ });
++ availableInterface->initialize();
++ }
++ if (!operationalInterface)
++ {
++ operationalInterface =
++ std::make_shared<sdbusplus::asio::dbus_interface>(
++ conn, sensorInterface->get_object_path(),
++ operationalInterfaceName);
++ operationalInterface->register_property("Functional", true);
++ operationalInterface->initialize();
++ }
++}
++
+ CPUSensor::~CPUSensor()
+ {
+ // close the input dev to cancel async operations
+diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
+index 92c1716..4c00551 100644
+--- a/src/CPUSensorMain.cpp
++++ b/src/CPUSensorMain.cpp
+@@ -332,10 +332,9 @@ bool createSensors(boost::asio::io_service& io,
+ {
+ if (debug)
+ {
+- std::cout << "Skipped: " << inputPath << ": " << sensorName
+- << " is already created\n";
++ std::cout << "Will be replaced: " << inputPath << ": "
++ << sensorName << " is already created\n";
+ }
+- continue;
+ }
+
+ // check hidden properties
+@@ -636,9 +635,9 @@ void detectCpuAsync(
+ });
+ }
+
+-bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
++bool getCpuConfig(std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ boost::container::flat_set<CPUConfig>& cpuConfigs,
+- ManagedObjectType& sensorConfigs,
++ ManagedObjectType& sensorConfigs, boost::asio::io_service& io,
+ sdbusplus::asio::object_server& objectServer)
+ {
+ bool useCache = false;
+@@ -700,6 +699,45 @@ bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ iface->register_property("Present", *present);
+ iface->initialize();
+ inventoryIfaces[name] = std::move(iface);
++ if (*present)
++ {
++ // create required CPU sensors here in unavailable state
++ auto findRequiredTempSensor =
++ config.second.find("RequiredTempSensor");
++ auto findCpuId = config.second.find("CpuID");
++ if (findRequiredTempSensor != config.second.end() &&
++ findCpuId != config.second.end())
++ {
++ std::string label =
++ std::visit(VariantToStringVisitor(),
++ findRequiredTempSensor->second);
++ // for temp sensor hwmon sysfs use input
++ std::string item{"input"};
++ int cpuId =
++ std::visit(VariantToUnsignedIntVisitor(),
++ findCpuId->second);
++ std::string requiredSensorName =
++ createSensorName(label, item, cpuId);
++
++ auto& sensorPtr = gCpuSensors[requiredSensorName];
++ if (sensorPtr == nullptr)
++ {
++ // created a dummy sensor for required sensor,
++ // will be replaced with a real one if it is
++ // detected
++ std::string objectType{};
++ std::vector<thresholds::Threshold>
++ emptyThreshold{};
++ std::string emptyConfig{};
++ sensorPtr = std::make_unique<CPUSensor>(
++ objectType, objectServer, systemBus, io,
++ requiredSensorName,
++ std::move(emptyThreshold), emptyConfig);
++ std::cout << "created required CPU sensor "
++ << requiredSensorName << "\n";
++ }
++ }
++ }
+ }
+
+ auto findBus = config.second.find("Bus");
+@@ -728,7 +766,6 @@ bool getCpuConfig(const std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ std::cout << "name: " << name << "\n";
+ std::cout << "type: " << type << "\n";
+ }
+-
+ cpuConfigs.emplace(bus, addr, name, State::OFF);
+ }
+ }
+@@ -764,7 +801,8 @@ int main()
+ return; // we're being canceled
+ }
+
+- if (getCpuConfig(systemBus, cpuConfigs, sensorConfigs, objectServer))
++ if (getCpuConfig(systemBus, cpuConfigs, sensorConfigs, io,
++ objectServer))
+ {
+ detectCpuAsync(pingTimer, creationTimer, io, objectServer,
+ systemBus, cpuConfigs, sensorConfigs);
+@@ -792,7 +830,7 @@ int main()
+ return; // we're being canceled
+ }
+
+- if (getCpuConfig(systemBus, cpuConfigs, sensorConfigs,
++ if (getCpuConfig(systemBus, cpuConfigs, sensorConfigs, io,
+ objectServer))
+ {
+ detectCpuAsync(pingTimer, creationTimer, io, objectServer,
+--
+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 c00b5d4cf..361e425e5 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 = "6b6891c52e550c42507d4b413cbc4c6a09235535"
+SRCREV = "13b63f8f597d396db8b5bd182ac2e5814d599e2f"
#SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
SRC_URI += "\
@@ -11,6 +11,7 @@ SRC_URI += "\
file://0003-Fix-missing-threshold-de-assert-event-when-threshold.patch \
file://0004-Fan-Tach-Sensor-Threshold-Ignore-Zero.patch \
file://0005-Fix-PECI-ioctl-number.patch \
+ file://0006-CPUSensor-create-RequirediTempSensor-if-defined.patch \
"
DEPENDS_append = " libgpiod libmctp"
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 c77e5ace6..adcdd0588 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 = "32ea1e19df9e5179054d87617468664367dfab80"
+SRCREV = "4f4f122790b999dc7db973a80727dbc1ca785e57"
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/system/callback-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
index 0dae2be3c..e0e10f7b7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
@@ -7,7 +7,7 @@ inherit cmake systemd
DEPENDS = "boost sdbusplus"
PV = "0.1+git${SRCPV}"
-SRCREV = "291d6388e0b770e89091935bc4edc7f371874666"
+SRCREV = "52639bebada24990c3514786d65598dc5557477a"
S = "${WORKDIR}/git/callback-manager"
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 42f23dd9e..34a93fb6c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
@@ -1,6 +1,6 @@
SRC_URI = "git://github.com/openbmc/telemetry.git"
-SRCREV = "f763c9e3bbe0f86a4a41e7bb0dc70bffde0af9b2"
+SRCREV = "32859b634e366a015331fb8ab62766340df9c7b8"
-EXTRA_OEMESON += " -Dmax-reports=5"
+EXTRA_OEMESON += " -Dmax-reports=10"
EXTRA_OEMESON += " -Dmax-reading-parameters=200"
-EXTRA_OEMESON += " -Dmin-interval=5000"
+EXTRA_OEMESON += " -Dmin-interval=1000"
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 c9f14f54c..43fd25df4 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 = "18c1b42c1612e0e8d8f5cd9973bba09b447c7185"
+SRCREV = "e6500a493a156dd58a92b384c77aef2cbd3addac"
EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
index a634b1588..07ac95c89 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
@@ -1,4 +1,4 @@
-From 67797d726b6eb6fa8e1dad063c7d2021cec47ab3 Mon Sep 17 00:00:00 2001
+From 5760937ef1ae9a4610b47ba64fdebe594fc2c9df Mon Sep 17 00:00:00 2001
From: James Feist <james.feist@linux.intel.com>
Date: Mon, 17 Jun 2019 12:00:58 -0700
Subject: [PATCH] Customize phosphor-watchdog for Intel platforms
@@ -22,14 +22,14 @@ Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com>
%% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
---
- watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++++++---
- watchdog.hpp | 23 +++++-
+ src/watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++---
+ src/watchdog.hpp | 23 ++++-
2 files changed, 242 insertions(+), 11 deletions(-)
-diff --git a/watchdog.cpp b/watchdog.cpp
-index 57e9050..1204db4 100644
---- a/watchdog.cpp
-+++ b/watchdog.cpp
+diff --git a/src/watchdog.cpp b/src/watchdog.cpp
+index 57e905059153..1204db4cab0f 100644
+--- a/src/watchdog.cpp
++++ b/src/watchdog.cpp
@@ -1,11 +1,14 @@
#include "watchdog.hpp"
@@ -300,10 +300,10 @@ index 57e9050..1204db4 100644
}
catch (const SdBusError& e)
{
-diff --git a/watchdog.hpp b/watchdog.hpp
-index 7de9bb3..b004b7a 100644
---- a/watchdog.hpp
-+++ b/watchdog.hpp
+diff --git a/src/watchdog.hpp b/src/watchdog.hpp
+index 7de9bb38419c..b004b7ab4e3f 100644
+--- a/src/watchdog.hpp
++++ b/src/watchdog.hpp
@@ -68,7 +68,18 @@ class Watchdog : public WatchdogInherits
WatchdogInherits(bus, objPath),
bus(bus), actionTargetMap(std::move(actionTargetMap)),
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 7ebf1d4d6..618f4dddb 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 = "5ed21f2d1e8b82be699a623bfdef550dfd598dbb"
+SRCREV = "71114feb9a800d42f6eeddfa477077a8ab8e44f6"
do_compile_prepend() {
cp -vf ${S}/.env.intel ${S}/.env
diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch
index 83f015a76..dc7f7b924 100644
--- a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch
+++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch
@@ -23,7 +23,7 @@ diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
index 0ed3984..804ad78 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
-@@ -525,6 +525,7 @@ static int
+@@ -787,6 +787,7 @@ static int
curl_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset)
{
struct curl_handle *h = handle;
@@ -31,10 +31,10 @@ index 0ed3984..804ad78 100644
CURLcode r;
char range[128];
-@@ -535,15 +536,21 @@ curl_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset)
+@@ -800,15 +801,21 @@ curl_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset)
h->read_count = count;
- curl_easy_setopt (h->c, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt (h->c, CURLOPT_UPLOAD, 1L);
+ curl_easy_setopt (h->c, CURLOPT_CUSTOMREQUEST, "PATCH");
/* Make an HTTP range request. */
@@ -55,7 +55,7 @@ index 0ed3984..804ad78 100644
display_curl_error (h, r, "pwrite: curl_easy_perform");
return -1;
}
-@@ -554,6 +561,10 @@ curl_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset)
+@@ -819,6 +826,10 @@ curl_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset)
/* As far as I understand the cURL API, this should never happen. */
assert (h->read_count == 0);
diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0002-Add-support-for-ssl-config.patch b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0002-Add-support-for-ssl-config.patch
index c597cb3a4..cec2813e9 100644
--- a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0002-Add-support-for-ssl-config.patch
+++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0002-Add-support-for-ssl-config.patch
@@ -3,14 +3,14 @@ index 610511f7..92be4656 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -69,6 +69,8 @@ static const char *proxy = NULL;
- static char *proxy_password = NULL;
- static const char *proxy_user = NULL;
- static bool sslverify = true;
-+static const char *ssl_version = NULL;
-+static const char *ssl_cipher_list = NULL;
- static bool tcp_keepalive = false;
- static bool tcp_nodelay = true;
- static uint32_t timeout = 0;
+ char *proxy_password = NULL;
+ const char *proxy_user = NULL;
+ bool sslverify = true;
++const char *ssl_version = NULL;
++const char *ssl_cipher_list = NULL;
+ bool tcp_keepalive = false;
+ bool tcp_nodelay = true;
+ uint32_t timeout = 0;
@@ -232,6 +234,12 @@ curl_config (const char *key, const char *value)
sslverify = r;
}
diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb
index 01b3fc27e..89072b090 100644
--- a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb
@@ -7,14 +7,14 @@ nbdkit is a toolkit for creating NBD servers."
HOMEPAGE = "https://github.com/libguestfs/nbdkit"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4332a97808994cf2133a65b6c6f33eaf"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f9dcc2d8acdde215fa4bd6ac12bb14f0"
SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https"
SRC_URI += "file://0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch"
SRC_URI += "file://0002-Add-support-for-ssl-config.patch"
-PV = "1.17.5+git${SRCPV}"
-SRCREV = "c8406880c6603bb617dae131dd0a8826c05869ca"
+PV = "1.25.5+git${SRCPV}"
+SRCREV = "c828c6d48ff6b69454cad98054a1920d03c4b4c7"
S = "${WORKDIR}/git"
diff --git a/meta-openpower/classes/openpower-software-manager-virtual-pnor.bbclass b/meta-openpower/classes/openpower-software-manager-virtual-pnor.bbclass
index 1e76efa45..375ef681c 100644
--- a/meta-openpower/classes/openpower-software-manager-virtual-pnor.bbclass
+++ b/meta-openpower/classes/openpower-software-manager-virtual-pnor.bbclass
@@ -1,5 +1,9 @@
PACKAGECONFIG_append = " virtual_pnor"
+RDEPENDS_${PN} += " \
+ bash \
+"
+
SYSTEMD_SERVICE_${PN} += " \
obmc-vpnor-updatesymlinks.service \
obmc-vpnor-check-clearvolatile@.service \
diff --git a/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb b/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb
index 051931c31..86005732b 100644
--- a/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb
+++ b/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb
@@ -59,7 +59,7 @@ S = "${WORKDIR}/git"
SRC_URI += "git://github.com/openbmc/openpower-pnor-code-mgmt"
-SRCREV = "a7b1f4caa49390064d0b66de04764547f3aa41c9"
+SRCREV = "067876aa2af9629161c4f367750828aec5e0cd63"
DBUS_SERVICE_${PN} += "org.open_power.Software.Host.Updater.service"
diff --git a/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb b/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb
index 33fe0025c..12ebbea49 100644
--- a/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb
+++ b/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb
@@ -11,7 +11,7 @@ inherit autotools obmc-phosphor-utils pkgconfig
inherit systemd
SRC_URI += "git://github.com/openbmc/openpower-proc-control"
-SRCREV = "854d05ab9d42720b420154d09508778d8504ca20"
+SRCREV = "1b607c35462ae5e2c00406a646aeedbbd26d4631"
DEPENDS += " \
autoconf-archive-native \
diff --git a/meta-openpower/recipes-phosphor/ipmi/openpower-host-ipmi-flash_git.bb b/meta-openpower/recipes-phosphor/ipmi/openpower-host-ipmi-flash_git.bb
index f730d700e..1dfa048dd 100644
--- a/meta-openpower/recipes-phosphor/ipmi/openpower-host-ipmi-flash_git.bb
+++ b/meta-openpower/recipes-phosphor/ipmi/openpower-host-ipmi-flash_git.bb
@@ -21,7 +21,7 @@ HOSTIPMI_PROVIDER_LIBRARY += "libhiomap.so"
S = "${WORKDIR}/git"
SRC_URI += "git://github.com/openbmc/openpower-host-ipmi-flash"
-SRCREV = "80d5bcaf032606a2e4593969d036cc6108b16003"
+SRCREV = "61e18614a64866026b5da05b11e51df2b8653bc4"
FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
diff --git a/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb b/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
index 4a6cc049f..6202c3621 100644
--- a/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
+++ b/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
@@ -16,7 +16,7 @@ inherit meson systemd
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/openpower-hw-diags"
-SRCREV = "2d5c63d90c14793e333c4eee6d0b8002fdf0c7ba"
+SRCREV = "5c5db65a37d953cb9393f257aab90a0a209d4861"
SYSTEMD_SERVICE_${PN} = "attn_handler.service"
diff --git a/meta-openpower/recipes-phosphor/logging/openpower-libhei_git.bb b/meta-openpower/recipes-phosphor/logging/openpower-libhei_git.bb
index 645155558..59ed91c25 100644
--- a/meta-openpower/recipes-phosphor/logging/openpower-libhei_git.bb
+++ b/meta-openpower/recipes-phosphor/logging/openpower-libhei_git.bb
@@ -8,10 +8,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "git://github.com/openbmc/openpower-libhei"
PV = "0.1+git${SRCPV}"
-SRCREV = "552992a66a275a046a93922dc14fa551da5a7f05"
+SRCREV = "0a905012d0e90ea32ca651883413cd84b56804d1"
S = "${WORKDIR}/git"
inherit perlnative
-DEPENDS += "libxml2-native libxml-simple-perl-native"
+DEPENDS += "libxml2-native libxml-simple-perl-native libjson-perl-native"
diff --git a/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc b/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc
index 3549355e5..cd31b488c 100644
--- a/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc
+++ b/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/openpower-occ-control"
-SRCREV = "a17f6e8c209363268871b3473654c506c749c810"
+SRCREV = "4c1079e71ae3ecbce8a9ddc33ee4e7d623d66568"
diff --git a/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc b/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc
index 58192eae1..0d0d53ba7 100644
--- a/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc
+++ b/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/openpower-vpd-parser"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/openpower-vpd-parser"
-SRCREV = "a504c3ee9e939a0c33d3c37c1cab59614c3ddb46"
+SRCREV = "33c61c2d634c116d9b31b0a3d7c69860e9dbcaab"
diff --git a/meta-phosphor/classes/phosphor-networkd-rev.bbclass b/meta-phosphor/classes/phosphor-networkd-rev.bbclass
deleted file mode 100644
index 94d599fa0..000000000
--- a/meta-phosphor/classes/phosphor-networkd-rev.bbclass
+++ /dev/null
@@ -1,2 +0,0 @@
-SRC_URI += "git://github.com/openbmc/phosphor-networkd"
-SRCREV = "a1b897e2a38b0ead01fb02cc647326c1d1035870"
diff --git a/meta-phosphor/recipes-extended/pam/pam-ipmi_git.bb b/meta-phosphor/recipes-extended/pam/pam-ipmi_git.bb
index 3f282ec70..30bcf6afb 100644
--- a/meta-phosphor/recipes-extended/pam/pam-ipmi_git.bb
+++ b/meta-phosphor/recipes-extended/pam/pam-ipmi_git.bb
@@ -8,7 +8,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI += "git://github.com/openbmc/pam-ipmi"
-SRCREV = "9dbd02268dfc40603e4a4985ba2fdf75b253dbf0"
+SRCREV = "1ea8be7fe6afbb1c5c94e90e49412f6553295be7"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
index 7978520e7..d3989866a 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
+++ b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
@@ -3,4 +3,4 @@ PR = "r1"
PV = "1.0+git${SRCPV}"
SRC_URI += "git://github.com/openbmc/sdbusplus"
-SRCREV = "533218b426ce2b393248591c234e2bb734fd0c43"
+SRCREV = "8db46a0fb0984f807f7e3b5c611af1ed31b17557"
diff --git a/meta-phosphor/recipes-extended/stdplus/stdplus_git.bb b/meta-phosphor/recipes-extended/stdplus/stdplus_git.bb
index 81141abac..3cc661b01 100644
--- a/meta-phosphor/recipes-extended/stdplus/stdplus_git.bb
+++ b/meta-phosphor/recipes-extended/stdplus/stdplus_git.bb
@@ -17,6 +17,6 @@ EXTRA_OEMESON = " \
"
SRC_URI += "git://github.com/openbmc/stdplus"
-SRCREV = "fd0f551cbdd26229dcdcfde2d6195bdf9f258197"
+SRCREV = "af0e0e81a1d7958bc9c49b0b0edae7e1f190d74e"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb b/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb
index c8190131c..77400aa3a 100644
--- a/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb
+++ b/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=75859989545e37968a99b631ef42722e"
DEPENDS = " libvncserver systemd sdbusplus phosphor-logging phosphor-dbus-interfaces"
SRC_URI = "git://github.com/openbmc/obmc-ikvm"
-SRCREV = "861337e8ec92767c4c88237ec5db494a2a67fa8d"
+SRCREV = "673ac2eb1117a7d692460f808f1d947495d033db"
PV = "1.0+git${SRCPV}"
diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb
index e9c62f664..9885240c4 100644
--- a/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "git://github.com/openbmc/phosphor-certificate-manager"
-SRCREV = "ebd1d8a8294659c788e2822ddee1ca923791c531"
+SRCREV = "811a29e1941db0157f49d2e05491be945f7b2f07"
inherit autotools \
pkgconfig \
diff --git a/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb b/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb
index f6a6eae47..ee301e26b 100644
--- a/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Entity Manager provides d-bus configuration data \
and configures system sensors"
SRC_URI = "git://github.com/openbmc/entity-manager.git file://blocklist.json"
-SRCREV = "9fd87e54f5a65f3103b996114e052470dd1afd03"
+SRCREV = "cda147301b0fa7eac99eee3a7565604dbd6f74dd"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb b/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb
index 4b6abb5a2..5d6e33351 100644
--- a/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb
+++ b/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb
@@ -26,7 +26,7 @@ DEPENDS += "autoconf-archive-native \
SRC_URI += "git://github.com/openbmc/obmc-console"
SRC_URI += "file://${BPN}.conf"
-SRCREV = "d802b11942abc8a4641976e70d567758ef0bbd58"
+SRCREV = "cabd9db06da91ecf2198c1baaf20360d1424c2f3"
PV = "1.0+git${SRCPV}"
REGISTERED_SERVICES_${PN} += "obmc_console:tcp:2200:"
diff --git a/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager/xyz.openbmc_project.Time.Manager.service b/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager/xyz.openbmc_project.Time.Manager.service
deleted file mode 100644
index aaf7abe4d..000000000
--- a/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager/xyz.openbmc_project.Time.Manager.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=Phosphor Time Manager daemon
-Wants=mapper-wait@-xyz-openbmc_project-time-sync_method.service
-After=mapper-wait@-xyz-openbmc_project-time-sync_method.service
-Wants=mapper-wait@-xyz-openbmc_project-state-host0.service
-After=mapper-wait@-xyz-openbmc_project-state-host0.service
-
-[Service]
-Restart=always
-ExecStart=/usr/bin/env phosphor-timemanager
-SyslogIdentifier=phosphor-timemanager
-Type=dbus
-BusName={BUSNAME}
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager_git.bb b/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager_git.bb
index dbe32cc89..503439a77 100644
--- a/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager_git.bb
@@ -5,7 +5,7 @@ PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-inherit autotools pkgconfig python3native
+inherit meson pkgconfig python3native
inherit obmc-phosphor-dbus-service
DEPENDS += "autoconf-archive-native"
@@ -20,7 +20,7 @@ RDEPENDS_${PN} += "phosphor-network"
RDEPENDS_${PN} += "phosphor-mapper"
SRC_URI += "git://github.com/openbmc/phosphor-time-manager"
-SRCREV = "7252bea64c7f3b03c4d80bb449f82f05a30baa71"
+SRCREV = "9c02e7ec0afff8e9a1cd7ecff6060c85f0ad70b7"
PV = "1.0+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
index 86467f6a1..dc4b652db 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
@@ -18,7 +18,7 @@ DEPENDS += " \
"
SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces"
-SRCREV = "32fbd5df095c9b0262a013bedae8cef51f1d35fe"
+SRCREV = "33458d4432a8323616622881f314a73cf0b04d97"
# Process OBMC_ORG_YAML_SUBDIRS to create Meson config options.
# ex. xyz/openbmc_project -> -Ddata_xyz_openbmc_project=true
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
index 0ac2c1dcc..cc0b5c631 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-dbus-monitor"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/openbmc/phosphor-dbus-monitor"
-SRCREV = "f3367686f8139cfb4566d6df205ceff4d2c33463"
+SRCREV = "995060c14f7c017db6ebf3a33d622ff0858b6ba2"
inherit autotools \
pkgconfig \
diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc
index b9d04f800..784e57cdc 100644
--- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc
+++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-debug-collector"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/phosphor-debug-collector"
-SRCREV = "0af74a5e46bfc1b2014cfe54261b2a9926a7cecc"
+SRCREV = "6341919fc147335ce64d838435d4a7b9bc625f62"
diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb
index 9854f05bc..374d32a07 100644
--- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb
+++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb
@@ -161,6 +161,7 @@ def install_dreport_user_script(script_path, d):
linkname = "E" + priority + script
destlink = os.path.join(destdir, linkname)
os.symlink(srclink, destlink)
+ file.close()
#Make the links for all the plugins
python install_dreport_user_scripts() {
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc b/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc
index 135e0f6f8..7899ef1b1 100644
--- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc
+++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/phosphor-fan-presence"
-SRCREV = "a3584bd2559e291cf329ff6b4f179ad92b7aeaa0"
+SRCREV = "3efec61c8f0ba530a24ad46e6c10d8827fbf9219"
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb
index f4ca8b075..1c7eeb798 100644
--- a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb
+++ b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb
@@ -13,7 +13,7 @@ inherit systemd
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control"
-SRCREV = "e39bbe9f03177f1653b33d1ccaf8b2bd0a3f89c6"
+SRCREV = "18d5bb18dcb4ebf7340b0b7a0b39daa887d530ce"
# Each platform will need a service file that starts
# at an appropriate time per system. For instance, if
diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc
index 2f57adae7..1b11fb137 100644
--- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc
+++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt"
-SRCREV = "6e9fb1d6ec428d1cc05c78b9b394b214b46c0364"
+SRCREV = "cfb4b2099f840f75aebd4b8ce9a054aa2b62ad2a"
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
index 061757519..3fad5e6fa 100644
--- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
+++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
@@ -31,8 +31,7 @@ done
# Move the secondary GPT to the end of the device if needed. Look for the GPT
# header signature "EFI PART" located 512 bytes from the end of the device.
-magic=$(tail -c 512 "${mmcdev}" | hexdump -C -n 8 | grep "EFI PART")
-if test -z "${magic}"; then
+if ! tail -c 512 "${mmcdev}" | hexdump -C -n 8 | grep -q "EFI PART"; then
sgdisk -e "${mmcdev}"
partprobe
fi
@@ -63,4 +62,4 @@ for f in $fslist; do
mount --move $f $rodir/$f
done
-exec chroot $rodir /sbin/init
+exec switch_root $rodir /sbin/init
diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
index 0e0abb236..ece4493de 100644
--- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
+++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=a6a4edad4aed50f39a66d098d74b265b"
SRC_URI = "git://github.com/openbmc/bmcweb.git"
PV = "1.0+git${SRCPV}"
-SRCREV = "1a6258dc985cde406d9098130e4a2d683e82beb2"
+SRCREV = "cb0d27e012456fc954be1649325402819bacb6a7"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc
index 79b0fd9fc..2612175a9 100644
--- a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-inventory-manager"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/openbmc/phosphor-inventory-manager"
-SRCREV = "ffa2b7ec19d7721295e8a05d202c7c0ca38a912f"
+SRCREV = "ab1f8b520a9fb2248ae6fe1e385b5154620bdd39"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb b/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb
index f07a14586..83df346f5 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb
@@ -14,4 +14,4 @@ EXTRA_OECONF = "--disable-tests"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/ipmi-blob-tool"
-SRCREV = "f9ee95f52be13be8ed11cba0bfec79da6375113a"
+SRCREV = "8da5f72db5a9d3374570cb860f52f35d518ac1c2"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb
index bac96c456..3e2710eb4 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb
@@ -16,7 +16,7 @@ DEPENDS += "ipmi-blob-tool"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs"
-SRCREV = "a533a3756f084ab6c5a80375074178440ba7c905"
+SRCREV = "52b75fb3927d46b75e75fd6040577c914476e6f1"
FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb
index e702d2481..6c7c82668 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb
@@ -19,4 +19,4 @@ DEPENDS += "systemd"
S = "${WORKDIR}/git"
SRC_URI += "git://github.com/openbmc/btbridge"
-SRCREV="aa5511d28ff9acee4a404c6397d09f5187812ed8"
+SRCREV="0a47d9a057c94438380142ff08e892e4df633d87"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb
index 67a8aa45e..bb6ae0e6e 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb
@@ -48,7 +48,7 @@ EXTRA_OECONF_append = " MAPPED_ADDRESS=${IPMI_FLASH_BMC_ADDRESS}"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash"
-SRCREV = "a3f65698000d366b57d2916eae67518f89c1298b"
+SRCREV = "f450486f238d6402b3ff9680ff50d2987b4f2d3d"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} += "phosphor-ipmi-flash-bmc-prepare.target \
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc
index 51d2da791..6ac3784ef 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-host-ipmid"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid"
-SRCREV = "916d4232a432b9f9ee5ddd3d0bbce05c1f3909f6"
+SRCREV = "7a0e5dfcfa49f4a60e2d0ddd9f90c64d177a7f14"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
index 56df13bdd..5e937648e 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
@@ -21,6 +21,9 @@ def ipmi_whitelists(d):
whitelists = [ '{}-whitelist-native'.format(x) for x in whitelists ]
return ' '.join(whitelists)
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[dynamic-sensors] = "--enable-dynamic-sensors,--disable-dynamic-sensors"
+
DEPENDS += "autoconf-archive-native"
DEPENDS += "nlohmann-json"
DEPENDS += "phosphor-state-manager"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
index a684c4807..df1cfd76e 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
@@ -5,7 +5,7 @@ PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1beb00e508e89da1ed2a541934f28c0"
-inherit autotools pkgconfig
+inherit meson pkgconfig
inherit systemd
PV = "1.0+git${SRCPV}"
@@ -20,7 +20,6 @@ RPROVIDES_${PN} += "virtual-obmc-host-ipmi-hw"
RRECOMMENDS_${PN} += "phosphor-ipmi-host"
DEPENDS += " \
- autoconf-archive-native \
systemd \
sdbusplus \
boost \
@@ -30,4 +29,4 @@ DEPENDS += " \
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/kcsbridge.git"
-SRCREV = "4a4d1d03d99fabe089e649aa226ad4c61e71684e"
+SRCREV = "4f5ba642295ab2d215e4d2e11e177edacd4a7ff5"
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb
index 8db745ecc..7377142c0 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb
@@ -18,7 +18,7 @@ DEPENDS += "phosphor-ipmi-host"
RRECOMMENDS_${PN} = "pam-ipmi"
SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid"
-SRCREV = "d4a4bed525f79c39705fa526b20ab663bb2c2069"
+SRCREV = "7b645018775b85a0c61148e592d951841809eef9"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc
index d296166c1..ad43e3d7f 100644
--- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-led-manager"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/phosphor-led-manager"
-SRCREV = "c105f279ebf2de11ca3941559c91c53e43bc646f"
+SRCREV = "cc9a575399bfcdb42f4ec3b78d840ca06f48ad58"
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb
index 03cdb9636..8e14d766d 100644
--- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb
@@ -19,7 +19,7 @@ DBUS_SERVICE_${PN} += "xyz.openbmc_project.led.controller@.service"
SRC_URI += "git://github.com/openbmc/phosphor-led-sysfs"
SRC_URI += "file://70-leds.rules"
-SRCREV = "a8a275f635ff876186ce5783308e93368f205898"
+SRCREV = "45eba6fc25260a3da68b6c4268af25be28c734c7"
S = "${WORKDIR}/git"
do_install_append() {
diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service b/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service
deleted file mode 100644
index 77936c72d..000000000
--- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Phosphor Log Manager
-
-[Service]
-ExecStart=/usr/bin/env phosphor-log-manager
-SyslogIdentifier=phosphor-log-manager
-Restart=always
-Type=dbus
-BusName={BUSNAME}
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Syslog.Config.service b/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Syslog.Config.service
deleted file mode 100644
index e1b1d667a..000000000
--- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Syslog.Config.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Rsyslog config updater
-
-[Service]
-ExecStart=/usr/bin/env phosphor-rsyslog-conf
-SyslogIdentifier=phosphor-rsyslog-conf
-Restart=always
-Type=dbus
-BusName={BUSNAME}
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb
index 5fa7f7a03..4e47e373b 100644
--- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb
+++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb
@@ -7,13 +7,12 @@ PV = "1.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-inherit autotools pkgconfig
+inherit meson
inherit python3native
inherit obmc-phosphor-dbus-service
inherit phosphor-logging
inherit phosphor-dbus-yaml
-DEPENDS += "autoconf-archive-native"
DEPENDS += "systemd"
DEPENDS += "${PYTHON_PN}-mako-native"
DEPENDS += "${PYTHON_PN}-pyyaml-native"
@@ -39,8 +38,11 @@ ALLOW_EMPTY_${PN} = "1"
PACKAGE_BEFORE_PN += "${LOGGING_PACKAGES}"
SYSTEMD_PACKAGES = "${LOGGING_PACKAGES}"
DBUS_PACKAGES = "${LOGGING_PACKAGES}"
+USERADD_PACKAGES = "${PN}-base"
+GROUPADD_PARAM_${PN}-base = "-r phosphor-logging"
FILES_${PN}-base += " \
+ ${sysconfdir}/dbus-1 \
${bindir}/phosphor-log-manager \
${libdir}/libphosphor_logging.so.* \
"
@@ -52,25 +54,20 @@ FILES_phosphor-rsyslog-config += " \
"
SRC_URI += "git://github.com/openbmc/phosphor-logging"
-SRCREV = "6b3f345b3f265036ec339d097f9d60d12998015d"
+SRCREV = "0b08776a882357d7e96ee072d14ba0940287ca93"
S = "${WORKDIR}/git"
-PACKAGECONFIG ??= "metadata-processing"
-
-PACKAGECONFIG[metadata-processing] = " \
- --enable-metadata-processing, \
- --disable-metadata-processing, , \
- "
+PACKAGECONFIG ??= ""
PACKAGECONFIG[openpower-pels] = " \
- --enable-openpower-pel-extension, \
- --disable-openpower-pel-extension, \
+ -Dopenpower-pel-extension=enabled, \
+ -Dopenpower-pel-extension=disabled, \
nlohmann-json cli11 pldm, \
python3, \
"
-EXTRA_OECONF = " \
- YAML_DIR=${STAGING_DIR_TARGET}${yaml_dir} \
- CALLOUTS_YAML=${STAGING_DIR_NATIVE}${callouts_datadir}/callouts.yaml \
+EXTRA_OEMESON = " \
+ -Dyamldir=${STAGING_DIR_TARGET}${yaml_dir} \
+ -Dcallout_yaml=${STAGING_DIR_NATIVE}${callouts_datadir}/callouts.yaml \
"
diff --git a/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb b/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb
index b15eb4973..22d38b83f 100644
--- a/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb
+++ b/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb
@@ -18,7 +18,7 @@ SRC_URI += "git://github.com/openbmc/mboxbridge.git"
SRC_URI += "file://99-aspeed-lpc-ctrl.rules"
-SRCREV="5ff50e3cbd7702aefc185264e4adfb9952040575"
+SRCREV="5c9264daedf1aff690e1957c4578d8395b549cff"
PROVIDES += "mboxctl"
diff --git a/meta-phosphor/recipes-phosphor/mctp/mctp_git.bb b/meta-phosphor/recipes-phosphor/mctp/mctp_git.bb
index ff3c098a9..475d2a284 100644
--- a/meta-phosphor/recipes-phosphor/mctp/mctp_git.bb
+++ b/meta-phosphor/recipes-phosphor/mctp/mctp_git.bb
@@ -11,7 +11,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0d30807bb7a4f16d36e96b78f9ed8fae"
SRC_URI = "git://github.com/openbmc/libmctp \
file://default"
-SRCREV = "eba19a3b122a39ef2b5dbda49b418a202f78a48d"
+SRCREV = "9f5b47a5844023719b84855cb6c554271c95ee4a"
CONFFILES_${PN} = "${sysconfdir}/default/mctp"
DEPENDS += "autoconf-archive-native \
diff --git a/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb b/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
index ee5bc4f64..e646d46b7 100644
--- a/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
+++ b/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
@@ -6,7 +6,7 @@ PR = "r1"
PV = "1.0+git${SRCPV}"
SRC_URI = "git://github.com/openbmc/phosphor-misc"
-SRCREV = "75d4734fb8bc390d97106544af8f2ffd2d9bf02c"
+SRCREV = "688e9134a83379393ddde6aab0602c64e956153d"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb b/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb
index 72f49a5bc..630dc6bcd 100644
--- a/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb
+++ b/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb
@@ -8,9 +8,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
inherit autotools pkgconfig
inherit python3native
-inherit phosphor-networkd-rev
inherit systemd
+SRC_URI += "git://github.com/openbmc/phosphor-networkd"
+SRCREV = "de433b74ec5bce22043ea44c55e83d9be3dc5372"
DEPENDS += "systemd"
DEPENDS += "autoconf-archive-native"
@@ -22,10 +23,14 @@ DEPENDS += "libnl"
DEPENDS += "stdplus"
DEPENDS += "nlohmann-json"
-PACKAGECONFIG ??= "uboot-env"
+PACKAGECONFIG ??= "uboot-env default-link-local-autoconf default-ipv6-accept-ra"
UBOOT_ENV_RDEPENDS = "${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'}"
PACKAGECONFIG[uboot-env] = "--with-uboot-env,--without-uboot-env,,${UBOOT_ENV_RDEPENDS}"
+PACKAGECONFIG[default-link-local-autoconf] = "--enable-link-local-autoconfiguration,--disable-link-local-autoconfiguration,,"
+PACKAGECONFIG[default-ipv6-accept-ra] = "--enable-ipv6-accept-ra,--disable-ipv6-accept-ra,,"
+PACKAGECONFIG[nic-ethtool] = "--enable-nic-ethtool,--disable-nic-ethtool,,"
+PACKAGECONFIG[sync-mac] = "--enable-sync-mac,--disable-sync-mac,,"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb b/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb
index 9c17974fc..61c581680 100644
--- a/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb
+++ b/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb
@@ -12,7 +12,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI += "git://github.com/openbmc/phosphor-snmp"
-SRCREV = "0d5094bf65f5102af6fc896e60a6fc6fbb1770b5"
+SRCREV = "33a34f04ba608276442cdaba2c02d203d09ac75b"
DBUS_SERVICE_${PN} += "xyz.openbmc_project.Network.SNMP.service"
diff --git a/meta-phosphor/recipes-phosphor/pldm/pldm.inc b/meta-phosphor/recipes-phosphor/pldm/pldm.inc
index 3f21adc20..45df9f489 100644
--- a/meta-phosphor/recipes-phosphor/pldm/pldm.inc
+++ b/meta-phosphor/recipes-phosphor/pldm/pldm.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/pldm"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "git://github.com/openbmc/pldm"
-SRCREV = "a1d27606bc7da14081770ca310012768b933f6e7"
+SRCREV = "144ef2bd474b518de0568d3d70cf5ef33eddf0b8"
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc
index f0ab969aa..3a7cd175b 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-power"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/phosphor-power"
-SRCREV = "e2f14a5748e2bedc926bdd7a855ff4fb368ae1a5"
+SRCREV = "ce540f3c9fb61f9711726cbbe86f42f55e768d42"
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
index 012b4939e..a01a99752 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power_git.bb
@@ -41,6 +41,10 @@ DEPENDS += " \
boost \
"
+# The monitor package uses an org.open_power D-Bus interface and so
+# should only build when told to.
+PACKAGECONFIG[monitor] = "-Dsupply-monitor=true, -Dsupply-monitor=false"
+
SEQ_MONITOR_SVC = "pseq-monitor.service"
SEQ_PGOOD_SVC = "pseq-monitor-pgood.service"
PSU_MONITOR_TMPL = "power-supply-monitor@.service"
@@ -51,7 +55,7 @@ REGS_MON_ENA_SVC = "phosphor-regulators-monitor-enable.service"
REGS_MON_DIS_SVC = "phosphor-regulators-monitor-disable.service"
SYSTEMD_SERVICE_${PN}-sequencer = "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC}"
-SYSTEMD_SERVICE_${PN}-monitor = "${PSU_MONITOR_TMPL}"
+SYSTEMD_SERVICE_${PN}-monitor = "${@bb.utils.contains('PACKAGECONFIG', 'monitor', '${PSU_MONITOR_TMPL}', '', d)}"
SYSTEMD_SERVICE_${PN}-psu-monitor = "${PSU_MONITOR_SVC}"
SYSTEMD_SERVICE_${PN}-regulators = "${REGS_SVC} ${REGS_CONF_SVC} ${REGS_MON_ENA_SVC} ${REGS_MON_DIS_SVC}"
diff --git a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb
index e3ab1f339..ada607648 100644
--- a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb
+++ b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "dbus-sensors"
DESCRIPTION = "Dbus Sensor Services Configured from D-Bus"
SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
-SRCREV = "eb0b84de9fd39a74a4a67990de6054b9d9f49833"
+SRCREV = "13b63f8f597d396db8b5bd182ac2e5814d599e2f"
PV = "0.1+git${SRCPV}"
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules
deleted file mode 100644
index 503b2d002..000000000
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBSYSTEM=="hwmon", ACTION=="add", RUN="/usr/bin/start_hwmon.sh start %p %E{OF_FULLNAME}"
-SUBSYSTEM=="hwmon", ACTION=="remove", RUN="/usr/bin/start_hwmon.sh stop %p %E{OF_FULLNAME}"
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
deleted file mode 100644
index 45fb4b0fb..000000000
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBSYSTEM=="iio", ACTION=="add", RUN="/usr/bin/start_hwmon.sh start %p %E{OF_FULLNAME}"
-SUBSYSTEM=="iio", ACTION=="remove", RUN="/usr/bin/start_hwmon.sh stop %p %E{OF_FULLNAME}"
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/phosphor-max31785-msl@.service b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/phosphor-max31785-msl@.service
deleted file mode 100644
index c007f1188..000000000
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/phosphor-max31785-msl@.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Phosphor MAX31785 MSL
-ConditionFileNotEmpty={envfiledir}/obmc/hwmon-max31785/%I.conf
-Wants=mapper-wait@-xyz-openbmc_project-inventory.service
-After=mapper-wait@-xyz-openbmc_project-inventory.service
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/env max31785-msl -p "${{PATHS}}" -b ${{BUS}} -r ${{REVISION}}
-EnvironmentFile={envfiledir}/obmc/hwmon-max31785/%I.conf
-SyslogIdentifier=max31785-msl
-RemainAfterExit=yes
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
deleted file mode 100755
index 2e346d0fb..000000000
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-action=$1
-devpath=$2
-of_fullname=$3
-
-#Use of_fullname if it's there, otherwise use devpath.
-
-path=$of_fullname
-if [ -z "$path" ]
-then
- path=$devpath
-
- if [[ "$path" =~ (.*)/hwmon/hwmon[0-9]+$ ]];
- then
- path=${BASH_REMATCH[1]}
- fi
-fi
-
-# Needed to re-do escaping used to avoid bitbake separator conflicts
-path="${path//:/--}"
-# Needed to escape prior to being used as a unit argument
-path="$(systemd-escape "$path")"
-systemctl --no-block "$action" "xyz.openbmc_project.Hwmon@$path.service"
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service
deleted file mode 100644
index b930b5711..000000000
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Phosphor Hwmon Poller
-ConditionFileNotEmpty=/etc/default/obmc/hwmon/%I.conf
-After=xyz.openbmc_project.ObjectMapper.service
-
-[Service]
-Restart=on-failure
-ExecStart=/usr/bin/env phosphor-hwmon-readd -o %I
-SyslogIdentifier=phosphor-hwmon-readd
-EnvironmentFile=/etc/default/obmc/hwmon/%I.conf
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb
index 4e90977b4..0d163c164 100644
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb
+++ b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb
@@ -5,10 +5,11 @@ PV = "1.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
-inherit meson pkgconfig
+inherit meson
inherit obmc-phosphor-systemd
PACKAGECONFIG ??= ""
+# Meson configure option to enable/disable max31785-msl
PACKAGECONFIG[max31785-msl] = "-Denable-max31785-msl=true, -Denable-max31785-msl=false"
PACKAGE_BEFORE_PN = "max31785-msl"
@@ -17,7 +18,6 @@ SYSTEMD_PACKAGES = "${PN} max31785-msl"
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Hwmon@.service"
SYSTEMD_SERVICE_max31785-msl = "${@bb.utils.contains('PACKAGECONFIG', 'max31785-msl', 'phosphor-max31785-msl@.service', '', d)}"
-DEPENDS += "autoconf-archive-native"
DEPENDS += " \
sdbusplus \
sdeventplus \
@@ -28,31 +28,68 @@ DEPENDS += " \
cli11 \
"
-
+FILES_${PN} += "${base_libdir}/systemd/system/xyz.openbmc_project.Hwmon@.service"
RDEPENDS_${PN} += "\
bash \
"
RRECOMMENDS_${PN} += "${VIRTUAL-RUNTIME_phosphor-hwmon-config}"
-FILES_max31785-msl = "${bindir}/max31785-msl"
+FILES_max31785-msl = "\
+ ${base_libdir}/systemd/system/phosphor-max31785-msl@.service \
+ ${bindir}/max31785-msl \
+ "
RDEPENDS_max31785-msl = "${VIRTUAL-RUNTIME_base-utils} i2c-tools bash"
SRC_URI += "git://github.com/openbmc/phosphor-hwmon"
-SRC_URI += "file://70-hwmon.rules"
-SRC_URI += "file://70-iio.rules"
-SRC_URI += "file://start_hwmon.sh"
-SRCREV = "73769099e215de68fbb6c82664eb682cacce9f56"
+SRCREV = "e32ce16bb6cc527b2e46b6e90ef7ac47404da173"
S = "${WORKDIR}/git"
-do_install_append() {
+# The following postinstall script iterate over hwmon env files:
+# 1. It adds HW_SENSOR_ID value if not set. The value being calculated
+# as sha256sum.
+# 2. For each hwmon the script generates busconfig ACLs.
+pkg_postinst_${PN}() {
+ hwmon_dir="$D/etc/default/obmc/hwmon"
+ dbus_dir="$D/etc/dbus-1/system.d"
+
+ if [ -n "$D" -a -d "${hwmon_dir}" ]; then
+ # Remove existing links and replace with actual copy of the file to prevent
+ # HW_SENSOR_ID variable override for different sensors' instances.
+ find "${hwmon_dir}" -type l -name \*.conf | while read f; do
+ path="$(readlink -f $f)"
+ rm -f "${f}"
+ cp "${path}" "${f}"
+ done
+
+ find "${hwmon_dir}" -type f -name \*.conf | while read f; do
+ path="/${f##${hwmon_dir}/}"
+ path="${path%.conf}"
+ sensor_id="$(printf "%s" "${path}" | sha256sum | cut -d\ -f1)"
+ acl_file="${dbus_dir}/xyz.openbmc_project.Hwmon-${sensor_id}.conf"
+
+ egrep -q '^HW_SENSOR_ID\s*=' "${f}" ||
+ printf "\n# Sensor id for %s\nHW_SENSOR_ID = \"%s\"\n" "${path}" "${sensor_id}" >> "${f}"
+
+ # Extract HW_SENSOR_ID that could be either quoted or unquoted string.
+ sensor_id="$(sed -n 's,^HW_SENSOR_ID\s*=\s*"\?\(.[^" ]\+\)\s*"\?,\1,p' "${f}")"
- install -d ${D}/${base_libdir}/udev/rules.d/
- install -m 0644 ${WORKDIR}/70-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
- install -m 0644 ${WORKDIR}/70-iio.rules ${D}/${base_libdir}/udev/rules.d/
+ [ ! -f "${acl_file}" ] || continue
+ path_s="$(echo "${path}" | sed 's,\-\-,\\-\\-,g')"
- install -d ${D}${bindir}
- install -m 0755 ${WORKDIR}/start_hwmon.sh ${D}${bindir}
+ cat <<EOF>"${acl_file}"
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="root">
+ <!-- ${path_s} -->
+ <allow own="xyz.openbmc_project.Hwmon-${sensor_id}.Hwmon1"/>
+ <allow send_destination="xyz.openbmc_project.Hwmon-${sensor_id}.Hwmon1"/>
+ </policy>
+</busconfig>
+EOF
+ done
+ fi
}
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb b/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb
index fb4035406..027de2762 100644
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb
+++ b/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb
@@ -15,7 +15,7 @@ DEPENDS += "phosphor-logging"
DEPENDS += "nlohmann-json"
SRC_URI = "git://github.com/openbmc/phosphor-nvme.git;protocol=git"
-SRCREV = "fdffe5c37f0d1feaa90558433f688c3757d2e79a"
+SRCREV = "d5838d1bbb26e9aa7ffc19c4fc57f4ee1237e22a"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.nvme.manager.service"
diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb b/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb
index 3eee4dbaa..e70e1b066 100644
--- a/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb
+++ b/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb
@@ -16,7 +16,7 @@ DEPENDS += "nlohmann-json"
DEPENDS += "exprtk"
SRC_URI = "git://github.com/openbmc/phosphor-virtual-sensor.git;protocol=git"
-SRCREV = "a55a907e7220bede5f4c76ca6d99fad2a0c1f00d"
+SRCREV = "543bf6687779c34f0f495eebae7e1819ced27577"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE_${PN} = "phosphor-virtual-sensor.service"
diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.inc b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.inc
index 77ba32545..2ecfd1fe8 100644
--- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.inc
+++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.inc
@@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-settingsd"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
SRC_URI += "git://github.com/openbmc/phosphor-settingsd"
-SRCREV = "9cca1ef0b1ab359e9745975bfb1aad01fb61f2a2"
+SRCREV = "235526310114281794f37e177eab34456d059c7a"
diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb
index 5fcaa5902..a0773a3a9 100644
--- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb
@@ -15,6 +15,7 @@ DBUS_SERVICE_${PN} = "xyz.openbmc_project.Settings.service"
DEPENDS += "${PYTHON_PN}-pyyaml-native"
DEPENDS += "${PYTHON_PN}-mako-native"
+DEPENDS += "${PYTHON_PN}-sdbus++-native"
DEPENDS += "autoconf-archive-native"
DEPENDS += "virtual/phosphor-settings-defaults"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'phosphor-settings-read-settings-mrw-native', '', d)}"
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb
index e93f12f7b..5375d7cda 100644
--- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb
@@ -182,6 +182,6 @@ SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHA
SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
-SRCREV = "aaa2e11057d89feadba173a6fea70325102cce21"
+SRCREV = "cd0ebe867b0592e9386650abc44696161da7bc8a"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb b/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb
index 3708e67ce..5c54a9b65 100644
--- a/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb
@@ -36,5 +36,5 @@ DBUS_SERVICE_phosphor-ldap = " \
xyz.openbmc_project.LDAP.PrivilegeMapper.service \
"
SRC_URI += "git://github.com/openbmc/phosphor-user-manager"
-SRCREV = "18c1b42c1612e0e8d8f5cd9973bba09b447c7185"
+SRCREV = "a260f187436837aec493baef0a5e7063fe11ee92"
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb
index 7f327d152..c6de6e004 100644
--- a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb
+++ b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb
@@ -20,7 +20,7 @@ DEPENDS += "phosphor-logging"
DEPENDS += "systemd"
SRC_URI += "git://github.com/openbmc/phosphor-watchdog"
-SRCREV = "18d3e6525cf412af8b940ad1f8e70afd7e907980"
+SRCREV = "459b6c798effc032cf41ae77c45cd63bbaad180b"
S = "${WORKDIR}/git"
EXTRA_OEMESON = " \
diff --git a/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb b/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb
index 481f7b6cc..3ffe5024d 100644
--- a/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb
+++ b/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb
@@ -6,7 +6,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/openbmc/webui-vue.git"
-SRCREV = "5ed21f2d1e8b82be699a623bfdef550dfd598dbb"
+SRCREV = "71114feb9a800d42f6eeddfa477077a8ab8e44f6"
S = "${WORKDIR}/git"
DEPENDS_prepend = "nodejs-native "
diff --git a/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb b/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb
index 8765dd573..fa695a80f 100755
--- a/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb
+++ b/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "Chassis Power Control service for Intel based platforms"
DESCRIPTION = "Chassis Power Control service for Intel based platforms"
SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh"
-SRCREV = "92caa4c639903ef076e2f09e985291781edd927d"
+SRCREV = "afd04f0283bfc4854c0100c56ccf8bc1c10c799a"
PV = "1.0+git${SRCPV}"
diff --git a/meta-quanta/meta-common/recipes-phosphor/health/files/bmc_health_config.json b/meta-quanta/meta-common/recipes-phosphor/health/files/bmc_health_config.json
new file mode 100755
index 000000000..373b5d50f
--- /dev/null
+++ b/meta-quanta/meta-common/recipes-phosphor/health/files/bmc_health_config.json
@@ -0,0 +1,15 @@
+{
+ "CPU" : {
+ "Frequency" : 1,
+ "Window_size": 120
+ },
+ "Memory" : {
+ "Frequency" : 1,
+ "Window_size": 120
+ },
+ "Storage_RW" : {
+ "Path" : "/run/initramfs/rw",
+ "Frequency" : 1,
+ "Window_size": 120
+ }
+}
diff --git a/meta-quanta/meta-common/recipes-phosphor/health/phosphor-health-monitor_%.bbappend b/meta-quanta/meta-common/recipes-phosphor/health/phosphor-health-monitor_%.bbappend
new file mode 100755
index 000000000..1d8bb4ecd
--- /dev/null
+++ b/meta-quanta/meta-common/recipes-phosphor/health/phosphor-health-monitor_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = " file://bmc_health_config.json \
+ "
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/healthMon/
+ install -m 0644 ${WORKDIR}/bmc_health_config.json ${D}/${sysconfdir}/healthMon/
+}
+
diff --git a/meta-quanta/meta-gbs/conf/machine/gbs.conf b/meta-quanta/meta-gbs/conf/machine/gbs.conf
index e9456b5ec..6f54e383b 100644
--- a/meta-quanta/meta-gbs/conf/machine/gbs.conf
+++ b/meta-quanta/meta-gbs/conf/machine/gbs.conf
@@ -10,12 +10,13 @@ MACHINEOVERRIDES .= ":npcm7xx"
require conf/machine/include/npcm7xx.inc
require conf/machine/include/obmc-bsp-common.inc
+SERIAL_CONSOLES = "115200;ttyS0"
GBMC_NCSI_IF_NAME = "eth0"
GBMC_KCS_DEV = "ipmi-kcs1"
# Overwrite flash offsets
-FLASH_ROFS_OFFSET = "7296"
-FLASH_RWFS_OFFSET = "61440"
+FLASH_ROFS_OFFSET = "7168"
+FLASH_RWFS_OFFSET = "62400"
FLASH_SIZE = "65536"
OBMC_MACHINE_FEATURES += "\
@@ -37,6 +38,7 @@ PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-gbs-apps"
PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-gbs-apps"
PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "gbmc-kcs-config"
PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "gbs-led-manager-config-native"
+PREFERRED_PROVIDER_virtual/bios-update = "gbs-bios-update"
# Remove unneeded binaries from image
IMAGE_FEATURES_remove = "obmc-fan-control"
diff --git a/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config b/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config
deleted file mode 100644
index 0c384273f..000000000
--- a/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config
+++ /dev/null
@@ -1,24 +0,0 @@
-# Configuration file for fw_(printenv/setenv) utility.
-# Up to two entries are valid, in this case the redundant
-# environment sector is assumed present.
-# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
-# Futhermore, if the Flash sector size is ommitted, this value is assumed to
-# be the same as the Environment size, which is valid for NOR and SPI-dataflash
-
-# NOR example
-# MTD device name Device offset Env. size Flash sector size Number of sectors
-/dev/mtd2 0x0000 0x40000 0x4000
-
-# MTD SPI-dataflash example
-# MTD device name Device offset Env. size Flash sector size Number of sectors
-#/dev/mtd5 0x4200 0x4200
-#/dev/mtd6 0x4200 0x4200
-
-# NAND example
-#/dev/mtd0 0x4000 0x4000 0x20000 2
-
-# Block device example
-#/dev/mmcblk0 0xc0000 0x20000
-
-# VFAT example
-#/boot/uboot.env 0x0000 0x4000
diff --git a/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend b/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend
deleted file mode 100644
index 8b66271a5..000000000
--- a/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend
+++ /dev/null
@@ -1,6 +0,0 @@
-FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
-SRC_URI_append_gbs = " file://fw_env.config"
-
-do_install_append_gbs() {
- install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
-}
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/gbs-bios-update.bb b/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/gbs-bios-update.bb
index 32b9d512b..0ea731c35 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/gbs-bios-update.bb
+++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/gbs-bios-update.bb
@@ -12,6 +12,9 @@ DEPENDS += "systemd"
DEPENDS += "phosphor-ipmi-flash"
RDEPENDS_${PN} += "bash"
+PROVIDES += "virtual/bios-update"
+RPROVIDES_${PN} += "virtual/bios-update"
+
SRC_URI += " file://bios-verify.sh \
file://bios-update.sh \
file://phosphor-ipmi-flash-bios-verify.service \
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-nvme-pwr-ctrl/gbs-nvme-pwr-ctrl.bb b/meta-quanta/meta-gbs/recipes-gbs/gbs-nvme-pwr-ctrl/gbs-nvme-pwr-ctrl.bb
index a3f0c58d9..21ef52c49 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/gbs-nvme-pwr-ctrl/gbs-nvme-pwr-ctrl.bb
+++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-nvme-pwr-ctrl/gbs-nvme-pwr-ctrl.bb
@@ -12,7 +12,7 @@ DEPENDS += "boost"
DEPENDS += "libgpiod"
SRC_URI = "git://github.com/quanta-bmc/nvme-power-control;protocol=git"
-SRCREV = "f7d2dbd6b48f3992d4a2fb1c0fe2afd746b8428a"
+SRCREV = "3b39e92a8340d8ba1bd40a03af3f5a9049da3bc7"
S = "${WORKDIR}/git"
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/gbs-sysinit.bb b/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/gbs-sysinit.bb
index 68a9cf181..c9d595a3d 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/gbs-sysinit.bb
+++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/gbs-sysinit.bb
@@ -8,8 +8,9 @@ inherit systemd
DEPENDS += "systemd"
RDEPENDS_${PN} += "bash"
-RDEPENDS_${PN} += "libsystemd"
+RDEPENDS_${PN} += "i2c-tools"
RDEPENDS_${PN} += "jq"
+RDEPENDS_${PN} += "libsystemd"
SRC_URI = "file://gbs-sysinit.sh \
file://gbs-gpio-common.sh \
diff --git a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb
index 6bf7bb69f..7c28dc28d 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb
+++ b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb
@@ -8,6 +8,7 @@ inherit systemd
DEPENDS += "systemd"
RDEPENDS_${PN} += "bash"
+RDEPENDS_${PN} += "libgpiod-tools"
SRC_URI = " file://hotswap-power-cycle.service \
file://tray_powercycle.sh \
diff --git a/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-host-s0-set-failsafe.service b/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-host-s0-set-failsafe.service
index 263cafaa2..ccc6a1c20 100644
--- a/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-host-s0-set-failsafe.service
+++ b/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-host-s0-set-failsafe.service
@@ -8,8 +8,8 @@ After=mapper-wait@-xyz-openbmc_project-settings-fanctrl.service
[Service]
Type=oneshot
-# 230: 90% duty cycle
-ExecStart=/usr/bin/gbs-set-failsafe.sh 230
+# 255: 100% duty cycle
+ExecStart=/usr/bin/gbs-set-failsafe.sh 255
[Install]
WantedBy=host-s0-state.target
diff --git a/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/0003-Add-basic-support-for-SB-TSI-sensors.patch b/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/0003-Add-basic-support-for-SB-TSI-sensors.patch
deleted file mode 100644
index b690a9813..000000000
--- a/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/0003-Add-basic-support-for-SB-TSI-sensors.patch
+++ /dev/null
@@ -1,327 +0,0 @@
-SB Temperature Sensor Interface (SB-TSI) is an SMBus compatible
-interface that reports AMD SoC's Ttcl (normalized temperature),
-and resembles a typical 8-pin remote temperature sensor's I2C interface
-to BMC.
-
-This commit adds basic support using this interface to read CPU
-temperature, and read/write high/low CPU temp thresholds.
-
-To instantiate this driver on an AMD CPU with SB-TSI
-support, the i2c bus number would be the bus connected from the board
-management controller (BMC) to the CPU. The i2c address is specified in
-Section 6.3.1 of the spec [1]: The SB-TSI address is normally 98h for socket 0
-and 90h for socket 1, but it could vary based on hardware address select pins.
-
-[1]: https://www.amd.com/system/files/TechDocs/56255_OSRR.pdf
-
-Test status: tested reading temp1_input, and reading/writing
-temp1_max/min.
-
-Signed-off-by: Kun Yi <kunyi at google.com>
----
- drivers/hwmon/Kconfig | 10 ++
- drivers/hwmon/Makefile | 1 +
- drivers/hwmon/sbtsi_temp.c | 259 +++++++++++++++++++++++++++++++++++++
- 3 files changed, 270 insertions(+)
- create mode 100644 drivers/hwmon/sbtsi_temp.c
-
-diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
-index 05a30832c6ba..9585dcd01d1b 100644
---- a/drivers/hwmon/Kconfig
-+++ b/drivers/hwmon/Kconfig
-@@ -1412,6 +1412,16 @@ config SENSORS_RASPBERRYPI_HWMON
- This driver can also be built as a module. If so, the module
- will be called raspberrypi-hwmon.
-
-+config SENSORS_SBTSI
-+ tristate "Emulated SB-TSI temperature sensor"
-+ depends on I2C
-+ help
-+ If you say yes here you get support for emulated temperature
-+ sensors on AMD SoCs with SB-TSI interface connected to a BMC device.
-+
-+ This driver can also be built as a module. If so, the module will
-+ be called sbtsi_temp.
-+
- config SENSORS_SHT15
- tristate "Sensiron humidity and temperature sensors. SHT15 and compat."
- depends on GPIOLIB || COMPILE_TEST
-diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
-index b0b9c8e57176..cd109f003ce4 100644
---- a/drivers/hwmon/Makefile
-+++ b/drivers/hwmon/Makefile
-@@ -152,6 +152,7 @@ obj-$(CONFIG_SENSORS_POWR1220) += powr1220.o
- obj-$(CONFIG_SENSORS_PWM_FAN) += pwm-fan.o
- obj-$(CONFIG_SENSORS_RASPBERRYPI_HWMON) += raspberrypi-hwmon.o
- obj-$(CONFIG_SENSORS_S3C) += s3c-hwmon.o
-+obj-$(CONFIG_SENSORS_SBTSI) += sbtsi_temp.o
- obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+= sch56xx-common.o
- obj-$(CONFIG_SENSORS_SCH5627) += sch5627.o
- obj-$(CONFIG_SENSORS_SCH5636) += sch5636.o
-diff --git a/drivers/hwmon/sbtsi_temp.c b/drivers/hwmon/sbtsi_temp.c
-new file mode 100644
-index 000000000000..e3ad6a9f7ec1
---- /dev/null
-+++ b/drivers/hwmon/sbtsi_temp.c
-@@ -0,0 +1,259 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later
-+/*
-+ * sbtsi_temp.c - hwmon driver for a SBI Temperature Sensor Interface (SB-TSI)
-+ * compliant AMD SoC temperature device.
-+ *
-+ * Copyright (c) 2020, Google Inc.
-+ * Copyright (c) 2020, Kun Yi <kunyi at google.com>
-+ */
-+
-+#include <linux/err.h>
-+#include <linux/i2c.h>
-+#include <linux/init.h>
-+#include <linux/hwmon.h>
-+#include <linux/module.h>
-+#include <linux/mutex.h>
-+#include <linux/of_device.h>
-+#include <linux/of.h>
-+
-+/*
-+ * SB-TSI registers only support SMBus byte data access. "_INT" registers are
-+ * the integer part of a temperature value or limit, and "_DEC" registers are
-+ * corresponding decimal parts.
-+ */
-+#define SBTSI_REG_TEMP_INT 0x01 /* RO */
-+#define SBTSI_REG_STATUS 0x02 /* RO */
-+#define SBTSI_REG_CONFIG 0x03 /* RO */
-+#define SBTSI_REG_TEMP_HIGH_INT 0x07 /* RW */
-+#define SBTSI_REG_TEMP_LOW_INT 0x08 /* RW */
-+#define SBTSI_REG_TEMP_DEC 0x10 /* RW */
-+#define SBTSI_REG_TEMP_HIGH_DEC 0x13 /* RW */
-+#define SBTSI_REG_TEMP_LOW_DEC 0x14 /* RW */
-+#define SBTSI_REG_REV 0xFF /* RO */
-+
-+#define SBTSI_CONFIG_READ_ORDER_SHIFT 5
-+
-+#define SBTSI_TEMP_MIN 0
-+#define SBTSI_TEMP_MAX 255875
-+#define SBTSI_REV_MAX_VALID_ID 4
-+
-+/* Each client has this additional data */
-+struct sbtsi_data {
-+ struct i2c_client *client;
-+ struct mutex lock;
-+};
-+
-+/*
-+ * From SB-TSI spec: CPU temperature readings and limit registers encode the
-+ * temperature in increments of 0.125 from 0 to 255.875. The "high byte"
-+ * register encodes the base-2 of the integer portion, and the upper 3 bits of
-+ * the "low byte" encode in base-2 the decimal portion.
-+ *
-+ * e.g. INT=0x19, DEC=0x20 represents 25.125 degrees Celsius
-+ *
-+ * Therefore temperature in millidegree Celsius =
-+ * (INT + DEC / 256) * 1000 = (INT * 8 + DEC / 32) * 125
-+ */
-+static inline int sbtsi_reg_to_mc(s32 integer, s32 decimal)
-+{
-+ return ((integer << 3) + (decimal >> 5)) * 125;
-+}
-+
-+/*
-+ * Inversely, given temperature in millidegree Celsius
-+ * INT = (TEMP / 125) / 8
-+ * DEC = ((TEMP / 125) % 8) * 32
-+ * Caller have to make sure temp doesn't exceed 255875, the max valid value.
-+ */
-+static inline void sbtsi_mc_to_reg(s32 temp, u8 *integer, u8 *decimal)
-+{
-+ temp /= 125;
-+ *integer = temp >> 3;
-+ *decimal = (temp & 0x7) << 5;
-+}
-+
-+static int sbtsi_read(struct device *dev, enum hwmon_sensor_types type,
-+ u32 attr, int channel, long *val)
-+{
-+ struct sbtsi_data *data = dev_get_drvdata(dev);
-+ s32 temp_int, temp_dec;
-+ int err, reg_int, reg_dec;
-+ u8 read_order;
-+
-+ if (type != hwmon_temp)
-+ return -EINVAL;
-+
-+ read_order = 0;
-+ switch (attr) {
-+ case hwmon_temp_input:
-+ /*
-+ * ReadOrder bit specifies the reading order of integer and
-+ * decimal part of CPU temp for atomic reads. If bit == 0,
-+ * reading integer part triggers latching of the decimal part,
-+ * so integer part should be read first. If bit == 1, read
-+ * order should be reversed.
-+ */
-+ err = i2c_smbus_read_byte_data(data->client, SBTSI_REG_CONFIG);
-+ if (err < 0)
-+ return err;
-+
-+ read_order = (u8)err & BIT(SBTSI_CONFIG_READ_ORDER_SHIFT);
-+ reg_int = SBTSI_REG_TEMP_INT;
-+ reg_dec = SBTSI_REG_TEMP_DEC;
-+ break;
-+ case hwmon_temp_max:
-+ reg_int = SBTSI_REG_TEMP_HIGH_INT;
-+ reg_dec = SBTSI_REG_TEMP_HIGH_DEC;
-+ break;
-+ case hwmon_temp_min:
-+ reg_int = SBTSI_REG_TEMP_LOW_INT;
-+ reg_dec = SBTSI_REG_TEMP_LOW_DEC;
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ if (read_order == 0) {
-+ temp_int = i2c_smbus_read_byte_data(data->client, reg_int);
-+ temp_dec = i2c_smbus_read_byte_data(data->client, reg_dec);
-+ } else {
-+ temp_dec = i2c_smbus_read_byte_data(data->client, reg_dec);
-+ temp_int = i2c_smbus_read_byte_data(data->client, reg_int);
-+ }
-+
-+ if (temp_int < 0)
-+ return temp_int;
-+ if (temp_dec < 0)
-+ return temp_dec;
-+
-+ *val = sbtsi_reg_to_mc(temp_int, temp_dec);
-+
-+ return 0;
-+}
-+
-+static int sbtsi_write(struct device *dev, enum hwmon_sensor_types type,
-+ u32 attr, int channel, long val)
-+{
-+ struct sbtsi_data *data = dev_get_drvdata(dev);
-+ int reg_int, reg_dec, err;
-+ u8 temp_int, temp_dec;
-+
-+ if (type != hwmon_temp)
-+ return -EINVAL;
-+
-+ switch (attr) {
-+ case hwmon_temp_max:
-+ reg_int = SBTSI_REG_TEMP_HIGH_INT;
-+ reg_dec = SBTSI_REG_TEMP_HIGH_DEC;
-+ break;
-+ case hwmon_temp_min:
-+ reg_int = SBTSI_REG_TEMP_LOW_INT;
-+ reg_dec = SBTSI_REG_TEMP_LOW_DEC;
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ val = clamp_val(val, SBTSI_TEMP_MIN, SBTSI_TEMP_MAX);
-+ mutex_lock(&data->lock);
-+ sbtsi_mc_to_reg(val, &temp_int, &temp_dec);
-+ err = i2c_smbus_write_byte_data(data->client, reg_int, temp_int);
-+ if (err)
-+ goto exit;
-+
-+ err = i2c_smbus_write_byte_data(data->client, reg_dec, temp_dec);
-+exit:
-+ mutex_unlock(&data->lock);
-+ return err;
-+}
-+
-+static umode_t sbtsi_is_visible(const void *data,
-+ enum hwmon_sensor_types type,
-+ u32 attr, int channel)
-+{
-+ switch (type) {
-+ case hwmon_temp:
-+ switch (attr) {
-+ case hwmon_temp_input:
-+ return 0444;
-+ case hwmon_temp_min:
-+ return 0644;
-+ case hwmon_temp_max:
-+ return 0644;
-+ }
-+ break;
-+ default:
-+ break;
-+ }
-+ return 0;
-+}
-+
-+static const struct hwmon_channel_info *sbtsi_info[] = {
-+ HWMON_CHANNEL_INFO(chip,
-+ HWMON_C_REGISTER_TZ),
-+ HWMON_CHANNEL_INFO(temp,
-+ HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX),
-+ NULL
-+};
-+
-+static const struct hwmon_ops sbtsi_hwmon_ops = {
-+ .is_visible = sbtsi_is_visible,
-+ .read = sbtsi_read,
-+ .write = sbtsi_write,
-+};
-+
-+static const struct hwmon_chip_info sbtsi_chip_info = {
-+ .ops = &sbtsi_hwmon_ops,
-+ .info = sbtsi_info,
-+};
-+
-+static int sbtsi_probe(struct i2c_client *client,
-+ const struct i2c_device_id *id)
-+{
-+ struct device *dev = &client->dev;
-+ struct device *hwmon_dev;
-+ struct sbtsi_data *data;
-+
-+ data = devm_kzalloc(dev, sizeof(struct sbtsi_data), GFP_KERNEL);
-+ if (!data)
-+ return -ENOMEM;
-+
-+ data->client = client;
-+ mutex_init(&data->lock);
-+
-+ hwmon_dev =
-+ devm_hwmon_device_register_with_info(dev, client->name, data,
-+ &sbtsi_chip_info, NULL);
-+
-+ return PTR_ERR_OR_ZERO(hwmon_dev);
-+}
-+
-+static const struct i2c_device_id sbtsi_id[] = {
-+ {"sbtsi", 0},
-+ {}
-+};
-+MODULE_DEVICE_TABLE(i2c, sbtsi_id);
-+
-+static const struct of_device_id __maybe_unused sbtsi_of_match[] = {
-+ {
-+ .compatible = "amd,sbtsi",
-+ },
-+ { },
-+};
-+MODULE_DEVICE_TABLE(of, sbtsi_of_match);
-+
-+static struct i2c_driver sbtsi_driver = {
-+ .class = I2C_CLASS_HWMON,
-+ .driver = {
-+ .name = "sbtsi",
-+ .of_match_table = of_match_ptr(sbtsi_of_match),
-+ },
-+ .probe = sbtsi_probe,
-+ .id_table = sbtsi_id,
-+};
-+
-+module_i2c_driver(sbtsi_driver);
-+
-+MODULE_AUTHOR("Kun Yi <kunyi at google.com>");
-+MODULE_DESCRIPTION("Hwmon driver for AMD SB-TSI emulated sensor");
-+MODULE_LICENSE("GPL");
---
-2.26.0.292.g33ef6b2f38-goog \ No newline at end of file
diff --git a/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/gbs.cfg b/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/gbs.cfg
index edd009c47..221910a36 100644
--- a/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/gbs.cfg
+++ b/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton/gbs.cfg
@@ -29,8 +29,10 @@ CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=y // Allow userspace to blink LEDs
-CONFIG_LEDS_TRIGGER_PANIC=y // Blink BMC fault when kernel panics
+# Allow userspace to blink LEDs
+CONFIG_LEDS_TRIGGER_TIMER=y
+# Blink BMC fault when kernel panics
+CONFIG_LEDS_TRIGGER_PANIC=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
@@ -108,3 +110,9 @@ CONFIG_MTD_M25P80=y
CONFIG_MUX_MMIO=y
CONFIG_NPCM7XX_LPC_BPC=y
CONFIG_MTD_PARTITIONED_MASTER=y
+
+# Enable phsophor-gpio-keys feature
+CONFIG_INPUT_EVDEV=y
+# Need for CONFIG_KEYBOARD_GPIO Kconfig
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_GPIO=y
diff --git a/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton_%.bbappend b/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton_%.bbappend
index 4de4ca900..e5fadfe05 100644
--- a/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-kernel/linux/linux-nuvoton_%.bbappend
@@ -1,6 +1,5 @@
FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/linux-nuvoton:"
SRC_URI_append_gbs = " file://gbs.cfg"
-SRC_URI_append_gbs = " file://0003-Add-basic-support-for-SB-TSI-sensors.patch"
SRC_URI_append_gbs = " file://0004-Add-kernel-seven-seg-display-support.patch"
SRC_URI_append_gbs = " file://0004-ben-drivers-misc-Character-device-driver-for-seven-segme.patch"
SRC_URI_append_gbs = " file://0004-ben-drivers-misc-Platform-driver-for-seven-segment-displ.patch"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config.bb b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config.bb
index cd632e132..167f78df9 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config.bb
+++ b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config.bb
@@ -9,6 +9,7 @@ SRC_URI = " \
file://gbs-ipmi-fru.yaml \
file://gbs-ipmi-sensors.yaml \
file://gbs-ipmi-fru-properties.yaml \
+ file://gbs-ipmi-inventory-sensors.yaml \
"
S = "${WORKDIR}"
@@ -20,12 +21,15 @@ do_install() {
${D}${datadir}/${BPN}/ipmi-sensors.yaml
install -m 0644 -D gbs-ipmi-fru-properties.yaml \
${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
+ install -m 0644 -D gbs-ipmi-inventory-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
}
FILES_${PN}-dev = " \
${datadir}/${BPN}/ipmi-fru-read.yaml \
${datadir}/${BPN}/ipmi-sensors.yaml \
${datadir}/${BPN}/ipmi-extra-properties.yaml \
+ ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \
"
ALLOW_EMPTY_${PN} = "1"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml
new file mode 100644
index 000000000..865e4b3b6
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml
@@ -0,0 +1,435 @@
+/xyz/openbmc_project/sensors/temperature/i2cool_0:
+ eventReadingType: 1
+ sensorID: 0x10
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/i2cool_1:
+ eventReadingType: 1
+ sensorID: 0x11
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/i2cool_2:
+ eventReadingType: 1
+ sensorID: 0x12
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/powerseq_temp:
+ eventReadingType: 1
+ sensorID: 0x13
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/cputemp:
+ eventReadingType: 1
+ sensorID: 0x14
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme0:
+ eventReadingType: 1
+ sensorID: 0x15
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme1:
+ eventReadingType: 1
+ sensorID: 0x16
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme2:
+ eventReadingType: 1
+ sensorID: 0x17
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme3:
+ eventReadingType: 1
+ sensorID: 0x18
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme4:
+ eventReadingType: 1
+ sensorID: 0x19
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme5:
+ eventReadingType: 1
+ sensorID: 0x1A
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme6:
+ eventReadingType: 1
+ sensorID: 0x1B
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme7:
+ eventReadingType: 1
+ sensorID: 0x1C
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme8:
+ eventReadingType: 1
+ sensorID: 0x1D
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme9:
+ eventReadingType: 1
+ sensorID: 0x1E
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme10:
+ eventReadingType: 1
+ sensorID: 0x1F
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme11:
+ eventReadingType: 1
+ sensorID: 0x20
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme12:
+ eventReadingType: 1
+ sensorID: 0x21
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme13:
+ eventReadingType: 1
+ sensorID: 0x22
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme14:
+ eventReadingType: 1
+ sensorID: 0x23
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/nvme15:
+ eventReadingType: 1
+ sensorID: 0x24
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/vddcr_cpu:
+ eventReadingType: 1
+ sensorID: 0x27
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/vddcr_soc:
+ eventReadingType: 1
+ sensorID: 0x28
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/vddio_abcd:
+ eventReadingType: 1
+ sensorID: 0x29
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/vddio_efgh:
+ eventReadingType: 1
+ sensorID: 0x2A
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/p12v_mobo:
+ eventReadingType: 1
+ sensorID: 0x2B
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/p12v_fan:
+ eventReadingType: 1
+ sensorID: 0x2C
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/hotswap:
+ eventReadingType: 1
+ sensorID: 0x2D
+ sensorType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p1v8_stby:
+ eventReadingType: 1
+ sensorID: 0x30
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddcr_soc_stby:
+ eventReadingType: 1
+ sensorID: 0x31
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p2v5_stby:
+ eventReadingType: 1
+ sensorID: 0x32
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p1v2_stby:
+ eventReadingType: 1
+ sensorID: 0x33
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p1v175_stby:
+ eventReadingType: 1
+ sensorID: 0x34
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p1v8:
+ eventReadingType: 1
+ sensorID: 0x35
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p3v3:
+ eventReadingType: 1
+ sensorID: 0x36
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/pwrgd_pvpp:
+ eventReadingType: 1
+ sensorID: 0x37
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/pwrgd_pvddio:
+ eventReadingType: 1
+ sensorID: 0x38
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/pwrgd_cpuvr:
+ eventReadingType: 1
+ sensorID: 0x39
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p3v3_stby:
+ eventReadingType: 1
+ sensorID: 0x3A
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p5v_stby:
+ eventReadingType: 1
+ sensorID: 0x3B
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddcr_cpu_in:
+ eventReadingType: 1
+ sensorID: 0x3C
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddcr_cpu_out:
+ eventReadingType: 1
+ sensorID: 0x3D
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddcr_soc_in:
+ eventReadingType: 1
+ sensorID: 0x3E
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddcr_soc_out:
+ eventReadingType: 1
+ sensorID: 0x3F
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddio_abcd_out:
+ eventReadingType: 1
+ sensorID: 0x40
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddio_abcd_in:
+ eventReadingType: 1
+ sensorID: 0x41
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddio_efgh_out:
+ eventReadingType: 1
+ sensorID: 0x42
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/vddio_efgh_in:
+ eventReadingType: 1
+ sensorID: 0x43
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/hotswap_vin:
+ eventReadingType: 1
+ sensorID: 0x44
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/hotswap_vout:
+ eventReadingType: 1
+ sensorID: 0x45
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p3v_bat_adc:
+ eventReadingType: 1
+ sensorID: 0x46
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p12v_mobo_out:
+ eventReadingType: 1
+ sensorID: 0x47
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p12v_mobo_in:
+ eventReadingType: 1
+ sensorID: 0x48
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p12v_fan_out:
+ eventReadingType: 1
+ sensorID: 0x49
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/p12v_fan_in:
+ eventReadingType: 1
+ sensorID: 0x4A
+ sensorType: 2
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddcr_cpu_in:
+ eventReadingType: 1
+ sensorID: 0x50
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddcr_cpu_out:
+ eventReadingType: 1
+ sensorID: 0x51
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddcr_soc_in:
+ eventReadingType: 1
+ sensorID: 0x52
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddcr_soc_out:
+ eventReadingType: 1
+ sensorID: 0x53
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddio_abcd_in:
+ eventReadingType: 1
+ sensorID: 0x55
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddio_abcd_out:
+ eventReadingType: 1
+ sensorID: 0x54
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddio_efgh_in:
+ eventReadingType: 1
+ sensorID: 0x57
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/vddio_efgh_out:
+ eventReadingType: 1
+ sensorID: 0x56
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/p12v_mobo_in:
+ eventReadingType: 1
+ sensorID: 0x5A
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/p12v_mobo_out:
+ eventReadingType: 1
+ sensorID: 0x59
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/p12v_fan_in:
+ eventReadingType: 1
+ sensorID: 0x5C
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/p12v_fan_out:
+ eventReadingType: 1
+ sensorID: 0x5B
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/hotswap_iout:
+ eventReadingType: 1
+ sensorID: 0x58
+ sensorType: 3
+ offset: 0xff
+/xyz/openbmc_project/sensors/power/hotswap_pout:
+ eventReadingType: 1
+ sensorID: 0x70
+ sensorType: 0x0B
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/fan0:
+ eventReadingType: 1
+ sensorID: 0x60
+ sensorType: 4
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/fan1:
+ eventReadingType: 1
+ sensorID: 0x61
+ sensorType: 4
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/fb_fan0:
+ eventReadingType: 1
+ sensorID: 0x62
+ sensorType: 4
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/fb_fan1:
+ eventReadingType: 1
+ sensorID: 0x63
+ sensorType: 4
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/fb_fan2:
+ eventReadingType: 1
+ sensorID: 0x64
+ sensorType: 4
+ offset: 0xff
+/xyz/openbmc_project/metrics/memory/BmcECC:
+ eventReadingType: 0x6f
+ sensorID: 0xF0
+ sensorType: 0x0C
+ offset: 0x00
+/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab0_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF1
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab1_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF2
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab2_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF3
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab3_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF4
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/entity/sata0_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF5
+ sensorType: 0x25
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/cable/hsbp_cab_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF6
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/cable/fanbd_cab_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF7
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/cable/bp12v_cab_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF8
+ sensorType: 0x1B
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot0_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xF9
+ sensorType: 0x25
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot1_prsnt:
+ eventReadingType: 0x6f
+ sensorID: 0xFA
+ sensorType: 0x25
+ offset: 0x01
+/xyz/openbmc_project/watchdog/host0:
+ eventReadingType: 0x6f
+ sensorID: 0xFB
+ sensorType: 0x23
+ offset: 0x01
+/xyz/openbmc_project/inventory/system/chassis/entity/fans_efuse_pg:
+ eventReadingType: 0x6f
+ sensorID: 0xFC
+ sensorType: 0x25
+ offset: 0x01
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/console/files/80-gbs-nuvoton-sol.rules b/meta-quanta/meta-gbs/recipes-phosphor/console/files/80-gbs-nuvoton-sol.rules
deleted file mode 100644
index 3d0670bc3..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/console/files/80-gbs-nuvoton-sol.rules
+++ /dev/null
@@ -1 +0,0 @@
-SUBSYSTEM=="tty", ATTRS{iomem_base}=="0xF0002000", ENV{SYSTEMD_WANTS}="obmc-console@ttyS1" SYMLINK+="ttyS1", TAG+="systemd"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/console/obmc-console_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/console/obmc-console_%.bbappend
index f78e3c22d..142661078 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/console/obmc-console_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/console/obmc-console_%.bbappend
@@ -1,13 +1,4 @@
FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/files:"
-SRC_URI_append_gbs = " file://80-gbs-nuvoton-sol.rules"
-do_install_append_gbs() {
- install -m 0755 -d ${D}${sysconfdir}/${BPN}
- rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
- install -m 0644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/
- ln -sr ${D}${sysconfdir}/${BPN}.conf ${D}${sysconfdir}/${BPN}/server.ttyS1.conf
-
- install -d ${D}/lib/udev/rules.d
- rm -f ${D}/lib/udev/rules.d/80-obmc-console-uart.rules
- install -m 0644 ${WORKDIR}/80-gbs-nuvoton-sol.rules ${D}/lib/udev/rules.d
-}
+OBMC_CONSOLE_FRONT_TTY_gbs = "ttyS3"
+OBMC_CONSOLE_HOST_TTY_gbs = "ttyS1"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch b/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch
deleted file mode 100644
index 67fa59090..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 6e9a19c43acac7d4254910906329d98d7b59085a Mon Sep 17 00:00:00 2001
-From: Ren Yu <yux.ren@intel.com>
-Date: Fri, 24 May 2019 14:55:10 +0800
-Subject: [PATCH] Add the pre-timeout interrupt defined in IPMI spec
-
-The IPMI watchdog pre-timeout interrupt is used to set the different
-pre-timeout interrupt source. Add them as a dbus property,
-IPMI set/get watchdog commands will use it.
-
-Signed-off-by: Ren Yu <yux.ren@intel.com>
----
- xyz/openbmc_project/State/Watchdog.interface.yaml | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/xyz/openbmc_project/State/Watchdog.interface.yaml b/xyz/openbmc_project/State/Watchdog.interface.yaml
-index 2fc47d8..6dfa9b9 100644
---- a/xyz/openbmc_project/State/Watchdog.interface.yaml
-+++ b/xyz/openbmc_project/State/Watchdog.interface.yaml
-@@ -33,6 +33,11 @@ properties:
- description: >
- The action the watchdog should perform when it expires.
- default: 'HardReset'
-+ - name: PreTimeoutInterrupt
-+ type: enum[self.PreTimeoutInterruptAction]
-+ description: >
-+ The BMC generates the selected interrupt before the timer expires.
-+ default: 'None'
- - name: Interval
- type: uint64
- description: >
-@@ -73,6 +78,23 @@ enumerations:
- description: >
- Perform a power cycle of the system.
-
-+ - name: PreTimeoutInterruptAction
-+ description: >
-+ The type of PreTimeout Interrupt.
-+ values:
-+ - name: 'None'
-+ description: >
-+ Do nothing.
-+ - name: 'SMI'
-+ description: >
-+ SMI.
-+ - name: 'NMI'
-+ description: >
-+ NMI / Diagnostic Interrupt.
-+ - name: 'MI'
-+ description: >
-+ Messaging Interrupt.
-+
- - name: TimerUse
- description: >
- The type of timer use.
---
-2.7.4
-
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0025-Add-PreInterruptFlag-properity-in-DBUS.patch b/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0025-Add-PreInterruptFlag-properity-in-DBUS.patch
deleted file mode 100644
index d7e66abd2..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0025-Add-PreInterruptFlag-properity-in-DBUS.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From b7c487750c05dcc081219ccdd4ef539beef6aa30 Mon Sep 17 00:00:00 2001
-From: Ren Yu <yux.ren@intel.com>
-Date: Mon, 29 Jul 2019 10:51:12 +0800
-Subject: [PATCH] Add PreInterruptFlag properity in DBUS.
-
-PreTimeoutInterruptOccurFlag in DBUS would be set 'true'
-when watchdog pre-timeout interrupt occurred.
-
-Tested:
-Enable command(raw 0x06 0x31) that get message flag
-can set right bit about watchdog,
-need record PreTimeoutInterruptOccurFlag
-at xyz.openbmmc_project.State.Watchdog when watchdog
-pre-timeout interrupt occurred.
-
-Signed-off-by: Ren Yu <yux.ren@intel.com>
----
- xyz/openbmc_project/State/Watchdog.interface.yaml | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/xyz/openbmc_project/State/Watchdog.interface.yaml b/xyz/openbmc_project/State/Watchdog.interface.yaml
-index bf4cca0..6579368 100644
---- a/xyz/openbmc_project/State/Watchdog.interface.yaml
-+++ b/xyz/openbmc_project/State/Watchdog.interface.yaml
-@@ -59,6 +59,11 @@ properties:
- description: >
- The timer user at the time of expiration.
- default: 'Reserved'
-+ - name: PreTimeoutInterruptOccurFlag
-+ type: boolean
-+ description: >
-+ PreTimeoutInterruptOccurFlag that preTimeoutInterrupt action occurred.
-+ default: false
-
- enumerations:
- - name: Action
---
-2.7.4
-
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
deleted file mode 100644
index 0b5bff905..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
-
-SRC_URI_append_gbs = " file://0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch \
- file://0025-Add-PreInterruptFlag-properity-in-DBUS.patch \
- "
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/images/obmc-phosphor-image.bbappend
index 9cea5db15..ff9e512c7 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/images/obmc-phosphor-image.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/images/obmc-phosphor-image.bbappend
@@ -22,3 +22,4 @@ OBMC_IMAGE_EXTRA_INSTALL_append_gbs = " gbs-nvme-pwr-ctrl"
OBMC_IMAGE_EXTRA_INSTALL_append_gbs = " read-margin-temp"
OBMC_IMAGE_EXTRA_INSTALL_append_gbs = " phosphor-virtual-sensor"
OBMC_IMAGE_EXTRA_INSTALL_append_gbs = " acpi-power-state-daemon"
+OBMC_IMAGE_EXTRA_INSTALL_append_gbs = " virtual/obmc-gpio-presence"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend
index 87ecf4fa3..2c19a3ead 100755
--- a/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,3 +1,8 @@
-EXTRA_OECMAKE_append_gbs = " \
- -DBMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES=ON \
+EXTRA_OEMESON_append_gbs = " \
+ -Dredfish-dbus-log=enabled \
+ -Dhttp-body-limit=40 \
"
+
+do_install_append_gbs(){
+ install -d ${D}${localstatedir}/lib/bmcweb
+}
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-flash_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-flash_%.bbappend
index 9f4c89026..14f333b81 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-flash_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-flash_%.bbappend
@@ -1,5 +1,5 @@
NUVOTON_FLASH_PCIMBOX = "0xF0848000"
-EXTRA_OECONF_append_gbs = " --enable-nuvoton-p2a-mbox"
+PACKAGECONFIG_append_gbs = " nuvoton-p2a-mbox"
IPMI_FLASH_BMC_ADDRESS_gbs = "${NUVOTON_FLASH_PCIMBOX}"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch
new file mode 100644
index 000000000..74f982b33
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch
@@ -0,0 +1,79 @@
+From a1f9d797753e32b36e08e7d611ff88b10e9bbad2 Mon Sep 17 00:00:00 2001
+From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
+Date: Thu, 30 Jan 2020 16:18:33 -0800
+Subject: [PATCH 1/3] Add Chassis State Transition interface
+
+This adds the Chassis State Transition interface in preparation
+to support the mapping defined in the design document below.
+
+ref: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/22358
+
+Tested:
+Ran each IPMI chassis control command to confirm the expected
+behavior:
+ipmitool power on: system is powered-on
+ipmitool power off: system is forced off
+ipmitool power cycle: system is forced off then powered-on
+ipmitool power reset: system is hard reset
+ipmitool power soft: soft power-off requested from system software
+
+Change-Id: I6acfb795a9a33ff5227a5d6e1830774ab732ac0c
+Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
+---
+ chassishandler.cpp | 33 +++++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+diff --git a/chassishandler.cpp b/chassishandler.cpp
+index 0d318647..fdbb9fa5 100644
+--- a/chassishandler.cpp
++++ b/chassishandler.cpp
+@@ -31,6 +31,7 @@
+ #include <xyz/openbmc_project/Control/Boot/Mode/server.hpp>
+ #include <xyz/openbmc_project/Control/Boot/Source/server.hpp>
+ #include <xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp>
++#include <xyz/openbmc_project/State/Chassis/server.hpp>
+ #include <xyz/openbmc_project/State/Host/server.hpp>
+ #include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
+
+@@ -865,6 +866,38 @@ int initiate_state_transition(State::Host::Transition transition)
+ return rc;
+ }
+
++//------------------------------------------
++// Calls into Chassis State Manager Dbus object
++//------------------------------------------
++int initiateChassisStateTransition(State::Chassis::Transition transition)
++{
++ // OpenBMC Chassis State Manager dbus framework
++ constexpr auto chassisStatePath = "/xyz/openbmc_project/state/chassis0";
++ constexpr auto chassisStateIntf = "xyz.openbmc_project.State.Chassis";
++
++ auto service =
++ ipmi::getService(*getSdBus(), chassisStateIntf, chassisStatePath);
++
++ // Convert to string equivalent of the passed in transition enum.
++ auto request = State::convertForMessage(transition);
++
++ try
++ {
++ ipmi::setDbusProperty(*getSdBus(), service, chassisStatePath,
++ chassisStateIntf, "RequestedPowerTransition",
++ request);
++ }
++ catch (std::exception& e)
++ {
++ log<level::ERR>(
++ "Failed to initiate transition",
++ entry("EXCEPTION=%s, REQUEST=%s", e.what(), request.c_str()));
++ return -1;
++ }
++
++ return 0;
++}
++
+ //------------------------------------------
+ // Set Enabled property to inform NMI source
+ // handling to trigger a NMI_OUT BSOD.
+--
+2.21.0
+
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Fix-issues-and-support-signed-sensor-values.patch b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Fix-issues-and-support-signed-sensor-values.patch
new file mode 100644
index 000000000..6d13f9297
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Fix-issues-and-support-signed-sensor-values.patch
@@ -0,0 +1,169 @@
+From 8ce91a760fca8c945540679c92770f841629e179 Mon Sep 17 00:00:00 2001
+From: Tony Lee <tony.lee@quantatw.com>
+Date: Thu, 31 Oct 2019 17:24:16 +0800
+Subject: [PATCH] Fix issues and support signed sensor values
+
+Sensor will get "disable" when the command "ipmitool sdr elist" is
+executed that if sensorReadingType is 0x6F.
+
+sensor_units_1 is always set to 0 currently. To support the display of
+signed sensor values, we add the attribute "sensorUnits1" to the sensor
+mapping yaml. This attribute can be used to determine whether the
+sensor is signed.
+
+It were making negative values 0 in get::readingData(). Fix the issue
+by using a int32_t and add an overflow check.
+
+Change-Id: I705defcf18805db9ada7d0de0738a59aedab61df
+Signed-off-by: Tony Lee <tony.lee@quantatw.com>
+---
+ include/ipmid/types.hpp | 2 ++
+ scripts/sensor-example.yaml | 2 ++
+ scripts/writesensor.mako.cpp | 2 ++
+ sensordatahandler.cpp | 2 --
+ sensordatahandler.hpp | 31 ++++++++++++++++++++++++++++---
+ sensorhandler.cpp | 5 ++---
+ 6 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/include/ipmid/types.hpp b/include/ipmid/types.hpp
+index e62c8192..bd1fac2b 100644
+--- a/include/ipmid/types.hpp
++++ b/include/ipmid/types.hpp
+@@ -133,6 +133,7 @@ using Unit = std::string;
+ using EntityType = uint8_t;
+ using EntityInst = uint8_t;
+ using SensorName = std::string;
++using SensorUnits1 = uint8_t;
+
+ enum class Mutability
+ {
+@@ -167,6 +168,7 @@ struct Info
+ Exponent exponentR;
+ bool hasScale;
+ Scale scale;
++ SensorUnits1 sensorUnits1;
+ Unit unit;
+ std::function<uint8_t(SetSensorReadingReq&, const Info&)> updateFunc;
+ std::function<GetSensorResponse(const Info&)> getFunc;
+diff --git a/scripts/sensor-example.yaml b/scripts/sensor-example.yaml
+index 9760cd01..bddd2e6d 100644
+--- a/scripts/sensor-example.yaml
++++ b/scripts/sensor-example.yaml
+@@ -112,6 +112,8 @@
+ # Applies for analog sensors, the actual reading value for the sensor is
+ # Value * 10^N
+ scale: -3
++ # Indicate Analog Data Format, Rate unit, Modifier unit and Percentage
++ sensorUnits1 : 0x80
+ mutability: Mutability::Write|Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
+index 8b268052..813f9404 100644
+--- a/scripts/writesensor.mako.cpp
++++ b/scripts/writesensor.mako.cpp
+@@ -49,6 +49,7 @@ extern const IdInfoMap sensors = {
+ offsetB = sensor.get("offsetB", 0)
+ bExp = sensor.get("bExp", 0)
+ rExp = sensor.get("rExp", 0)
++ sensorUnits1 = sensor.get("sensorUnits1", 0)
+ unit = sensor.get("unit", "")
+ scale = sensor.get("scale", 0)
+ hasScale = "true" if "scale" in sensor.keys() else "false"
+@@ -91,6 +92,7 @@ extern const IdInfoMap sensors = {
+ .exponentR = ${rExp},
+ .hasScale = ${hasScale},
+ .scale = ${scale},
++ .sensorUnits1 = ${sensorUnits1},
+ .unit = "${unit}",
+ .updateFunc = ${updateFunc},
+ .getFunc = ${getFunc},
+diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
+index 06f5f429..fc74b8f8 100644
+--- a/sensordatahandler.cpp
++++ b/sensordatahandler.cpp
+@@ -7,8 +7,6 @@
+ #include <ipmid/types.hpp>
+ #include <ipmid/utils.hpp>
+ #include <optional>
+-#include <phosphor-logging/elog-errors.hpp>
+-#include <phosphor-logging/log.hpp>
+ #include <sdbusplus/message/types.hpp>
+ #include <xyz/openbmc_project/Common/error.hpp>
+
+diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp
+index 5cad58c5..c48140a3 100644
+--- a/sensordatahandler.hpp
++++ b/sensordatahandler.hpp
+@@ -8,6 +8,8 @@
+ #include <ipmid/api.hpp>
+ #include <ipmid/types.hpp>
+ #include <ipmid/utils.hpp>
++#include <phosphor-logging/elog-errors.hpp>
++#include <phosphor-logging/log.hpp>
+ #include <sdbusplus/message/types.hpp>
+
+ namespace ipmi
+@@ -28,6 +30,7 @@ using ServicePath = std::pair<Path, Service>;
+ using Interfaces = std::vector<Interface>;
+
+ using MapperResponseType = std::map<Path, std::map<Service, Interfaces>>;
++using namespace phosphor::logging;
+
+ /** @brief get the D-Bus service and service path
+ * @param[in] bus - The Dbus bus object
+@@ -225,10 +228,32 @@ GetSensorResponse readingData(const Info& sensorInfo)
+
+ double value = std::get<T>(propValue) *
+ std::pow(10, sensorInfo.scale - sensorInfo.exponentR);
++ int32_t rawData =
++ (value - sensorInfo.scaledOffset) / sensorInfo.coefficientM;
+
+- auto rawData = static_cast<uint8_t>((value - sensorInfo.scaledOffset) /
+- sensorInfo.coefficientM);
+- setReading(rawData, &response);
++ constexpr uint8_t sensorUnitsSignedBits = 2 << 6;
++ constexpr uint8_t signedDataFormat = 0x80;
++ // if sensorUnits1 [7:6] = 10b, sensor is signed
++ if ((sensorInfo.sensorUnits1 & sensorUnitsSignedBits) == signedDataFormat)
++ {
++ if (rawData > std::numeric_limits<int8_t>::max() ||
++ rawData < std::numeric_limits<int8_t>::lowest())
++ {
++ log<level::ERR>("Value out of range");
++ throw std::out_of_range("Value out of range");
++ }
++ setReading(static_cast<int8_t>(rawData), &response);
++ }
++ else
++ {
++ if (rawData > std::numeric_limits<uint8_t>::max() ||
++ rawData < std::numeric_limits<uint8_t>::lowest())
++ {
++ log<level::ERR>("Value out of range");
++ throw std::out_of_range("Value out of range");
++ }
++ setReading(static_cast<uint8_t>(rawData), &response);
++ }
+
+ return response;
+ }
+diff --git a/sensorhandler.cpp b/sensorhandler.cpp
+index 36998715..260331a0 100644
+--- a/sensorhandler.cpp
++++ b/sensorhandler.cpp
+@@ -700,9 +700,8 @@ ipmi_ret_t populate_record_from_dbus(get_sdr::SensorDataFullRecordBody* body,
+ /* Functional sensor case */
+ if (isAnalogSensor(info->propertyInterfaces.begin()->first))
+ {
+-
+- body->sensor_units_1 = 0; // unsigned, no rate, no modifier, not a %
+-
++ body->sensor_units_1 = info->sensorUnits1; // default is 0. unsigned, no
++ // rate, no modifier, not a %
+ /* Unit info */
+ setUnitFieldsForObject(info, body);
+
+--
+2.21.0
+
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Update-Host-State-Transition-function.patch b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Update-Host-State-Transition-function.patch
new file mode 100644
index 000000000..156327b9c
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Update-Host-State-Transition-function.patch
@@ -0,0 +1,137 @@
+From 8079e1e39e1953458bd2e59c7f546a3d879558db Mon Sep 17 00:00:00 2001
+From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
+Date: Thu, 30 Jan 2020 16:02:39 -0800
+Subject: [PATCH 2/3] Update Host State Transition function
+
+This updates the Host State Transition function to use the new
+IPMI DBus APIs for transition requests.
+
+Tested:
+Ran each IPMI chassis control command to confirm the expected
+behavior:
+ipmitool power on: system is powered-on
+ipmitool power off: system is forced off
+ipmitool power cycle: system is forced off then powered-on
+ipmitool power reset: system is hard reset
+ipmitool power soft: soft power-off requested from system software
+
+Change-Id: Id2253a9c0060e892bc318dd02a6221ac1a2ae2d9
+Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
+---
+ chassishandler.cpp | 64 +++++++++++++---------------------------------
+ 1 file changed, 18 insertions(+), 46 deletions(-)
+
+diff --git a/chassishandler.cpp b/chassishandler.cpp
+index fdbb9fa5..af9cba72 100644
+--- a/chassishandler.cpp
++++ b/chassishandler.cpp
+@@ -811,59 +811,31 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout,
+ //------------------------------------------
+ // Calls into Host State Manager Dbus object
+ //------------------------------------------
+-int initiate_state_transition(State::Host::Transition transition)
++int initiateHostStateTransition(State::Host::Transition transition)
+ {
+ // OpenBMC Host State Manager dbus framework
+- constexpr auto HOST_STATE_MANAGER_ROOT = "/xyz/openbmc_project/state/host0";
+- constexpr auto HOST_STATE_MANAGER_IFACE = "xyz.openbmc_project.State.Host";
+- constexpr auto DBUS_PROPERTY_IFACE = "org.freedesktop.DBus.Properties";
+- constexpr auto PROPERTY = "RequestedHostTransition";
++ constexpr auto hostStatePath = "/xyz/openbmc_project/state/host0";
++ constexpr auto hostStateIntf = "xyz.openbmc_project.State.Host";
+
+- // sd_bus error
+- int rc = 0;
+- char* busname = NULL;
+-
+- // SD Bus error report mechanism.
+- sd_bus_error bus_error = SD_BUS_ERROR_NULL;
+-
+- // Gets a hook onto either a SYSTEM or SESSION bus
+- sd_bus* bus_type = ipmid_get_sd_bus_connection();
+- rc = mapper_get_service(bus_type, HOST_STATE_MANAGER_ROOT, &busname);
+- if (rc < 0)
+- {
+- log<level::ERR>(
+- "Failed to get bus name",
+- entry("ERRNO=0x%X, OBJPATH=%s", -rc, HOST_STATE_MANAGER_ROOT));
+- return rc;
+- }
++ auto service = ipmi::getService(*getSdBus(), hostStateIntf, hostStatePath);
+
+ // Convert to string equivalent of the passed in transition enum.
+ auto request = State::convertForMessage(transition);
+
+- rc = sd_bus_call_method(bus_type, // On the system bus
+- busname, // Service to contact
+- HOST_STATE_MANAGER_ROOT, // Object path
+- DBUS_PROPERTY_IFACE, // Interface name
+- "Set", // Method to be called
+- &bus_error, // object to return error
+- nullptr, // Response buffer if any
+- "ssv", // Takes 3 arguments
+- HOST_STATE_MANAGER_IFACE, PROPERTY, "s",
+- request.c_str());
+- if (rc < 0)
++ try
+ {
+- log<level::ERR>("Failed to initiate transition",
+- entry("ERRNO=0x%X, REQUEST=%s", -rc, request.c_str()));
++ ipmi::setDbusProperty(*getSdBus(), service, hostStatePath,
++ hostStateIntf, "RequestedHostTransition",
++ request);
+ }
+- else
++ catch (std::exception& e)
+ {
+- log<level::INFO>("Transition request initiated successfully");
++ log<level::ERR>(
++ "Failed to initiate transition",
++ entry("EXCEPTION=%s, REQUEST=%s", e.what(), request.c_str()));
++ return -1;
+ }
+-
+- sd_bus_error_free(&bus_error);
+- free(busname);
+-
+- return rc;
++ return 0;
+ }
+
+ //------------------------------------------
+@@ -1411,7 +1383,7 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+ switch (chassisControl)
+ {
+ case CMD_POWER_ON:
+- rc = initiate_state_transition(State::Host::Transition::On);
++ rc = initiateHostStateTransition(State::Host::Transition::On);
+ break;
+ case CMD_POWER_OFF:
+ // This path would be hit in 2 conditions.
+@@ -1439,7 +1411,7 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+ indicate_no_softoff_needed();
+
+ // Now request the shutdown
+- rc = initiate_state_transition(State::Host::Transition::Off);
++ rc = initiateHostStateTransition(State::Host::Transition::Off);
+ }
+ else
+ {
+@@ -1460,12 +1432,12 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+ // originating via a soft power off SMS request)
+ indicate_no_softoff_needed();
+
+- rc = initiate_state_transition(State::Host::Transition::Reboot);
++ rc = initiateHostStateTransition(State::Host::Transition::Reboot);
+ break;
+
+ case CMD_SOFT_OFF_VIA_OVER_TEMP:
+ // Request Host State Manager to do a soft power off
+- rc = initiate_state_transition(State::Host::Transition::Off);
++ rc = initiateHostStateTransition(State::Host::Transition::Off);
+ break;
+
+ case CMD_PULSE_DIAGNOSTIC_INTR:
+--
+2.21.0
+
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Update-IPMI-Chassis-Control-command-transition-reque.patch b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Update-IPMI-Chassis-Control-command-transition-reque.patch
new file mode 100644
index 000000000..271af3f5b
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Update-IPMI-Chassis-Control-command-transition-reque.patch
@@ -0,0 +1,180 @@
+From 291629d5c3e5bea31925c9d025688897c90eb783 Mon Sep 17 00:00:00 2001
+From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
+Date: Thu, 30 Jan 2020 16:22:24 -0800
+Subject: [PATCH 3/3] Update IPMI Chassis Control command transition requests
+
+This change updates the IPMI Chassis Control command to use the new
+host state transitions and chassis off transition based on the
+mapping in the design document below. This allows each chassis
+control action to more closely follow the behavior defined in the
+IPMI spec.
+
+ref: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/22358
+
+Tested:
+Ran each IPMI chassis control command to confirm the expected
+behavior:
+ipmitool power on: system is powered-on using Host.On
+ipmitool power off: system is forced off using Chassis.Off
+ipmitool power cycle: system is forced off then powered-on using
+ Host.Reboot
+ipmitool power reset: system is hard reset using Host.ForceWarmReboot
+ipmitool power soft: soft power-off requested from system software
+ using Host.Off
+
+Change-Id: Ieb42722102fde0e51a49dc4aaa3ff227a3394066
+Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
+---
+ chassishandler.cpp | 121 ++-------------------------------------------
+ 1 file changed, 5 insertions(+), 116 deletions(-)
+
+diff --git a/chassishandler.cpp b/chassishandler.cpp
+index af9cba72..663081de 100644
+--- a/chassishandler.cpp
++++ b/chassishandler.cpp
+@@ -1301,76 +1301,6 @@ ipmi::RspType<uint4_t, // Restart Cause
+ return ipmi::responseSuccess(cause.value(), reserved, channel);
+ }
+
+-//-------------------------------------------------------------
+-// Send a command to SoftPowerOff application to stop any timer
+-//-------------------------------------------------------------
+-int stop_soft_off_timer()
+-{
+- constexpr auto iface = "org.freedesktop.DBus.Properties";
+- constexpr auto soft_off_iface = "xyz.openbmc_project.Ipmi.Internal."
+- "SoftPowerOff";
+-
+- constexpr auto property = "ResponseReceived";
+- constexpr auto value = "xyz.openbmc_project.Ipmi.Internal."
+- "SoftPowerOff.HostResponse.HostShutdown";
+-
+- // Get the system bus where most system services are provided.
+- auto bus = ipmid_get_sd_bus_connection();
+-
+- // Get the service name
+- // TODO openbmc/openbmc#1661 - Mapper refactor
+- //
+- // See openbmc/openbmc#1743 for some details but high level summary is that
+- // for now the code will directly call the soft off interface due to a
+- // race condition with mapper usage
+- //
+- // char *busname = nullptr;
+- // auto r = mapper_get_service(bus, SOFTOFF_OBJPATH, &busname);
+- // if (r < 0)
+- //{
+- // fprintf(stderr, "Failed to get %s bus name: %s\n",
+- // SOFTOFF_OBJPATH, -r);
+- // return r;
+- //}
+-
+- // No error object or reply expected.
+- int rc = sd_bus_call_method(bus, SOFTOFF_BUSNAME, SOFTOFF_OBJPATH, iface,
+- "Set", nullptr, nullptr, "ssv", soft_off_iface,
+- property, "s", value);
+- if (rc < 0)
+- {
+- log<level::ERR>("Failed to set property in SoftPowerOff object",
+- entry("ERRNO=0x%X", -rc));
+- }
+-
+- // TODO openbmc/openbmc#1661 - Mapper refactor
+- // free(busname);
+- return rc;
+-}
+-
+-//----------------------------------------------------------------------
+-// Create file to indicate there is no need for softoff notification to host
+-//----------------------------------------------------------------------
+-void indicate_no_softoff_needed()
+-{
+- fs::path path{HOST_INBAND_REQUEST_DIR};
+- if (!fs::is_directory(path))
+- {
+- fs::create_directory(path);
+- }
+-
+- // Add the host instance (default 0 for now) to the file name
+- std::string file{HOST_INBAND_REQUEST_FILE};
+- auto size = std::snprintf(nullptr, 0, file.c_str(), 0);
+- size++; // null
+- std::unique_ptr<char[]> buf(new char[size]);
+- std::snprintf(buf.get(), size, file.c_str(), 0);
+-
+- // Append file name to directory and create it
+- path /= buf.get();
+- std::ofstream(path.c_str());
+-}
+-
+ /** @brief Implementation of chassis control command
+ *
+ * @param - chassisControl command byte
+@@ -1386,60 +1316,19 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+ rc = initiateHostStateTransition(State::Host::Transition::On);
+ break;
+ case CMD_POWER_OFF:
+- // This path would be hit in 2 conditions.
+- // 1: When user asks for power off using ipmi chassis command 0x04
+- // 2: Host asking for power off post shutting down.
+-
+- // If it's a host requested power off, then need to nudge Softoff
+- // application that it needs to stop the watchdog timer if running.
+- // If it is a user requested power off, then this is not really
+- // needed. But then we need to differentiate between user and host
+- // calling this same command
+-
+- // For now, we are going ahead with trying to nudge the soft off and
+- // interpret the failure to do so as a non softoff case
+- rc = stop_soft_off_timer();
+-
+- // Only request the Off transition if the soft power off
+- // application is not running
+- if (rc < 0)
+- {
+- // First create a file to indicate to the soft off application
+- // that it should not run. Not doing this will result in State
+- // manager doing a default soft power off when asked for power
+- // off.
+- indicate_no_softoff_needed();
+-
+- // Now request the shutdown
+- rc = initiateHostStateTransition(State::Host::Transition::Off);
+- }
+- else
+- {
+- log<level::INFO>("Soft off is running, so let shutdown target "
+- "stop the host");
+- }
++ rc =
++ initiateChassisStateTransition(State::Chassis::Transition::Off);
+ break;
+-
+ case CMD_HARD_RESET:
++ rc = initiateHostStateTransition(
++ State::Host::Transition::ForceWarmReboot);
++ break;
+ case CMD_POWER_CYCLE:
+- // SPEC has a section that says certain implementations can trigger
+- // PowerOn if power is Off when a command to power cycle is
+- // requested
+-
+- // First create a file to indicate to the soft off application
+- // that it should not run since this is a direct user initiated
+- // power reboot request (i.e. a reboot request that is not
+- // originating via a soft power off SMS request)
+- indicate_no_softoff_needed();
+-
+ rc = initiateHostStateTransition(State::Host::Transition::Reboot);
+ break;
+-
+ case CMD_SOFT_OFF_VIA_OVER_TEMP:
+- // Request Host State Manager to do a soft power off
+ rc = initiateHostStateTransition(State::Host::Transition::Off);
+ break;
+-
+ case CMD_PULSE_DIAGNOSTIC_INTR:
+ rc = setNmiProperty(true);
+ break;
+--
+2.21.0
+
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch
deleted file mode 100644
index d815cde72..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 9deb72959477700216326c033c930236e58f965f Mon Sep 17 00:00:00 2001
-From: Ren Yu <yux.ren@intel.com>
-Date: Tue, 28 May 2019 17:11:17 +0800
-Subject: [PATCH] Save the pre-timeout interrupt in dbus property
-
-Get the watchdog pre-timeout interrupt value from ipmi watchdog set command,
-and store it into dbus property.
-
-Tested:
-Config IPMI watchdog: BIOS FRB2 Power Cycle after 1 seconds:
-ipmitool raw 0x06 0x24 0x01 0x13 0x0 0x2 0xa 0x00
-Start watchdog:
-Ipmitool mc watchdog reset
-Check the watchdog pre-timeout interrupt in below:
-https://BMCIP/redfish/v1/Systems/system/LogServices/EventLog/Entries
-
-Signed-off-by: Ren Yu <yux.ren@intel.com>
-
----
- app/watchdog.cpp | 47 ++++++++++++++++++++++++++++++++++++++++
- app/watchdog_service.cpp | 6 +++++
- app/watchdog_service.hpp | 9 ++++++++
- 3 files changed, 62 insertions(+)
-
-diff --git a/app/watchdog.cpp b/app/watchdog.cpp
-index 03c373e..cb0b1fd 100644
---- a/app/watchdog.cpp
-+++ b/app/watchdog.cpp
-@@ -80,6 +80,7 @@ ipmi::RspType<> ipmiAppResetWatchdogTimer()
-
- static constexpr uint8_t wd_dont_stop = 0x1 << 6;
- static constexpr uint8_t wd_timeout_action_mask = 0x3;
-+static constexpr uint8_t wdPreTimeoutInterruptMask = 0x3;
-
- static constexpr uint8_t wdTimerUseResTimer1 = 0x0;
- static constexpr uint8_t wdTimerUseResTimer2 = 0x6;
-@@ -127,6 +128,45 @@ WatchdogService::Action ipmiActionToWdAction(IpmiAction ipmi_action)
- }
- }
-
-+enum class IpmiPreTimeoutInterrupt : uint8_t
-+{
-+ None = 0x0,
-+ SMI = 0x1,
-+ NMI = 0x2,
-+ MI = 0x3,
-+};
-+/** @brief Converts an IPMI Watchdog PreTimeoutInterrupt to DBUS defined action
-+ * @param[in] ipmi_action The IPMI Watchdog PreTimeoutInterrupt
-+ * @return The Watchdog PreTimeoutInterrupt that the ipmi_action maps to
-+ */
-+WatchdogService::PreTimeoutInterruptAction ipmiPreTimeoutInterruptToWdAction(
-+ IpmiPreTimeoutInterrupt ipmiPreTimeOutInterrupt)
-+{
-+ switch (ipmiPreTimeOutInterrupt)
-+ {
-+ case IpmiPreTimeoutInterrupt::None:
-+ {
-+ return WatchdogService::PreTimeoutInterruptAction::None;
-+ }
-+ case IpmiPreTimeoutInterrupt::SMI:
-+ {
-+ return WatchdogService::PreTimeoutInterruptAction::SMI;
-+ }
-+ case IpmiPreTimeoutInterrupt::NMI:
-+ {
-+ return WatchdogService::PreTimeoutInterruptAction::NMI;
-+ }
-+ case IpmiPreTimeoutInterrupt::MI:
-+ {
-+ return WatchdogService::PreTimeoutInterruptAction::MI;
-+ }
-+ default:
-+ {
-+ throw std::domain_error("IPMI PreTimeoutInterrupt is invalid");
-+ }
-+ }
-+}
-+
- enum class IpmiTimerUse : uint8_t
- {
- Reserved = 0x0,
-@@ -250,6 +290,13 @@ ipmi::RspType<>
- // Mark as initialized so that future resets behave correctly
- wd_service.setInitialized(true);
-
-+ // pretimeOutAction
-+ const auto ipmiPreTimeoutInterrupt =
-+ static_cast<IpmiPreTimeoutInterrupt>(wdPreTimeoutInterruptMask &
-+ (static_cast<uint8_t>(preTimeoutInterrupt)));
-+ wd_service.setPreTimeoutInterrupt(
-+ ipmiPreTimeoutInterruptToWdAction(ipmiPreTimeoutInterrupt));
-+
- lastCallSuccessful = true;
- return ipmi::responseSuccess();
- }
-diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
-index 3534e89..4df1ab6 100644
---- a/app/watchdog_service.cpp
-+++ b/app/watchdog_service.cpp
-@@ -198,3 +198,9 @@ void WatchdogService::setInterval(uint64_t interval)
- {
- setProperty("Interval", interval);
- }
-+
-+void WatchdogService::setPreTimeoutInterrupt(
-+ PreTimeoutInterruptAction preTimeoutInterrupt)
-+{
-+ setProperty("PreTimeoutInterrupt", convertForMessage(preTimeoutInterrupt));
-+}
-\ No newline at end of file
-diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp
-index 141bdb7..32b7461 100644
---- a/app/watchdog_service.hpp
-+++ b/app/watchdog_service.hpp
-@@ -15,6 +15,8 @@ class WatchdogService
-
- using Action =
- sdbusplus::xyz::openbmc_project::State::server::Watchdog::Action;
-+ using PreTimeoutInterruptAction = sdbusplus::xyz::openbmc_project::State::
-+ server::Watchdog::PreTimeoutInterruptAction;
- using TimerUse =
- sdbusplus::xyz::openbmc_project::State::server::Watchdog::TimerUse;
-
-@@ -92,6 +94,13 @@ class WatchdogService
- */
- void setInterval(uint64_t interval);
-
-+ /** @brief Sets the value of the PreTimeoutInterrupt property on the host
-+ * watchdog
-+ *
-+ * @param[in] PreTimeoutInterrupt - The new PreTimeoutInterrupt value
-+ */
-+ void setPreTimeoutInterrupt(PreTimeoutInterruptAction preTimeoutInterrupt);
-+
- private:
- /** @brief sdbusplus handle */
- sdbusplus::bus::bus bus;
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index bf2986c47..af5fb1356 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -1,18 +1,19 @@
DEPENDS_append_gbs = " gbs-yaml-config"
-SRC_URI_remove_gbs = "git://github.com/openbmc/phosphor-host-ipmid"
-SRC_URI_prepend_gbs = "git://github.com/quanta-bmc/phosphor-host-ipmid.git"
-
-SRCREV_gbs = "257ea262809c52e51f1f592e047d27125f0273b3"
-
FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
SRC_URI_append_gbs = " file://gbs-ipmid-whitelist.conf \
- file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \
+ file://0001-Add-Chassis-State-Transition-interface.patch \
+ file://0002-Update-Host-State-Transition-function.patch \
+ file://0003-Update-IPMI-Chassis-Control-command-transition-reque.patch \
+ file://0001-Fix-issues-and-support-signed-sensor-values.patch \
"
WHITELIST_CONF_gbs = "${WORKDIR}/gbs-ipmid-whitelist.conf"
-EXTRA_OECONF_append_gbs = " --with-journal-sel \
+EXTRA_OECONF_append_gbs = " \
SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/gbs-yaml-config/ipmi-sensors.yaml \
FRU_YAML_GEN=${STAGING_DIR_HOST}${datadir}/gbs-yaml-config/ipmi-fru-read.yaml \
+ INVSENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/gbs-yaml-config/ipmi-inventory-sensors.yaml \
"
+
+RDEPENDS_${PN}_remove_gbs = "clear-once"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
index a7ec24f41..e887b1935 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
@@ -1,5 +1,16 @@
FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
SRC_URI_append_gbs = " file://service-override.conf"
-SYSTEMD_OVERRIDE_${PN}-ledmanager_append_gbs = " \
- service-override.conf:xyz.openbmc_project.LED.GroupManager.service.d/service-override.conf"
+FILES_${PN}_append_gbs = " ${systemd_system_unitdir}/xyz.openbmc_project.LED.GroupManager.service.d/service-override.conf"
+
+do_compile_prepend_gbs() {
+ install -m 0644 ${STAGING_DATADIR_NATIVE}/${PN}/led.yaml ${S}
+}
+
+do_install_append_gbs() {
+ rm -rf ${D}${datadir}/${PN}/*
+
+ install -d ${D}${systemd_system_unitdir}/xyz.openbmc_project.LED.GroupManager.service.d
+ install -D -m 0644 ${WORKDIR}/service-override.conf \
+ ${D}${systemd_system_unitdir}/xyz.openbmc_project.LED.GroupManager.service.d/
+}
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/logging/phosphor-logging_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/logging/phosphor-logging_%.bbappend
new file mode 100644
index 000000000..264423933
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/logging/phosphor-logging_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OEMESON_append_gbs = " -Derror_info_cap=256"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/network/phosphor-network_%.bbappend
index 49959cc0e..9caf61e66 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -1 +1,2 @@
-EXTRA_OECONF_append_gbs = " --enable-nic-ethtool=yes"
+PACKAGECONFIG_append_gbs = " nic-ethtool"
+PACKAGECONFIG_remove_gbs = "uboot-env"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-gbs-apps.bb b/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-gbs-apps.bb
index 4c1bb123c..20c81ad94 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-gbs-apps.bb
+++ b/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-gbs-apps.bb
@@ -32,5 +32,5 @@ SUMMARY_${PN}-flash = "GBS Flash"
RDEPENDS_${PN}-flash = " \
phosphor-ipmi-flash \
gbs-bmc-update \
- gbs-bios-update \
+ virtual/bios-update \
"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-obmc-apps%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-obmc-apps%.bbappend
index 935c3cebb..73e9b0aa4 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-obmc-apps%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/packagegroups/packagegroup-obmc-apps%.bbappend
@@ -1,2 +1,2 @@
-RDEPENDS_${PN}-extras_remove_gbs = "obmc-ikvm"
-RDEPENDS_${PN}-inventory_append_gbs = " virtual/obmc-gpio-presence"
+RDEPENDS_${PN}-fru-ipmi_remove_gbs = "fru-device"
+RDEPENDS_${PN}-ikvm_remove_gbs = "obmc-ikvm"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
index e0f8e08aa..5c28b0435 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -1,5 +1,4 @@
-SRC_URI_gbs := "git://github.com/quanta-bmc/phosphor-sel-logger.git"
-SRCREV_gbs := "6ded68355db28958836aedb40c0d4780d84d2b43"
-
# Enable threshold monitoring
-EXTRA_OECMAKE_append_gbs = "-DSEL_LOGGER_MONITOR_THRESHOLD_EVENTS=ON"
+EXTRA_OECMAKE_append_gbs = "-DSEL_LOGGER_SEND_TO_LOGGING_SERVICE=ON \
+ -DSEL_LOGGER_MONITOR_THRESHOLD_ALARM_EVENTS=ON \
+ "
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0001-lev-add-poweron-monitor-feature.patch b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-Add-power-on-monitor-mechanism.patch
index c279e0b81..a3718ea2a 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0001-lev-add-poweron-monitor-feature.patch
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-Add-power-on-monitor-mechanism.patch
@@ -1,44 +1,33 @@
-From 2cea5d289b278db4468b16bf6b64102655811fd0 Mon Sep 17 00:00:00 2001
-From: Eddielu <Eddie.Lu@quantatw.com>
-Date: Mon, 27 Jul 2020 20:30:22 +0800
-Subject: [PATCH] Update lev-add-poweron-monitor-feature patch.
+From 5cea18ba476c0cb6ea622be50a09ead00cd47b14 Mon Sep 17 00:00:00 2001
+From: Ivan Li <rli11@lenovo.com>
+Date: Wed, 25 Dec 2019 17:05:00 +0800
+Subject: [PATCH] Add power on monitor mechanism
+Summary:
+1. Add "PWRONMON" attribute in sensor configuration file to determine whether it's power-on monitor sensor or not. (i.e. PWRONMON_temp1 = "ON")
+2. Watching "CurrentHostState" property and then use it to turn on/off threshold alert for power-on monitor sensors.
+
+Test Plan:
+Check if there is any abnormal threshold events occurred in power off state or during power transition
+
+Signed-off-by: Ivan Li <rli11@lenovo.com>
+Change-Id: I76d3a664153141d94636e0011f3a48e4f6dee922
---
- Makefile.am | 2 ++
- mainloop.cpp | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- sensor.cpp | 11 ++++++-
- sensor.hpp | 13 ++++++++
- thresholds.hpp | 2 --
- 5 files changed, 127 insertions(+), 3 deletions(-)
+ mainloop.cpp | 102 +++++++++++++++++++++++++++++++++++++++++++++++++
+ sensor.cpp | 11 +++++-
+ sensor.hpp | 13 +++++++
+ thresholds.hpp | 24 ------------
+ 4 files changed, 125 insertions(+), 25 deletions(-)
-diff --git a/Makefile.am b/Makefile.am
-index 706a6cc..c620fa4 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -46,6 +46,7 @@ libhwmon_la_LIBADD = \
- $(SDEVENTPLUS_LIBS) \
- $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS) \
-+ $(PTHREAD_LIBS) \
- $(GPIOPLUS_LIBS) \
- $(STDPLUS_LIBS) \
- $(CODE_COVERAGE_LIBS) \
-@@ -55,6 +56,7 @@ libhwmon_la_CXXFLAGS = \
- $(SDEVENTPLUS_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
-+ $(PTHREAD_CFLAGS) \
- $(STDPLUS_CFLAGS) \
- $(CODE_COVERAGE_CXXFLAGS)
-
diff --git a/mainloop.cpp b/mainloop.cpp
-index 3e7e0bf..4789a80 100644
+index 29dc26a..5e27a30 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
-@@ -41,6 +41,12 @@
+@@ -42,6 +42,13 @@
#include <string>
#include <unordered_set>
#include <xyz/openbmc_project/Sensor/Device/error.hpp>
++#include <boost/asio/io_service.hpp>
+#include <boost/container/flat_map.hpp>
+#include <boost/algorithm/string/predicate.hpp>
+#include <sdbusplus/asio/connection.hpp>
@@ -48,9 +37,9 @@ index 3e7e0bf..4789a80 100644
using namespace phosphor::logging;
-@@ -76,6 +82,12 @@ decltype(
- Thresholds<CriticalObject>::alarmHi) Thresholds<CriticalObject>::alarmHi =
- &CriticalObject::criticalAlarmHigh;
+@@ -110,6 +117,12 @@ decltype(Thresholds<CriticalObject>::deassertHighSignal)
+ Thresholds<CriticalObject>::deassertHighSignal =
+ &CriticalObject::criticalHighAlarmDeasserted;
+static std::unique_ptr<phosphor::Timer> cacheTimer = nullptr;
+static std::unique_ptr<sdbusplus::bus::match::match> powerMatch = nullptr;
@@ -61,7 +50,7 @@ index 3e7e0bf..4789a80 100644
void updateSensorInterfaces(InterfaceMap& ifaces, SensorValueType value)
{
for (auto& iface : ifaces)
-@@ -103,6 +115,84 @@ void updateSensorInterfaces(InterfaceMap& ifaces, SensorValueType value)
+@@ -137,6 +150,83 @@ void updateSensorInterfaces(InterfaceMap& ifaces, SensorValueType value)
}
}
@@ -104,23 +93,23 @@ index 3e7e0bf..4789a80 100644
+ std::string objectName;
+ boost::container::flat_map<std::string, std::variant<std::string>>
+ values;
-+ message.read(objectName, values);
-+ auto findState = values.find("CurrentHostState");
-+ if (findState != values.end())
-+ {
-+ bool on = boost::ends_with(
++ message.read(objectName, values);
++ auto findState = values.find("CurrentHostState");
++ if (findState != values.end())
++ {
++ bool on = boost::ends_with(
+ std::get<std::string>(findState->second), "Running");
-+ if (!on)
++ if (!on)
+ {
-+ cacheTimer->stop();
++ cacheTimer->stop();
+ powerStatusOn = false;
+ return;
+ }
-+ cacheTimer->start(std::chrono::duration_cast<std::chrono::microseconds>(
++ cacheTimer->start(std::chrono::duration_cast<std::chrono::microseconds>(
+ std::chrono::seconds(10)));
-+ }
-+ else {
-+ powerStatusOn = false;
++ }
++ else {
++ powerStatusOn = false;
+ }
+ });
+
@@ -135,18 +124,17 @@ index 3e7e0bf..4789a80 100644
+ boost::ends_with(std::get<std::string>(state), "Running");
+ },
+ "xyz.openbmc_project.State.Host",
-+ "/xyz/openbmc_project/state/host0",
-+ "org.freedesktop.DBus.Properties", "Get",
++ "/xyz/openbmc_project/state/host0",
++ "org.freedesktop.DBus.Properties", "Get",
+ "xyz.openbmc_project.State.Host", "CurrentHostState");
+
+ createTimer();
+}
+
-+
std::string MainLoop::getID(SensorSet::container_t::const_reference sensor)
{
std::string id;
-@@ -384,6 +474,7 @@ void MainLoop::init()
+@@ -418,6 +508,7 @@ void MainLoop::init()
_interval = std::strtoull(interval.c_str(), NULL, 10);
}
}
@@ -154,7 +142,7 @@ index 3e7e0bf..4789a80 100644
}
void MainLoop::read()
-@@ -428,6 +519,12 @@ void MainLoop::read()
+@@ -462,6 +553,12 @@ void MainLoop::read()
try
{
@@ -167,23 +155,23 @@ index 3e7e0bf..4789a80 100644
if (sensor->hasFaultFile())
{
auto fault = _ioAccess->read(sensorSysfsType, sensorSysfsNum,
-@@ -490,6 +587,11 @@ void MainLoop::read()
+@@ -588,6 +685,11 @@ void MainLoop::read()
}
}
+ if(sensor->pwrOnMonitor() && !isPowerOn())
+ {
-+ statusIface->functional(false);
-+ continue;
++ statusIface->functional(false);
++ continue;
+ }
updateSensorInterfaces(obj, value);
}
catch (const std::system_error& e)
diff --git a/sensor.cpp b/sensor.cpp
-index 09aeca6..b1cb470 100644
+index ac2f896..72b45f8 100644
--- a/sensor.cpp
+++ b/sensor.cpp
-@@ -31,7 +31,7 @@ Sensor::Sensor(const SensorSet::key_type& sensor,
+@@ -32,7 +32,7 @@ Sensor::Sensor(const SensorSet::key_type& sensor,
const hwmonio::HwmonIOInterface* ioAccess,
const std::string& devPath) :
_sensor(sensor),
@@ -192,7 +180,7 @@ index 09aeca6..b1cb470 100644
{
auto chip = env::getEnv("GPIOCHIP", sensor);
auto access = env::getEnv("GPIO", sensor);
-@@ -60,6 +60,15 @@ Sensor::Sensor(const SensorSet::key_type& sensor,
+@@ -61,6 +61,15 @@ Sensor::Sensor(const SensorSet::key_type& sensor,
auto senRmRCs = env::getEnv("REMOVERCS", sensor);
// Add sensor removal return codes defined per sensor
addRemoveRCs(senRmRCs);
@@ -209,10 +197,10 @@ index 09aeca6..b1cb470 100644
void Sensor::addRemoveRCs(const std::string& rcList)
diff --git a/sensor.hpp b/sensor.hpp
-index 4b2d281..369a252 100644
+index 64d6e48..41c0fe7 100644
--- a/sensor.hpp
+++ b/sensor.hpp
-@@ -135,6 +135,16 @@ class Sensor
+@@ -151,6 +151,16 @@ class Sensor
return _hasFaultFile;
}
@@ -229,7 +217,7 @@ index 4b2d281..369a252 100644
private:
/** @brief Sensor object's identifiers */
SensorSet::key_type _sensor;
-@@ -156,6 +166,9 @@ class Sensor
+@@ -172,6 +182,9 @@ class Sensor
/** @brief Tracks whether the sensor has a fault file or not. */
bool _hasFaultFile;
@@ -240,18 +228,42 @@ index 4b2d281..369a252 100644
/**
diff --git a/thresholds.hpp b/thresholds.hpp
-index 4d2fcff..972a469 100644
+index 8d557fc..0ffe0ce 100644
--- a/thresholds.hpp
+++ b/thresholds.hpp
-@@ -101,8 +101,6 @@ auto addThreshold(const std::string& sensorType, const std::string& sensorID,
+@@ -137,32 +137,8 @@ auto addThreshold(const std::string& sensorType, const std::string& sensorID,
auto hi = stod(tHi) * std::pow(10, scale);
(*iface.*Thresholds<T>::setLo)(lo);
(*iface.*Thresholds<T>::setHi)(hi);
-- (*iface.*Thresholds<T>::alarmLo)(value <= lo);
-- (*iface.*Thresholds<T>::alarmHi)(value >= hi);
+- auto alarmLowState = (*iface.*Thresholds<T>::getAlarmLow)();
+- auto alarmHighState = (*iface.*Thresholds<T>::getAlarmHigh)();
+ (*iface.*Thresholds<T>::alarmLo)(value <= lo);
+ (*iface.*Thresholds<T>::alarmHi)(value >= hi);
+- if (alarmLowState != (value <= lo))
+- {
+- if (value <= lo)
+- {
+- (*iface.*Thresholds<T>::assertLowSignal)(value);
+- }
+- else
+- {
+- (*iface.*Thresholds<T>::deassertLowSignal)(value);
+- }
+- }
+- if (alarmHighState != (value >= hi))
+- {
+- if (value >= hi)
+- {
+- (*iface.*Thresholds<T>::assertHighSignal)(value);
+- }
+- else
+- {
+- (*iface.*Thresholds<T>::deassertHighSignal)(value);
+- }
+- }
auto type = Thresholds<T>::type;
obj[type] = iface;
}
--
-2.7.4
+2.21.0
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-lev-add-sensors-slow-readings.patch b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-lev-add-sensors-slow-readings.patch
deleted file mode 100644
index 0ab2f2048..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/0002-lev-add-sensors-slow-readings.patch
+++ /dev/null
@@ -1,295 +0,0 @@
-From 8eafa1b0513dd2f5898182487b4524a485bf1e21 Mon Sep 17 00:00:00 2001
-From: Eddielu <Eddie.Lu@quantatw.com>
-Date: Mon, 27 Jul 2020 20:54:28 +0800
-Subject: [PATCH] Update add sensors slow readings patch.
-
----
- mainloop.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
- mainloop.hpp | 3 +++
- meson.build | 1 +
- sensor.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
- sensor.hpp | 20 ++++++++++++++--
- 5 files changed, 158 insertions(+), 14 deletions(-)
-
-diff --git a/mainloop.cpp b/mainloop.cpp
-index 4789a80..98d0658 100644
---- a/mainloop.cpp
-+++ b/mainloop.cpp
-@@ -34,6 +34,7 @@
- #include <cassert>
- #include <cstdlib>
- #include <functional>
-+#include <future>
- #include <iostream>
- #include <memory>
- #include <phosphor-logging/elog-errors.hpp>
-@@ -299,7 +300,7 @@ std::optional<ObjectStateData>
- {
- // Add status interface based on _fault file being present
- sensorObj->addStatus(info);
-- valueInterface = sensorObj->addValue(retryIO, info);
-+ valueInterface = sensorObj->addValue(retryIO, info, _timedoutMap);
- }
- catch (const std::system_error& e)
- {
-@@ -542,10 +543,74 @@ void MainLoop::read()
- // RAII object for GPIO unlock / lock
- auto locker = sensor::gpioUnlock(sensor->getGpio());
-
-- // Retry for up to a second if device is busy
-- // or has a transient error.
-- value = _ioAccess->read(sensorSysfsType, sensorSysfsNum, input,
-+ // For sensors with attribute ASYNC_READ_TIMEOUT,
-+ // spawn a thread with timeout
-+ auto asyncRead =
-+ env::getEnv("ASYNC_READ_TIMEOUT", sensorSetKey);
-+ if (!asyncRead.empty())
-+ {
-+ // Default async read timeout
-+ std::chrono::milliseconds asyncReadTimeout{
-+ std::stoi(asyncRead)};
-+ bool valueIsValid = false;
-+ std::future<int64_t> asyncThread;
-+
-+ auto asyncIter = _timedoutMap.find(sensorSetKey);
-+ if (asyncIter == _timedoutMap.end())
-+ {
-+ // If sensor not found in timedoutMap, spawn an async
-+ // thread
-+ asyncThread = std::async(
-+ std::launch::async,
-+ &hwmonio::HwmonIOInterface::read, _ioAccess,
-+ sensorSysfsType, sensorSysfsNum, input,
-+ hwmonio::retries, hwmonio::delay);
-+ valueIsValid = true;
-+ }
-+ else
-+ {
-+ // If we already have the async thread in the
-+ // timedoutMap, it means this sensor has already timed
-+ // out in the previous reads. No need to wait on
-+ // subsequent reads
-+ asyncReadTimeout = std::chrono::seconds(0);
-+ asyncThread = std::move(asyncIter->second);
-+ }
-+
-+ std::future_status status =
-+ asyncThread.wait_for(asyncReadTimeout);
-+ switch (status)
-+ {
-+ // Read has finished
-+ case std::future_status::ready:
-+ // Read has finished
-+ if (valueIsValid)
-+ {
-+ value = asyncThread.get();
-+ break;
-+ // Good sensor reads should skip the code below
-+ }
-+ // Async read thread has completed, erase from
-+ // timedoutMap to allow retry then throw
-+ _timedoutMap.erase(sensorSetKey);
-+ throw sensor::AsyncSensorReadTimeOut();
-+ default:
-+ // Read timed out so add the thread to the
-+ // timedoutMap (if the entry already exists,
-+ // operator[] updates it)
-+ _timedoutMap[sensorSetKey] = std::move(asyncThread);
-+ throw sensor::AsyncSensorReadTimeOut();
-+ }
-+ }
-+ else
-+ {
-+ // Retry for up to a second if device is busy
-+ // or has a transient error.
-+ value =
-+ _ioAccess->read(sensorSysfsType, sensorSysfsNum, input,
- hwmonio::retries, hwmonio::delay);
-+ }
-+
- // Set functional property to true if we could read sensor
- statusIface->functional(true);
-
-diff --git a/mainloop.hpp b/mainloop.hpp
-index b3de022..6803c4b 100644
---- a/mainloop.hpp
-+++ b/mainloop.hpp
-@@ -9,6 +9,7 @@
- #include "types.hpp"
-
- #include <any>
-+#include <future>
- #include <memory>
- #include <optional>
- #include <sdbusplus/server.hpp>
-@@ -116,6 +117,8 @@ class MainLoop
- /** @brief Store the specifications of sensor objects */
- std::map<SensorSet::key_type, std::unique_ptr<sensor::Sensor>>
- _sensorObjects;
-+ /** @brief Store the async futures of timed out sensor objects */
-+ std::map<SensorSet::key_type, std::future<int64_t>> _timedoutMap;
-
- /**
- * @brief Map of removed sensors
-diff --git a/meson.build b/meson.build
-index 66e6801..d6a92f8 100644
---- a/meson.build
-+++ b/meson.build
-@@ -84,6 +84,7 @@ libhwmon_all = static_library(
- gpioplus,
- phosphor_dbus_interfaces,
- phosphor_logging,
-+ threads,
- ],
- link_with: [
- libaverage,
-diff --git a/sensor.cpp b/sensor.cpp
-index b1cb470..72b45f8 100644
---- a/sensor.cpp
-+++ b/sensor.cpp
-@@ -15,6 +15,7 @@
- #include <cmath>
- #include <cstring>
- #include <filesystem>
-+#include <future>
- #include <phosphor-logging/elog-errors.hpp>
- #include <thread>
- #include <xyz/openbmc_project/Common/error.hpp>
-@@ -125,8 +126,9 @@ SensorValueType Sensor::adjustValue(SensorValueType value)
- return value;
- }
-
--std::shared_ptr<ValueObject> Sensor::addValue(const RetryIO& retryIO,
-- ObjectInfo& info)
-+std::shared_ptr<ValueObject> Sensor::addValue(
-+ const RetryIO& retryIO, ObjectInfo& info,
-+ std::map<SensorSet::key_type, std::future<int64_t>>& timedoutMap)
- {
- static constexpr bool deferSignals = true;
-
-@@ -153,12 +155,69 @@ std::shared_ptr<ValueObject> Sensor::addValue(const RetryIO& retryIO,
- // RAII object for GPIO unlock / lock
- auto locker = gpioUnlock(getGpio());
-
-- // Retry for up to a second if device is busy
-- // or has a transient error.
-- val =
-- _ioAccess->read(_sensor.first, _sensor.second,
-- hwmon::entry::cinput, std::get<size_t>(retryIO),
-- std::get<std::chrono::milliseconds>(retryIO));
-+ // For sensors with attribute ASYNC_READ_TIMEOUT,
-+ // spawn a thread with timeout
-+ auto asyncRead = env::getEnv("ASYNC_READ_TIMEOUT", _sensor);
-+ if (!asyncRead.empty())
-+ {
-+ // Default async read timeout
-+ std::chrono::milliseconds asyncReadTimeout{
-+ std::stoi(asyncRead)};
-+ bool valueIsValid = false;
-+ std::future<int64_t> asyncThread;
-+
-+ auto asyncIter = timedoutMap.find(_sensor);
-+ if (asyncIter == timedoutMap.end())
-+ {
-+ // If sensor not found in timedoutMap, spawn an async thread
-+ asyncThread = std::async(
-+ std::launch::async, &hwmonio::HwmonIOInterface::read,
-+ _ioAccess, _sensor.first, _sensor.second,
-+ hwmon::entry::cinput, std::get<size_t>(retryIO),
-+ std::get<std::chrono::milliseconds>(retryIO));
-+ valueIsValid = true;
-+ }
-+ else
-+ {
-+ // If we already have the async thread in the timedoutMap,
-+ // it means this sensor has already timed out in the
-+ // previous reads. No need to wait on subsequent reads
-+ asyncReadTimeout = std::chrono::seconds(0);
-+ asyncThread = std::move(asyncIter->second);
-+ }
-+
-+ std::future_status status =
-+ asyncThread.wait_for(asyncReadTimeout);
-+ switch (status)
-+ {
-+ case std::future_status::ready:
-+ // Read has finished
-+ if (valueIsValid)
-+ {
-+ val = asyncThread.get();
-+ break;
-+ // Good sensor reads should skip the code below
-+ }
-+ // Async read thread has completed, erase from
-+ // timedoutMap to allow retry then throw
-+ timedoutMap.erase(_sensor);
-+ throw AsyncSensorReadTimeOut();
-+ default:
-+ // Read timed out so add the thread to the timedoutMap
-+ // (if the entry already exists, operator[] updates it)
-+ timedoutMap[_sensor] = std::move(asyncThread);
-+ throw AsyncSensorReadTimeOut();
-+ }
-+ }
-+ else
-+ {
-+ // Retry for up to a second if device is busy
-+ // or has a transient error.
-+ val = _ioAccess->read(
-+ _sensor.first, _sensor.second, hwmon::entry::cinput,
-+ std::get<size_t>(retryIO),
-+ std::get<std::chrono::milliseconds>(retryIO));
-+ }
- }
- #ifdef UPDATE_FUNCTIONAL_ON_FAIL
- catch (const std::system_error& e)
-diff --git a/sensor.hpp b/sensor.hpp
-index 369a252..41c0fe7 100644
---- a/sensor.hpp
-+++ b/sensor.hpp
-@@ -4,6 +4,8 @@
- #include "sensorset.hpp"
- #include "types.hpp"
-
-+#include <cerrno>
-+#include <future>
- #include <gpioplus/handle.hpp>
- #include <memory>
- #include <optional>
-@@ -20,6 +22,17 @@ struct valueAdjust
- std::unordered_set<int> rmRCs;
- };
-
-+/** @brief Custom exception for async sensor reading timeout
-+ */
-+struct AsyncSensorReadTimeOut : public std::system_error
-+{
-+ AsyncSensorReadTimeOut() :
-+ system_error(std::error_code(ETIMEDOUT, std::system_category()),
-+ "Async sensor read timed out")
-+ {
-+ }
-+};
-+
- /** @class Sensor
- * @brief Sensor object based on a SensorSet container's key type
- * @details Sensor object to create and modify an associated device's sensor
-@@ -87,10 +100,13 @@ class Sensor
- * (number of and delay between)
- * @param[in] info - Sensor object information
- *
-+ * @param[in] timedoutMap - Map to track timed out threads
-+ *
- * @return - Shared pointer to the value object
- */
-- std::shared_ptr<ValueObject> addValue(const RetryIO& retryIO,
-- ObjectInfo& info);
-+ std::shared_ptr<ValueObject> addValue(
-+ const RetryIO& retryIO, ObjectInfo& info,
-+ std::map<SensorSet::key_type, std::future<int64_t>>& timedoutMap);
-
- /**
- * @brief Add status interface and functional property for sensor
---
-2.7.4
-
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-fan-controller@103000.conf b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-fan-controller@103000.conf
index 34caf4a43..f21ee70e9 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-fan-controller@103000.conf
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-fan-controller@103000.conf
@@ -2,7 +2,7 @@ LABEL_fan1= "fan0"
WARNHI_fan1= "19800"
WARNLO_fan1= "3330"
CRITHI_fan1= "19800"
-CRITLO_fan1= "1800"
+CRITLO_fan1= "1500"
MINVALUE_fan1 = "0"
MAXVALUE_fan1 = "20775"
PWM_TARGET_fan1 = 1
@@ -11,7 +11,7 @@ LABEL_fan2= "fan1"
WARNHI_fan2= "19800"
WARNLO_fan2= "3330"
CRITHI_fan2= "19800"
-CRITLO_fan2= "1800"
+CRITLO_fan2= "1500"
MINVALUE_fan2 = "0"
MAXVALUE_fan2 = "20775"
PWM_TARGET_fan2 = 2
@@ -20,7 +20,7 @@ LABEL_fan3= "fb_fan0"
WARNHI_fan3= "19800"
WARNLO_fan3= "3330"
CRITHI_fan3= "19800"
-CRITLO_fan3= "1800"
+CRITLO_fan3= "1500"
MINVALUE_fan3 = "0"
MAXVALUE_fan3 = "20775"
PWM_TARGET_fan3 = 3
@@ -29,7 +29,7 @@ LABEL_fan4= "fb_fan1"
WARNHI_fan4= "19800"
WARNLO_fan4= "3330"
CRITHI_fan4= "19800"
-CRITLO_fan4= "1800"
+CRITLO_fan4= "1500"
MINVALUE_fan4 = "0"
MAXVALUE_fan4 = "20775"
PWM_TARGET_fan4 = 4
@@ -38,7 +38,7 @@ LABEL_fan5= "fb_fan2"
WARNHI_fan5= "19800"
WARNLO_fan5= "3330"
CRITHI_fan5= "19800"
-CRITLO_fan5= "1800"
+CRITLO_fan5= "1500"
MINVALUE_fan5 = "0"
MAXVALUE_fan5 = "20775"
PWM_TARGET_fan5 = 5
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
index 5f0517a30..22b31cfb9 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
@@ -1,7 +1,6 @@
FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
-SRC_URI_append_gbs = " file://0001-lev-add-poweron-monitor-feature.patch \
- file://0002-lev-add-sensors-slow-readings.patch \
+SRC_URI_append_gbs = " file://0002-Add-power-on-monitor-mechanism.patch \
"
GBS_NAMES = " \
@@ -32,4 +31,4 @@ FENVS = "obmc/hwmon/ahb/apb/{0}"
SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs = " ${@compose_list(d, 'FENVS', 'FITEMS')}"
-EXTRA_OEMESON_append_gbs = " -Dupdate-functional-on-fail=true"
+EXTRA_OEMESON_append_gbs = " -Dupdate-functional-on-fail=true -Dnegative-errno-on-fail=false"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/config-virtual-sensor.json b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/config-virtual-sensor.json
index 6e729108a..7be584152 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/config-virtual-sensor.json
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/config-virtual-sensor.json
@@ -2,7 +2,9 @@
{
"Desc": {
"Name": "i2cool_0",
- "SensorType": "temperature"
+ "SensorType": "temperature",
+ "MaxValue": 127.0,
+ "MinValue": -128.0
},
"Threshold": {
"CriticalHigh": 35,
@@ -40,7 +42,9 @@
{
"Desc": {
"Name": "i2cool_1",
- "SensorType": "temperature"
+ "SensorType": "temperature",
+ "MaxValue": 127.0,
+ "MinValue": -128.0
},
"Threshold": {
"CriticalHigh": 70,
@@ -78,7 +82,9 @@
{
"Desc": {
"Name": "i2cool_2",
- "SensorType": "temperature"
+ "SensorType": "temperature",
+ "MaxValue": 127.0,
+ "MinValue": -128.0
},
"Threshold": {
"CriticalHigh": 70,
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace
index eae38b23d..bffb6d154 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor/phosphor-virtual-sensor.service.replace
@@ -2,13 +2,12 @@
Description=Virtual sensors
Wants=obmc-mapper.target
After=obmc-mapper.target
+After=mapper-wait@-xyz-openbmc_project-sensors-temperature-inlet.service
+After=mapper-wait@-xyz-openbmc_project-sensors-temperature-outlet_0.service
+After=mapper-wait@-xyz-openbmc_project-sensors-temperature-outlet_1.service
[Service]
-ExecStartPre=mapper wait /xyz/openbmc_project/sensors/temperature/inlet
-ExecStartPre=mapper wait /xyz/openbmc_project/sensors/temperature/outlet_0
-ExecStartPre=mapper wait /xyz/openbmc_project/sensors/temperature/outlet_1
ExecStart=/usr/bin/virtual-sensor
-ExecStartPost=/usr/bin/setMaxMinValue.sh
Type=dbus
BusName=xyz.openbmc_project.VirtualSensor
SyslogIdentifier=phosphor-virtual-sensor
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend
index 77546694e..d151f2025 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend
@@ -2,15 +2,11 @@ FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
SRC_URI_append_gbs = " file://config-virtual-sensor.json \
file://phosphor-virtual-sensor.service.replace \
- file://setMaxMinValue.sh \
"
RDEPENDS_${PN}_append_gbs = "bash"
do_install_append_gbs() {
- install -d ${D}${bindir}
- install -m 0755 ${WORKDIR}/setMaxMinValue.sh ${D}${bindir}/
-
install -d ${D}${datadir}/${PN}
install -m 0644 -D ${WORKDIR}/config-virtual-sensor.json \
${D}${datadir}/${PN}/virtual_sensor_config.json
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
deleted file mode 100644
index 22670d3fc..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-From ac0c216ac2c273c620579fd1308c8c225e0cca36 Mon Sep 17 00:00:00 2001
-From: James Feist <james.feist@linux.intel.com>
-Date: Mon, 17 Jun 2019 12:00:58 -0700
-Subject: [PATCH] Customize phosphor-watchdog for Intel platforms
-
-This patch adds various changes to phosphor-watchdog that are
-required for compatibility with Intel platforms.
-
- 1. Add Redfish messages for watchdog timeout and pre-interrupt
- 2. Use dbus properties for power control insted of service files
- 3. Use host status to enable/disable watchdog
- 4. Set preTimeoutInterruptOccurFlag
-
-Signed-off-by: James Feist <james.feist@linux.intel.com>
-Signed-off-by: Ren Yu <yux.ren@intel.com>
-Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
-Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
----
- watchdog.cpp | 193 ++++++++++++++++++++++++++++++++++++++++++++++++---
- watchdog.hpp | 23 +++++-
- 2 files changed, 206 insertions(+), 10 deletions(-)
-
-diff --git a/watchdog.cpp b/watchdog.cpp
-index 57e9050..3b5356f 100644
---- a/watchdog.cpp
-+++ b/watchdog.cpp
-@@ -1,11 +1,14 @@
- #include "watchdog.hpp"
-
-+#include <systemd/sd-journal.h>
-+
- #include <algorithm>
- #include <chrono>
- #include <phosphor-logging/elog.hpp>
- #include <phosphor-logging/log.hpp>
- #include <sdbusplus/exception.hpp>
- #include <xyz/openbmc_project/Common/error.hpp>
-+#include <xyz/openbmc_project/State/Host/server.hpp>
-
- namespace phosphor
- {
-@@ -18,10 +21,69 @@ using namespace phosphor::logging;
- using sdbusplus::exception::SdBusError;
- using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
-
--// systemd service to kick start a target.
--constexpr auto SYSTEMD_SERVICE = "org.freedesktop.systemd1";
--constexpr auto SYSTEMD_ROOT = "/org/freedesktop/systemd1";
--constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager";
-+const static constexpr char* currentHostState = "CurrentHostState";
-+const static constexpr char* hostStatusOff =
-+ "xyz.openbmc_project.State.Host.HostState.Off";
-+
-+const static constexpr char* actionDescription = " due to Watchdog timeout";
-+const static constexpr char* hardResetDescription = "Hard Reset - System reset";
-+const static constexpr char* powerOffDescription =
-+ "Power Down - System power down";
-+const static constexpr char* powerCycleDescription =
-+ "Power Cycle - System power cycle";
-+const static constexpr char* timerExpiredDescription = "Timer expired";
-+
-+const static constexpr char* preInterruptActionNone =
-+ "xyz.openbmc_project.State.Watchdog.PreTimeoutInterruptAction.None";
-+
-+const static constexpr char* preInterruptDescriptionSMI = "SMI";
-+const static constexpr char* preInterruptDescriptionNMI = "NMI";
-+const static constexpr char* preInterruptDescriptionMI = "Messaging Interrupt";
-+
-+const static constexpr char* reservedDescription = "Reserved";
-+
-+const static constexpr char* timerUseDescriptionBIOSFRB2 = "BIOS FRB2";
-+const static constexpr char* timerUseDescriptionBIOSPOST = "BIOS/POST";
-+const static constexpr char* timerUseDescriptionOSLoad = "OSLoad";
-+const static constexpr char* timerUseDescriptionSMSOS = "SMS/OS";
-+const static constexpr char* timerUseDescriptionOEM = "OEM";
-+
-+namespace restart
-+{
-+static constexpr const char* busName =
-+ "xyz.openbmc_project.Control.Host.RestartCause";
-+static constexpr const char* path =
-+ "/xyz/openbmc_project/control/host0/restart_cause";
-+static constexpr const char* interface =
-+ "xyz.openbmc_project.Control.Host.RestartCause";
-+static constexpr const char* property = "RequestedRestartCause";
-+} // namespace restart
-+
-+// chassis state manager service
-+namespace chassis
-+{
-+static constexpr const char* busName = "xyz.openbmc_project.State.Chassis";
-+static constexpr const char* path = "/xyz/openbmc_project/state/chassis0";
-+static constexpr const char* interface = "xyz.openbmc_project.State.Chassis";
-+static constexpr const char* request = "RequestedPowerTransition";
-+} // namespace chassis
-+
-+void Watchdog::powerStateChangedHandler(
-+ const std::map<std::string, std::variant<std::string>>& props)
-+{
-+ const auto iter = props.find(currentHostState);
-+ if (iter != props.end())
-+ {
-+ const std::string* powerState = std::get_if<std::string>(&iter->second);
-+ if (powerState && (*powerState == hostStatusOff))
-+ {
-+ if (timerEnabled())
-+ {
-+ enabled(false);
-+ }
-+ }
-+ }
-+}
-
- void Watchdog::resetTimeRemaining(bool enableWatchdog)
- {
-@@ -107,13 +169,102 @@ uint64_t Watchdog::interval(uint64_t value)
- // Optional callback function on timer expiration
- void Watchdog::timeOutHandler()
- {
-+ PreTimeoutInterruptAction preTimeoutInterruptAction = preTimeoutInterrupt();
-+ std::string preInterruptActionMessageArgs{};
-+
- Action action = expireAction();
-+ std::string actionMessageArgs{};
-+
-+ expiredTimerUse(currentTimerUse());
-+
-+ TimerUse timeUser = expiredTimerUse();
-+ std::string timeUserMessage{};
-+
- if (!this->enabled())
- {
- action = fallback->action;
- }
-
-- expiredTimerUse(currentTimerUse());
-+ switch (timeUser)
-+ {
-+ case Watchdog::TimerUse::BIOSFRB2:
-+ timeUserMessage = timerUseDescriptionBIOSFRB2;
-+ break;
-+ case Watchdog::TimerUse::BIOSPOST:
-+ timeUserMessage = timerUseDescriptionBIOSPOST;
-+ break;
-+ case Watchdog::TimerUse::OSLoad:
-+ timeUserMessage = timerUseDescriptionOSLoad;
-+ break;
-+ case Watchdog::TimerUse::SMSOS:
-+ timeUserMessage = timerUseDescriptionSMSOS;
-+ break;
-+ case Watchdog::TimerUse::OEM:
-+ timeUserMessage = timerUseDescriptionOEM;
-+ break;
-+ default:
-+ timeUserMessage = reservedDescription;
-+ break;
-+ }
-+
-+ switch (action)
-+ {
-+ case Watchdog::Action::HardReset:
-+ actionMessageArgs = std::string(hardResetDescription) +
-+ std::string(actionDescription);
-+ break;
-+ case Watchdog::Action::PowerOff:
-+ actionMessageArgs = std::string(powerOffDescription) +
-+ std::string(actionDescription);
-+ break;
-+ case Watchdog::Action::PowerCycle:
-+ actionMessageArgs = std::string(powerCycleDescription) +
-+ std::string(actionDescription);
-+ break;
-+ case Watchdog::Action::None:
-+ actionMessageArgs = timerExpiredDescription;
-+ break;
-+ default:
-+ actionMessageArgs = reservedDescription;
-+ break;
-+ }
-+
-+ // Log into redfish event log
-+ sd_journal_send("MESSAGE=IPMIWatchdog: Timed out ACTION=%s",
-+ convertForMessage(action).c_str(), "PRIORITY=%i", LOG_INFO,
-+ "REDFISH_MESSAGE_ID=%s", "OpenBMC.0.1.IPMIWatchdog",
-+ "REDFISH_MESSAGE_ARGS=%s. timer use: %s",
-+ actionMessageArgs.c_str(), timeUserMessage.c_str(), NULL);
-+
-+ switch (preTimeoutInterruptAction)
-+ {
-+ case Watchdog::PreTimeoutInterruptAction::SMI:
-+ preInterruptActionMessageArgs = preInterruptDescriptionSMI;
-+ break;
-+ case Watchdog::PreTimeoutInterruptAction::NMI:
-+ preInterruptActionMessageArgs = preInterruptDescriptionNMI;
-+ break;
-+ case Watchdog::PreTimeoutInterruptAction::MI:
-+ preInterruptActionMessageArgs = preInterruptDescriptionMI;
-+ break;
-+ default:
-+ preInterruptActionMessageArgs = reservedDescription;
-+ break;
-+ }
-+
-+ if (preInterruptActionNone != convertForMessage(preTimeoutInterruptAction))
-+ {
-+ preTimeoutInterruptOccurFlag(true);
-+
-+ sd_journal_send("MESSAGE=IPMIWatchdog: Pre Timed out Interrupt=%s",
-+ convertForMessage(preTimeoutInterruptAction).c_str(),
-+ "PRIORITY=%i", LOG_INFO, "REDFISH_MESSAGE_ID=%s",
-+ "OpenBMC.0.1.IPMIWatchdog",
-+ "REDFISH_MESSAGE_ARGS=Timer interrupt - %s due to "
-+ "Watchdog timeout. timer use: %s",
-+ preInterruptActionMessageArgs.c_str(),
-+ timeUserMessage.c_str(), NULL);
-+ }
-
- auto target = actionTargetMap.find(action);
- if (target == actionTargetMap.end())
-@@ -133,10 +284,11 @@ void Watchdog::timeOutHandler()
-
- try
- {
-- auto method = bus.new_method_call(SYSTEMD_SERVICE, SYSTEMD_ROOT,
-- SYSTEMD_INTERFACE, "StartUnit");
-- method.append(target->second);
-- method.append("replace");
-+ auto method =
-+ bus.new_method_call(chassis::busName, chassis::path,
-+ "org.freedesktop.DBus.Properties", "Set");
-+ method.append(chassis::interface, chassis::request,
-+ std::variant<std::string>(target->second));
-
- bus.call_noreply(method);
- }
-@@ -147,6 +299,29 @@ void Watchdog::timeOutHandler()
- entry("ERROR=%s", e.what()));
- commit<InternalFailure>();
- }
-+
-+ // set restart cause for watchdog HardReset & PowerCycle actions
-+ if ((action == Watchdog::Action::HardReset) ||
-+ (action == Watchdog::Action::PowerCycle))
-+ {
-+ try
-+ {
-+ auto method = bus.new_method_call(
-+ restart::busName, restart::path,
-+ "org.freedesktop.DBus.Properties", "Set");
-+ method.append(
-+ restart::interface, restart::property,
-+ std::variant<std::string>("xyz.openbmc_project.State.Host."
-+ "RestartCause.WatchdogTimer"));
-+ bus.call(method);
-+ }
-+ catch (sdbusplus::exception_t& e)
-+ {
-+ log<level::ERR>("Failed to set HostRestartCause property",
-+ entry("ERROR=%s", e.what()));
-+ commit<InternalFailure>();
-+ }
-+ }
- }
-
- tryFallbackOrDisable();
-diff --git a/watchdog.hpp b/watchdog.hpp
-index 7de9bb3..b004b7a 100644
---- a/watchdog.hpp
-+++ b/watchdog.hpp
-@@ -68,7 +68,18 @@ class Watchdog : public WatchdogInherits
- WatchdogInherits(bus, objPath),
- bus(bus), actionTargetMap(std::move(actionTargetMap)),
- fallback(std::move(fallback)), minInterval(minInterval),
-- timer(event, std::bind(&Watchdog::timeOutHandler, this))
-+ timer(event, std::bind(&Watchdog::timeOutHandler, this)),
-+ powerStateChangedSignal(
-+ bus,
-+ sdbusplus::bus::match::rules::propertiesChanged(
-+ "/xyz/openbmc_project/state/host0",
-+ "xyz.openbmc_project.State.Host"),
-+ [this](sdbusplus::message::message& msg) {
-+ std::string objectName;
-+ std::map<std::string, std::variant<std::string>> props;
-+ msg.read(objectName, props);
-+ powerStateChangedHandler(props);
-+ })
- {
- // We set the watchdog interval with the default value.
- interval(interval());
-@@ -77,6 +88,12 @@ class Watchdog : public WatchdogInherits
- tryFallbackOrDisable();
- }
-
-+ /** @brief Disable watchdog when power status change meet
-+ * the specific requirement
-+ */
-+ void powerStateChangedHandler(
-+ const std::map<std::string, std::variant<std::string>>& props);
-+
- /** @brief Resets the TimeRemaining to the configured Interval
- * Optionally enables the watchdog.
- *
-@@ -165,6 +182,10 @@ class Watchdog : public WatchdogInherits
- /** @brief Contained timer object */
- sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic> timer;
-
-+ /** @brief Optional Callback handler when power status change meet
-+ * the specific requirement */
-+ sdbusplus::bus::match_t powerStateChangedSignal;
-+
- /** @brief Optional Callback handler on timer expirartion */
- void timeOutHandler();
-
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/host0 b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/host0
new file mode 100644
index 000000000..27c438d90
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/host0
@@ -0,0 +1,8 @@
+DEVPATH=/xyz/openbmc_project/watchdog/host0
+SERVICE=xyz.openbmc_project.Watchdog
+UNIT_HARD_RESET=phosphor-host-watchdog-reset.service
+UNIT_POWER_OFF=phosphor-host-watchdog-poweroff.service
+UNIT_POWER_CYCLE=phosphor-host-watchdog-powercycle.service
+FALLBACK_ACTION=xyz.openbmc_project.State.Watchdog.Action.PowerCycle
+FALLBACK_INTERVAL=180000
+MIN_INTERVAL=60000
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-powercycle.service b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-powercycle.service
new file mode 100644
index 000000000..9b8b0d691
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-powercycle.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Power Cycle Host Server
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-poweroff.service b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-poweroff.service
new file mode 100644
index 000000000..af7e6ef0d
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-poweroff.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Shutdown Host Server
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-reset.service b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-reset.service
new file mode 100644
index 000000000..655618b05
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-host-watchdog-reset.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Reset Host Server
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s xyz.openbmc_project.State.Host.Transition.ForceWarmReboot
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
deleted file mode 100644
index 5ef1a4179..000000000
--- a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=Phosphor Watchdog
-
-[Service]
-ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
- --path=/xyz/openbmc_project/watchdog/host0 \
- --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=xyz.openbmc_project.State.Chassis.Transition.Reset \
- --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=xyz.openbmc_project.State.Chassis.Transition.Off \
- --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=xyz.openbmc_project.State.Chassis.Transition.PowerCycle
-
-SyslogIdentifier=phosphor-watchdog
-BusName =xyz.openbmc_project.Watchdog
-Type=dbus
-
-[Install]
-WantedBy=basic.target
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service
new file mode 100644
index 000000000..4577cd1c1
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Phosphor Watchdog
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/watchdog/%I
+ExecStart=/usr/bin/env phosphor-watchdog --service=${{SERVICE}} --path=${{DEVPATH}} \
+ --continue --fallback_always --min_interval=${{MIN_INTERVAL}} \
+ --fallback_action=${{FALLBACK_ACTION}} --fallback_interval=${{FALLBACK_INTERVAL}} \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=${{UNIT_HARD_RESET}} \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=${{UNIT_POWER_OFF}} \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=${{UNIT_POWER_CYCLE}}
+SyslogIdentifier=phosphor-watchdog
+BusName=xyz.openbmc_project.Watchdog
+Type=dbus
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
index 9c491ecfc..d8b1aa956 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -1,7 +1,13 @@
FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
-SRC_URI_append_gbs = " file://0001-Customize-phosphor-watchdog-for-Intel-platforms.patch"
-
-# Remove the override to keep service running after DC cycle
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs = " obmc/watchdog/host0"
+OBMC_HOST_WATCHDOG_INSTANCES_A = "host0"
+WATCHDOG_FMT_A = "phosphor-watchdog@{0}.service"
SYSTEMD_OVERRIDE_${PN}_remove_gbs = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
-SYSTEMD_SERVICE_${PN}_gbs = "phosphor-watchdog.service"
+SYSTEMD_LINK_${PN}_remove_gbs = "${@compose_list(d, 'ENABLE_WATCHDOG_FMT', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN}_remove_gbs = "${@compose_list(d, 'WATCHDOG_FMT', 'OBMC_HOST_WATCHDOG_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_SERVICE_${PN}_gbs = " ${@compose_list(d, 'WATCHDOG_FMT_A', 'OBMC_HOST_WATCHDOG_INSTANCES_A')} \
+ phosphor-host-watchdog-reset.service \
+ phosphor-host-watchdog-poweroff.service \
+ phosphor-host-watchdog-powercycle.service \
+ "
diff --git a/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service b/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service
deleted file mode 100644
index e18d69493..000000000
--- a/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Initialize MAC Address
-Before=usb_network.service network-pre.target
-Wants=network-pre.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/mac-address
-
-[Install]
-WantedBy=multi-user.target \ No newline at end of file
diff --git a/meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb b/meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb
deleted file mode 100644
index d9fda7ccb..000000000
--- a/meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SRC_URI = "git://github.com/quanta-bmc/mac-address.git;protocol=git"
-SRCREV = "${AUTOREV}"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-inherit autotools pkgconfig
-inherit systemd
-
-DEPENDS += "systemd"
-DEPENDS += "autoconf-archive-native"
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI_append = " file://mac-address.service"
-SRC_URI_append = " file://config.txt"
-
-FILES_${PN}_append = " ${datadir}/mac-address/config.txt"
-
-HASHSTYLE = "gnu"
-S = "${WORKDIR}/git"
-CXXFLAGS += "-std=c++17"
-
-do_install_append() {
- install -d ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/mac-address.service \
- ${D}${systemd_unitdir}/system
-
- install -d ${D}${datadir}/mac-address
- install -m 0644 -D ${WORKDIR}/config.txt \
- ${D}${datadir}/mac-address/config.txt
-}
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} += "mac-address.service"
diff --git a/meta-quanta/meta-gsj/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-quanta/meta-gsj/recipes-phosphor/network/phosphor-network_%.bbappend
deleted file mode 100644
index 730c62d5f..000000000
--- a/meta-quanta/meta-gsj/recipes-phosphor/network/phosphor-network_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_OECONF_gsj += " --disable-link-local-autoconfiguration"
diff --git a/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/config.txt b/meta-quanta/meta-gsj/recipes-quanta/network/mac-address/mac-address/config.txt
index 668b1d485..668b1d485 100644
--- a/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/config.txt
+++ b/meta-quanta/meta-gsj/recipes-quanta/network/mac-address/mac-address/config.txt
diff --git a/meta-quanta/meta-gsj/recipes-quanta/network/mac-address_%.bbappend b/meta-quanta/meta-gsj/recipes-quanta/network/mac-address_%.bbappend
new file mode 100644
index 000000000..a90150b3d
--- /dev/null
+++ b/meta-quanta/meta-gsj/recipes-quanta/network/mac-address_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend_gsj := "${THISDIR}/${PN}:"
+SRC_URI_append_gsj = " file://config.txt"
+
+FILES_${PN}_append_gsj = " ${datadir}/mac-address/config.txt"
+
+do_install_append_gsj() {
+ install -d ${D}${datadir}/mac-address
+ install -m 0644 -D ${WORKDIR}/config.txt \
+ ${D}${datadir}/mac-address/config.txt
+}
diff --git a/meta-wistron/OWNERS b/meta-wistron/OWNERS
new file mode 100644
index 000000000..96108bbb3
--- /dev/null
+++ b/meta-wistron/OWNERS
@@ -0,0 +1,9 @@
+inherited: false
+owners:
+- Timothy_Huang@wistron.com
+- Claire_Ku@wistron.com
+- Ben_Pai@wistron.com
+- Andy_YF_Wang@wistron.com
+- Ken_Hsu@wistron.com
+- Jolie_Ku@wistron.com
+- Bob_King@wistron.com
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend
index e71ba71a3..5be003a75 100644
--- a/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -1,6 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-EXTRA_OECONF_append = " --enable-sync-mac "
+PACKAGECONFIG_append = " sync-mac"
SRC_URI_append = " file://config.json "
FILES_${PN} += "${datadir}/network/*.json"