From 235618c7396902842906bc3a8c90a3320aeeaeba Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Tue, 7 Apr 2020 15:43:15 -0700 Subject: Update to internal 0.47 Signed-off-by: Jason M. Bills --- .../configuration/entity-manager/WC-Baseboard.json | 1509 ++++++++++---------- .../configuration/entity-manager/WP-Baseboard.json | 70 +- .../conf/machine/include/intel-ast2600.inc | 3 +- .../configuration/entity-manager/AC-Baseboard.json | 3 + ...-aspeed-Add-an-intel-ast2500-machine-type.patch | 63 +- .../qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch | 32 - .../recipes-devtools/qemu/qemu-native_%.bbappend | 7 +- .../qemu/qemu-system-native_%.bbappend | 6 +- .../recipes-devtools/qemu/qemu_%.bbappend | 5 +- .../classes/image_types_intel_pfr.bbclass | 6 +- .../classes/obmc-phosphor-image-common.bbclass | 2 + .../meta-common/classes/systemd-watchdog.bbclass | 4 + ...0-Add-the-latest-chip-initialization-code.patch | 265 ---- .../0001-Add-ast2600-intel-as-a-new-board.patch | 176 ++- ...003-ast2600-intel-layout-environment-addr.patch | 58 +- ...0004-AST2600-Adjust-default-GPIO-settings.patch | 86 ++ .../0004-Disable-crashdump-trigger-gpio.patch | 57 - .../0005-Ast2600-Enable-interrupt-in-u-boot.patch | 27 +- .../u-boot/files/0006-SPI-Quad-IO-Mode.patch | 83 +- .../0007-ast2600-Override-OTP-strap-settings.patch | 44 +- .../files/0008-AST2600-Add-TPM-pulse-trigger.patch | 60 + ...ble-host-searial-port-clock-configuration.patch | 13 +- ...R-u-boot-env-changes-as-per-PFR-BMC-image.patch | 36 + ...ip-counting-WDT2-event-when-EXTRST-is-set.patch | 45 + .../meta-common/recipes-bsp/u-boot/files/intel.cfg | 18 +- .../u-boot/u-boot-aspeed-sdk_%.bbappend | 10 +- .../recipes-bsp/u-boot/u-boot-aspeed_%.bbappend | 1 + .../u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend | 4 + .../at-scale-debug/at-scale-debug_git.bb | 2 +- .../recipes-core/crashdump/crashdump_git.bb | 2 +- .../recipes-core/fw-update/files/fwupd.sh | 13 +- .../host-error-monitor/host-error-monitor_git.bb | 2 +- .../libmctp/0001-Smbus-changes-for-libmctp.patch | 32 +- .../recipes-core/interfaces/libmctp/CMakeLists.txt | 27 + .../recipes-core/interfaces/libmctp_git.bb | 4 +- .../recipes-core/ipmi/intel-ipmi-oem_%.bbappend | 2 +- .../recipes-devtools/mtd-util/mtd-util.bb | 2 +- .../sdbusplus/sdbusplus_%.bbappend | 2 +- .../libvncserver/libvncserver_%.bbappend | 2 +- .../recipes-intel/images/intel-platforms.bb | 1 + .../recipes-intel/intel-pfr/files/bmc_config.xml | 48 - .../recipes-intel/intel-pfr/files/csk_prv.pem | 8 - .../recipes-intel/intel-pfr/files/csk_pub.pem | 4 - .../recipes-intel/intel-pfr/files/pfm_config.xml | 48 - .../recipes-intel/intel-pfr/files/pfr_image.py | 43 +- .../intel-pfr/files/pfr_manifest.json | 130 -- .../recipes-intel/intel-pfr/files/rk_prv.pem | 8 - .../recipes-intel/intel-pfr/files/rk_pub.pem | 4 - .../intel-pfr/files/wht/bmc_config.xml | 48 + .../recipes-intel/intel-pfr/files/wht/csk_prv.pem | 8 + .../recipes-intel/intel-pfr/files/wht/csk_pub.pem | 4 + .../intel-pfr/files/wht/pfm_config.xml | 48 + .../intel-pfr/files/wht/pfr_manifest.json | 196 +++ .../recipes-intel/intel-pfr/files/wht/rk_prv.pem | 8 + .../recipes-intel/intel-pfr/files/wht/rk_pub.pem | 4 + .../intel-pfr/intel-blocksign-native.bb | 2 +- .../intel-pfr/obmc-intel-pfr-image-native.bb | 35 +- .../meta-common/recipes-intel/nic/enable-nics.bb | 24 + .../nic/enable-nics/enable-nics.service | 11 + .../recipes-intel/nic/enable-nics/enable-nics.sh | 14 + .../recipes-intel/smbios/smbios-mdrv1.bb | 2 +- .../recipes-intel/smbios/smbios-mdrv2.bb | 13 +- ...m-dts-add-DTS-for-Intel-ast2600-platforms.patch | 27 +- .../0022-Add-AST2500-eSPI-driver.patch | 16 +- ...35-Implement-a-memory-driver-share-memory.patch | 17 +- .../0051-Add-AST2500-JTAG-device.patch | 25 +- ...dd-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch | 15 +- ...-Mailbox-Enabling-interrupt-based-mailbox.patch | 234 +++ .../0101-Add-poll-fops-in-eSPI-driver.patch | 142 ++ .../recipes-kernel/linux/linux-aspeed_%.bbappend | 2 + ...ing-channel-specific-privilege-to-network.patch | 20 +- ...e-disable-control-of-the-Network-Interfac.patch | 191 --- ...network-link-carrier-state-to-be-reported.patch | 137 +- ...e-disable-control-of-the-Network-Interfac.patch | 189 +++ .../network/phosphor-network_%.bbappend | 5 +- .../configuration/entity-manager_%.bbappend | 4 +- .../dbus/phosphor-dbus-interfaces_%.bbappend | 2 +- ...-Firmware-update-support-for-StandBySpare.patch | 120 +- ...b-crashdump-to-the-D-Bus-interface-provid.patch | 331 +++++ .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 12 +- .../recipes-phosphor/ipmi/ipmitool_%.bbappend | 6 - .../ipmi/phosphor-ipmi-host_%.bbappend | 5 +- .../multi-node-manager/multi-node-manager.bb | 4 +- .../phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb | 8 +- .../sensors/dbus-sensors_%.bbappend | 2 +- .../state/phosphor-state-manager_%.bbappend | 2 + .../state/post-code-manager_git.bb | 2 +- ...mems-instead-of-getgrnam_r-due-to-overlay.patch | 15 +- .../virtual-media/virtual-media.bb | 1 + .../webui/phosphor-webui/config.json | 9 + .../webui/phosphor-webui_%.bbappend | 4 +- ...rce-nbdkit-to-send-PATCH-as-upload-method.patch | 71 + .../recipes-utilities/nbdkit/nbdkit_git.bb | 35 + 93 files changed, 2973 insertions(+), 2174 deletions(-) delete mode 100644 meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0000-AST2600-Add-the-latest-chip-initialization-code.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-Disable-crashdump-trigger-gpio.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/CMakeLists.txt delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/bmc_config.xml delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem delete mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service create mode 100755 meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0100-Mailbox-Enabling-interrupt-based-mailbox.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0101-Add-poll-fops-in-eSPI-driver.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0008-Added-enable-disable-control-of-the-Network-Interfac.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0011-Added-enable-disable-control-of-the-Network-Interfac.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/ipmitool_%.bbappend create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui/config.json create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb 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 caf960748..ea6aff1d9 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 @@ -619,499 +619,6 @@ ], "Type": "CFMSensor" }, - { - "Dcpmm": [ - { - "Channel": 0, - "DimmID": 1, - "I2cAddress": "0xB0", - "I2cbus": "MemoryChannel1", - "Imc": 0, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 2, - "I2cAddress": "0xB2", - "I2cbus": "MemoryChannel1", - "Imc": 0, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 3, - "I2cAddress": "0xB4", - "I2cbus": "MemoryChannel1", - "Imc": 0, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 4, - "I2cAddress": "0xB6", - "I2cbus": "MemoryChannel1", - "Imc": 0, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 5, - "I2cAddress": "0xB8", - "I2cbus": "MemoryChannel1", - "Imc": 1, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 6, - "I2cAddress": "0xBA", - "I2cbus": "MemoryChannel1", - "Imc": 1, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 7, - "I2cAddress": "0xBC", - "I2cbus": "MemoryChannel1", - "Imc": 1, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 8, - "I2cAddress": "0xBE", - "I2cbus": "MemoryChannel1", - "Imc": 1, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 9, - "I2cAddress": "0xB0", - "I2cbus": "MemoryChannel2", - "Imc": 2, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 10, - "I2cAddress": "0xB2", - "I2cbus": "MemoryChannel2", - "Imc": 2, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 11, - "I2cAddress": "0xB4", - "I2cbus": "MemoryChannel2", - "Imc": 2, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 12, - "I2cAddress": "0xB6", - "I2cbus": "MemoryChannel2", - "Imc": 2, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 13, - "I2cAddress": "0xB8", - "I2cbus": "MemoryChannel2", - "Imc": 3, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 14, - "I2cAddress": "0xBA", - "I2cbus": "MemoryChannel2", - "Imc": 3, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 15, - "I2cAddress": "0xBC", - "I2cbus": "MemoryChannel2", - "Imc": 3, - "Slot": 0, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 16, - "I2cAddress": "0xBE", - "I2cbus": "MemoryChannel2", - "Imc": 3, - "Slot": 1, - "Socket": 0, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 17, - "I2cAddress": "0xB0", - "I2cbus": "MemoryChannel3", - "Imc": 0, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 18, - "I2cAddress": "0xB2", - "I2cbus": "MemoryChannel3", - "Imc": 0, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 19, - "I2cAddress": "0xB4", - "I2cbus": "MemoryChannel3", - "Imc": 0, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 20, - "I2cAddress": "0xB6", - "I2cbus": "MemoryChannel3", - "Imc": 0, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 21, - "I2cAddress": "0xB8", - "I2cbus": "MemoryChannel3", - "Imc": 1, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 22, - "I2cAddress": "0xBA", - "I2cbus": "MemoryChannel3", - "Imc": 1, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 23, - "I2cAddress": "0xBC", - "I2cbus": "MemoryChannel3", - "Imc": 1, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 24, - "I2cAddress": "0xBE", - "I2cbus": "MemoryChannel3", - "Imc": 1, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 0, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 25, - "I2cAddress": "0xB0", - "I2cbus": "MemoryChannel4", - "Imc": 2, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 26, - "I2cAddress": "0xB2", - "I2cbus": "MemoryChannel4", - "Imc": 2, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 27, - "I2cAddress": "0xB4", - "I2cbus": "MemoryChannel4", - "Imc": 2, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 28, - "I2cAddress": "0xB6", - "I2cbus": "MemoryChannel4", - "Imc": 2, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 29, - "I2cAddress": "0xB8", - "I2cbus": "MemoryChannel4", - "Imc": 3, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 0, - "DimmID": 30, - "I2cAddress": "0xBA", - "I2cbus": "MemoryChannel4", - "Imc": 3, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 31, - "I2cAddress": "0xBC", - "I2cbus": "MemoryChannel4", - "Imc": 3, - "Slot": 0, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - }, - { - "Channel": 1, - "DimmID": 32, - "I2cAddress": "0xBE", - "I2cbus": "MemoryChannel4", - "Imc": 3, - "Slot": 1, - "Socket": 1, - "Spdpcibus": "0x7E", - "Spdpcicmdregister": "0x80", - "Spdpcidataregister": "0x88", - "Spdpcidevice": 11, - "Spdpcifunction": 1, - "Spdpcistatusregister": "0x84" - } - ], - "Name": "DCPMM", - "Type": "DCPMM" - }, - { - "Direction": "Input", - "Index": 40, - "Name": "NMI Input", - "Polarity": "Low", - "Type": "Gpio" - }, { "Name": "System Fan connector 1", "Pwm": 0, @@ -1182,25 +689,217 @@ 14, 15 ], - "Type": "IntelFanConnector" + "Type": "IntelFanConnector" + }, + { + "Address": "0x8", + "Class": "METemp", + "Name": "SSB Temp", + "PowerState": "BiosPost", + "Thresholds": [ + { + "Direction": "greater than", + "Name": "upper critical", + "Severity": 1, + "Value": 103 + }, + { + "Direction": "greater than", + "Name": "upper non critical", + "Severity": 0, + "Value": 98 + }, + { + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" + }, + { + "Address": "0xC4", + "Class": "MpsBridgeTemp", + "Name": "CPU1 P12V PVCCIN VR Temp", + "Thresholds": [ + { + "Direction": "greater than", + "Name": "upper critical", + "Severity": 1, + "Value": 115 + }, + { + "Direction": "greater than", + "Name": "upper non critical", + "Severity": 0, + "Value": 110 + }, + { + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" + }, + { + "Address": "0xB4", + "Class": "PxeBridgeTemp", + "Name": "CPU1 P12V PVCCIO VR Temp", + "Thresholds": [ + { + "Direction": "greater than", + "Name": "upper critical", + "Severity": 1, + "Value": 115 + }, + { + "Direction": "greater than", + "Name": "upper non critical", + "Severity": 0, + "Value": 110 + }, + { + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" + }, + { + "Address": "0xDC", + "Class": "PxeBridgeTemp", + "Name": "CPU1 VR Mem ABCD Temp", + "Thresholds": [ + { + "Direction": "greater than", + "Name": "upper critical", + "Severity": 1, + "Value": 115 + }, + { + "Direction": "greater than", + "Name": "upper non critical", + "Severity": 0, + "Value": 110 + }, + { + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" + }, + { + "Address": "0xDC", + "Class": "PxeBridgeTemp", + "Name": "CPU1 VR Mem EFGH Temp", + "Thresholds": [ + { + "Direction": "greater than", + "Name": "upper critical", + "Severity": 1, + "Value": 115 + }, + { + "Direction": "greater than", + "Name": "upper non critical", + "Severity": 0, + "Value": 110 + }, + { + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" + }, + { + "Address": "0x4A", + "Class": "IRBridgeTemp", + "Name": "CPU1 VR P1V8", + "Thresholds": [ + { + "Direction": "greater than", + "Name": "upper critical", + "Severity": 1, + "Value": 115 + }, + { + "Direction": "greater than", + "Name": "upper non critical", + "Severity": 0, + "Value": 110 + }, + { + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" }, { - "Address": "0x8", - "Class": "METemp", - "Name": "SSB Temp", - "PowerState": "BiosPost", + "Address": "0xCC", + "Class": "MpsBridgeTemp", + "Name": "CPU2 P12V PVCCIN VR Temp", "Thresholds": [ { "Direction": "greater than", "Name": "upper critical", "Severity": 1, - "Value": 103 + "Value": 115 }, { "Direction": "greater than", "Name": "upper non critical", "Severity": 0, - "Value": 98 + "Value": 110 }, { "Direction": "less than", @@ -1218,9 +917,9 @@ "Type": "IpmbSensor" }, { - "Address": "0xC4", - "Class": "MpsBridgeTemp", - "Name": "CPU1 P12V PVCCIN VR Temp", + "Address": "0xD4", + "Class": "PxeBridgeTemp", + "Name": "CPU2 P12V PVCCIO VR Temp", "Thresholds": [ { "Direction": "greater than", @@ -1250,9 +949,9 @@ "Type": "IpmbSensor" }, { - "Address": "0xB4", + "Address": "0xB0", "Class": "PxeBridgeTemp", - "Name": "CPU1 P12V PVCCIO VR Temp", + "Name": "CPU2 VR Mem ABCD Temp", "Thresholds": [ { "Direction": "greater than", @@ -1282,9 +981,9 @@ "Type": "IpmbSensor" }, { - "Address": "0xDC", + "Address": "0xEC", "Class": "PxeBridgeTemp", - "Name": "CPU1 VR Mem ABCD Temp", + "Name": "CPU2 VR Mem EFGH Temp", "Thresholds": [ { "Direction": "greater than", @@ -1314,9 +1013,9 @@ "Type": "IpmbSensor" }, { - "Address": "0xDC", - "Class": "PxeBridgeTemp", - "Name": "CPU1 VR Mem EFGH Temp", + "Address": "0x4C", + "Class": "IRBridgeTemp", + "Name": "CPU2 VR P1V8", "Thresholds": [ { "Direction": "greater than", @@ -1331,279 +1030,609 @@ "Value": 110 }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Direction": "less than", + "Name": "lower non critical", + "Severity": 0, + "Value": 5 + }, + { + "Direction": "less than", + "Name": "lower critical", + "Severity": 1, + "Value": 0 + } + ], + "Type": "IpmbSensor" + }, + { + "EthIndex": 0, + "Name": "Dedicated Management NIC", + "Type": "NIC" + }, + { + "EthIndex": 1, + "Name": "Host/BMC Shared NIC", + "Type": "NIC" + }, + { + "Address": "0x71", + "Bus": 2, + "ChannelNames": [ + "M2Slot1", + "M2Slot2" + ], + "Name": "M2 Mux", + "Type": "PCA9543Mux" + }, + { + "Address": "0x72", + "Bus": 2, + "ChannelNames": [ + "Pcie_Slot_1", + "Pcie_Slot_2", + "", + "FruChannel" + ], + "Name": "Riser 1 Mux", + "Type": "PCA9545Mux" + }, + { + "Address": "0x73", + "Bus": 2, + "ChannelNames": [ + "Pcie_Slot_1", + "Pcie_Slot_2", + "", + "FruChannel" + ], + "Name": "Riser 2 Mux", + "Type": "PCA9545Mux" + }, + { + "Address": "0x73", + "Bus": 9, + "ChannelNames": [ + "MemoryChannel1", + "MemoryChannel2", + "MemoryChannel3", + "MemoryChannel4" + ], + "Name": "Memory Mux", + "Type": "PCA9545Mux" + }, + { + "Address": "0x74", + "Bus": 2, + "ChannelNames": [ + "Pcie_Slot_1", + "Pcie_Slot_2", + "Pcie_Slot_3", + "Pcie_Slot_4" + ], + "Name": "PCIE Mux", + "Type": "PCA9546Mux" + }, + { + "Interface": [ + "i2c", + "peci" + ], + "Name": "PMEM", + "Pmem": [ + { + "Channel": 0, + "DeviceID": 1, + "I2cAddress": "0xB0", + "I2cbus": "MemoryChannel1", + "Imc": 0, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 0, + "DeviceID": 2, + "I2cAddress": "0xB2", + "I2cbus": "MemoryChannel1", + "Imc": 0, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 1, + "DeviceID": 3, + "I2cAddress": "0xB4", + "I2cbus": "MemoryChannel1", + "Imc": 0, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 1, + "DeviceID": 4, + "I2cAddress": "0xB6", + "I2cbus": "MemoryChannel1", + "Imc": 0, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 0, + "DeviceID": 5, + "I2cAddress": "0xB8", + "I2cbus": "MemoryChannel1", + "Imc": 1, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 0, + "DeviceID": 6, + "I2cAddress": "0xBA", + "I2cbus": "MemoryChannel1", + "Imc": 1, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 1, + "DeviceID": 7, + "I2cAddress": "0xBC", + "I2cbus": "MemoryChannel1", + "Imc": 1, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 1, + "DeviceID": 8, + "I2cAddress": "0xBE", + "I2cbus": "MemoryChannel1", + "Imc": 1, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 0, + "DeviceID": 9, + "I2cAddress": "0xB0", + "I2cbus": "MemoryChannel2", + "Imc": 2, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" + }, + { + "Channel": 0, + "DeviceID": 10, + "I2cAddress": "0xB2", + "I2cbus": "MemoryChannel2", + "Imc": 2, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 - } - ], - "Type": "IpmbSensor" - }, - { - "Address": "0x4A", - "Class": "IRBridgeTemp", - "Name": "CPU1 VR P1V8", - "Thresholds": [ - { - "Direction": "greater than", - "Name": "upper critical", - "Severity": 1, - "Value": 115 + "Channel": 1, + "DeviceID": 11, + "I2cAddress": "0xB4", + "I2cbus": "MemoryChannel2", + "Imc": 2, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "greater than", - "Name": "upper non critical", - "Severity": 0, - "Value": 110 + "Channel": 1, + "DeviceID": 12, + "I2cAddress": "0xB6", + "I2cbus": "MemoryChannel2", + "Imc": 2, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Channel": 0, + "DeviceID": 13, + "I2cAddress": "0xB8", + "I2cbus": "MemoryChannel2", + "Imc": 3, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 - } - ], - "Type": "IpmbSensor" - }, - { - "Address": "0xCC", - "Class": "MpsBridgeTemp", - "Name": "CPU2 P12V PVCCIN VR Temp", - "Thresholds": [ - { - "Direction": "greater than", - "Name": "upper critical", - "Severity": 1, - "Value": 115 + "Channel": 0, + "DeviceID": 14, + "I2cAddress": "0xBA", + "I2cbus": "MemoryChannel2", + "Imc": 3, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "greater than", - "Name": "upper non critical", - "Severity": 0, - "Value": 110 + "Channel": 1, + "DeviceID": 15, + "I2cAddress": "0xBC", + "I2cbus": "MemoryChannel2", + "Imc": 3, + "Pecibus": "0x30", + "Slot": 0, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Channel": 1, + "DeviceID": 16, + "I2cAddress": "0xBE", + "I2cbus": "MemoryChannel2", + "Imc": 3, + "Pecibus": "0x30", + "Slot": 1, + "Socket": 0, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 - } - ], - "Type": "IpmbSensor" - }, - { - "Address": "0xD4", - "Class": "PxeBridgeTemp", - "Name": "CPU2 P12V PVCCIO VR Temp", - "Thresholds": [ + "Channel": 0, + "DeviceID": 17, + "I2cAddress": "0xB0", + "I2cbus": "MemoryChannel3", + "Imc": 0, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, { - "Direction": "greater than", - "Name": "upper critical", - "Severity": 1, - "Value": 115 + "Channel": 0, + "DeviceID": 18, + "I2cAddress": "0xB2", + "I2cbus": "MemoryChannel3", + "Imc": 0, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" }, { - "Direction": "greater than", - "Name": "upper non critical", - "Severity": 0, - "Value": 110 + "Channel": 1, + "DeviceID": 19, + "I2cAddress": "0xB4", + "I2cbus": "MemoryChannel3", + "Imc": 0, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Channel": 1, + "DeviceID": 20, + "I2cAddress": "0xB6", + "I2cbus": "MemoryChannel3", + "Imc": 0, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 - } - ], - "Type": "IpmbSensor" - }, - { - "Address": "0xB0", - "Class": "PxeBridgeTemp", - "Name": "CPU2 VR Mem ABCD Temp", - "Thresholds": [ + "Channel": 0, + "DeviceID": 21, + "I2cAddress": "0xB8", + "I2cbus": "MemoryChannel3", + "Imc": 1, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" + }, { - "Direction": "greater than", - "Name": "upper critical", - "Severity": 1, - "Value": 115 + "Channel": 0, + "DeviceID": 22, + "I2cAddress": "0xBA", + "I2cbus": "MemoryChannel3", + "Imc": 1, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" }, { - "Direction": "greater than", - "Name": "upper non critical", - "Severity": 0, - "Value": 110 + "Channel": 1, + "DeviceID": 23, + "I2cAddress": "0xBC", + "I2cbus": "MemoryChannel3", + "Imc": 1, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Channel": 1, + "DeviceID": 24, + "I2cAddress": "0xBE", + "I2cbus": "MemoryChannel3", + "Imc": 1, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 0, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 - } - ], - "Type": "IpmbSensor" - }, - { - "Address": "0xEC", - "Class": "PxeBridgeTemp", - "Name": "CPU2 VR Mem EFGH Temp", - "Thresholds": [ - { - "Direction": "greater than", - "Name": "upper critical", - "Severity": 1, - "Value": 115 + "Channel": 0, + "DeviceID": 25, + "I2cAddress": "0xB0", + "I2cbus": "MemoryChannel4", + "Imc": 2, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "greater than", - "Name": "upper non critical", - "Severity": 0, - "Value": 110 + "Channel": 0, + "DeviceID": 26, + "I2cAddress": "0xB2", + "I2cbus": "MemoryChannel4", + "Imc": 2, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Channel": 1, + "DeviceID": 27, + "I2cAddress": "0xB4", + "I2cbus": "MemoryChannel4", + "Imc": 2, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 - } - ], - "Type": "IpmbSensor" - }, - { - "Address": "0x4C", - "Class": "IRBridgeTemp", - "Name": "CPU2 VR P1V8", - "Thresholds": [ + "Channel": 1, + "DeviceID": 28, + "I2cAddress": "0xB6", + "I2cbus": "MemoryChannel4", + "Imc": 2, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" + }, { - "Direction": "greater than", - "Name": "upper critical", - "Severity": 1, - "Value": 115 + "Channel": 0, + "DeviceID": 29, + "I2cAddress": "0xB8", + "I2cbus": "MemoryChannel4", + "Imc": 3, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "greater than", - "Name": "upper non critical", - "Severity": 0, - "Value": 110 + "Channel": 0, + "DeviceID": 30, + "I2cAddress": "0xBA", + "I2cbus": "MemoryChannel4", + "Imc": 3, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower non critical", - "Severity": 0, - "Value": 5 + "Channel": 1, + "DeviceID": 31, + "I2cAddress": "0xBC", + "I2cbus": "MemoryChannel4", + "Imc": 3, + "Pecibus": "0x31", + "Slot": 0, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" }, { - "Direction": "less than", - "Name": "lower critical", - "Severity": 1, - "Value": 0 + "Channel": 1, + "DeviceID": 32, + "I2cAddress": "0xBE", + "I2cbus": "MemoryChannel4", + "Imc": 3, + "Pecibus": "0x31", + "Slot": 1, + "Socket": 1, + "Spdpcibus": "0x7E", + "Spdpcicmdregister": "0x80", + "Spdpcidataregister": "0x88", + "Spdpcidevice": 11, + "Spdpcifunction": 1, + "Spdpcistatusregister": "0x84" } ], - "Type": "IpmbSensor" - }, - { - "EthIndex": 0, - "Name": "Dedicated Management NIC", - "Type": "NIC" - }, - { - "EthIndex": 1, - "Name": "Host/BMC Shared NIC", - "Type": "NIC" - }, - { - "Address": "0x71", - "Bus": 2, - "ChannelNames": [ - "M2Slot1", - "M2Slot2" - ], - "Name": "M2 Mux", - "Type": "PCA9543Mux" - }, - { - "Address": "0x72", - "Bus": 2, - "ChannelNames": [ - "Pcie_Slot_1", - "Pcie_Slot_2", - "", - "FruChannel" - ], - "Name": "Riser 1 Mux", - "Type": "PCA9545Mux" - }, - { - "Address": "0x73", - "Bus": 2, - "ChannelNames": [ - "Pcie_Slot_1", - "Pcie_Slot_2", - "", - "FruChannel" - ], - "Name": "Riser 2 Mux", - "Type": "PCA9545Mux" - }, - { - "Address": "0x73", - "Bus": 9, - "ChannelNames": [ - "MemoryChannel1", - "MemoryChannel2", - "MemoryChannel3", - "MemoryChannel4" - ], - "Name": "Memory Mux", - "Type": "PCA9545Mux" - }, - { - "Address": "0x74", - "Bus": 2, - "ChannelNames": [ - "Pcie_Slot_1", - "Pcie_Slot_2", - "Pcie_Slot_3", - "Pcie_Slot_4" - ], - "Name": "PCIE Mux", - "Type": "PCA9546Mux" + "Type": "PMEM" }, { "Address": [ 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 02929fb33..7b128099f 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 @@ -620,10 +620,10 @@ "Type": "CFMSensor" }, { - "Dcpmm": [ + "Pmem": [ { "Channel": 0, - "DimmID": 1, + "DeviceID": 1, "I2cAddress": "0xB0", "I2cbus": "MemoryChannel1", "Imc": 0, @@ -639,7 +639,7 @@ }, { "Channel": 0, - "DimmID": 2, + "DeviceID": 2, "I2cAddress": "0xB2", "I2cbus": "MemoryChannel1", "Imc": 0, @@ -655,7 +655,7 @@ }, { "Channel": 1, - "DimmID": 3, + "DeviceID": 3, "I2cAddress": "0xB4", "I2cbus": "MemoryChannel1", "Imc": 0, @@ -671,7 +671,7 @@ }, { "Channel": 1, - "DimmID": 4, + "DeviceID": 4, "I2cAddress": "0xB6", "I2cbus": "MemoryChannel1", "Imc": 0, @@ -687,7 +687,7 @@ }, { "Channel": 0, - "DimmID": 5, + "DeviceID": 5, "I2cAddress": "0xB8", "I2cbus": "MemoryChannel1", "Imc": 1, @@ -703,7 +703,7 @@ }, { "Channel": 0, - "DimmID": 6, + "DeviceID": 6, "I2cAddress": "0xBA", "I2cbus": "MemoryChannel1", "Imc": 1, @@ -719,7 +719,7 @@ }, { "Channel": 1, - "DimmID": 7, + "DeviceID": 7, "I2cAddress": "0xBC", "I2cbus": "MemoryChannel1", "Imc": 1, @@ -735,7 +735,7 @@ }, { "Channel": 1, - "DimmID": 8, + "DeviceID": 8, "I2cAddress": "0xBE", "I2cbus": "MemoryChannel1", "Imc": 1, @@ -751,7 +751,7 @@ }, { "Channel": 0, - "DimmID": 9, + "DeviceID": 9, "I2cAddress": "0xB0", "I2cbus": "MemoryChannel2", "Imc": 2, @@ -767,7 +767,7 @@ }, { "Channel": 0, - "DimmID": 10, + "DeviceID": 10, "I2cAddress": "0xB2", "I2cbus": "MemoryChannel2", "Imc": 2, @@ -783,7 +783,7 @@ }, { "Channel": 1, - "DimmID": 11, + "DeviceID": 11, "I2cAddress": "0xB4", "I2cbus": "MemoryChannel2", "Imc": 2, @@ -799,7 +799,7 @@ }, { "Channel": 1, - "DimmID": 12, + "DeviceID": 12, "I2cAddress": "0xB6", "I2cbus": "MemoryChannel2", "Imc": 2, @@ -815,7 +815,7 @@ }, { "Channel": 0, - "DimmID": 13, + "DeviceID": 13, "I2cAddress": "0xB8", "I2cbus": "MemoryChannel2", "Imc": 3, @@ -831,7 +831,7 @@ }, { "Channel": 0, - "DimmID": 14, + "DeviceID": 14, "I2cAddress": "0xBA", "I2cbus": "MemoryChannel2", "Imc": 3, @@ -847,7 +847,7 @@ }, { "Channel": 1, - "DimmID": 15, + "DeviceID": 15, "I2cAddress": "0xBC", "I2cbus": "MemoryChannel2", "Imc": 3, @@ -863,7 +863,7 @@ }, { "Channel": 1, - "DimmID": 16, + "DeviceID": 16, "I2cAddress": "0xBE", "I2cbus": "MemoryChannel2", "Imc": 3, @@ -879,7 +879,7 @@ }, { "Channel": 0, - "DimmID": 17, + "DeviceID": 17, "I2cAddress": "0xB0", "I2cbus": "MemoryChannel3", "Imc": 0, @@ -895,7 +895,7 @@ }, { "Channel": 0, - "DimmID": 18, + "DeviceID": 18, "I2cAddress": "0xB2", "I2cbus": "MemoryChannel3", "Imc": 0, @@ -911,7 +911,7 @@ }, { "Channel": 1, - "DimmID": 19, + "DeviceID": 19, "I2cAddress": "0xB4", "I2cbus": "MemoryChannel3", "Imc": 0, @@ -927,7 +927,7 @@ }, { "Channel": 1, - "DimmID": 20, + "DeviceID": 20, "I2cAddress": "0xB6", "I2cbus": "MemoryChannel3", "Imc": 0, @@ -943,7 +943,7 @@ }, { "Channel": 0, - "DimmID": 21, + "DeviceID": 21, "I2cAddress": "0xB8", "I2cbus": "MemoryChannel3", "Imc": 1, @@ -959,7 +959,7 @@ }, { "Channel": 0, - "DimmID": 22, + "DeviceID": 22, "I2cAddress": "0xBA", "I2cbus": "MemoryChannel3", "Imc": 1, @@ -975,7 +975,7 @@ }, { "Channel": 1, - "DimmID": 23, + "DeviceID": 23, "I2cAddress": "0xBC", "I2cbus": "MemoryChannel3", "Imc": 1, @@ -991,7 +991,7 @@ }, { "Channel": 1, - "DimmID": 24, + "DeviceID": 24, "I2cAddress": "0xBE", "I2cbus": "MemoryChannel3", "Imc": 1, @@ -1007,7 +1007,7 @@ }, { "Channel": 0, - "DimmID": 25, + "DeviceID": 25, "I2cAddress": "0xB0", "I2cbus": "MemoryChannel4", "Imc": 2, @@ -1023,7 +1023,7 @@ }, { "Channel": 0, - "DimmID": 26, + "DeviceID": 26, "I2cAddress": "0xB2", "I2cbus": "MemoryChannel4", "Imc": 2, @@ -1039,7 +1039,7 @@ }, { "Channel": 1, - "DimmID": 27, + "DeviceID": 27, "I2cAddress": "0xB4", "I2cbus": "MemoryChannel4", "Imc": 2, @@ -1055,7 +1055,7 @@ }, { "Channel": 1, - "DimmID": 28, + "DeviceID": 28, "I2cAddress": "0xB6", "I2cbus": "MemoryChannel4", "Imc": 2, @@ -1071,7 +1071,7 @@ }, { "Channel": 0, - "DimmID": 29, + "DeviceID": 29, "I2cAddress": "0xB8", "I2cbus": "MemoryChannel4", "Imc": 3, @@ -1087,7 +1087,7 @@ }, { "Channel": 0, - "DimmID": 30, + "DeviceID": 30, "I2cAddress": "0xBA", "I2cbus": "MemoryChannel4", "Imc": 3, @@ -1103,7 +1103,7 @@ }, { "Channel": 1, - "DimmID": 31, + "DeviceID": 31, "I2cAddress": "0xBC", "I2cbus": "MemoryChannel4", "Imc": 3, @@ -1119,7 +1119,7 @@ }, { "Channel": 1, - "DimmID": 32, + "DeviceID": 32, "I2cAddress": "0xBE", "I2cbus": "MemoryChannel4", "Imc": 3, @@ -1138,8 +1138,8 @@ "i2c", "peci" ], - "Name": "DCPMM", - "Type": "DCPMM" + "Name": "PMEM", + "Type": "PMEM" }, { "Name": "System Fan connector 1", diff --git a/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc b/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc index 28aeccfb7..7f323f4e2 100644 --- a/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc +++ b/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc @@ -12,7 +12,8 @@ TARGET_FPU = "hard" PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-aspeed-sdk" -UBOOT_MACHINE = "evb-ast2600_defconfig" +UBOOT_MACHINE = "ast2600_openbmc_defconfig" +UBOOT_DEVICETREE = "ast2600-intel" VIRTUAL-RUNTIME_skeleton_workbook = "${MACHINE}-config" diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json index 2f692022f..dd1c4d21a 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json +++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json @@ -2048,5 +2048,8 @@ "xyz.openbmc_project.Inventory.Decorator.AssetTag": { "AssetTag": "$PRODUCT_ASSET_TAG" }, + "xyz.openbmc_project.Inventory.Item.Board.Motherboard": { + "ProductId": 156 + }, "xyz.openbmc_project.Inventory.Item.System": {} } diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch index cca6c838b..deccc47f3 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch +++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch @@ -12,15 +12,15 @@ Signed-off-by: James Feist 1 file changed, 42 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c -index 465e65f323..80e8466aa9 100644 +index 6f4d707..5a9d58b 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c -@@ -60,6 +60,21 @@ struct AspeedBoardState { +@@ -64,6 +64,21 @@ struct AspeedBoardState { SCU_HW_STRAP_MAC0_RGMII) & \ ~SCU_HW_STRAP_2ND_BOOT_WDT) - + +/* intel ast2500 hardware value: 0xF3CCC286 */ -+#define INTEL_AST2500_BMC_HW_STRAP1 (( \ ++#define INTEL_AST2500_BMC_HW_STRAP1 (( \ + AST2500_HW_STRAP1_DEFAULTS | \ + SCU_AST2500_HW_STRAP_SPI_AUTOFETCH_ENABLE | \ + SCU_AST2500_HW_STRAP_GPIO_STRAP_ENABLE | \ @@ -37,10 +37,10 @@ index 465e65f323..80e8466aa9 100644 /* Romulus hardware value: 0xF10AD206 */ #define ROMULUS_BMC_HW_STRAP1 ( \ AST2500_HW_STRAP1_DEFAULTS | \ -@@ -281,6 +296,24 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bmc) - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32); +@@ -396,6 +411,24 @@ static void ast2600_evb_i2c_init(AspeedBoardState *bmc) + ast2500_evb_i2c_init(bmc); } - + +static void intel_ast2500_i2c_init(AspeedBoardState *bmc) +{ + AspeedSoCState *soc = &bmc->soc; @@ -62,22 +62,39 @@ index 465e65f323..80e8466aa9 100644 static void romulus_bmc_i2c_init(AspeedBoardState *bmc) { AspeedSoCState *soc = &bmc->soc; -@@ -390,6 +423,15 @@ static const AspeedBoardConfig aspeed_boards[] = { - .spi_model = "mx25l25635e", - .num_cs = 1, - .i2c_init = ast2500_evb_i2c_init, -+ }, { -+ .name = MACHINE_TYPE_NAME("intel-ast2500"), -+ .desc = "Intel AST2500 BMC (ARM1176)", -+ .soc_name = "ast2500-a1", -+ .hw_strap1 = INTEL_AST2500_BMC_HW_STRAP1, -+ .fmc_model = "n25q512a", -+ .spi_model = "n25q512a", -+ .num_cs = 1, -+ .i2c_init = intel_ast2500_i2c_init, +@@ -537,6 +570,21 @@ static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data) + mc->default_ram_size = 512 * MiB; + }; + ++static void aspeed_machine_intel_ast2500_class_init(ObjectClass *oc, void *data) ++{ ++ MachineClass *mc = MACHINE_CLASS(oc); ++ AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc); ++ ++ mc->desc = "Intel AST2500 BMC (ARM1176)"; ++ amc->soc_name = "ast2500-a1"; ++ amc->hw_strap1 = INTEL_AST2500_BMC_HW_STRAP1; ++ amc->fmc_model = "n25q512a"; ++ amc->spi_model = "n25q512a"; ++ amc->num_cs = 1; ++ amc->i2c_init = intel_ast2500_i2c_init; ++ mc->default_ram_size = 512 * MiB; ++}; ++ + static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data) + { + MachineClass *mc = MACHINE_CLASS(oc); +@@ -624,6 +672,10 @@ static const TypeInfo aspeed_machine_types[] = { + .parent = TYPE_ASPEED_MACHINE, + .class_init = aspeed_machine_ast2500_evb_class_init, }, { - .name = MACHINE_TYPE_NAME("romulus-bmc"), - .desc = "OpenPOWER Romulus BMC (ARM1176)", --- ++ .name = MACHINE_TYPE_NAME("intel-ast2500"), ++ .parent = TYPE_ASPEED_MACHINE, ++ .class_init = aspeed_machine_intel_ast2500_class_init, ++ }, { + .name = MACHINE_TYPE_NAME("romulus-bmc"), + .parent = TYPE_ASPEED_MACHINE, + .class_init = aspeed_machine_romulus_class_init, +-- 2.17.1 diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch deleted file mode 100644 index 2f81895d0..000000000 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch +++ /dev/null @@ -1,32 +0,0 @@ -From db99abbddc9fe958353e47fcd91c741bd7a93066 Mon Sep 17 00:00:00 2001 -From: James Feist -Date: Wed, 19 Jun 2019 14:15:07 -0700 -Subject: [PATCH] Turn Off FFWUPD Jumper - -This disabled the jumper so we don't get stuck during -boot. - -TODO: Do this the "right way", if there is one. - -Signed-off-by: James Feist ---- - hw/gpio/aspeed_gpio.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c -index 12d8a49666..ca6f8dd0dd 100644 ---- a/hw/gpio/aspeed_gpio.c -+++ b/hw/gpio/aspeed_gpio.c -@@ -29,6 +29,9 @@ static uint64_t aspeed_gpio_read(void *opaque, hwaddr addr, - val = s->regs[addr]; - } - -+ if (addr == 0x0){ -+ val |= 1 << 0x18; // ffupd jumper -+ } - return val; - } - --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend index e0bc525ba..d2855db1b 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend +++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend @@ -1,11 +1,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI = "git://github.com/openbmc/qemu.git;nobranch=1 \ - file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \ - file://0002-Turn-Off-FFWUPD-Jumper.patch" + file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch" QEMU_TARGETS = "arm" S = "${WORKDIR}/git" -SRCREV = "5dca85cb0b85ac309d131f9db1fb57af282d67cc" - -PACKAGECONFIG[ssh] = "--enable-libssh2,--disable-libssh2,libssh2," +SRCREV = "8ab0db0624b454bd69a04ca0010f165cb7119100" diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend index 3a0ccb83f..f8c8c66c1 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend +++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend @@ -1,11 +1,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI = "git://github.com/openbmc/qemu.git;nobranch=1 \ file://powerpc_rom.bin \ - file://run-ptest \ - file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \ - file://0002-Turn-Off-FFWUPD-Jumper.patch" + file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch" QEMU_TARGETS = "arm" S = "${WORKDIR}/git" -SRCREV = "5dca85cb0b85ac309d131f9db1fb57af282d67cc" +SRCREV = "8ab0db0624b454bd69a04ca0010f165cb7119100" diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend index 6b59f16b0..cfc1a3ace 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend +++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend @@ -1,7 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI = "git://github.com/openbmc/qemu.git;nobranch=1 \ - file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \ - file://0002-Turn-Off-FFWUPD-Jumper.patch" + file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch" S = "${WORKDIR}/git" -SRCREV = "5dca85cb0b85ac309d131f9db1fb57af282d67cc" +SRCREV = "8ab0db0624b454bd69a04ca0010f165cb7119100" diff --git a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass index 9563b55cb..505391669 100644 --- a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass +++ b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass @@ -43,7 +43,7 @@ do_image_pfr () { cd "${PFR_IMAGES_DIR}" # python script that does the creating PFM, BMC compressed and unsigned images from BMC 128MB raw binary file. - ${PFR_SCRIPT_DIR}/pfr_image.py ${PFR_CFG_DIR}/pfr_manifest.json ${DEPLOY_DIR_IMAGE}/image-mtd ${build_version} ${build_number} ${build_hash} + ${PFR_SCRIPT_DIR}/pfr_image.py ${PFR_CFG_DIR}/pfr_manifest.json ${DEPLOY_DIR_IMAGE}/image-mtd ${build_version} ${build_number} ${build_hash} ${SHA} # sign the PFM region ${PFR_SCRIPT_DIR}/blocksign -c ${PFR_CFG_DIR}/pfm_config.xml -o ${PFR_IMAGES_DIR}/pfm_signed.bin ${PFR_IMAGES_DIR}/pfm.bin -v @@ -82,6 +82,10 @@ do_image_pfr[depends] += " \ " python() { + product_gen = d.getVar('PRODUCT_GENERATION', True) + if product_gen == "wht": + d.setVar('SHA', "1")# 1- SHA256 + types = d.getVar('IMAGE_FSTYPES', True).split() if 'intel-pfr' in types: diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass index b43933278..6d5ac0e2b 100644 --- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass +++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass @@ -43,6 +43,8 @@ IMAGE_INSTALL_append = " \ security-manager \ multi-node-nl \ mctpd \ + virtual-media \ + enable-nics \ " IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'intel-pfr-manager', '', d)}" diff --git a/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass b/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass index 20b77d1be..66fecb8a9 100644 --- a/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass +++ b/meta-openbmc-mods/meta-common/classes/systemd-watchdog.bbclass @@ -12,6 +12,10 @@ add_watchdog_confs() { continue fi + if [ "$service" = "systemd-coredump@.service" ]; then + continue + fi + if cat $D/lib/systemd/system/${service} | grep oneshot > /dev/null; then continue fi diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0000-AST2600-Add-the-latest-chip-initialization-code.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0000-AST2600-Add-the-latest-chip-initialization-code.patch deleted file mode 100644 index 2ec774144..000000000 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0000-AST2600-Add-the-latest-chip-initialization-code.patch +++ /dev/null @@ -1,265 +0,0 @@ -From 8c9e2fffa9ea72ddc8734ee74b30cc62ba06fd3a Mon Sep 17 00:00:00 2001 -From: Jae Hyun Yoo -Date: Mon, 2 Mar 2020 13:54:50 -0800 -Subject: [PATCH] AST2600: Add the latest chip initialization code - -This commit cherry picked the latest chip initialization code from -Aspped SDK v00.05.05 to support AST2600 A1 revision. - -Signed-off-by: Jae Hyun Yoo ---- - arch/arm/mach-aspeed/ast2600/Makefile | 2 +- - arch/arm/mach-aspeed/ast2600/cache.c | 26 +++++++ - arch/arm/mach-aspeed/ast2600/platform.S | 132 +++++++++++++++++++++++++------- - 3 files changed, 130 insertions(+), 30 deletions(-) - create mode 100644 arch/arm/mach-aspeed/ast2600/cache.c - -diff --git a/arch/arm/mach-aspeed/ast2600/Makefile b/arch/arm/mach-aspeed/ast2600/Makefile -index b074d4b70a14..2889388fab75 100644 ---- a/arch/arm/mach-aspeed/ast2600/Makefile -+++ b/arch/arm/mach-aspeed/ast2600/Makefile -@@ -1,2 +1,2 @@ --obj-y += platform.o aspeed_scu_info.o -+obj-y += platform.o aspeed_scu_info.o cache.o - obj-$(CONFIG_SPL_BUILD) += spl.o -diff --git a/arch/arm/mach-aspeed/ast2600/cache.c b/arch/arm/mach-aspeed/ast2600/cache.c -new file mode 100644 -index 000000000000..82de0b0fda8a ---- /dev/null -+++ b/arch/arm/mach-aspeed/ast2600/cache.c -@@ -0,0 +1,26 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) ASPEED Technology Inc. -+ * Chia-Wei Wang -+ */ -+ -+#include -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+void enable_caches(void) -+{ -+#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) -+ enum dcache_option opt = DCACHE_WRITETHROUGH; -+#else -+ enum dcache_option opt = DCACHE_WRITEBACK; -+#endif -+ /* enable D-cache as well as MMU */ -+ dcache_enable(); -+ -+ /* setup cache attribute for DRAM region */ -+ mmu_set_region_dcache_behaviour(ASPEED_DRAM_BASE, -+ gd->ram_size, -+ opt); -+} -diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S -index de97cccc78b7..f1a1f057c09b 100644 ---- a/arch/arm/mach-aspeed/ast2600/platform.S -+++ b/arch/arm/mach-aspeed/ast2600/platform.S -@@ -26,39 +26,45 @@ - * +----------------------+ AST_SMP_MAILBOX_BASE - */ - --#define AST_SMP_MAILBOX_BASE 0x1E6E2180 -+#define AST_SMP_MAILBOX_BASE (0x1E6E2180) - #define AST_SMP_MBOX_FIELD_ENTRY (AST_SMP_MAILBOX_BASE + 0x0) - #define AST_SMP_MBOX_FIELD_GOSIGN (AST_SMP_MAILBOX_BASE + 0x4) - #define AST_SMP_MBOX_FIELD_READY (AST_SMP_MAILBOX_BASE + 0x8) - #define AST_SMP_MBOX_FIELD_POLLINSN (AST_SMP_MAILBOX_BASE + 0xc) - - /* AST2600 HW registers */ --#define AST_SCU_BASE 0x1E6E2000 --#define AST_SCU_PROT_KEY1 (AST_SCU_BASE) --#define AST_SCU_PROT_KEY2 (AST_SCU_BASE + 0x010) --#define AST_SCU_REV_ID (AST_SCU_BASE + 0x014) --#define AST_SCU_HPLL_PARAM (AST_SCU_BASE + 0x200) --#define AST_SCU_HPLL_PARAM_EXT (AST_SCU_BASE + 0x204) --#define AST_SCU_HW_STRAP1 (AST_SCU_BASE + 0x500) --#define AST_SCU_CA7_PARITY_CHK (AST_SCU_BASE + 0x820) --#define AST_SCU_CA7_PARITY_CLR (AST_SCU_BASE + 0x824) -- --#define AST_FMC_BASE 0x1E620000 -+#define AST_SCU_BASE (0x1E6E2000) -+#define AST_SCU_PROT_KEY1 (AST_SCU_BASE) -+#define AST_SCU_PROT_KEY2 (AST_SCU_BASE + 0x010) -+#define AST_SCU_REV_ID (AST_SCU_BASE + 0x014) -+#define AST_SCU_SYSRST_CTRL (AST_SCU_BASE + 0x040) -+#define AST_SCU_SYSRST_CTRL_CLR (AST_SCU_BASE + 0x044) -+#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) -+#define AST_SCU_HPLL_PARAM_EXT (AST_SCU_BASE + 0x204) -+#define AST_SCU_HW_STRAP1 (AST_SCU_BASE + 0x500) -+#define AST_SCU_HW_STRAP1_CLR (AST_SCU_BASE + 0x504) -+#define AST_SCU_HW_STRAP2 (AST_SCU_BASE + 0x510) -+#define AST_SCU_HW_STRAP2_CLR (AST_SCU_BASE + 0x514) -+#define AST_SCU_CA7_CTRL (AST_SCU_BASE + 0x800) -+#define AST_SCU_CA7_AXI_PREFETCH_START (AST_SCU_BASE + 0x808) -+#define AST_SCU_CA7_AXI_PREFETCH_END (AST_SCU_BASE + 0x80C) -+#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) -+ -+#define AST_FMC_BASE (0x1E620000) -+#define AST_FMC_CE0_CTRL (AST_FMC_BASE + 0x010) - #define AST_FMC_WDT1_CTRL_MODE (AST_FMC_BASE + 0x060) - #define AST_FMC_WDT2_CTRL_MODE (AST_FMC_BASE + 0x064) - -+#define AST_GPIO_BASE (0x1E780000) -+#define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0) -+ - /* Revision ID */ - #define REV_ID_AST2600A0 0x05000303 - --ENTRY(ast_bootmode) -- ldr r1, =AST_SCU_HW_STRAP1 -- ldr r0, [r1] -- tst r0, #0x4 -- moveq r0, #0x0 @; AST_BOOTMODE_SPI -- movne r0, #0x1 @; AST_BOOTMODE_EMMC -- mov pc, lr --ENDPROC(ast_bootmode) -- - .macro scu_unlock - movw r0, #0xA8A8 - movt r0, #0x1688 @; magic key to unlock SCU -@@ -71,11 +77,19 @@ ENDPROC(ast_bootmode) - - .macro timer_init - #ifdef CONFIG_FPGA_ASPEED -- movw r0, #0x7840 -- movt r0, #0x17D -+ movw r0, #0xF080 -+ movt r0, #0x2FA - #else -- movw r0, #0x2340 -- movt r0, #0x430E -+ ldr r0, =AST_SCU_REV_ID -+ ldr r0, [r0] -+ -+ ldr r1, =REV_ID_AST2600A0 -+ cmp r0, r1 -+ -+ movweq r0, #0x32C0 -+ movteq r0, #0x4013 -+ movwne r0, #0x8C00 -+ movtne r0, #0x4786 - #endif - mcr p15, 0, r0, c14, c0, 0 @; update CNTFRQ - .endm -@@ -133,7 +147,7 @@ do_primary_core_setup: - /* unlock system control unit */ - scu_unlock - -- /* tune-up CPU clock for AST2600 A0 */ -+ /* identify AST2600 A0/A1 */ - ldr r0, =AST_SCU_REV_ID - ldr r0, [r0] - -@@ -142,7 +156,7 @@ do_primary_core_setup: - - bne 0f - -- /* setup CPU clocks */ -+ /* tune up CPU clocks (A0 only) */ - ldr r0, =AST_SCU_HW_STRAP1 - ldr r1, [r0] - bic r1, #0x1800 -@@ -150,7 +164,7 @@ do_primary_core_setup: - str r1, [r0] - - ldr r0, =AST_SCU_HPLL_PARAM -- movw r1, #0x4087 -+ movw r1, #0x4080 - movt r1, #0x1000 - str r1, [r0] - -@@ -163,13 +177,54 @@ wait_lock: - tst r1, #0x80000000 - beq wait_lock - -+ /* skip A1 only area */ -+ b 1f -+ - 0: -+ /* enable AXI prefetch (A1 only) */ -+ ldr r0, =AST_SCU_CA7_AXI_PREFETCH_START -+ ldr r1, =ASPEED_DRAM_BASE -+ str r1, [r0] -+ -+ ldr r0, =AST_SCU_CA7_AXI_PREFETCH_END -+ ldr r1, =0xFFFFFFFF -+ str r1, [r0] -+ -+ ldr r0, =AST_SCU_CA7_CTRL -+ ldr r1, [r0] -+ orr r1, #0x8000 -+ str r1, [r0] -+ -+ /* LPC/eSPI mode selection (A1 only) */ -+ ldr r0, =AST_GPIOYZ_DATA_VALUE -+ ldr r0, [r0] -+ tst r0, #0x1000 -+ beq 1f -+ -+ /* switch to LPC mode if GPIOZ[4]=1 */ -+ ldr r0, =AST_SCU_HW_STRAP2 -+ ldr r1, [r0] -+ orr r1, #0x40 -+ str r1, [r0] -+ -+1: -+ /* release display port reset */ -+ ldr r0, =AST_SCU_SYSRST_CTRL_CLR -+ movw r1, #0x0000 -+ movt r1, #0x3000 -+ str r1, [r0] -+ -+ /* MMIO decode setting */ -+ ldr r0, =AST_SCU_MMIO_DEC_SET -+ mov r1, #0x2000 -+ str r1, [r0] -+ - /* enable cache & SRAM parity check */ - mov r0, #0 - ldr r1, =AST_SCU_CA7_PARITY_CLR - str r0, [r1] - -- mov r0, #0x11 -+ mov r0, #0x1 - ldr r1, =AST_SCU_CA7_PARITY_CHK - str r0, [r1] - -@@ -177,8 +232,27 @@ wait_lock: - mov r0, #0 - ldr r1, =AST_FMC_WDT1_CTRL_MODE - str r0, [r1] -+#if 0 - ldr r1, =AST_FMC_WDT2_CTRL_MODE - str r0, [r1] -+#endif -+ /* tune up SPI clock */ -+ movw r0, #0x0641 -+ movt r0, #0x203B -+ ldr r1, =AST_FMC_CE0_CTRL -+ str r0, [r1] -+ -+ /* 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 -+ ldr r1, [r0] -+ orr r1, #0x0A -+ str r1, [r0] - - /* relocate mailbox insn. for cpuN polling SMP go signal */ - adrl r0, mailbox_insn --- -2.7.4 - diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch index f1505b8cd..373893a44 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch @@ -1,4 +1,4 @@ -From efa949f82a1dd32b83eafe3fe58038abc04ecdbf Mon Sep 17 00:00:00 2001 +From 145ffdf95955562eddf96d0342bcdebd98f8dc95 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Thu, 24 Oct 2019 14:06:33 -0700 Subject: [PATCH] Add ast2600-intel as a new board @@ -7,23 +7,20 @@ Signed-off-by: Vernon Mauery Signed-off-by: Jae Hyun Yoo Signed-off-by: Kuiying Wang --- - arch/arm/dts/Makefile | 3 + - arch/arm/dts/ast2600-intel.dts | 157 ++++++++++ - arch/arm/lib/interrupts.c | 5 + - arch/arm/mach-aspeed/ast2600/Kconfig | 9 + - arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c | 1 + - board/aspeed/ast2600_intel/Kconfig | 13 + - board/aspeed/ast2600_intel/Makefile | 4 + - board/aspeed/ast2600_intel/ast-espi.c | 298 ++++++++++++++++++ - board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++ - board/aspeed/ast2600_intel/ast-irq.h | 8 + - board/aspeed/ast2600_intel/ast-timer.c | 59 ++++ - board/aspeed/ast2600_intel/intel.c | 176 +++++++++++ - cmd/Kconfig | 2 +- - common/autoboot.c | 10 + - common/board_r.c | 8 +- - include/configs/evb_ast2600.h | 2 +- - 16 files changed, 1148 insertions(+), 6 deletions(-) + arch/arm/dts/Makefile | 3 +- + arch/arm/dts/ast2600-intel.dts | 197 ++++++++++++++++ + arch/arm/lib/interrupts.c | 5 + + arch/arm/mach-aspeed/ast2600/Kconfig | 8 + + board/aspeed/ast2600_intel/Kconfig | 13 ++ + board/aspeed/ast2600_intel/Makefile | 4 + + board/aspeed/ast2600_intel/ast-espi.c | 298 ++++++++++++++++++++++++ + board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++++++++++ + board/aspeed/ast2600_intel/ast-irq.h | 8 + + board/aspeed/ast2600_intel/ast-timer.c | 59 +++++ + board/aspeed/ast2600_intel/intel.c | 177 +++++++++++++++ + cmd/Kconfig | 2 +- + common/autoboot.c | 10 + + 13 files changed, 1181 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/ast2600-intel.dts create mode 100644 board/aspeed/ast2600_intel/Kconfig create mode 100644 board/aspeed/ast2600_intel/Makefile @@ -34,25 +31,27 @@ Signed-off-by: Kuiying Wang create mode 100644 board/aspeed/ast2600_intel/intel.c diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index d1d4dca340f8..38fe8113469e 100644 +index e4dae2937968..da8903123999 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -680,6 +680,9 @@ dtb-$(CONFIG_TARGET_EVB_AST2500) += \ - dtb-$(CONFIG_TARGET_EVB_AST2600) += \ - ast2600-evb.dtb - -+dtb-$(CONFIG_TARGET_AST2600_INTEL) += \ +@@ -683,7 +683,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \ + ast2600-fpga.dtb \ + ast2600-rainier.dtb \ + ast2600-slt.dtb \ +- ast2600-tacoma.dtb ++ ast2600-tacoma.dtb \ + ast2600-intel.dtb -+ - dtb-$(CONFIG_TARGET_FPGA_AST2600) += \ - ast2600-fpga.dtb + + dtb-$(CONFIG_ARCH_STI) += stih410-b2260.dtb diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts new file mode 100644 -index 000000000000..99788b21e444 +index 000000000000..9a15e204f83b --- /dev/null +++ b/arch/arm/dts/ast2600-intel.dts -@@ -0,0 +1,157 @@ +@@ -0,0 +1,197 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++// Copyright (c) 2019-2020 Intel Corporation +/dts-v1/; + +#include "ast2600-u-boot.dtsi" @@ -144,14 +143,31 @@ index 000000000000..99788b21e444 + +&mdio { + status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ethphy1: ethernet-phy@1 { ++ reg = <0>; ++ }; ++ ++ ethphy2: ethernet-phy@2 { ++ reg = <0>; ++ }; ++ ++ ethphy3: ethernet-phy@3 { ++ reg = <0>; ++ }; ++ ++ ethphy4: ethernet-phy@4 { ++ reg = <0>; ++ }; +}; + +&mac1 { + status = "okay"; -+ + phy-mode = "rgmii"; ++ phy-handle = <ðphy2>; + pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_mac2link_default &pinctrl_mdio2_default>; ++ pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mac2link_default &pinctrl_mdio2_default>; +}; + +&fmc { @@ -210,6 +226,28 @@ index 000000000000..99788b21e444 + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c9_default>; +}; ++ ++&i2c9 { ++ status = "okay"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c10_default>; ++}; ++ ++&i2c12 { ++ status = "okay"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c13_default>; ++}; ++ ++&i2c13 { ++ status = "okay"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c14_default>; ++}; +\ No newline at end of file diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index ee775ce5d264..8c985532afb4 100644 --- a/arch/arm/lib/interrupts.c @@ -245,14 +283,13 @@ index ee775ce5d264..8c985532afb4 100644 { efi_restore_gd(); diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig -index 3c208ff3da67..a2a2fe0e24a8 100644 +index dd991e87c795..7ccbb0b5e0ea 100644 --- a/arch/arm/mach-aspeed/ast2600/Kconfig +++ b/arch/arm/mach-aspeed/ast2600/Kconfig -@@ -24,9 +24,18 @@ config TARGET_FPGA_AST2600 - FPGA-AST2600 is Aspeed FPGA board for AST2600 chip. - This is mainly for internal development. Note that - most implementation is co-code with EVB-AST2600. -+ +@@ -51,6 +51,13 @@ config TARGET_SLT_AST2600 + help + SLT-AST2600 is Aspeed SLT board for AST2600 chip. + +config TARGET_AST2600_INTEL + bool "AST2600-INTEL" + depends on ASPEED_AST2600 @@ -262,23 +299,14 @@ index 3c208ff3da67..a2a2fe0e24a8 100644 + endchoice - source "board/aspeed/evb_ast2600/Kconfig" + source "board/aspeed/evb_ast2600a0/Kconfig" +@@ -59,5 +66,6 @@ source "board/aspeed/ncsi_ast2600a0/Kconfig" + source "board/aspeed/ncsi_ast2600a1/Kconfig" source "board/aspeed/fpga_ast2600/Kconfig" + source "board/aspeed/slt_ast2600/Kconfig" +source "board/aspeed/ast2600_intel/Kconfig" endif -diff --git a/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c b/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c -index c31e8a3614b0..84ca9f68aee7 100644 ---- a/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c -+++ b/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c -@@ -88,6 +88,7 @@ extern void - aspeed_sys_reset_info(void) - { - u32 rest = readl(ASPEED_SYS_RESET_CTRL); -+ printf("RST: %08x\n", rest); - - if (rest & SYS_PWR_RESET_FLAG) { - printf("RST : Power On \n"); diff --git a/board/aspeed/ast2600_intel/Kconfig b/board/aspeed/ast2600_intel/Kconfig new file mode 100644 index 000000000000..b841dab60c76 @@ -1098,10 +1126,10 @@ index 000000000000..cf8c69aba5d3 +} diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c new file mode 100644 -index 000000000000..b5d8dd36d20b +index 000000000000..a02e246d0d81 --- /dev/null +++ b/board/aspeed/ast2600_intel/intel.c -@@ -0,0 +1,176 @@ +@@ -0,0 +1,177 @@ +/* Intel customizations of Das U-Boot */ +#include +#include @@ -1139,6 +1167,7 @@ index 000000000000..b5d8dd36d20b + return value <= 0 ? 0 : 1; +} + ++#define SCU_BASE 0x1E6E2000 +int misc_init_r(void) +{ + /* This is called near the end of the _r init sequence */ @@ -1279,10 +1308,10 @@ index 000000000000..b5d8dd36d20b +} +#endif diff --git a/cmd/Kconfig b/cmd/Kconfig -index 92736f2d6612..f64a2595da65 100644 +index d5aa204290bd..89f6668b788e 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig -@@ -1862,7 +1862,7 @@ config CMD_DIAG +@@ -1876,7 +1876,7 @@ config CMD_DIAG config CMD_IRQ bool "irq - Show information about interrupts" @@ -1316,45 +1345,6 @@ index 94133eaeda78..5e69000b848b 100644 if (bootdelay >= 0) abort = __abortboot(bootdelay); -diff --git a/common/board_r.c b/common/board_r.c -index 472987d5d52f..a7f5371bac71 100644 ---- a/common/board_r.c -+++ b/common/board_r.c -@@ -673,6 +673,10 @@ static init_fnc_t init_sequence_r[] = { - #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \ - defined(CONFIG_SANDBOX) - board_init, /* Setup chipselects */ -+ interrupt_init, -+#ifdef CONFIG_ARM -+ initr_enable_interrupts, -+#endif - #endif - /* - * TODO: printing of the clock inforamtion of the board is now -@@ -771,10 +775,6 @@ static init_fnc_t init_sequence_r[] = { - #ifdef CONFIG_CMD_KGDB - initr_kgdb, - #endif -- interrupt_init, --#ifdef CONFIG_ARM -- initr_enable_interrupts, --#endif - #if defined(CONFIG_MICROBLAZE) || defined(CONFIG_M68K) - timer_init, /* initialize timer */ - #endif -diff --git a/include/configs/evb_ast2600.h b/include/configs/evb_ast2600.h -index 3a12f2f0d43c..91a42f2522e2 100644 ---- a/include/configs/evb_ast2600.h -+++ b/include/configs/evb_ast2600.h -@@ -18,7 +18,7 @@ - - /* Environment */ - #define CONFIG_ENV_SIZE 0x10000 --#define CONFIG_ENV_OFFSET 0x60000 -+#define CONFIG_ENV_OFFSET 0x2400000 - #define CONFIG_ENV_SECT_SIZE (4 << 10) - - #endif /* __CONFIG_H */ -- 2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch index 88d7cd019..326f36df1 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch @@ -1,4 +1,4 @@ -From 2a52808ddd6a6bef40bab9a15bd22b1c7988a798 Mon Sep 17 00:00:00 2001 +From 3195e1ec2d772d5e4c16ae5b60c294086cfc17be Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Thu, 12 Dec 2019 12:54:18 +0800 Subject: [PATCH] ast2600: intel-layout-environment-addr @@ -9,13 +9,12 @@ Both kernel and u-boot work at the area /dev/mtd/u-boot-env Signed-off-by: Kuiying Wang Signed-off-by: Jae Hyun Yoo --- - common/board_r.c | 11 +++++++++-- - include/configs/aspeed-common.h | 12 +++++++++++- - include/configs/evb_ast2600_spl.h | 2 +- - 3 files changed, 21 insertions(+), 4 deletions(-) + common/board_r.c | 13 ++++++++++--- + include/configs/aspeed-common.h | 11 ++++++++++- + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/common/board_r.c b/common/board_r.c -index a7f5371bac71..492d7f1cbe4c 100644 +index 472987d5d52f..b665d0e30262 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -433,10 +433,17 @@ static int should_load_env(void) @@ -23,6 +22,8 @@ index a7f5371bac71..492d7f1cbe4c 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 @@ -30,8 +31,7 @@ index a7f5371bac71..492d7f1cbe4c 100644 + */ + if (!gd->env_valid) + env_init(); - env_relocate(); -- else ++ env_relocate(); + } else { set_default_env(NULL, 0); + } @@ -39,47 +39,29 @@ index a7f5371bac71..492d7f1cbe4c 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 d1eb4688e68f..0ece4a1b9440 100644 +index cdbffc97a223..6065ec58db0a 100644 --- a/include/configs/aspeed-common.h +++ b/include/configs/aspeed-common.h -@@ -55,13 +55,23 @@ - #ifndef CONFIG_BOOTCOMMAND - #define CONFIG_BOOTCOMMAND "bootm 20080000" +@@ -65,9 +65,18 @@ + #endif + + #ifndef CONFIG_ENV_OFFSET +-#define CONFIG_ENV_OFFSET 0xF0000 ++#define CONFIG_ENV_OFFSET 0x2400000 #endif + +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT -+#define CONFIG_ENV_ADDR_REDUND - #define CONFIG_ENV_OVERWRITE ++#define CONFIG_ENV_OVERWRITE ++ +#define AST_FMC_CS0_BASE 0x20000000 /* CS0 */ -+#define CONFIG_ENV_OFFSET 0x2400000 +#define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + CONFIG_ENV_OFFSET) -+#define CONFIG_ENV_SIZE 0x10000 +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) +#define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + CONFIG_ENV_OFFSET_REDUND) +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE -+#define CONFIG_ENV_SECT_SIZE (4 << 10) - - #define CONFIG_SYS_BOOTM_LEN (0x800000 * 2) - - #define CONFIG_EXTRA_ENV_SETTINGS \ - "verify=yes\0" \ -- "spi_dma=no\0" \ -+ "spi_dma=yes\0" \ - "" ++ + #define CONFIG_ENV_SECT_SIZE (4 << 10) /* -diff --git a/include/configs/evb_ast2600_spl.h b/include/configs/evb_ast2600_spl.h -index 8bbd6e18727a..8529f46c0b19 100644 ---- a/include/configs/evb_ast2600_spl.h -+++ b/include/configs/evb_ast2600_spl.h -@@ -19,7 +19,7 @@ - - /* Environment */ - #define CONFIG_ENV_SIZE 0x10000 --#define CONFIG_ENV_OFFSET 0x90000 -+#define CONFIG_ENV_OFFSET 0x2400000 - #define CONFIG_ENV_SECT_SIZE (4 << 10) - - #ifdef CONFIG_SPL_TINY -- 2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch new file mode 100644 index 000000000..950382544 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch @@ -0,0 +1,86 @@ +From 8dfc080bafc688ccdb3253eff79b72ad72f93761 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Fri, 3 Jan 2020 15:14:09 -0800 +Subject: [PATCH] AST2600: Adjust default GPIO settings + +- Disable GPIOC3 to prevent unexpected host failures. +- Fixed GPIOC5, GPIOG6, GPIOI0~7 and GPIOL6~7 directions and + default values. +- Disabled internal pull-down of GPIOB6. + +Signed-off-by: Jae Hyun Yoo +--- + board/aspeed/ast2600_intel/intel.c | 50 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c +index eb9b3959625e..b4a3dd222f3f 100644 +--- a/board/aspeed/ast2600_intel/intel.c ++++ b/board/aspeed/ast2600_intel/intel.c +@@ -151,6 +151,54 @@ static void sgpio_init(void) + SCU_BASE | SCU_414); + } + ++static void set_gpio_default_state(void) ++{ ++#define SCU_410 0x410 /* Multi-function Pin Control #4 */ ++#define SCU_410_RGMII3TXD1 BIT(19) ++#define GPIO_004 0x004 /* GPIO A/B/C/D Direction */ ++#define GPIO_000 0x000 /* GPIO A/B/C/D Value */ ++#define GPIO_C3 BIT(19) ++ ++ /* ++ * Set GPIOC3 as an output with value high explicitly since it doesn't ++ * have an external pull up. It uses direct register access because ++ * it's called from board_early_init_f(). ++ */ ++ writel(readl(SCU_BASE | SCU_410) & ~SCU_410_RGMII3TXD1, ++ SCU_BASE | SCU_410); ++ writel(readl(AST_GPIO_BASE | GPIO_004) | GPIO_C3, ++ AST_GPIO_BASE | GPIO_004); ++ writel(readl(AST_GPIO_BASE | GPIO_000) | GPIO_C3, ++ AST_GPIO_BASE | GPIO_000); ++ ++#define SCU_610 0x610 /* Disable internal pull-down #0 */ ++#define SCU_610_GPIOB6 BIT(14) ++ writel(readl(SCU_BASE | SCU_610) | SCU_610_GPIOB6, SCU_BASE | SCU_610); ++ ++#define GPIO_C5 BIT(21) ++ writel(readl(AST_GPIO_BASE | GPIO_004) | GPIO_C5, ++ AST_GPIO_BASE | GPIO_004); ++ writel(readl(AST_GPIO_BASE | GPIO_000) | GPIO_C5, ++ AST_GPIO_BASE | GPIO_000); ++ ++#define GPIO_024 0x024 /* GPIO E/F/G/H Direction */ ++#define GPIO_020 0x020 /* GPIO E/F/G/H Value */ ++#define GPIO_G6 BIT(22) ++ writel(readl(AST_GPIO_BASE | GPIO_024) | GPIO_G6, ++ AST_GPIO_BASE | GPIO_024); ++ writel(readl(AST_GPIO_BASE | GPIO_020) | GPIO_G6, ++ AST_GPIO_BASE | GPIO_020); ++ ++#define GPIO_074 0x074 /* GPIO I/J/K/L Direction */ ++#define GPIO_070 0x070 /* GPIO I/J/K/L Value */ ++#define GPIO_I_MASK GENMASK(7, 0) ++#define GPIO_L_MASK GENMASK(29, 28) ++ writel(readl(AST_GPIO_BASE | GPIO_074) | GPIO_I_MASK | GPIO_L_MASK, ++ AST_GPIO_BASE | GPIO_074); ++ writel(readl(AST_GPIO_BASE | GPIO_070) | GPIO_I_MASK | GPIO_L_MASK, ++ AST_GPIO_BASE | GPIO_070); ++} ++ + void espi_init(void); + int arch_interrupt_init_early(void); + +@@ -167,6 +215,8 @@ int board_early_init_f(void) + * I am not sure if it actually does anything... */ + arch_interrupt_init_early(); + ++ set_gpio_default_state(); ++ + gpio_passthru_init(); + + port80h_snoop_init(); +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-Disable-crashdump-trigger-gpio.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-Disable-crashdump-trigger-gpio.patch deleted file mode 100644 index d9c40fea0..000000000 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-Disable-crashdump-trigger-gpio.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b203aee347f6b4104a7dfbc061b195c99795451e Mon Sep 17 00:00:00 2001 -From: Jae Hyun Yoo -Date: Fri, 3 Jan 2020 15:14:09 -0800 -Subject: [PATCH] Disable crashdump trigger gpio - -This commit disables crashdump trigger gpio (GPIOC3) to prevent -unexpected host failures. - -Signed-off-by: Jae Hyun Yoo ---- - board/aspeed/ast2600_intel/intel.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c -index b6a11132448f..f095f1ecd696 100644 ---- a/board/aspeed/ast2600_intel/intel.c -+++ b/board/aspeed/ast2600_intel/intel.c -@@ -151,6 +151,27 @@ static void sgpio_init(void) - SCU_BASE | SCU_414); - } - -+static void disable_crashlog_trigger(void) -+{ -+#define SCU_410 0x410 /* Multi-function Pin Control #4 */ -+#define SCU_410_RGMII3TXD1 BIT(19) -+#define GPIO_004 0x004 /* GPIO A/B/C/D Direction */ -+#define GPIO_000 0x000 /* GPIO A/B/C/D Value */ -+#define GPIO_C3 BIT(19) -+ -+ /* -+ * Set FM_BMC_CRASHLOG_TRIG_N (GPIOC3) as an output with value high -+ * explicitly since it doesn't have an external pull up. It uses direct -+ * register access because it's called from board_early_init_f(). -+ */ -+ writel(readl(SCU_BASE | SCU_410) & ~SCU_410_RGMII3TXD1, -+ SCU_BASE | SCU_410); -+ writel(readl(AST_GPIO_BASE | GPIO_004) | GPIO_C3, -+ AST_GPIO_BASE | GPIO_004); -+ writel(readl(AST_GPIO_BASE | GPIO_000) | GPIO_C3, -+ AST_GPIO_BASE | GPIO_000); -+} -+ - void espi_init(void); - int arch_interrupt_init_early(void); - -@@ -167,6 +188,8 @@ int board_early_init_f(void) - * I am not sure if it actually does anything... */ - arch_interrupt_init_early(); - -+ disable_crashlog_trigger(); -+ - gpio_passthru_init(); - - port80h_snoop_init(); --- -2.7.4 - diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch index ce9aa668a..66f3d3b12 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch @@ -1,4 +1,4 @@ -From 959b75b846aa25168fe9e3d04ceb0e0778f89992 Mon Sep 17 00:00:00 2001 +From 143fb89b03af61bd807b0d6f9f11d6801cf8fe69 Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Fri, 3 Jan 2020 12:52:29 +0800 Subject: [PATCH] Enable interrupt in u-boot. @@ -15,9 +15,7 @@ Signed-off-by: Kuiying Wang --- arch/arm/lib/vectors.S | 31 ++++++- board/aspeed/ast2600_intel/ast-irq.c | 154 +++++++++++++++++------------------ - configs/evb-ast2600_defconfig | 1 + - include/configs/evb_ast2600.h | 1 + - 4 files changed, 107 insertions(+), 80 deletions(-) + 2 files changed, 105 insertions(+), 80 deletions(-) diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 2ca6e2494a7a..e2ed04a204de 100644 @@ -432,27 +430,6 @@ index f817f8cd7c81..6e91b17ab186 100644 } } } -diff --git a/configs/evb-ast2600_defconfig b/configs/evb-ast2600_defconfig -index 517d59adaf11..9cd7aea98e8d 100644 ---- a/configs/evb-ast2600_defconfig -+++ b/configs/evb-ast2600_defconfig -@@ -72,3 +72,4 @@ CONFIG_SPI=y - CONFIG_DM_SPI=y - CONFIG_SYSRESET=y - CONFIG_WDT=y -+CONFIG_USE_IRQ=y -diff --git a/include/configs/evb_ast2600.h b/include/configs/evb_ast2600.h -index 91a42f2522e2..15061b25d872 100644 ---- a/include/configs/evb_ast2600.h -+++ b/include/configs/evb_ast2600.h -@@ -8,6 +8,7 @@ - - #include - -+#define CONFIG_USE_IRQ - #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x300000) - #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x5000000) - -- 2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch index ca5846416..34d8b1abb 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch @@ -1,4 +1,4 @@ -From 8c953c7f1d512cf4acd9ce000d65e46094d61597 Mon Sep 17 00:00:00 2001 +From c438edace30a3408c827faaae2d5004fe5ae010d Mon Sep 17 00:00:00 2001 From: arun-pm Date: Fri, 29 Nov 2019 00:19:09 +0530 Subject: [PATCH] SPI Quad IO Mode @@ -8,13 +8,14 @@ This commit adds quad IO mode in SPI driver for AST2600. Note:- Removed n25q00 Quad I/O support for the time being due to clock issue with chip 'Micron 8UA15 - rw182 (128MB)' while enabling Quad I/O mode. --- - arch/arm/dts/ast2600-intel.dts | 6 ++--- - drivers/mtd/spi/spi-nor-ids.c | 7 +++++- - drivers/spi/aspeed_spi.c | 46 ++++++++++++++++++++++++---------- - 3 files changed, 41 insertions(+), 18 deletions(-) + arch/arm/dts/ast2600-intel.dts | 6 ++---- + drivers/mtd/spi/spi-nor-ids.c | 7 ++++++- + drivers/spi/aspeed_spi.c | 18 +++++++++++++++++- + 3 files changed, 25 insertions(+), 6 deletions(-) + mode change 100755 => 100644 drivers/spi/aspeed_spi.c diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts -index 0d362ac7c1..2a74bbd30a 100644 +index d16581c5811d..ab78b516b6a3 100644 --- a/arch/arm/dts/ast2600-intel.dts +++ b/arch/arm/dts/ast2600-intel.dts @@ -101,16 +101,14 @@ @@ -37,7 +38,7 @@ index 0d362ac7c1..2a74bbd30a 100644 }; diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c -index c77987f1ff..d679238562 100644 +index ad733e71988b..257ab472305c 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[] = { @@ -55,7 +56,9 @@ index c77987f1ff..d679238562 100644 { 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 a8c2b3de2b..ae5edaee9f 100644 +old mode 100755 +new mode 100644 +index c7b998fadfde..930b18443a48 --- a/drivers/spi/aspeed_spi.c +++ b/drivers/spi/aspeed_spi.c @@ -16,6 +16,9 @@ @@ -63,68 +66,12 @@ index a8c2b3de2b..ae5edaee9f 100644 #define ASPEED_SPI_MAX_CS 3 +#define AST2600A0 0x05000303 -+#define AST2600A0_MAX_FREQ 40000000 ++#define AST2600A0_MAX_FREQ 40000000 +#define AST_MAX_FREQ 100000000 struct aspeed_spi_regs { u32 conf; /* 0x00 CE Type Setting */ -@@ -593,6 +596,7 @@ static int aspeed_spi_write_reg(struct aspeed_spi_priv *priv, - aspeed_spi_write_to_ahb(flash->ahb_base, write_buf, len); - aspeed_spi_stop_user(priv, flash); - -+ debug("=== write opcode [%x] ==== \n", opcode); - switch(opcode) { - case SPINOR_OP_EN4B: - writel(readl(&priv->regs->ctrl) | BIT(flash->cs), &priv->regs->ctrl); -@@ -615,6 +619,8 @@ static void aspeed_spi_send_cmd_addr(struct aspeed_spi_priv *priv, - /* First, send the opcode */ - aspeed_spi_write_to_ahb(flash->ahb_base, &cmdbuf[0], 1); - -+ if(flash->iomode == CE_CTRL_IO_QUAD_ADDR_DATA) -+ writel(flash->ce_ctrl_user | flash->iomode, &priv->regs->ce_ctrl[flash->cs]); - /* - * The controller is configured for 4BYTE address mode. Fix - * the address width and send an extra byte if the SPI Flash -@@ -664,9 +670,6 @@ static ssize_t aspeed_spi_write_user(struct aspeed_spi_priv *priv, - { - aspeed_spi_start_user(priv, flash); - -- if(flash->iomode == CE_CTRL_IO_QPI_DATA) -- writel(flash->ce_ctrl_user | flash->iomode, &priv->regs->ce_ctrl[flash->cs]); -- - /* cmd buffer = cmd + addr : normally cmd is use signle mode*/ - aspeed_spi_send_cmd_addr(priv, flash, cmdbuf, cmdlen); - -@@ -872,15 +875,19 @@ static int aspeed_spi_flash_init(struct aspeed_spi_priv *priv, - else - read_hclk = aspeed_spi_hclk_divisor(priv, slave->speed); - -- if (slave->mode & (SPI_RX_DUAL | SPI_TX_DUAL)) { -- debug("CS%u: setting dual data mode\n", flash->cs); -- flash->iomode = CE_CTRL_IO_DUAL_DATA; -- flash->spi->read_opcode = SPINOR_OP_READ_1_1_2; -- } else if (slave->mode & (SPI_RX_QUAD | SPI_TX_QUAD)) { -- flash->iomode = CE_CTRL_IO_QUAD_DATA; -- flash->spi->read_opcode = SPINOR_OP_READ_1_4_4; -- } else { -- debug("normal read \n"); -+ switch(flash->spi->read_opcode) { -+ case SPINOR_OP_READ_1_1_2: -+ case SPINOR_OP_READ_1_1_2_4B: -+ flash->iomode = CE_CTRL_IO_DUAL_DATA; -+ break; -+ case SPINOR_OP_READ_1_1_4: -+ case SPINOR_OP_READ_1_1_4_4B: -+ flash->iomode = CE_CTRL_IO_QUAD_DATA; -+ break; -+ case SPINOR_OP_READ_1_4_4: -+ case SPINOR_OP_READ_1_4_4_4B: -+ flash->iomode = CE_CTRL_IO_QUAD_ADDR_DATA; -+ break; - } - - if(priv->new_ver) { -@@ -986,6 +993,19 @@ static int aspeed_spi_bind(struct udevice *bus) +@@ -1011,6 +1014,19 @@ static int aspeed_spi_bind(struct udevice *bus) return 0; } @@ -144,7 +91,7 @@ index a8c2b3de2b..ae5edaee9f 100644 static int aspeed_spi_probe(struct udevice *bus) { struct resource res_regs, res_ahb; -@@ -1016,7 +1036,7 @@ static int aspeed_spi_probe(struct udevice *bus) +@@ -1041,7 +1057,7 @@ static int aspeed_spi_probe(struct udevice *bus) clk_free(&hclk); priv->max_hz = dev_read_u32_default(bus, "spi-max-frequency", @@ -154,5 +101,5 @@ index a8c2b3de2b..ae5edaee9f 100644 priv->num_cs = dev_read_u32_default(bus, "num-cs", ASPEED_SPI_MAX_CS); -- -2.17.1 +2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch index 94a658610..e8ffb4e72 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch @@ -1,20 +1,31 @@ -From 3f53513c2b16ce2f9a24975cb23b2b58e70ba0f2 Mon Sep 17 00:00:00 2001 +From ddf356e738ab147775bf49a3a4fae179c0dde9ef Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo Date: Wed, 29 Jan 2020 14:55:44 -0800 -Subject: [PATCH] Override OTP strap settings +Subject: [PATCH] ast2600: Override OTP strap settings This commit adds settings to override OTP strap. +Also, this commit disables SoC debug interface. Signed-off-by: Jae Hyun Yoo --- - arch/arm/mach-aspeed/ast2600/platform.S | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + arch/arm/mach-aspeed/ast2600/platform.S | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S -index 80ba06802acd..e7ae9041093c 100644 +index d107ed80a835..eb3cb2f38cb6 100644 --- a/arch/arm/mach-aspeed/ast2600/platform.S +++ b/arch/arm/mach-aspeed/ast2600/platform.S -@@ -147,6 +147,26 @@ do_primary_core_setup: +@@ -45,7 +45,9 @@ + #define AST_SCU_HPLL_PARAM_EXT (AST_SCU_BASE + 0x204) + #define AST_SCU_MFP_CTRL15 (AST_SCU_BASE + 0x454) + #define AST_SCU_HW_STRAP1 (AST_SCU_BASE + 0x500) ++#define AST_SCU_HW_STRAP1_CLR (AST_SCU_BASE + 0x504) + #define AST_SCU_HW_STRAP2 (AST_SCU_BASE + 0x510) ++#define AST_SCU_HW_STRAP2_CLR (AST_SCU_BASE + 0x514) + #define AST_SCU_CA7_CTRL (AST_SCU_BASE + 0x800) + #define AST_SCU_CA7_AXI_PREFETCH_START (AST_SCU_BASE + 0x808) + #define AST_SCU_CA7_AXI_PREFETCH_END (AST_SCU_BASE + 0x80C) +@@ -146,6 +148,26 @@ do_primary_core_setup: /* unlock system control unit */ scu_unlock @@ -41,6 +52,27 @@ index 80ba06802acd..e7ae9041093c 100644 /* identify AST2600 A0/A1 */ ldr r0, =AST_SCU_REV_ID ldr r0, [r0] +@@ -241,19 +263,17 @@ wait_lock: + ldr r1, =AST_FMC_CE0_CTRL + str r0, [r1] + +-#if 0 + /* 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 + ldr r1, [r0] + orr r1, #0x0A + str r1, [r0] +-#endif + + /* Strongest LADESPID Driving Strngth */ + ldr r0, =AST_SCU_MFP_CTRL15 -- 2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch new file mode 100644 index 000000000..9af713c99 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch @@ -0,0 +1,60 @@ +From 9d2d9b9db7796a49d03ac8b19dfbdefbe840c506 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Wed, 25 Mar 2020 15:04:26 -0700 +Subject: [PATCH] AST2600: Add TPM pulse trigger + +This commit adds TPM pulse trigger into u-boot booting. + +Signed-off-by: Jae Hyun Yoo +--- + board/aspeed/ast2600_intel/intel.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c +index 04fd450d14fc..34b37cc24f91 100644 +--- a/board/aspeed/ast2600_intel/intel.c ++++ b/board/aspeed/ast2600_intel/intel.c +@@ -35,6 +35,31 @@ int gpio_abort(void) + return value <= 0 ? 0 : 1; + } + ++/* use GPIOC2 on intel boards */ ++#define TPM_EN_GPIO "gpio@1e78000018" ++ ++int enable_onboard_tpm(void) ++{ ++ struct gpio_desc desc; ++ int ret; ++ ++ ret = dm_gpio_lookup_name(TPM_EN_GPIO, &desc); ++ if (ret) ++ return ret; ++ ret = dm_gpio_request(&desc, "tpm_en_pulse"); ++ if (ret) ++ return ret; ++ if (dm_gpio_is_valid(&desc)) { ++ dm_gpio_set_value(&desc, 1); ++ mdelay(50); ++ dm_gpio_set_value(&desc, 0); ++ printf("TPM: Pulse triggered\n"); ++ } ++ dm_gpio_free(desc.dev, &desc); ++ ++ return ret; ++} ++ + #define SCU_BASE 0x1E6E2000 + #define SCU_338 0x338 //Generate UART 24 MHz Reference from UXCLK + #define SCU_33C 0x33c //Generate UART 24 MHz Reference from HUXCLK +@@ -234,6 +259,8 @@ int board_early_init_r(void) + + espi_init(); + ++ (void) enable_onboard_tpm(); ++ + return 0; + } + +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch index 5522d5f6c..915b0197f 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch @@ -1,4 +1,4 @@ -From ccfc20ceb2931e84ffb02b01099ccb7610b44d9c Mon Sep 17 00:00:00 2001 +From c2e2496dfd8cde56e32274b11968185a77f40736 Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Tue, 10 Dec 2019 14:58:10 +0800 Subject: [PATCH] AST2600: Enable host searial port clock configuration in @@ -14,18 +14,17 @@ by default is 24Mhz. Signed-off-by: Kuiying Wang --- - board/aspeed/ast2600_intel/intel.c | 36 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) + 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 100eb1e..eb6fbaf 100644 +index a02e246d0d81..eb9b3959625e 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c -@@ -35,9 +35,45 @@ int gpio_abort(void) - return value <= 0 ? 0 : 1; +@@ -36,9 +36,44 @@ int gpio_abort(void) } -+#define SCU_BASE 0x1E6E2000 + #define SCU_BASE 0x1E6E2000 +#define SCU_338 0x338 //Generate UART 24 MHz Reference from UXCLK +#define SCU_33C 0x33c //Generate UART 24 MHz Reference from HUXCLK +#define SCU_338_R_VALUE_192MHZ 0x8e diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch new file mode 100644 index 000000000..1b4201f5e --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch @@ -0,0 +1,36 @@ +From 23e29ce85056f2b296d938e1244b5b2f2160069e Mon Sep 17 00:00:00 2001 +From: Kuiying Wang +Date: Wed, 4 Mar 2020 13:21:12 +0800 +Subject: [PATCH] AST2600: PFR u-boot env changes as per PFR BMC image + +u-boot env changes as per PFR BMC flash layout. + +Signed-off-by: Kuiying Wang +Signed-off-by: Vikram Bodireddy +--- + include/configs/aspeed-common.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h +index 0ece4a1b94..6291e0e7d9 100644 +--- a/include/configs/aspeed-common.h ++++ b/include/configs/aspeed-common.h +@@ -53,13 +53,13 @@ + * Miscellaneous configurable options + */ + #ifndef CONFIG_BOOTCOMMAND +-#define CONFIG_BOOTCOMMAND "bootm 20080000" ++#define CONFIG_BOOTCOMMAND "bootm 20b00000" + #endif + #define CONFIG_SYS_REDUNDAND_ENVIRONMENT + #define CONFIG_ENV_ADDR_REDUND + #define CONFIG_ENV_OVERWRITE + #define AST_FMC_CS0_BASE 0x20000000 /* CS0 */ +-#define CONFIG_ENV_OFFSET 0x2400000 ++#define CONFIG_ENV_OFFSET 0xa0000 + #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + CONFIG_ENV_OFFSET) + #define CONFIG_ENV_SIZE 0x10000 + #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) +-- +2.20.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch new file mode 100644 index 000000000..3833d2a31 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch @@ -0,0 +1,45 @@ +From 51ae3c80f20be3b8e010aa57041fa9c38076cc76 Mon Sep 17 00:00:00 2001 +From: Vikram Bodireddy +Date: Wed, 18 Mar 2020 21:47:11 +0530 +Subject: [PATCH] PFR- Skip counting WDT2 event when EXTRST# is set + +PFR CPLD drives EXTRST# of BMC to reset it during +firmware update and during recovery. On ast2500 the +EXTRST# is also setting WDT2/3 flags which is counted +as boot failures by u-boot and aborts the boot if +boot failures are more than 3. This change will skip +counting WDT2 flag if EXTRST# is also set in SCU3C. + +Tested: Verified BMC updates 4 times and checked that + the boot is not aborted at u-boot. + +Signed-off-by: Vikram Bodireddy +--- + board/aspeed/ast-g5/ast-g5-intel.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c +index 575061ff88..872c7a843a 100644 +--- a/board/aspeed/ast-g5/ast-g5-intel.c ++++ b/board/aspeed/ast-g5/ast-g5-intel.c +@@ -145,6 +145,7 @@ static const GPIOValue gpio_table[] = { + #define HOST_SERIAL_B_HIGH_SPEED (1 << 1) + + #define WATCHDOG_RESET_BIT 0x8 ++#define EXTRST_RESET_BIT 0x2 + #define BOOT_FAILURE_LIMIT 0x3 + + #define BRIGHTON_CITY_BOARD_ID 0 +@@ -572,7 +573,8 @@ void ast_g5_intel_late_init(void) + + boot_failures = get_boot_failures(); + +- if (reset_reason & WATCHDOG_RESET_BIT) ++ if ((reset_reason & WATCHDOG_RESET_BIT) && ++ !(reset_reason & EXTRST_RESET_BIT)) + set_boot_failures(boot_failures + 1); + else + set_boot_failures(0); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg index 8e247744a..99ac5a220 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg @@ -6,6 +6,22 @@ CONFIG_CMD_LED=y CONFIG_TARGET_AST2600_INTEL=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_EARLY_INIT_R=y -CONFIG_DEFAULT_DEVICE_TREE="ast2600-intel" CONFIG_SYS_ARCH_TIMER=y +CONFIG_USE_IRQ=y CONFIG_CMD_IRQ=y +CONFIG_ENV_SIZE=0x10000 +CONFIG_ENV_OFFSET=0x2400000 +CONFIG_BOOTCOMMAND="bootm 20080000" +CONFIG_TARGET_EVB_AST2600A1=n +CONFIG_PHY_NCSI=n +CONFIG_CMD_USB=n +CONFIG_CMD_EXT4=n +CONFIG_CMD_EXT4_WRITE=n +CONFIG_CMD_FAT=n +CONFIG_CMD_FS_GENERIC=n +CONFIG_CMD_MTDPARTS=n +CONFIG_EFI_PARTITION=n +CONFIG_USB=n +CONFIG_DM_USB=n +CONFIG_USB_EHCI_HCD=n +CONFIG_USB_STORAGE=n \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend index 04496acf7..e8f2bb571 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend @@ -6,15 +6,21 @@ FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:" SRC_URI_append_intel-ast2600 = " \ file://fw_env.config \ file://intel.cfg \ - file://0000-AST2600-Add-the-latest-chip-initialization-code.patch \ file://0001-Add-ast2600-intel-as-a-new-board.patch \ file://0021-AST2600-Enable-host-searial-port-clock-configuration.patch \ file://0003-ast2600-intel-layout-environment-addr.patch \ - file://0004-Disable-crashdump-trigger-gpio.patch \ + file://0004-AST2600-Adjust-default-GPIO-settings.patch \ file://0005-Ast2600-Enable-interrupt-in-u-boot.patch \ file://0006-SPI-Quad-IO-Mode.patch \ file://0007-ast2600-Override-OTP-strap-settings.patch \ + file://0008-AST2600-Add-TPM-pulse-trigger.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 ${S}/tools/env/fw_env.config } diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend index 170e84846..f1035476a 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend @@ -45,6 +45,7 @@ PFR_SRC_URI = " \ file://0022-u-boot-env-change-for-PFR-image.patch \ file://0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch \ file://0035-PFR-platform-EXTRST-reset-mask-selection.patch \ + file://0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch \ " AUTOBOOT_SRC_URI = " \ file://0041-Disabling-boot-delay.patch \ diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend index b271f3b38..a69056ecc 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend @@ -6,6 +6,10 @@ SRC_URI_append_intel-ast2600 = " \ 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 diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb index 1f7fbe73b..112e77b6a 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb @@ -13,7 +13,7 @@ DEPENDS = "sdbusplus openssl libpam libgpiod" do_configure[depends] += "virtual/kernel:do_shared_workdir" SRC_URI = "git://github.com/Intel-BMC/asd;protocol=git" -SRCREV = "1.4.2" +SRCREV = "1.4.3" inherit useradd diff --git a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb index 6d2bfa88e..b80282743 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb @@ -10,7 +10,7 @@ inherit cmake EXTRA_OECMAKE = "-DCRASHDUMP_BUILD_UT=ON" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=26bb6d0733830e7bab774914a8f8f20a" +LIC_FILES_CHKSUM = "file://LICENSE;md5=43c09494f6b77f344027eea0a1c22830" SRC_URI = "git://github.com/Intel-BMC/crashdump;protocol=git" SRCREV = "0.5" diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh index 17923b84d..917e7ab09 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh +++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh @@ -66,10 +66,14 @@ pfr_write() { pfr_active_update() { local factory_reset="" + local recovery_offset=0x2a00000 systemctl stop nv-sync.service || \ log "BMC NV sync failed to stop" # transition from non-PFR to PFR image requires factory reset - [ ! -e /usr/share/pfr ] && factory_reset="-r" + if [ ! -e /usr/share/pfr ]; then + factory_reset="-r" + mtd-util pfr stage $LOCAL_PATH $recovery_offset + fi mtd-util $factory_reset pfr write $LOCAL_PATH redfish_log_fw_evt success # only wait for logging if not transitioning from non-PFR to PFR @@ -228,6 +232,13 @@ blk0blk1_update() { } ping_pong_update() { + # if some one tries to update with non-PFR on PFR image + # just exit + if [ -e /usr/share/pfr ]; then + log "Update exited as non-PFR image is tried onto PFR image" + redfish_log_fw_evt abort + return 1 + fi # do a quick sanity check on the image if [ $(stat -c "%s" "$LOCAL_PATH") -lt 10000000 ]; then log "Update file "$LOCAL_PATH" seems to be too small" diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb index f70e81fd2..7e08c9393 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb @@ -7,7 +7,7 @@ SRC_URI = "git://github.com/Intel-BMC/host-error-monitor.git;protocol=ssh" DEPENDS = "boost sdbusplus libgpiod libpeci" PV = "0.1+git${SRCPV}" -SRCREV = "4b56eb0cd42ac87ae8bfd0b725fc274ee3cbbc36" +SRCREV = "77722dd390351ce2b3877af13e1a0698a86386c1" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch index 7bba22ede..05bd4c055 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/0001-Smbus-changes-for-libmctp.patch @@ -1,38 +1,16 @@ -From ab1634441f4dd218486f6bb3b94e90e2110ccc2a Mon Sep 17 00:00:00 2001 +From 1f14ea50ece39c59d23690690dc7c8b1059a35f6 Mon Sep 17 00:00:00 2001 From: Nikhil Potade Date: Tue, 19 Feb 2019 14:16:20 +0800 Subject: [PATCH 1/1] Smbus changes for libmctp Signed-off-by: James Feist --- - CMakeLists.txt | 5 +++-- - core.c | 2 ++ - libmctp.h | 40 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 45 insertions(+), 2 deletions(-) + core.c | 2 ++ + libmctp.h | 40 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 42 insertions(+) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3f05bd..7991b11 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,7 +5,7 @@ add_definitions (-DMCTP_HAVE_FILEIO) - add_definitions (-DMCTP_HAVE_STDIO) - add_definitions (-DMCTP_DEFAULT_ALLOC) - --add_library (libmctp STATIC alloc.c core.c log.c libmctp.h serial.c) -+add_library (libmctp STATIC alloc.c core.c log.c libmctp.h serial.c smbus.c crc32c.c) - - target_include_directories (libmctp PUBLIC - $ -@@ -20,5 +20,6 @@ add_executable (test_seq tests/test_seq.c tests/test-utils.c) - target_link_libraries (test_seq libmctp) - - install (TARGETS libmctp DESTINATION lib) --install (FILES libmctp.h DESTINATION include) -+install (FILES libmctp.h libmctp-smbus.h libmctp-serial.h crc32c.h DESTINATION -+ include) - diff --git a/core.c b/core.c -index f8abbb1..79a681c 100644 +index e7f5689..3732e8a 100644 --- a/core.c +++ b/core.c @@ -17,6 +17,7 @@ diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/CMakeLists.txt b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/CMakeLists.txt new file mode 100644 index 000000000..28354123e --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + +add_definitions(-DMCTP_LOG_STDERR) +add_definitions(-DMCTP_HAVE_FILEIO) +add_definitions(-DMCTP_HAVE_STDIO) +add_definitions(-DMCTP_DEFAULT_ALLOC) + +add_library( + libmctp STATIC alloc.c core.c log.c libmctp.h serial.c smbus.c crc32c.c) + +target_include_directories(libmctp + PUBLIC + $ + $ - - - 1 - - - 0xB6EAFD19 - 4 - - - - 0xF27F28D7 - - - 0xA757A046 - 0xC7B88C74 - -1 - -1 - rk_pub.pem - - - - 0x14711C2F - 0xC7B88C74 - 8 - 1 - csk_pub.pem - 0xDE64437D - sha256 - rk_prv.pem - - - - - 0x15364367 - 0xDE64437D - sha256 - csk_prv.pem - - - - - - 1024 - - 128 - - diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem deleted file mode 100644 index a46fa2a2b..000000000 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN EC PARAMETERS----- -BggqhkjOPQMBBw== ------END EC PARAMETERS----- ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIFjPqxcb6tfFWyFVaQCVjeN9MtcISpYIbNlkQoODrHTUoAoGCCqGSM49 -AwEHoUQDQgAERGJveRnhIp7I5cvmjO74MJLbUJjTfvTDKlzK0hJB0WRBEFScpb9d -xWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ== ------END EC PRIVATE KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem deleted file mode 100644 index cc70d6e28..000000000 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERGJveRnhIp7I5cvmjO74MJLbUJjT -fvTDKlzK0hJB0WRBEFScpb9dxWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ== ------END PUBLIC KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml deleted file mode 100644 index 78c816191..000000000 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - 1 - - - 0xB6EAFD19 - 3 - - - - 0xF27F28D7 - - - 0xA757A046 - 0xC7B88C74 - -1 - -1 - rk_pub.pem - - - - 0x14711C2F - 0xC7B88C74 - 4 - 1 - csk_pub.pem - 0xDE64437D - sha256 - rk_prv.pem - - - - - 0x15364367 - 0xDE64437D - sha256 - csk_prv.pem - - - - - - 1024 - - 128 - - diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py index c2c18247d..438a3b91f 100755 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py @@ -17,7 +17,7 @@ import os, hashlib, struct, json, sys, subprocess, mmap, io, array, binascii, copy, shutil, re from array import array from binascii import unhexlify -from hashlib import sha1, sha256, sha512 +from hashlib import sha1, sha256, sha384, sha512 from shutil import copyfile # Flash Map # ----------------------------------------------- @@ -44,8 +44,7 @@ EXCLUDE_PAGES =[[0x80, 0x9f],[0x2a00,0x7fff]] PFM_OFFSET = 0x80000 PFM_SPI = 0x1 PFM_I2C = 0x2 -SHA256 = 0x1 -SHA256_SIZE = 32 +SHA = 0x1 PFM_DEF_SIZE = 32 # 32 bytes of PFM header PFM_SPI_SIZE_DEF = 16 # 16 bytes of SPI PFM PFM_SPI_SIZE_HASH = 32 # 32 bytes of SPI region HASH @@ -65,7 +64,7 @@ class pfm_spi(object): self.spi_pfm = PFM_SPI self.spi_prot_mask = prot_mask self.spi_hash_pres = hash_pres - if hash_pres == 1: + if hash_pres != 0: self.spi_hash = hash self.spi_pfm_rsvd = 0xffffffff # b'\xff'*4 self.spi_start_addr = start_addr @@ -84,14 +83,20 @@ class pfm_i2c(object): class pfr_bmc_image(object): # json_file, firmware_file - def __init__(self, manifest, firmware_file, build_ver, build_num, build_hash): + def __init__(self, manifest, firmware_file, build_ver, build_num, build_hash, sha): self.manifest = load_manifest(manifest) self.firmware_file = firmware_file self.build_version = build_ver self.build_number = build_num self.build_hash = build_hash - + self.sha = sha + if self.sha == "2": + SHA = 0x2 + PFM_SPI_SIZE_HASH = 48 + if self.sha == "1": + PFM_SPI_SIZE_HASH = 32 + SHA = 0x1 self.pfr_rom_file = 'image-mtd-pfr' open(self.pfr_rom_file, 'a').close() @@ -102,9 +107,10 @@ class pfr_bmc_image(object): for p in self.manifest['image-parts']: # the json should have in the order- filename, index, offset, size and protection byte self.image_parts.append((p['name'], p['index'], p['offset'], p['size'], p['prot_mask'], p['pfm'], p['hash'], p['compress'])) - - self.act_dgst = hashlib.sha256() - + if self.sha == "1": + self.act_dgst = hashlib.sha256() + if self.sha == "2": + self.act_dgst = hashlib.sha384() # SPI regions PFM array self.pfm_spi_regions = [] self.pfm_bytes = PFM_DEF_SIZE # PFM definition bytes (SPI regions + SMBUS) @@ -166,8 +172,10 @@ class pfr_bmc_image(object): skip = False if hash_flag == 1: - hash_dgst = hashlib.sha256() - + if self.sha == "1": + hash_dgst = hashlib.sha256() + if self.sha == "2": + hash_dgst = hashlib.sha384() for chunk in iter(lambda: f.read(self.page_size), b''): chunk_len = len(chunk) if chunk_len != self.page_size: @@ -203,13 +211,13 @@ class pfr_bmc_image(object): if pfm_flag == 1: self.pfm_bytes += PFM_SPI_SIZE_DEF - hash = bytearray(32) + hash = bytearray(PFM_SPI_SIZE_HASH) hash_pres = 0 if hash_flag == 1: # region's hash hash = hash_dgst.hexdigest() - hash_pres = SHA256 + hash_pres = SHA self.pfm_bytes += PFM_SPI_SIZE_HASH # append to SPI regions in PFM @@ -344,7 +352,7 @@ class pfr_bmc_image(object): f.write(struct.pack(' - print('usage: {} '.format(sys.argv[0])) + if len(sys.argv) != 7: #< pfr_image.py manifest.json> + print('usage: {} '.format(sys.argv[0])) return json_file = sys.argv[1] @@ -368,9 +376,10 @@ def main(): build_ver = sys.argv[3] build_num = sys.argv[4] build_hash = sys.argv[5] + sha = sys.argv[6] # function to generate BMC PFM, PBC header and BMC compressed image - pfr_bmc_image(json_file, firmware_file, build_ver, build_num, build_hash) + pfr_bmc_image(json_file, firmware_file, build_ver, build_num, build_hash, sha) if __name__ == '__main__': main() diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json deleted file mode 100644 index b567faa02..000000000 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "image-parts": [{ - "name": "u-boot", - "index": 0, - "offset": "0", - "size": "0x80000", - "prot_mask": 29, - "pfm": 1, - "hash": 1, - "compress": 1 - }, - { - "name": "pfm", - "index": 1, - "offset": "0x80000", - "size": "0x20000", - "prot_mask": 0, - "pfm": 1, - "hash": 0, - "compress": 0 - }, - { - "name": "u-boot-env", - "index": 2, - "offset": "0xa0000", - "size": "0x20000", - "prot_mask": 31, - "pfm": 1, - "hash": 0, - "compress": 1 - }, - { - "name": "sofs", - "index": 3, - "offset": "0xc0000", - "size": "0x200000", - "prot_mask": 31, - "pfm": 1, - "hash": 0, - "compress": 1 - }, - { - "name": "rwfs", - "index": 4, - "offset": "0x2c0000", - "size": "0x840000", - "prot_mask": 31, - "pfm": 1, - "hash": 0, - "compress": 1 - }, - { - "name": "fit-image-a", - "index": 5, - "offset": "0xb00000", - "size": "0x1f00000", - "prot_mask": 29, - "pfm": 1, - "hash": 1, - "compress": 1 - }, - { - "name": "rc-image", - "index": 6, - "offset": "0x2a00000", - "size": "0x2000000", - "prot_mask": 0, - "pfm": 1, - "hash": 0, - "compress": 0 - }, - { - "name": "image-stg", - "index": 7, - "offset": "0x4a00000", - "size": "0x3500000", - "prot_mask": 3, - "pfm": 1, - "hash": 0, - "compress": 0 - }, - { - "name": "cpld-rc", - "index": 8, - "offset": "0x7f00000", - "size": "0x100000", - "prot_mask": 0, - "pfm": 1, - "hash": 0, - "compress": 0 - } - ], - "i2c-rules": [{ - "bus-id": 3, - "rule-id": 3, - "address": "0xD0", - "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F", - "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30", - "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"] - }, - { - "bus-id": 3, - "rule-id": 4, - "address": "0xD8", - "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F", - "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30", - "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"] - }, - { - "bus-id": 1, - "rule-id": 6, - "address": "0xB0", - "cmd-whitelist": ["0x00", "0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F", - "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88", - "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", - "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8", - "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"] - }, - { - "bus-id": 1, - "rule-id": 4, - "address": "0xB2", - "cmd-whitelist": ["0x00", "0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F", - "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88", - "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", - "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8", - "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"] - } - ] -} diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem deleted file mode 100644 index 9e8616795..000000000 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN EC PARAMETERS----- -BggqhkjOPQMBBw== ------END EC PARAMETERS----- ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIHVbq5CmT4Vr4Jb0eJK0+KhUxDOWy1kh9QYAClV5MH1GoAoGCCqGSM49 -AwEHoUQDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E44XiKcqvS6+l2GfSdCLRhXWHw -iV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ== ------END EC PRIVATE KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem deleted file mode 100644 index 117e08bae..000000000 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E4 -4XiKcqvS6+l2GfSdCLRhXWHwiV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ== ------END PUBLIC KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml new file mode 100644 index 000000000..9e7d3f82d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/bmc_config.xml @@ -0,0 +1,48 @@ + + + + 1 + + + 0xB6EAFD19 + 4 + + + + 0xF27F28D7 + + + 0xA757A046 + 0xC7B88C74 + -1 + -1 + rk_pub.pem + + + + 0x14711C2F + 0xC7B88C74 + 8 + 1 + csk_pub.pem + 0xDE64437D + sha256 + rk_prv.pem + + + + + 0x15364367 + 0xDE64437D + sha256 + csk_prv.pem + + + + + + 1024 + + 128 + + diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem new file mode 100644 index 000000000..a46fa2a2b --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_prv.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIFjPqxcb6tfFWyFVaQCVjeN9MtcISpYIbNlkQoODrHTUoAoGCCqGSM49 +AwEHoUQDQgAERGJveRnhIp7I5cvmjO74MJLbUJjTfvTDKlzK0hJB0WRBEFScpb9d +xWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ== +-----END EC PRIVATE KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem new file mode 100644 index 000000000..cc70d6e28 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/csk_pub.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERGJveRnhIp7I5cvmjO74MJLbUJjT +fvTDKlzK0hJB0WRBEFScpb9dxWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ== +-----END PUBLIC KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml new file mode 100644 index 000000000..19378d1b9 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfm_config.xml @@ -0,0 +1,48 @@ + + + + 1 + + + 0xB6EAFD19 + 3 + + + + 0xF27F28D7 + + + 0xA757A046 + 0xC7B88C74 + -1 + -1 + rk_pub.pem + + + + 0x14711C2F + 0xC7B88C74 + 4 + 1 + csk_pub.pem + 0xDE64437D + sha256 + rk_prv.pem + + + + + 0x15364367 + 0xDE64437D + sha256 + csk_prv.pem + + + + + + 1024 + + 128 + + diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json new file mode 100644 index 000000000..c79b7f343 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/pfr_manifest.json @@ -0,0 +1,196 @@ +{ + "image-parts": [{ + "name": "u-boot", + "index": 0, + "offset": "0", + "size": "0x80000", + "prot_mask": 29, + "pfm": 1, + "hash": 1, + "compress": 1 + }, + { + "name": "pfm", + "index": 1, + "offset": "0x80000", + "size": "0x20000", + "prot_mask": 0, + "pfm": 1, + "hash": 0, + "compress": 0 + }, + { + "name": "u-boot-env", + "index": 2, + "offset": "0xa0000", + "size": "0x20000", + "prot_mask": 31, + "pfm": 1, + "hash": 0, + "compress": 1 + }, + { + "name": "sofs", + "index": 3, + "offset": "0xc0000", + "size": "0x200000", + "prot_mask": 31, + "pfm": 1, + "hash": 0, + "compress": 1 + }, + { + "name": "rwfs", + "index": 4, + "offset": "0x2c0000", + "size": "0x840000", + "prot_mask": 31, + "pfm": 1, + "hash": 0, + "compress": 1 + }, + { + "name": "fit-image-a", + "index": 5, + "offset": "0xb00000", + "size": "0x1f00000", + "prot_mask": 29, + "pfm": 1, + "hash": 1, + "compress": 1 + }, + { + "name": "rc-image", + "index": 6, + "offset": "0x2a00000", + "size": "0x2000000", + "prot_mask": 0, + "pfm": 1, + "hash": 0, + "compress": 0 + }, + { + "name": "image-stg", + "index": 7, + "offset": "0x4a00000", + "size": "0x3500000", + "prot_mask": 3, + "pfm": 1, + "hash": 0, + "compress": 0 + }, + { + "name": "cpld-rc", + "index": 8, + "offset": "0x7f00000", + "size": "0x100000", + "prot_mask": 0, + "pfm": 1, + "hash": 0, + "compress": 0 + } + ], + "i2c-rules": [{ + "bus-id": 3, + "rule-id": 3, + "address": "0xD0", + "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F", + "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30", + "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"] + }, + { + "bus-id": 3, + "rule-id": 4, + "address": "0xD8", + "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F", + "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30", + "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"] + }, + { + "bus-id": 1, + "rule-id": 6, + "address": "0xB0", + "cmd-whitelist": ["0x00", "0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F", + "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88", + "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", + "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8", + "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"] + }, + { + "bus-id": 1, + "rule-id": 4, + "address": "0xB2", + "cmd-whitelist": ["0x00", "0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F", + "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88", + "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", + "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8", + "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"] + }, + { + "bus-id": 2, + "rule-id": 1, + "address": "0xB4", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 2, + "address": "0xD4", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 3, + "address": "0x4A", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 4, + "address": "0x4C", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 5, + "address": "0xDC", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 6, + "address": "0xEC", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 7, + "address": "0xE0", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 8, + "address": "0xB0", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 9, + "address": "0xC4", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 10, + "address": "0xCC", + "cmd-whitelist": ["0x00"] + }, + { + "bus-id": 2, + "rule-id": 11, + "address": "0xE4", + "cmd-whitelist": ["0x00"] + } + ] +} diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem new file mode 100644 index 000000000..9e8616795 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_prv.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIHVbq5CmT4Vr4Jb0eJK0+KhUxDOWy1kh9QYAClV5MH1GoAoGCCqGSM49 +AwEHoUQDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E44XiKcqvS6+l2GfSdCLRhXWHw +iV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ== +-----END EC PRIVATE KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem new file mode 100644 index 000000000..117e08bae --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/wht/rk_pub.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E4 +4XiKcqvS6+l2GfSdCLRhXWHwiV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ== +-----END PUBLIC KEY----- diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb index 9965ab11c..9f8100dc2 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb @@ -10,7 +10,7 @@ DEPENDS = "openssl-native libxml2-native " SRC_URI = "git://github.com/Intel-BMC/blocksign;protocol=ssh" -SRCREV = "60d76db038a0d85851098b13451246abb0d876ed" +SRCREV = "852d88a1cbf4dc5856ff88e823a38d2872a86ffe" S = "${WORKDIR}/git/" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb index 910e61142..bb8684ac2 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb @@ -10,27 +10,28 @@ inherit native DEPENDS += " intel-blocksign-native" SRC_URI = " \ - file://pfr_manifest.json \ file://pfr_image.py \ - file://pfm_config.xml \ - file://bmc_config.xml \ - file://csk_prv.pem \ - file://csk_pub.pem \ - file://rk_pub.pem \ - file://rk_prv.pem \ + file://${PRODUCT_GENERATION}/pfr_manifest.json \ + file://${PRODUCT_GENERATION}/pfm_config.xml \ + file://${PRODUCT_GENERATION}/bmc_config.xml \ + file://${PRODUCT_GENERATION}/csk_prv.pem \ + file://${PRODUCT_GENERATION}/csk_pub.pem \ + file://${PRODUCT_GENERATION}/rk_pub.pem \ + file://${PRODUCT_GENERATION}/rk_prv.pem \ " -do_install() { +do_install () { bbplain "Copying intel pfr image generation scripts and image signing keys" - install -d ${D}/${bindir} + install -d ${D}${bindir} install -d ${D}/${datadir}/pfrconfig - install -m 775 ${WORKDIR}/pfr_image.py ${D}${bindir} - install -m 400 ${WORKDIR}/pfr_manifest.json ${D}/${datadir}/pfrconfig - install -m 400 ${WORKDIR}/pfm_config.xml ${D}/${datadir}/pfrconfig - install -m 400 ${WORKDIR}/bmc_config.xml ${D}/${datadir}/pfrconfig - install -m 400 ${WORKDIR}/csk_prv.pem ${D}/${datadir}/pfrconfig - install -m 400 ${WORKDIR}/csk_pub.pem ${D}/${datadir}/pfrconfig - install -m 400 ${WORKDIR}/rk_pub.pem ${D}/${datadir}/pfrconfig - install -m 400 ${WORKDIR}/rk_prv.pem ${D}/${datadir}/pfrconfig + install -m 775 ${WORKDIR}/pfr_image.py ${D}${bindir}/pfr_image.py + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/pfr_manifest.json ${D}/${datadir}/pfrconfig + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/pfm_config.xml ${D}/${datadir}/pfrconfig/pfm_config.xml + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/bmc_config.xml ${D}/${datadir}/pfrconfig/bmc_config.xml + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/csk_prv.pem ${D}/${datadir}/pfrconfig/csk_prv.pem + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/csk_pub.pem ${D}/${datadir}/pfrconfig/csk_pub.pem + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/rk_pub.pem ${D}/${datadir}/pfrconfig/rk_pub.pem + install -m 400 ${WORKDIR}/${PRODUCT_GENERATION}/rk_prv.pem ${D}/${datadir}/pfrconfig/rk_prv.pem } + diff --git a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb new file mode 100644 index 000000000..50c8bd63e --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb @@ -0,0 +1,24 @@ +SUMMARY = "One time automatically enable every NIC" +DESCRIPTION = "Re-enable NIC accidentally disabled by earlier BMC firmware." + +S = "${WORKDIR}" +SRC_URI = "file://enable-nics.sh \ + file://enable-nics.service \ + " + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" +RDEPENDS_${PN} += "bash" + +inherit systemd + +FILES_${PN} += "${systemd_system_unitdir}/enable-nics.service" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/enable-nics.service ${D}${systemd_system_unitdir} + install -d ${D}${bindir} + install -m 0755 ${S}/enable-nics.sh ${D}/${bindir}/enable-nics.sh +} + +SYSTEMD_SERVICE_${PN} += " enable-nics.service" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service new file mode 100644 index 000000000..531b5d86e --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service @@ -0,0 +1,11 @@ +[Unit] +Description=Re-enable NICs mistakenly disabled by earlier BMC firmware +Wants=multi-user.target +After=multi-user.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/enable-nics.sh + +[Install] +WantedBy=network.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh new file mode 100755 index 000000000..ce1473be1 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +SEMAPHORE_FILE=/var/cache/private/nic_fixup_complete + +if [ -a $SEMAPHORE_FILE ]; then + exit 0 +fi + +for nicFile in /etc/systemd/network/*.network +do + sed -i -e"/Unmanaged/d" $nicFile +done + +touch $SEMAPHORE_FILE diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb index 97866ba4e..93a849001 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb @@ -2,7 +2,7 @@ SUMMARY = "SMBIOS MDR version 1 service for Intel based platform" DESCRIPTION = "SMBIOS MDR version 1 service for Intel based platfrom" SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh;nobranch=1" -SRCREV = "6aab8bcc8fd0550753c87265036b1b7c4c8a9f71" +SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" S = "${WORKDIR}/git/services/smbios/" 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 306ef13f5..cd49a6316 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 @@ -1,10 +1,10 @@ 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/Intel-BMC/provingground.git;protocol=ssh" -SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" +SRC_URI = "git://github.com/Intel-BMC/mdrv2.git;protocol=ssh" +SRCREV = "d1fc2546cba818388fbef22f50dce6ef17885ff5" -S = "${WORKDIR}/git/services/smbios-mdrv2/" +S = "${WORKDIR}/git" PV = "1.0+git${SRCPV}" @@ -18,6 +18,7 @@ SYSTEMD_SERVICE_${PN} += "smbios-mdrv2.service" DEPENDS += " \ autoconf-archive-native \ + boost \ systemd \ sdbusplus \ sdbusplus-native \ @@ -25,9 +26,3 @@ DEPENDS += " \ phosphor-dbus-interfaces-native \ phosphor-logging \ " -RDEPENDS_${PN} += " \ - libsystemd \ - sdbusplus \ - phosphor-dbus-interfaces \ - phosphor-logging \ - " diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch index dcc4b887e..885e15e4c 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch @@ -1,11 +1,10 @@ -From a25d8478847866e823aed2ecd1e360d5685410bf Mon Sep 17 00:00:00 2001 +From c8c8503401e8593860b4b78340a50d55a1a780b3 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Tue, 19 Sep 2017 15:55:39 +0800 Subject: [PATCH] arm: dts: add DTS for Intel ast2600 platforms Add the DTS file for Intel ast2600-based systems. -Change-Id: Ib0b5358570a967c255a370bf2503cc2f448039bb Signed-off-by: Vernon Mauery Signed-off-by: Jae Hyun Yoo Signed-off-by: Chen Yugang @@ -13,16 +12,16 @@ Signed-off-by: Kuiying Wang Signed-off-by: arun-pm Signed-off-by: Ayushi Smriti --- - .../arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 502 ++++++++++++++++++ - 1 file changed, 502 insertions(+) + arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 498 +++++++++++++++++++++++++ + 1 file changed, 498 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts new file mode 100644 -index 000000000000..d32b0390cd87 +index 000000000000..c51ed3c57f3e --- /dev/null +++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -@@ -0,0 +1,502 @@ +@@ -0,0 +1,498 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + @@ -320,8 +319,6 @@ index 000000000000..d32b0390cd87 + +&uart1 { + status = "okay"; -+ // Workaround for A0 -+ compatible = "snps,dw-apb-uart"; + pinctrl-0 = <&pinctrl_txd1_default + &pinctrl_rxd1_default + &pinctrl_nrts1_default @@ -334,8 +331,6 @@ index 000000000000..d32b0390cd87 + +&uart2 { + status = "okay"; -+ // Workaround for A0 -+ compatible = "snps,dw-apb-uart"; + pinctrl-0 = <&pinctrl_txd2_default + &pinctrl_rxd2_default + &pinctrl_nrts2_default @@ -348,15 +343,11 @@ index 000000000000..d32b0390cd87 + +&uart3 { + status = "okay"; -+ // Workaround for A0 -+ compatible = "snps,dw-apb-uart"; + pinctrl-0 = <>; +}; + +&uart4 { + status = "okay"; -+ // Workaround for A0 -+ compatible = "snps,dw-apb-uart"; + pinctrl-0 = <>; +}; + @@ -462,7 +453,7 @@ index 000000000000..d32b0390cd87 +}; + +&pwm_tacho { -+ status = "okay"; ++ status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_tach0_default + &pinctrl_pwm1_default &pinctrl_tach1_default @@ -525,6 +516,10 @@ index 000000000000..d32b0390cd87 +&vhub { + status = "okay"; +}; ++ ++&jtag { ++ status = "okay"; ++}; -- -2.17.1 +2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch index 64059b1da..c409dec50 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch @@ -1,4 +1,4 @@ -From 34308f4078361987adfb854bdc6876abdaf323cb Mon Sep 17 00:00:00 2001 +From e6e186acacc16fd95251b2d0fb024993a66ffa0a Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Sat, 24 Feb 2018 11:12:32 +0800 Subject: [PATCH] Add AST2500 eSPI driver @@ -187,10 +187,10 @@ index 000000000000..887a69a7130a +- Interface Base Specification (for Client and Server Platforms) +`_ diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi -index c15be82c3a9d..bd2037e52a94 100644 +index 26d885d2bd8a..7b798c49cb95 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi -@@ -316,6 +316,7 @@ +@@ -336,6 +336,7 @@ clocks = <&syscon ASPEED_CLK_APB>; interrupt-controller; #interrupt-cells = <2>; @@ -198,7 +198,7 @@ index c15be82c3a9d..bd2037e52a94 100644 }; sgpio: sgpio@1e780200 { -@@ -412,6 +413,9 @@ +@@ -432,6 +433,9 @@ reg = <0x1e6ee000 0x100>; interrupts = <23>; status = "disabled"; @@ -209,18 +209,18 @@ index c15be82c3a9d..bd2037e52a94 100644 lpc: lpc@1e789000 { diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi -index 62d101dc6926..753770912f0a 100644 +index 825e64ce317a..315d35c15208 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi -@@ -3,6 +3,7 @@ - +@@ -4,6 +4,7 @@ #include #include + #include +#include / { model = "Aspeed BMC"; -@@ -674,6 +675,19 @@ +@@ -708,6 +709,19 @@ status = "disabled"; }; diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0035-Implement-a-memory-driver-share-memory.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0035-Implement-a-memory-driver-share-memory.patch index 798038a8e..741b44462 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0035-Implement-a-memory-driver-share-memory.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0035-Implement-a-memory-driver-share-memory.patch @@ -1,4 +1,4 @@ -From 5ccf8e3e397edf195aa65e91af6e9ea16ed88882 Mon Sep 17 00:00:00 2001 +From 9be0e8ccde0e096cc494aad6f15e7d7d3de3e46f Mon Sep 17 00:00:00 2001 From: Cheng C Yang Date: Fri, 9 Nov 2018 10:24:37 +0800 Subject: [PATCH] Implement a memory driver share memory @@ -45,12 +45,12 @@ index 000000000000..03f57c53e844 + reg = <0x9ff00000 0x100000>; +}; diff --git a/drivers/soc/aspeed/Kconfig b/drivers/soc/aspeed/Kconfig -index 285c19042c65..59f25d16d6e7 100644 +index cb85917b8c6f..13cd9fbabbf1 100644 --- a/drivers/soc/aspeed/Kconfig +++ b/drivers/soc/aspeed/Kconfig -@@ -51,4 +51,13 @@ config ASPEED_P2A_CTRL - ioctl()s, the driver also provides an interface for userspace mappings to - a pre-defined region. +@@ -59,4 +59,13 @@ config ASPEED_XDMA + SOCs. The XDMA engine can perform automatic PCI DMA operations + between the AST2XXX (acting as a BMC) and a host processor. +config ASPEED_VGA_SHAREDMEM + tristate "Aspeed VGA Shared memory" @@ -63,15 +63,14 @@ index 285c19042c65..59f25d16d6e7 100644 + endmenu diff --git a/drivers/soc/aspeed/Makefile b/drivers/soc/aspeed/Makefile -index 2e547cc47e62..ae4ef10914be 100644 +index 56c5de5eeabe..875f0d9e7866 100644 --- a/drivers/soc/aspeed/Makefile +++ b/drivers/soc/aspeed/Makefile -@@ -5,3 +5,4 @@ obj-$(CONFIG_ASPEED_LPC_MBOX) += aspeed-lpc-mbox.o - obj-$(CONFIG_ASPEED_LPC_SIO) += aspeed-lpc-sio.o +@@ -6,3 +6,4 @@ obj-$(CONFIG_ASPEED_LPC_SIO) += aspeed-lpc-sio.o obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o + obj-$(CONFIG_ASPEED_XDMA) += aspeed-xdma.o +obj-$(CONFIG_ASPEED_VGA_SHAREDMEM) += aspeed-vga-sharedmem.o -\ No newline at end of file diff --git a/drivers/soc/aspeed/aspeed-vga-sharedmem.c b/drivers/soc/aspeed/aspeed-vga-sharedmem.c new file mode 100644 index 000000000000..cd1f5431378c diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch index c3c1eb509..4230c077b 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch @@ -1,4 +1,4 @@ -From fe860284fb5e062b430dc7b882144f69cb605353 Mon Sep 17 00:00:00 2001 +From 1bf4e5a8cd7ca069092bfe7ac3fd3d1879b7a87d Mon Sep 17 00:00:00 2001 From: "Hunt, Bryan" Date: Mon, 6 May 2019 10:02:14 -0700 Subject: [PATCH] Add AST2500 JTAG device @@ -8,7 +8,8 @@ Adding aspeed jtag device Signed-off-by: Hunt, Bryan --- arch/arm/boot/dts/aspeed-g5.dtsi | 9 +++++++++ - 1 file changed, 9 insertions(+) + arch/arm/boot/dts/aspeed-g6.dtsi | 9 +++++++++ + 2 files changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi index 751a8f0316d6..eb1f9c9d9cca 100644 @@ -30,6 +31,26 @@ index 751a8f0316d6..eb1f9c9d9cca 100644 lpc: lpc@1e789000 { compatible = "aspeed,ast2500-lpc", "simple-mfd"; reg = <0x1e789000 0x1000>; +diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi +index bc2ce43827fc..31903b08e731 100644 +--- a/arch/arm/boot/dts/aspeed-g6.dtsi ++++ b/arch/arm/boot/dts/aspeed-g6.dtsi +@@ -333,6 +333,15 @@ + quality = <100>; + }; + ++ jtag: jtag@1e6e4000 { ++ compatible = "aspeed,ast2600-jtag"; ++ reg = <0x1e6e4000 0x40>; ++ clocks = <&syscon ASPEED_CLK_APB1>; ++ resets = <&syscon ASPEED_RESET_JTAG_MASTER>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ + adc: adc@1e6e9000 { + compatible = "aspeed,ast2500-adc"; + reg = <0x1e6e9000 0x100>; -- 2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch index 1ffaf7646..69c993d86 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch @@ -1,4 +1,4 @@ -From 817a43d1b1e197e7eff43492599469bbc23bf0fd Mon Sep 17 00:00:00 2001 +From 3b7175753cafcee67cfc13eefc30438a518ad348 Mon Sep 17 00:00:00 2001 From: "Corona, Ernesto" Date: Mon, 3 Jun 2019 08:22:09 -0800 Subject: [PATCH] Add Aspeed SoC 24xx and 25xx families JTAG @@ -199,12 +199,12 @@ Comments pointed by kbuild test robot --- drivers/jtag/Kconfig | 14 + drivers/jtag/Makefile | 1 + - drivers/jtag/jtag-aspeed.c | 1050 ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 1065 insertions(+) + drivers/jtag/jtag-aspeed.c | 1051 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 1066 insertions(+) create mode 100644 drivers/jtag/jtag-aspeed.c diff --git a/drivers/jtag/Kconfig b/drivers/jtag/Kconfig -index 47771fc..0cc163f 100644 +index 47771fcd3c5b..0cc163f9ad44 100644 --- a/drivers/jtag/Kconfig +++ b/drivers/jtag/Kconfig @@ -15,3 +15,17 @@ menuconfig JTAG @@ -226,7 +226,7 @@ index 47771fc..0cc163f 100644 + To compile this driver as a module, choose M here: the module will + be called jtag-aspeed. diff --git a/drivers/jtag/Makefile b/drivers/jtag/Makefile -index af37493..04a855e 100644 +index af374939a9e6..04a855e2df28 100644 --- a/drivers/jtag/Makefile +++ b/drivers/jtag/Makefile @@ -1 +1,2 @@ @@ -234,10 +234,10 @@ index af37493..04a855e 100644 +obj-$(CONFIG_JTAG_ASPEED) += jtag-aspeed.o diff --git a/drivers/jtag/jtag-aspeed.c b/drivers/jtag/jtag-aspeed.c new file mode 100644 -index 0000000..1d41a66 +index 000000000000..0c9da1b8986c --- /dev/null +++ b/drivers/jtag/jtag-aspeed.c -@@ -0,0 +1,1050 @@ +@@ -0,0 +1,1051 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2018 Mellanox Technologies. All rights reserved. +// Copyright (c) 2018 Oleksandr Shamray @@ -1272,6 +1272,7 @@ index 0000000..1d41a66 +static const struct of_device_id aspeed_jtag_of_match[] = { + { .compatible = "aspeed,ast2400-jtag", }, + { .compatible = "aspeed,ast2500-jtag", }, ++ { .compatible = "aspeed,ast2600-jtag", }, + {} +}; + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0100-Mailbox-Enabling-interrupt-based-mailbox.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0100-Mailbox-Enabling-interrupt-based-mailbox.patch new file mode 100644 index 000000000..e67adb729 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0100-Mailbox-Enabling-interrupt-based-mailbox.patch @@ -0,0 +1,234 @@ +From 7094f4d8efea8e059c965ba70c73d5226af392cb Mon Sep 17 00:00:00 2001 +From: "Arun P. Mohanan" +Date: Wed, 11 Mar 2020 17:23:49 +0530 +Subject: [PATCH] [Mailbox] Enabling interrupt based mailbox + +Modifying the mailbox driver to use FIFO queue while using interrupt. + +Signed-off-by: Arun P. Mohanan +--- + drivers/soc/aspeed/aspeed-lpc-mbox.c | 101 ++++++++++++++++++--------- + 1 file changed, 68 insertions(+), 33 deletions(-) + +diff --git a/drivers/soc/aspeed/aspeed-lpc-mbox.c b/drivers/soc/aspeed/aspeed-lpc-mbox.c +index 795107206022..99f38a4e4550 100644 +--- a/drivers/soc/aspeed/aspeed-lpc-mbox.c ++++ b/drivers/soc/aspeed/aspeed-lpc-mbox.c +@@ -12,10 +12,11 @@ + #include + #include + #include ++#include + + #define DEVICE_NAME "aspeed-mbox" + +-#define MBX_USE_INTERRUPT 0 ++#define MBX_USE_INTERRUPT 1 + + #define ASPEED_MBOX_NUM_REGS 16 + +@@ -29,6 +30,7 @@ + #define ASPEED_MBOX_HOST_CTRL 0x4c + #define ASPEED_MBOX_INTERRUPT_0 0x50 + #define ASPEED_MBOX_INTERRUPT_1 0x54 ++#define MBOX_FIFO_SIZE 64 + + struct aspeed_mbox { + struct miscdevice miscdev; +@@ -38,6 +40,8 @@ struct aspeed_mbox { + int irq; + wait_queue_head_t queue; + struct mutex mutex; ++ struct kfifo fifo; ++ spinlock_t lock; + }; + + static atomic_t aspeed_mbox_open_count = ATOMIC_INIT(0); +@@ -74,20 +78,37 @@ static struct aspeed_mbox *file_mbox(struct file *file) + return container_of(file->private_data, struct aspeed_mbox, miscdev); + } + ++/* Save a byte to a FIFO and discard the oldest byte if FIFO is full */ ++static void put_fifo_with_discard(struct aspeed_mbox *mbox, u8 val) ++{ ++ if (!kfifo_initialized(&mbox->fifo)) ++ return; ++ if (kfifo_is_full(&mbox->fifo)) ++ kfifo_skip(&mbox->fifo); ++ kfifo_put(&mbox->fifo, val); ++} ++ + static int aspeed_mbox_open(struct inode *inode, struct file *file) + { + #if MBX_USE_INTERRUPT + struct aspeed_mbox *mbox = file_mbox(file); ++ int i; + #endif + + if (atomic_inc_return(&aspeed_mbox_open_count) == 1) { + #if MBX_USE_INTERRUPT + /* +- * Clear the interrupt status bit if it was left on and unmask +- * interrupts. +- * ASPEED_MBOX_CTRL_RECV bit is W1C, this also unmasks in 1 step ++ * Reset the FIFO while opening to clear the old cached data ++ * and load the FIFO with latest mailbox register values. + */ +- aspeed_mbox_outb(mbox, ASPEED_MBOX_CTRL_RECV, ASPEED_MBOX_BMC_CTRL); ++ kfifo_reset(&mbox->fifo); ++ spin_lock_irq(&mbox->lock); ++ for (i = 0; i < ASPEED_MBOX_NUM_REGS; i++) { ++ put_fifo_with_discard(mbox, ++ aspeed_mbox_inb(mbox, ASPEED_MBOX_DATA_0 + (i * 4))); ++ } ++ spin_unlock_irq(&mbox->lock); ++ + #endif + return 0; + } +@@ -102,6 +123,8 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, + struct aspeed_mbox *mbox = file_mbox(file); + char __user *p = buf; + ssize_t ret; ++ unsigned int copied; ++ unsigned long flags; + int i; + + if (!access_ok(buf, count)) +@@ -111,15 +134,29 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, + return -EINVAL; + + #if MBX_USE_INTERRUPT +- if (file->f_flags & O_NONBLOCK) { +- if (!(aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & +- ASPEED_MBOX_CTRL_RECV)) ++ /* ++ * Restrict count as per the number of mailbox registers ++ * if interrupt is enabled. ++ */ ++ if (count != ASPEED_MBOX_NUM_REGS) ++ return -EINVAL; ++ ++ if (kfifo_is_empty(&mbox->fifo)) { ++ if (file->f_flags & O_NONBLOCK){ + return -EAGAIN; +- } else if (wait_event_interruptible(mbox->queue, +- aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & +- ASPEED_MBOX_CTRL_RECV)) { +- return -ERESTARTSYS; ++ } ++ ret = wait_event_interruptible(mbox->queue, ++ !kfifo_is_empty(&mbox->fifo)); ++ if (ret == -ERESTARTSYS){ ++ return -EINTR; ++ } + } ++ ++ spin_lock_irqsave(&mbox->lock, flags); ++ ret = kfifo_to_user(&mbox->fifo, buf, count, &copied); ++ spin_unlock_irqrestore(&mbox->lock, flags); ++ return ret ? ret : copied; ++ + #endif + + mutex_lock(&mbox->mutex); +@@ -134,11 +171,6 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, + p++; + count--; + } +- +-#if MBX_USE_INTERRUPT +- /* ASPEED_MBOX_CTRL_RECV bit is write to clear, this also unmasks in 1 step */ +- aspeed_mbox_outb(mbox, ASPEED_MBOX_CTRL_RECV, ASPEED_MBOX_BMC_CTRL); +-#endif + ret = p - buf; + + out_unlock: +@@ -186,16 +218,9 @@ static ssize_t aspeed_mbox_write(struct file *file, const char __user *buf, + static unsigned int aspeed_mbox_poll(struct file *file, poll_table *wait) + { + struct aspeed_mbox *mbox = file_mbox(file); +- unsigned int mask = 0; + + poll_wait(file, &mbox->queue, wait); +- +-#if MBX_USE_INTERRUPT +- if (aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & ASPEED_MBOX_CTRL_RECV) +-#endif +- mask |= POLLIN; +- +- return mask; ++ return !kfifo_is_empty(&mbox->fifo) ? POLLIN : 0; + } + + static int aspeed_mbox_release(struct inode *inode, struct file *file) +@@ -220,19 +245,23 @@ static irqreturn_t aspeed_mbox_irq(int irq, void *arg) + #if MBX_USE_INTERRUPT + int i; + +-// if (!(aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & ASPEED_MBOX_CTRL_RECV)) +-// return IRQ_NONE; +- +- printk(KERN_ERR "BMC_CTRL: 0x%02x\n", ++ dev_dbg(mbox->miscdev.parent, "BMC_CTRL11: 0x%02x\n", + aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL)); +- printk(KERN_ERR "STATUS_0: 0x%02x\n", ++ dev_dbg(mbox->miscdev.parent, "STATUS_0: 0x%02x\n", + aspeed_mbox_inb(mbox, ASPEED_MBOX_STATUS_0)); +- printk(KERN_ERR "STATUS_1: 0x%02x\n", ++ dev_dbg(mbox->miscdev.parent, "STATUS_1: 0x%02x\n", + aspeed_mbox_inb(mbox, ASPEED_MBOX_STATUS_1)); + for (i = 0; i < ASPEED_MBOX_NUM_REGS; i++) { +- printk(KERN_ERR "DATA_%d: 0x%02x\n", i, ++ dev_dbg(mbox->miscdev.parent, "DATA_%d: 0x%02x\n", i, + aspeed_mbox_inb(mbox, ASPEED_MBOX_DATA_0 + (i * 4))); + } ++ ++ spin_lock(&mbox->lock); ++ for (i = 0; i < ASPEED_MBOX_NUM_REGS; i++) { ++ put_fifo_with_discard(mbox, ++ aspeed_mbox_inb(mbox, ASPEED_MBOX_DATA_0 + (i * 4))); ++ } ++ spin_unlock(&mbox->lock); + #endif + + /* Clear interrupt status */ +@@ -249,7 +278,6 @@ static int aspeed_mbox_config_irq(struct aspeed_mbox *mbox, + { + struct device *dev = &pdev->dev; + int rc; +- + mbox->irq = platform_get_irq(pdev, 0); + if (!mbox->irq) + return -ENODEV; +@@ -300,6 +328,7 @@ static int aspeed_mbox_probe(struct platform_device *pdev) + return -ENODEV; + } + ++ spin_lock_init(&mbox->lock); + mutex_init(&mbox->mutex); + init_waitqueue_head(&mbox->queue); + +@@ -316,6 +345,11 @@ static int aspeed_mbox_probe(struct platform_device *pdev) + return rc; + } + ++ /* Create FIFO data structure */ ++ rc = kfifo_alloc(&mbox->fifo, MBOX_FIFO_SIZE, GFP_KERNEL); ++ if (rc) ++ return rc; ++ + mbox->miscdev.minor = MISC_DYNAMIC_MINOR; + mbox->miscdev.name = DEVICE_NAME; + mbox->miscdev.fops = &aspeed_mbox_fops; +@@ -349,6 +383,7 @@ static int aspeed_mbox_remove(struct platform_device *pdev) + + misc_deregister(&mbox->miscdev); + clk_disable_unprepare(mbox->clk); ++ kfifo_free(&mbox->fifo); + + return 0; + } +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0101-Add-poll-fops-in-eSPI-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0101-Add-poll-fops-in-eSPI-driver.patch new file mode 100644 index 000000000..9c9704eff --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0101-Add-poll-fops-in-eSPI-driver.patch @@ -0,0 +1,142 @@ +From 56ea1fc793c97232c12ddc3b4936081fe14c962f Mon Sep 17 00:00:00 2001 +From: "Arun P. Mohanan" +Date: Wed, 18 Mar 2020 08:34:43 +0530 +Subject: [PATCH] Add poll fops in eSPI driver + +Modify eSPI driver to support poll fops. + +Signed-off-by: Arun P. Mohanan +--- + drivers/misc/aspeed-espi-slave.c | 83 +++++++++++++++++++++++--------- + 1 file changed, 59 insertions(+), 24 deletions(-) + +diff --git a/drivers/misc/aspeed-espi-slave.c b/drivers/misc/aspeed-espi-slave.c +index 87bc81948694..f4a0d7528414 100644 +--- a/drivers/misc/aspeed-espi-slave.c ++++ b/drivers/misc/aspeed-espi-slave.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -95,6 +96,7 @@ struct aspeed_espi { + spinlock_t pltrstn_lock; /* for PLTRST_N signal sampling */ + wait_queue_head_t pltrstn_waitq; + char pltrstn; ++ bool pltrstn_in_avail; + }; + + static void aspeed_espi_sys_event(struct aspeed_espi *priv) +@@ -127,7 +129,10 @@ static void aspeed_espi_sys_event(struct aspeed_espi *priv) + dev_dbg(priv->dev, "SYSEVT_OOB_RST_WARN: acked\n"); + } + if (sts & ASPEED_ESPI_SYSEVT_PLTRSTN || priv->pltrstn == 'U') { ++ spin_lock(&priv->pltrstn_lock); + priv->pltrstn = (evt & ASPEED_ESPI_SYSEVT_PLTRSTN) ? '1' : '0'; ++ priv->pltrstn_in_avail = true; ++ spin_unlock(&priv->pltrstn_lock); + wake_up_interruptible(&priv->pltrstn_waitq); + dev_dbg(priv->dev, "SYSEVT_PLTRSTN: %c\n", priv->pltrstn); + } +@@ -284,41 +289,71 @@ static ssize_t aspeed_espi_pltrstn_read(struct file *filp, char __user *buf, + + spin_lock_irqsave(&priv->pltrstn_lock, flags); + +- add_wait_queue(&priv->pltrstn_waitq, &wait); +- set_current_state(TASK_INTERRUPTIBLE); +- +- old_sample = priv->pltrstn; +- +- do { +- char new_sample = priv->pltrstn; +- +- if (filp->f_flags & O_NONBLOCK || old_sample != new_sample) { +- ret = put_user(new_sample, (unsigned long __user *)buf); +- if (!ret) +- ret = sizeof(new_sample); +- } else if (signal_pending(current)) { +- ret = -ERESTARTSYS; ++ if (filp->f_flags & O_NONBLOCK) { ++ if (!priv->pltrstn_in_avail) { ++ ret = -EAGAIN; ++ goto out_unlock; + } +- +- if (!ret) { +- spin_unlock_irqrestore(&priv->pltrstn_lock, flags); +- schedule(); +- spin_lock_irqsave(&priv->pltrstn_lock, flags); ++ char data = priv->pltrstn; ++ ret = put_user(data, (unsigned long __user *)buf); ++ if (!ret){ ++ ret = sizeof(data); ++ } else{ ++ ret = -EAGAIN; + } +- } while (!ret); +- +- remove_wait_queue(&priv->pltrstn_waitq, &wait); +- set_current_state(TASK_RUNNING); +- ++ priv->pltrstn_in_avail = false; ++ } else { ++ add_wait_queue(&priv->pltrstn_waitq, &wait); ++ set_current_state(TASK_INTERRUPTIBLE); ++ ++ old_sample = priv->pltrstn; ++ ++ do { ++ char new_sample = priv->pltrstn; ++ ++ if (old_sample != new_sample) { ++ ret = put_user(new_sample, ++ (unsigned long __user *)buf); ++ if (!ret) ++ ret = sizeof(new_sample); ++ } else if (signal_pending(current)) { ++ ret = -ERESTARTSYS; ++ } ++ ++ if (!ret) { ++ spin_unlock_irqrestore(&priv->pltrstn_lock, ++ flags); ++ schedule(); ++ spin_lock_irqsave(&priv->pltrstn_lock, flags); ++ } ++ } while (!ret); ++ ++ remove_wait_queue(&priv->pltrstn_waitq, &wait); ++ set_current_state(TASK_RUNNING); ++ } ++out_unlock: + spin_unlock_irqrestore(&priv->pltrstn_lock, flags); + + return ret; + } + ++static unsigned int aspeed_espi_pltrstn_poll(struct file *file, ++ poll_table *wait) ++{ ++ struct aspeed_espi *priv = to_aspeed_espi(file); ++ unsigned int mask = 0; ++ poll_wait(file, &priv->pltrstn_waitq, wait); ++ ++ if (priv->pltrstn_in_avail) ++ mask |= POLLIN; ++ return mask; ++} ++ + static const struct file_operations aspeed_espi_pltrstn_fops = { + .owner = THIS_MODULE, + .open = aspeed_espi_pltrstn_open, + .read = aspeed_espi_pltrstn_read, ++ .poll = aspeed_espi_pltrstn_poll, + }; + + static const struct regmap_config aspeed_espi_regmap_cfg = { +-- +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 57df89699..a829e544b 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 @@ -70,6 +70,8 @@ SRC_URI += " \ file://0094-Return-link-speed-and-duplex-settings-for-the-NCSI-c.patch \ file://0095-pwm-and-tach-driver-changes-for-ast2600.patch \ file://0096-Fix-truncated-WrEndPointConfig-MMIO-command.patch \ + file://0100-Mailbox-Enabling-interrupt-based-mailbox.patch \ + file://0101-Add-poll-fops-in-eSPI-driver.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 53f381af8..ac7d7f8a7 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 @@ -18,7 +18,7 @@ Change-Id: I3b592a19363eef684e31d5f7c34dad8f2f9211df Signed-off-by: AppaRao Puli Signed-off-by: Yong Li --- - ethernet_interface.cpp | 116 +++++++++++++++++++++++++++++++++++++++++ + ethernet_interface.cpp | 122 +++++++++++++++++++++++++++++++++++++++++ ethernet_interface.hpp | 39 +++++++++++++- network_manager.cpp | 104 ++++++++++++++++++++++++++++++++++++ network_manager.hpp | 9 ++++ @@ -46,7 +46,7 @@ index 2375482..c3edd4b 100644 // Emit deferred signal. if (emitSignal) -@@ -823,5 +827,117 @@ void EthernetInterface::deleteAll() +@@ -823,5 +827,123 @@ void EthernetInterface::deleteAll() manager.writeToConfigurationFile(); } @@ -133,6 +133,12 @@ index 2375482..c3edd4b 100644 +{ + std::string intfName = interfaceName(); + ++ if (manager.supportedPrivList.empty()) ++ { ++ // Populate the supported privilege list ++ manager.initSupportedPrivilges(); ++ } ++ + if (!priv.empty() && (std::find(manager.supportedPrivList.begin(), + manager.supportedPrivList.end(), + priv) == manager.supportedPrivList.end())) @@ -377,26 +383,26 @@ diff --git a/network_manager.hpp b/network_manager.hpp index edb341f..e16b205 100644 --- a/network_manager.hpp +++ b/network_manager.hpp -@@ -137,6 +137,9 @@ class Manager : public details::VLANCreateIface +@@ -137,6 +137,12 @@ class Manager : public details::VLANCreateIface return (interfaces.find(intf) != interfaces.end()); } + /** supported privilege list **/ + std::vector supportedPrivList; ++ ++ /** @brief initializes the supportedPrivilege List */ ++ void initSupportedPrivilges(); + protected: /** @brief Persistent sdbusplus DBus bus connection. */ sdbusplus::bus::bus& bus; -@@ -159,6 +162,12 @@ class Manager : public details::VLANCreateIface +@@ -159,6 +162,9 @@ class Manager : public details::VLANCreateIface /** @brief Network Configuration directory. */ fs::path confDir; + + /** Get the user management service name dynamically **/ + std::string getUserServiceName(); -+ -+ /** @brief initializes the supportedPrivilege List */ -+ void initSupportedPrivilges(); }; } // namespace network diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0008-Added-enable-disable-control-of-the-Network-Interfac.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0008-Added-enable-disable-control-of-the-Network-Interfac.patch deleted file mode 100644 index e1972e815..000000000 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0008-Added-enable-disable-control-of-the-Network-Interfac.patch +++ /dev/null @@ -1,191 +0,0 @@ -From 0e415f23b7a97e9a0f0fa616b6bcccec6035bbed Mon Sep 17 00:00:00 2001 -From: Johnathan Mantey -Date: Tue, 29 Oct 2019 16:20:28 -0700 -Subject: [PATCH] Added enable/disable control of the Network Interface Card - -Implemented enable/disable function to perform -"ip link set eth(x) up" -"ip link set eth(x) down" -functionality from DBus. - -Tested: - -Confirmed Redfish PATCH commands on the InterfaceEnabled property -changes the NIC state. Confirmed the NIC is DOWN/UP using "ip link". -Confirmed "ip link" state changes can be obsserved from dbus-send -commands, and from Redfish GET actions. - -Confirmed the link is inactive after a reboot. - -Confirmed link stays down despite assigning an IP manually. - -Confirmed link stays down despite enabling DHCP. - -Change-Id: I4152b53055e6546f7a6ca81b5a5eef6f689bcc66 -Signed-off-by: Johnathan Mantey ---- - ethernet_interface.cpp | 70 ++++++++++++++++++++++++++++++++++++++++-- - ethernet_interface.hpp | 7 ++++- - 2 files changed, 74 insertions(+), 3 deletions(-) - -diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp -index ba6195e..671e8c4 100644 ---- a/ethernet_interface.cpp -+++ b/ethernet_interface.cpp -@@ -60,6 +60,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, - #if NIC_SUPPORTS_ETHTOOL - InterfaceInfo ifInfo = EthernetInterface::getInterfaceInfo(); - -+ EthernetInterfaceIntf::nICEnabled(std::get<3>(ifInfo)); - EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo)); - EthernetInterfaceIntf::speed(std::get<0>(ifInfo)); - #endif -@@ -300,6 +301,7 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const - LinkSpeed speed{0}; - Autoneg autoneg{0}; - DuplexMode duplex{0}; -+ NICEnabled nicEnabled{false}; - do - { - sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); -@@ -324,13 +326,21 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const - speed = edata.speed; - duplex = edata.duplex; - autoneg = edata.autoneg; -+ -+ if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) -+ { -+ log("ioctl failed for SIOCGIFFLAGS:", -+ entry("ERROR=%s", strerror(errno))); -+ break; -+ } -+ nicEnabled = static_cast(ifr.ifr_flags & IFF_UP); - } while (0); - -- if (sock) -+ if (sock >= 0) - { - close(sock); - } -- return std::make_tuple(speed, duplex, autoneg); -+ return std::make_tuple(speed, duplex, autoneg, nicEnabled); - } - #endif - -@@ -355,9 +365,11 @@ std::string - { - log("ioctl failed for SIOCGIFHWADDR:", - entry("ERROR=%s", strerror(errno))); -+ close(sock); - elog(); - } - -+ close(sock); - static_assert(sizeof(ifr.ifr_hwaddr.sa_data) >= sizeof(ether_addr)); - std::string_view hwaddr(reinterpret_cast(ifr.ifr_hwaddr.sa_data), - sizeof(ifr.ifr_hwaddr.sa_data)); -@@ -514,6 +526,55 @@ EthernetInterface::DHCPConf EthernetInterface::dHCPEnabled(DHCPConf value) - return value; - } - -+bool EthernetInterface::nICEnabled(bool value) -+{ -+ if (value == EthernetInterfaceIntf::nICEnabled()) -+ { -+ return value; -+ } -+ -+ int sock{-1}; -+ ifreq ifr{0}; -+ EthernetInterfaceIntf::nICEnabled(value); -+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); -+ if (sock < 0) -+ { -+ log("socket creation failed:", -+ entry("ERROR=%s", strerror(errno))); -+ return value; -+ } -+ -+ do -+ { -+ std::strncpy(ifr.ifr_name, interfaceName().c_str(), IF_NAMESIZE); -+ if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) -+ { -+ log("ioctl failed for SIOCGIFFLAGS:", -+ entry("ERROR=%s", strerror(errno))); -+ break; -+ } -+ -+ ifr.ifr_flags &= ~IFF_UP; -+ if (value) -+ { -+ ifr.ifr_flags |= IFF_UP; -+ } -+ -+ if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) -+ { -+ log("ioctl failed for SIOCSIFFLAGS:", -+ entry("ERROR=%s", strerror(errno))); -+ break; -+ } -+ } while (0); -+ -+ close(sock); -+ writeConfigurationFile(); -+ manager.restartSystemdUnit(networkdService); -+ -+ return value; -+} -+ - ServerList EthernetInterface::nameservers(ServerList value) - { - for (const auto& nameserverip : value) -@@ -704,6 +765,11 @@ void EthernetInterface::writeConfigurationFile() - stream << "MACAddress=" << mac << "\n"; - } - -+ if (!nICEnabled()) -+ { -+ stream << "Unmanaged=yes\n"; -+ } -+ - // write the network section - stream << "[Network]\n"; - #ifdef LINK_LOCAL_AUTOCONFIGURATION -diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp -index a962751..3dee311 100644 ---- a/ethernet_interface.hpp -+++ b/ethernet_interface.hpp -@@ -59,9 +59,10 @@ class Neighbor; - using LinkSpeed = uint16_t; - using DuplexMode = uint8_t; - using Autoneg = uint8_t; -+using NICEnabled = bool; - using VlanId = uint32_t; - using InterfaceName = std::string; --using InterfaceInfo = std::tuple; -+using InterfaceInfo = std::tuple; - using AddressMap = std::map>; - using NeighborMap = std::map>; - using VlanInterfaceMap = -@@ -186,6 +187,9 @@ class EthernetInterface : public Ifaces - */ - void disableDHCP(IP::Protocol protocol); - -+ /** Set value of NICEnabled */ -+ bool nICEnabled(bool value) override; -+ - /** @brief sets the MAC address. - * @param[in] value - MAC address which needs to be set on the system. - * @returns macAddress of the interface or throws an error. -@@ -241,6 +245,7 @@ class EthernetInterface : public Ifaces - using ChannelAccessIntf::maxPrivilege; - using EthernetInterfaceIntf::dHCPEnabled; - using EthernetInterfaceIntf::interfaceName; -+ using EthernetInterfaceIntf::nICEnabled; - using MacAddressIntf::mACAddress; - - /** @brief Absolute path of the resolv conf file */ --- -2.24.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0010-Enable-the-network-link-carrier-state-to-be-reported.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0010-Enable-the-network-link-carrier-state-to-be-reported.patch index 51957ffff..eb4efab8f 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0010-Enable-the-network-link-carrier-state-to-be-reported.patch +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0010-Enable-the-network-link-carrier-state-to-be-reported.patch @@ -1,4 +1,4 @@ -From 8f6f3ccb1f5a4af8065485c2e683402ec2b38abf Mon Sep 17 00:00:00 2001 +From 7e99cfbb5cdbf47cd0350d869be236c88f982fd3 Mon Sep 17 00:00:00 2001 From: Johnathan Mantey Date: Wed, 8 Jan 2020 10:38:58 -0800 Subject: [PATCH] Enable the network link carrier state to be reported. @@ -24,12 +24,12 @@ Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = Linkup Change-Id: I5530cf7882cfbfdba1436dd34b3219c735047c5e Signed-off-by: Johnathan Mantey --- - ethernet_interface.cpp | 141 +++++++++++++++++++++++++---------------- - ethernet_interface.hpp | 8 ++- - 2 files changed, 92 insertions(+), 57 deletions(-) + ethernet_interface.cpp | 104 ++++++++++++++++++++++++++++------------- + ethernet_interface.hpp | 7 ++- + 2 files changed, 77 insertions(+), 34 deletions(-) diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp -index 671e8c4..018f2e1 100644 +index ba6195e..8b8f698 100644 --- a/ethernet_interface.cpp +++ b/ethernet_interface.cpp @@ -42,6 +42,28 @@ static constexpr const char* defaultChannelPriv = "priv-admin"; @@ -49,7 +49,7 @@ index 671e8c4..018f2e1 100644 + + ~EthernetIntfSocket() + { -+ if (sock > 0) ++ if (sock >= 0) + { + close(sock); + } @@ -61,42 +61,24 @@ index 671e8c4..018f2e1 100644 EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, const std::string& objPath, DHCPConf dhcpEnabled, Manager& parent, -@@ -57,12 +79,12 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, - MacAddressIntf::mACAddress(getMACAddress(intfName)); - EthernetInterfaceIntf::nTPServers(getNTPServersFromConf()); - EthernetInterfaceIntf::nameservers(getNameServerFromConf()); --#if NIC_SUPPORTS_ETHTOOL - InterfaceInfo ifInfo = EthernetInterface::getInterfaceInfo(); -- -- EthernetInterfaceIntf::nICEnabled(std::get<3>(ifInfo)); -+#if NIC_SUPPORTS_ETHTOOL +@@ -62,6 +84,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, + EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo)); EthernetInterfaceIntf::speed(std::get<0>(ifInfo)); -+ EthernetInterfaceIntf::nICEnabled(std::get<3>(ifInfo)); -+ EthernetInterfaceIntf::linkUp(std::get<4>(ifInfo)); ++ EthernetInterfaceIntf::linkUp(std::get<3>(ifInfo)); #endif getChannelPrivilege(intfName); -@@ -286,63 +308,47 @@ ObjectPath EthernetInterface::neighbor(std::string iPAddress, - return objectPath; - } - --#if NIC_SUPPORTS_ETHTOOL --/* -- Enable this code if your NIC driver supports the ETHTOOL features. -- Do this by adding the following to your phosphor-network*.bbappend file. -- EXTRA_OECONF_append = " --enable-nic-ethtool=yes" -- The default compile mode is to omit getInterfaceInfo() --*/ +@@ -294,43 +317,33 @@ ObjectPath EthernetInterface::neighbor(std::string iPAddress, + */ InterfaceInfo EthernetInterface::getInterfaceInfo() const { - int sock{-1}; -- ifreq ifr{0}; -- ethtool_cmd edata{0}; + ifreq ifr{0}; + ethtool_cmd edata{0}; LinkSpeed speed{0}; Autoneg autoneg{0}; DuplexMode duplex{0}; - NICEnabled nicEnabled{false}; - do - { - sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); @@ -107,67 +89,46 @@ index 671e8c4..018f2e1 100644 - break; - } + LinkUp linkState{false}; ++ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); - strcpy(ifr.ifr_name, interfaceName().c_str()); - ifr.ifr_data = reinterpret_cast(&edata); -+#if NIC_SUPPORTS_ETHTOOL -+ /* -+ Enable this code if your NIC driver supports the ETHTOOL features. -+ Do this by adding the following to your phosphor-network*.bbappend -+ file. EXTRA_OECONF_append = " --enable-nic-ethtool=yes" The -+ default compile mode is to omit getInterfaceInfo() -+ */ -+ ifreq ifr{0}; -+ ethtool_cmd edata{0}; -+ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); - -- edata.cmd = ETHTOOL_GSET; + if (eifSocket.sock < 0) + { -+ return std::make_tuple(speed, duplex, autoneg, nicEnabled, linkState); ++ return std::make_tuple(speed, duplex, autoneg, linkState); + } +- edata.cmd = ETHTOOL_GSET; ++ std::strncpy(ifr.ifr_name, interfaceName().c_str(), IFNAMSIZ - 1); ++ ifr.ifr_data = reinterpret_cast(&edata); + - if (ioctl(sock, SIOCETHTOOL, &ifr) < 0) - { - log("ioctl failed for SIOCETHTOOL:", - entry("ERROR=%s", strerror(errno))); - break; - } -+ std::strncpy(ifr.ifr_name, interfaceName().c_str(), IFNAMSIZ - 1); -+ ifr.ifr_data = reinterpret_cast(&edata); -+ + edata.cmd = ETHTOOL_GSET; + if (ioctl(eifSocket.sock, SIOCETHTOOL, &ifr) >= 0) + { speed = edata.speed; duplex = edata.duplex; autoneg = edata.autoneg; -+ } -+#endif - -- if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) -- { -- log("ioctl failed for SIOCGIFFLAGS:", -- entry("ERROR=%s", strerror(errno))); -- break; -- } -- nicEnabled = static_cast(ifr.ifr_flags & IFF_UP); - } while (0); -+ nicEnabled = nICEnabled(); -+ linkState = linkUp(); - -- if (sock >= 0) +- +- if (sock) - { - close(sock); -- } -- return std::make_tuple(speed, duplex, autoneg, nicEnabled); -+ return std::make_tuple(speed, duplex, autoneg, nicEnabled, linkState); + } +- return std::make_tuple(speed, duplex, autoneg); ++ ++ linkState = linkUp(); ++ ++ return std::make_tuple(speed, duplex, autoneg, linkState); } --#endif + #endif - /** @brief get the mac address of the interface. - * @return macaddress on success -@@ -351,25 +357,23 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const +@@ -341,17 +354,17 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const std::string EthernetInterface::getMACAddress(const std::string& interfaceName) const { @@ -193,24 +154,7 @@ index 671e8c4..018f2e1 100644 { log("ioctl failed for SIOCGIFHWADDR:", entry("ERROR=%s", strerror(errno))); -- close(sock); - elog(); - } - -- close(sock); - static_assert(sizeof(ifr.ifr_hwaddr.sa_data) >= sizeof(ether_addr)); - std::string_view hwaddr(reinterpret_cast(ifr.ifr_hwaddr.sa_data), - sizeof(ifr.ifr_hwaddr.sa_data)); -@@ -546,7 +550,7 @@ bool EthernetInterface::nICEnabled(bool value) - - do - { -- std::strncpy(ifr.ifr_name, interfaceName().c_str(), IF_NAMESIZE); -+ std::strncpy(ifr.ifr_name, interfaceName().c_str(), IF_NAMESIZE - 1); - if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) - { - log("ioctl failed for SIOCGIFFLAGS:", -@@ -575,6 +579,31 @@ bool EthernetInterface::nICEnabled(bool value) +@@ -514,6 +527,31 @@ EthernetInterface::DHCPConf EthernetInterface::dHCPEnabled(DHCPConf value) return value; } @@ -243,25 +187,24 @@ index 671e8c4..018f2e1 100644 { for (const auto& nameserverip : value) diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp -index 3dee311..83d7cb5 100644 +index a962751..4e36ae8 100644 --- a/ethernet_interface.hpp +++ b/ethernet_interface.hpp -@@ -60,9 +60,11 @@ using LinkSpeed = uint16_t; +@@ -59,9 +59,10 @@ class Neighbor; + using LinkSpeed = uint16_t; using DuplexMode = uint8_t; using Autoneg = uint8_t; - using NICEnabled = bool; +using LinkUp = bool; using VlanId = uint32_t; using InterfaceName = std::string; --using InterfaceInfo = std::tuple; -+using InterfaceInfo = -+ std::tuple; +-using InterfaceInfo = std::tuple; ++using InterfaceInfo = std::tuple; using AddressMap = std::map>; using NeighborMap = std::map>; using VlanInterfaceMap = -@@ -190,6 +192,9 @@ class EthernetInterface : public Ifaces - /** Set value of NICEnabled */ - bool nICEnabled(bool value) override; +@@ -186,6 +187,9 @@ class EthernetInterface : public Ifaces + */ + void disableDHCP(IP::Protocol protocol); + /** Retrieve Link State */ + bool linkUp() const override; @@ -269,14 +212,14 @@ index 3dee311..83d7cb5 100644 /** @brief sets the MAC address. * @param[in] value - MAC address which needs to be set on the system. * @returns macAddress of the interface or throws an error. -@@ -245,6 +250,7 @@ class EthernetInterface : public Ifaces +@@ -241,6 +245,7 @@ class EthernetInterface : public Ifaces using ChannelAccessIntf::maxPrivilege; using EthernetInterfaceIntf::dHCPEnabled; using EthernetInterfaceIntf::interfaceName; + using EthernetInterfaceIntf::linkUp; - using EthernetInterfaceIntf::nICEnabled; using MacAddressIntf::mACAddress; + /** @brief Absolute path of the resolv conf file */ -- 2.24.1 diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0011-Added-enable-disable-control-of-the-Network-Interfac.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0011-Added-enable-disable-control-of-the-Network-Interfac.patch new file mode 100644 index 000000000..58dcf3f21 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0011-Added-enable-disable-control-of-the-Network-Interfac.patch @@ -0,0 +1,189 @@ +From 4bfb4ad5ff795d78e06fbeaf1664df6819880f50 Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey +Date: Tue, 29 Oct 2019 16:20:28 -0700 +Subject: [PATCH] Added enable/disable control of the Network Interface Card + +Implemented enable/disable function to perform +"ip link set eth(x) up" +"ip link set eth(x) down" +functionality from DBus. + +Tested: + +Confirmed Redfish PATCH commands on the InterfaceEnabled property +changes the NIC state. Confirmed the NIC is DOWN/UP using "ip link". +Confirmed "ip link" state changes can be obsserved from dbus-send +commands, and from Redfish GET actions. + +Confirmed the link is inactive after a reboot. + +Confirmed link stays down despite assigning an IP manually. + +Confirmed link stays down despite enabling DHCP. + +Change-Id: I4152b53055e6546f7a6ca81b5a5eef6f689bcc66 +Signed-off-by: Johnathan Mantey +--- + ethernet_interface.cpp | 73 ++++++++++++++++++++++++++++++++++++++++-- + ethernet_interface.hpp | 11 ++++++- + 2 files changed, 81 insertions(+), 3 deletions(-) + +diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp +index 8b8f698..a2754a4 100644 +--- a/ethernet_interface.cpp ++++ b/ethernet_interface.cpp +@@ -85,6 +85,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, + EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo)); + EthernetInterfaceIntf::speed(std::get<0>(ifInfo)); + EthernetInterfaceIntf::linkUp(std::get<3>(ifInfo)); ++ EthernetInterfaceIntf::nICEnabled(std::get<4>(ifInfo)); + #endif + getChannelPrivilege(intfName); + +@@ -323,11 +324,12 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const + Autoneg autoneg{0}; + DuplexMode duplex{0}; + LinkUp linkState{false}; ++ NICEnabled nicEnabled{false}; + EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); + + if (eifSocket.sock < 0) + { +- return std::make_tuple(speed, duplex, autoneg, linkState); ++ return std::make_tuple(speed, duplex, autoneg, linkState, nicEnabled); + } + + std::strncpy(ifr.ifr_name, interfaceName().c_str(), IFNAMSIZ - 1); +@@ -341,9 +343,10 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const + autoneg = edata.autoneg; + } + ++ nicEnabled = nICEnabled(); + linkState = linkUp(); + +- return std::make_tuple(speed, duplex, autoneg, linkState); ++ return std::make_tuple(speed, duplex, autoneg, linkState, nicEnabled); + } + #endif + +@@ -548,6 +551,67 @@ bool EthernetInterface::linkUp() const + log("ioctl failed for SIOCGIFFLAGS:", + entry("ERROR=%s", strerror(errno))); + } ++ return value; ++} ++ ++bool EthernetInterface::nICEnabled() const ++{ ++ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); ++ bool value = EthernetInterfaceIntf::nICEnabled(); ++ ++ if (eifSocket.sock < 0) ++ { ++ return value; ++ } ++ ++ ifreq ifr{0}; ++ std::strncpy(ifr.ifr_name, interfaceName().c_str(), IF_NAMESIZE - 1); ++ if (ioctl(eifSocket.sock, SIOCGIFFLAGS, &ifr) == 0) ++ { ++ value = static_cast(ifr.ifr_flags & IFF_UP); ++ } ++ else ++ { ++ log("ioctl failed for SIOCGIFFLAGS:", ++ entry("ERROR=%s", strerror(errno))); ++ } ++ return value; ++} ++ ++bool EthernetInterface::nICEnabled(bool value) ++{ ++ if (value == EthernetInterfaceIntf::nICEnabled()) ++ { ++ return value; ++ } ++ ++ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); ++ if (eifSocket.sock < 0) ++ { ++ return EthernetInterfaceIntf::nICEnabled(); ++ } ++ ++ ifreq ifr{0}; ++ std::strncpy(ifr.ifr_name, interfaceName().c_str(), IF_NAMESIZE - 1); ++ if (ioctl(eifSocket.sock, SIOCGIFFLAGS, &ifr) != 0) ++ { ++ log("ioctl failed for SIOCGIFFLAGS:", ++ entry("ERROR=%s", strerror(errno))); ++ return EthernetInterfaceIntf::nICEnabled(); ++ } ++ ++ ifr.ifr_flags &= ~IFF_UP; ++ ifr.ifr_flags |= value ? IFF_UP : 0; ++ ++ if (ioctl(eifSocket.sock, SIOCSIFFLAGS, &ifr) != 0) ++ { ++ log("ioctl failed for SIOCSIFFLAGS:", ++ entry("ERROR=%s", strerror(errno))); ++ return EthernetInterfaceIntf::nICEnabled(); ++ } ++ EthernetInterfaceIntf::nICEnabled(value); ++ writeConfigurationFile(); ++ manager.restartSystemdUnit(networkdService); + + return value; + } +@@ -742,6 +806,11 @@ void EthernetInterface::writeConfigurationFile() + stream << "MACAddress=" << mac << "\n"; + } + ++ if (!nICEnabled()) ++ { ++ stream << "Unmanaged=yes\n"; ++ } ++ + // write the network section + stream << "[Network]\n"; + #ifdef LINK_LOCAL_AUTOCONFIGURATION +diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp +index 4e36ae8..104750e 100644 +--- a/ethernet_interface.hpp ++++ b/ethernet_interface.hpp +@@ -60,9 +60,11 @@ using LinkSpeed = uint16_t; + using DuplexMode = uint8_t; + using Autoneg = uint8_t; + using LinkUp = bool; ++using NICEnabled = bool; + using VlanId = uint32_t; + using InterfaceName = std::string; +-using InterfaceInfo = std::tuple; ++using InterfaceInfo = ++ std::tuple; + using AddressMap = std::map>; + using NeighborMap = std::map>; + using VlanInterfaceMap = +@@ -190,6 +192,12 @@ class EthernetInterface : public Ifaces + /** Retrieve Link State */ + bool linkUp() const override; + ++ /** Retrieve NIC State */ ++ bool nICEnabled() const override; ++ ++ /** Set value of NICEnabled */ ++ bool nICEnabled(bool value) override; ++ + /** @brief sets the MAC address. + * @param[in] value - MAC address which needs to be set on the system. + * @returns macAddress of the interface or throws an error. +@@ -246,6 +254,7 @@ class EthernetInterface : public Ifaces + using EthernetInterfaceIntf::dHCPEnabled; + using EthernetInterfaceIntf::interfaceName; + using EthernetInterfaceIntf::linkUp; ++ using EthernetInterfaceIntf::nICEnabled; + using MacAddressIntf::mACAddress; + + /** @brief Absolute path of the resolv conf file */ +-- +2.24.1 + 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 5279b2e52..e1480ec1b 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 @@ -2,12 +2,13 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" DEPENDS += "nlohmann-json boost" -SRC_URI += "git://github.com/openbmc/phosphor-networkd" +#todo: Appu, fix nobranch +SRC_URI = "git://github.com/openbmc/phosphor-networkd;nobranch=1" SRC_URI += "file://0003-Adding-channel-specific-privilege-to-network.patch \ file://0005-Enable-conditional-use-of-ETHTOOL-features-in-the-NI.patch \ - file://0008-Added-enable-disable-control-of-the-Network-Interfac.patch \ file://0009-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch \ file://0010-Enable-the-network-link-carrier-state-to-be-reported.patch \ + file://0011-Added-enable-disable-control-of-the-Network-Interfac.patch \ " SRCREV = "dbd328d7e037b1af13fb0f20f3708e2261b9e0b6" 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 9a25eafa9..4e56cb963 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,8 +1,8 @@ # this is here just to bump faster than upstream SRC_URI = "git://github.com/openbmc/entity-manager.git" -SRCREV = "41622a95da34e3aacbf2b70d687d3a3a7c816c8a" +SRCREV = "29d83258f1268b3c41f97649518fa9bb1ffe83ed" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -EXTRA_OECMAKE = "-DYOCTO=1 -DUSE_OVERLAYS=0" +EXTRA_OECMAKE = "-DYOCTO=1" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend index 9690ec20f..580fd9038 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend @@ -1,5 +1,5 @@ SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git" -SRCREV = "79064a8e0c49b35cfa1c343cef31f21ebfd7298d" +SRCREV = "8aec946e2844831cfc377c0e0136de5714c08a5b" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch index dc3ec060e..46e94e339 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch @@ -1,6 +1,6 @@ -From 17caf10b048450979dcd95a9f9333bbaa8c307ec Mon Sep 17 00:00:00 2001 -From: AppaRao Puli -Date: Fri, 10 Jan 2020 08:16:10 +0530 +From 461da7ec950704a1f5bcc7f6527ed8ca119cfaf9 Mon Sep 17 00:00:00 2001 +From: Vikram Bodireddy +Date: Tue, 24 Mar 2020 16:05:32 +0530 Subject: [PATCH] Firmware update support for StandBySpare Firmware update support for StandBySpare. This will @@ -26,15 +26,13 @@ Tested: - Successfully ran redfish validater with no new errors. -Change-Id: I59f317ac001ebf56bbf30e7f43dbec5d69fa249a -Signed-off-by: Vikram Bodireddy -Signed-off-by: AppaRao Puli +Signed-off-by: Vikram Bodireddy --- - redfish-core/lib/update_service.hpp | 284 ++++++++++++++++++++++++++++++------ - 1 file changed, 241 insertions(+), 43 deletions(-) + redfish-core/lib/update_service.hpp | 274 +++++++++++++++++++++++++++++++----- + 1 file changed, 241 insertions(+), 33 deletions(-) diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp -index ec9600e..9daf6ce 100644 +index e9793eb..a913bac 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -30,6 +30,17 @@ static std::unique_ptr fwUpdateMatcher; @@ -55,7 +53,7 @@ index ec9600e..9daf6ce 100644 static void cleanUp() { -@@ -37,27 +48,118 @@ static void cleanUp() +@@ -37,27 +48,119 @@ static void cleanUp() fwUpdateMatcher = nullptr; } static void activateImage(const std::string &objPath, @@ -64,7 +62,6 @@ index ec9600e..9daf6ce 100644 + const std::vector &imgUriTargets) { BMCWEB_LOG_DEBUG << "Activate image for " << objPath << " " << service; -+ + // If targets is empty, it will apply to the active. + if (imgUriTargets.size() == 0) + { @@ -72,8 +69,10 @@ index ec9600e..9daf6ce 100644 + [](const boost::system::error_code error_code) { + if (error_code) + { -+ BMCWEB_LOG_DEBUG << "RequestedActivation failed: ec = " -+ << error_code; ++ BMCWEB_LOG_DEBUG ++ << "RequestedActivation failed: error_code = " ++ << error_code; ++ BMCWEB_LOG_DEBUG << "error msg = " << error_code.message(); + } + }, + service, objPath, "org.freedesktop.DBus.Properties", "Set", @@ -181,54 +180,51 @@ index ec9600e..9daf6ce 100644 // then no asyncResp updates will occur static void softwareInterfaceAdded(std::shared_ptr asyncResp, + const std::vector imgUriTargets, - sdbusplus::message::message &m) + sdbusplus::message::message &m, + const crow::Request &req) { - std::vector asyncResp, +@@ -70,25 +173,27 @@ static void softwareInterfaceAdded(std::shared_ptr asyncResp, m.read(objPath, interfacesProperties); - BMCWEB_LOG_DEBUG << "obj path = " << objPath.str; -+ BMCWEB_LOG_DEBUG << "Software Interface Added. objPath = " << objPath.str; ++ BMCWEB_LOG_DEBUG << "Software Interface Added. obj path = " << objPath.str; for (auto &interface : interfacesProperties) { -- BMCWEB_LOG_DEBUG << "interface = " << interface.first; -- + BMCWEB_LOG_DEBUG << "interface = " << interface.first; + - if (interface.first == "xyz.openbmc_project.Software.Activation") + if (interface.first == activationIntf) { // Found our interface, disable callbacks fwUpdateMatcher = nullptr; -- + // Retrieve service and activate crow::connections::systemBus->async_method_call( -- [objPath, asyncResp]( -+ [objPath, asyncResp, imgTargets{imgUriTargets}]( - const boost::system::error_code error_code, - const std::vector>> &objInfo) { +- [objPath, asyncResp, ++ [objPath, asyncResp, imgTargets{imgUriTargets}, + req](const boost::system::error_code error_code, + const std::vector>> &objInfo) { if (error_code) { - BMCWEB_LOG_DEBUG << "error_code = " << error_code; -- BMCWEB_LOG_DEBUG << "error msg = " -- << error_code.message(); + BMCWEB_LOG_DEBUG -+ << "GetSoftwareObject path failed: ec = " ++ << "GetSoftwareObject path failed: error_code = " + << error_code; + BMCWEB_LOG_DEBUG << "error msg = " + << error_code.message(); if (asyncResp) - { - messages::internalError(asyncResp->res); -@@ -113,8 +212,7 @@ static void softwareInterfaceAdded(std::shared_ptr asyncResp, - // xyz.openbmc_project.Software.Activation interface +@@ -115,7 +220,7 @@ static void softwareInterfaceAdded(std::shared_ptr asyncResp, // is added fwAvailableTimer = nullptr; -- + - activateImage(objPath.str, objInfo[0].first); + activateImage(objPath.str, objInfo[0].first, imgTargets); if (asyncResp) { - redfish::messages::success(asyncResp->res); -@@ -124,17 +222,16 @@ static void softwareInterfaceAdded(std::shared_ptr asyncResp, + std::shared_ptr task = +@@ -196,17 +301,16 @@ static void softwareInterfaceAdded(std::shared_ptr asyncResp, "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", "xyz.openbmc_project.ObjectMapper", "GetObject", objPath.str, @@ -250,30 +246,20 @@ index ec9600e..9daf6ce 100644 { // Only allow one FW update at a time if (fwUpdateInProgress != false) -@@ -145,7 +242,6 @@ static void monitorForSoftwareAvailable(std::shared_ptr asyncResp, - } - return; - } -- - fwAvailableTimer = - std::make_unique(*req.ioService); - -@@ -174,10 +270,10 @@ static void monitorForSoftwareAvailable(std::shared_ptr asyncResp, +@@ -246,9 +350,10 @@ static void monitorForSoftwareAvailable(std::shared_ptr asyncResp, } }); -- auto callback = [asyncResp](sdbusplus::message::message &m) { -- BMCWEB_LOG_DEBUG << "Match fired"; -- softwareInterfaceAdded(asyncResp, m); -- }; -+ auto callback = -+ [asyncResp, imgTargets{imgUriTargets}](sdbusplus::message::message &m) { -+ softwareInterfaceAdded(asyncResp, imgTargets, m); -+ }; +- auto callback = [asyncResp, req](sdbusplus::message::message &m) { ++ auto callback = [asyncResp, imgTargets{imgUriTargets}, ++ req](sdbusplus::message::message &m) { + BMCWEB_LOG_DEBUG << "Match fired"; +- softwareInterfaceAdded(asyncResp, m, req); ++ softwareInterfaceAdded(asyncResp, imgTargets, m, req); + }; fwUpdateInProgress = true; - -@@ -286,9 +382,12 @@ class UpdateServiceActionsSimpleUpdate : public Node +@@ -358,9 +463,12 @@ class UpdateServiceActionsSimpleUpdate : public Node std::string fwFile = imageURI.substr(separator + 1); BMCWEB_LOG_DEBUG << "Server: " << tftpServer + " File: " << fwFile; @@ -287,7 +273,7 @@ index ec9600e..9daf6ce 100644 // TFTP can take up to 2 minutes depending on image size and // connection speed. Return to caller as soon as the TFTP operation -@@ -322,7 +421,8 @@ class UpdateServiceActionsSimpleUpdate : public Node +@@ -394,7 +502,8 @@ class UpdateServiceActionsSimpleUpdate : public Node class UpdateService : public Node { public: @@ -297,7 +283,7 @@ index ec9600e..9daf6ce 100644 { entityPrivileges = { {boost::beast::http::verb::get, {{"Login"}}}, -@@ -334,6 +434,9 @@ class UpdateService : public Node +@@ -406,6 +515,9 @@ class UpdateService : public Node } private: @@ -307,7 +293,7 @@ index ec9600e..9daf6ce 100644 void doGet(crow::Response &res, const crow::Request &req, const std::vector ¶ms) override { -@@ -346,6 +449,8 @@ class UpdateService : public Node +@@ -416,6 +528,8 @@ class UpdateService : public Node res.jsonValue["Description"] = "Service for Software Update"; res.jsonValue["Name"] = "Update Service"; res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService"; @@ -316,7 +302,7 @@ index ec9600e..9daf6ce 100644 // UpdateService cannot be disabled res.jsonValue["ServiceEnabled"] = true; res.jsonValue["FirmwareInventory"] = { -@@ -405,9 +510,14 @@ class UpdateService : public Node +@@ -475,9 +589,14 @@ class UpdateService : public Node std::shared_ptr asyncResp = std::make_shared(res); std::optional pushUriOptions; @@ -333,15 +319,7 @@ index ec9600e..9daf6ce 100644 return; } -@@ -464,7 +574,6 @@ class UpdateService : public Node - messages::internalError(asyncResp->res); - return; - } -- messages::success(asyncResp->res); - }, - "xyz.openbmc_project.Settings", - "/xyz/openbmc_project/software/apply_time", -@@ -475,6 +584,98 @@ class UpdateService : public Node +@@ -545,6 +664,98 @@ class UpdateService : public Node } } } @@ -440,7 +418,7 @@ index ec9600e..9daf6ce 100644 } void doPost(crow::Response &res, const crow::Request &req, -@@ -485,7 +686,7 @@ class UpdateService : public Node +@@ -555,7 +766,7 @@ class UpdateService : public Node std::shared_ptr asyncResp = std::make_shared(res); // Setup callback for when new software detected @@ -449,7 +427,7 @@ index ec9600e..9daf6ce 100644 std::string filepath( "/tmp/images/" + -@@ -574,8 +775,7 @@ class SoftwareInventoryCollection : public Node +@@ -641,8 +852,7 @@ class SoftwareInventoryCollection : public Node "/xyz/openbmc_project/object_mapper", "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/xyz/openbmc_project/software", static_cast(0), @@ -459,7 +437,7 @@ index ec9600e..9daf6ce 100644 } }; -@@ -760,7 +960,7 @@ class SoftwareInventory : public Node +@@ -825,7 +1035,7 @@ class SoftwareInventory : public Node }, obj.second[0].first, obj.first, "org.freedesktop.DBus.Properties", "GetAll", @@ -468,7 +446,7 @@ index ec9600e..9daf6ce 100644 } if (!found) { -@@ -781,9 +981,7 @@ class SoftwareInventory : public Node +@@ -846,9 +1056,7 @@ class SoftwareInventory : public Node "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/", diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch new file mode 100644 index 000000000..995b62750 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch @@ -0,0 +1,331 @@ +From 7c55dfb33e035f8a31f11fd3e047a4b674f392ac Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey +Date: Tue, 10 Mar 2020 17:15:28 -0700 +Subject: [PATCH] Match BMCWeb crashdump to the D-Bus interface provided by + crashdump + +The crashdump service changed to eliminate hangs, and failures to +retrieve the crashdump data. The BMCWeb crashdump handling code has to +be aligned with the server. + +Tested: +Confirmed each of the primary functions operates as expected. +Getting the collection +Getting the entries +Forcing an on demand capture +Polling for the on demand capture to complete +Retrieving the creashdump data +Clearing all of the crashdump content + +Change-Id: Ie8fb48369a782d905b942c1f9bef11f387f6463e +Signed-off-by: Johnathan Mantey +--- + redfish-core/lib/log_services.hpp | 268 +++++++++++++++++------------- + 1 file changed, 150 insertions(+), 118 deletions(-) + +diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp +index f864007..4b13897 100644 +--- a/redfish-core/lib/log_services.hpp ++++ b/redfish-core/lib/log_services.hpp +@@ -1575,109 +1575,80 @@ class CrashdumpClear : public Node + } + }; + +-std::string getLogCreatedTime(const std::string &crashdump) +-{ +- nlohmann::json crashdumpJson = +- nlohmann::json::parse(crashdump, nullptr, false); +- if (crashdumpJson.is_discarded()) +- { +- return std::string(); +- } +- +- nlohmann::json::const_iterator cdIt = crashdumpJson.find("crash_data"); +- if (cdIt == crashdumpJson.end()) +- { +- return std::string(); +- } +- +- nlohmann::json::const_iterator siIt = cdIt->find("METADATA"); +- if (siIt == cdIt->end()) +- { +- return std::string(); +- } +- +- nlohmann::json::const_iterator tsIt = siIt->find("timestamp"); +- if (tsIt == siIt->end()) +- { +- return std::string(); +- } +- +- const std::string *logTime = tsIt->get_ptr(); +- if (logTime == nullptr) +- { +- return std::string(); +- } +- +- std::string redfishDateTime = *logTime; +- if (redfishDateTime.length() > 2) +- { +- redfishDateTime.insert(redfishDateTime.end() - 2, ':'); +- } +- +- return redfishDateTime; +-} +- +-std::string getLogFileName(const std::string &logTime) +-{ +- // Set the crashdump file name to "crashdump_.json" using the +- // created time without the timezone info +- std::string fileTime = logTime; +- size_t plusPos = fileTime.rfind('+'); +- if (plusPos != std::string::npos) +- { +- fileTime.erase(plusPos); +- } +- return "crashdump_" + fileTime + ".json"; +-} +- + static void logCrashdumpEntry(std::shared_ptr asyncResp, + const std::string &logID, + nlohmann::json &logEntryJson) + { +- auto getStoredLogCallback = [asyncResp, logID, &logEntryJson]( +- const boost::system::error_code ec, +- const std::variant &resp) { +- if (ec) +- { +- BMCWEB_LOG_DEBUG << "failed to get log ec: " << ec.message(); +- if (ec.value() == +- boost::system::linux_error::bad_request_descriptor) ++ auto getStoredLogCallback = ++ [asyncResp, logID, &logEntryJson]( ++ const boost::system::error_code ec, ++ const std::vector> ¶ms) { ++ if (ec) + { +- messages::resourceNotFound(asyncResp->res, "LogEntry", logID); ++ BMCWEB_LOG_DEBUG << "failed to get log ec: " << ec.message(); ++ if (ec.value() == ++ boost::system::linux_error::bad_request_descriptor) ++ { ++ messages::resourceNotFound(asyncResp->res, "LogEntry", ++ logID); ++ } ++ else ++ { ++ messages::internalError(asyncResp->res); ++ } ++ return; + } +- else ++ ++ std::string timestamp{}; ++ std::string filename{}; ++ for (auto property : params) + { +- messages::internalError(asyncResp->res); ++ if (property.first == "Timestamp") ++ { ++ const std::string *value = ++ sdbusplus::message::variant_ns::get_if( ++ &property.second); ++ if (value != nullptr) ++ { ++ timestamp = *value; ++ } ++ } ++ else if (property.first == "Filename") ++ { ++ const std::string *value = ++ sdbusplus::message::variant_ns::get_if( ++ &property.second); ++ if (value != nullptr) ++ { ++ filename = *value; ++ } ++ } + } +- return; +- } +- const std::string *log = std::get_if(&resp); +- if (log == nullptr) +- { +- messages::internalError(asyncResp->res); +- return; +- } +- std::string logTime = getLogCreatedTime(*log); +- std::string fileName = getLogFileName(logTime); + +- logEntryJson = { +- {"@odata.type", "#LogEntry.v1_4_0.LogEntry"}, +- {"@odata.id", +- "/redfish/v1/Systems/system/LogServices/Crashdump/Entries/" + +- logID}, +- {"Name", "CPU Crashdump"}, +- {"Id", logID}, +- {"EntryType", "Oem"}, +- {"OemRecordFormat", "Crashdump URI"}, +- {"Message", +- "/redfish/v1/Systems/system/LogServices/Crashdump/Entries/" + +- logID + "/" + fileName}, +- {"Created", std::move(logTime)}}; +- }; ++ if (filename.empty() || timestamp.empty()) ++ { ++ messages::resourceMissingAtURI(asyncResp->res, logID); ++ return; ++ } ++ ++ std::string crashdumpURI = ++ "/redfish/v1/Systems/system/LogServices/Crashdump/Entries/" + ++ logID + "/" + filename; ++ logEntryJson = {{"@odata.type", "#LogEntry.v1_4_0.LogEntry"}, ++ {"@odata.id", "/redfish/v1/Systems/system/" ++ "LogServices/Crashdump/Entries/" + ++ logID}, ++ {"Name", "CPU Crashdump"}, ++ {"Id", logID}, ++ {"EntryType", "Oem"}, ++ {"OemRecordFormat", "Crashdump URI"}, ++ {"Message", std::move(crashdumpURI)}, ++ {"Created", std::move(timestamp)}}; ++ }; + crow::connections::systemBus->async_method_call( + std::move(getStoredLogCallback), crashdumpObject, + crashdumpPath + std::string("/") + logID, +- "org.freedesktop.DBus.Properties", "Get", crashdumpInterface, "Log"); ++ "org.freedesktop.DBus.Properties", "GetAll", crashdumpInterface); + } + + class CrashdumpEntryCollection : public Node +@@ -1827,38 +1798,99 @@ class CrashdumpFile : public Node + const std::string &logID = params[0]; + const std::string &fileName = params[1]; + +- auto getStoredLogCallback = [asyncResp, logID, fileName]( +- const boost::system::error_code ec, +- const std::variant &resp) { +- if (ec) +- { +- BMCWEB_LOG_DEBUG << "failed to get log ec: " << ec.message(); +- messages::internalError(asyncResp->res); +- return; +- } +- const std::string *log = std::get_if(&resp); +- if (log == nullptr) +- { +- messages::internalError(asyncResp->res); +- return; +- } ++ auto getStoredLogCallback = ++ [asyncResp, logID, fileName]( ++ const boost::system::error_code ec, ++ const std::vector> &resp) { ++ if (ec) ++ { ++ BMCWEB_LOG_DEBUG << "failed to get log ec: " ++ << ec.message(); ++ messages::internalError(asyncResp->res); ++ return; ++ } + +- // Verify the file name parameter is correct +- if (fileName != getLogFileName(getLogCreatedTime(*log))) +- { +- messages::resourceMissingAtURI(asyncResp->res, fileName); +- return; +- } ++ std::string dbusFilename{}; ++ std::string dbusTimestamp{}; ++ std::string dbusFilepath{}; + +- // Configure this to be a file download when accessed from a browser +- asyncResp->res.addHeader("Content-Disposition", "attachment"); +- asyncResp->res.body() = *log; +- }; ++ for (auto property : resp) ++ { ++ if (property.first == "Timestamp") ++ { ++ const std::string *value = ++ sdbusplus::message::variant_ns::get_if( ++ &property.second); ++ if (value != nullptr) ++ { ++ dbusTimestamp = *value; ++ } ++ } ++ else if (property.first == "Filename") ++ { ++ const std::string *value = ++ sdbusplus::message::variant_ns::get_if( ++ &property.second); ++ if (value != nullptr) ++ { ++ dbusFilename = *value; ++ } ++ } ++ else if (property.first == "Log") ++ { ++ const std::string *value = ++ sdbusplus::message::variant_ns::get_if( ++ &property.second); ++ if (value != nullptr) ++ { ++ dbusFilepath = *value; ++ } ++ } ++ } ++ ++ if (dbusFilename.empty() || dbusTimestamp.empty() || ++ dbusFilepath.empty()) ++ { ++ messages::resourceMissingAtURI(asyncResp->res, fileName); ++ return; ++ } ++ ++ // Verify the file name parameter is correct ++ if (fileName != dbusFilename) ++ { ++ messages::resourceMissingAtURI(asyncResp->res, fileName); ++ return; ++ } ++ ++ if (!std::filesystem::exists(dbusFilepath)) ++ { ++ messages::resourceMissingAtURI(asyncResp->res, fileName); ++ return; ++ } ++ std::ifstream ifs(dbusFilepath, std::ios::in | ++ std::ios::binary | ++ std::ios::ate); ++ std::ifstream::pos_type fileSize = ifs.tellg(); ++ if (fileSize < 0) ++ { ++ messages::generalError(asyncResp->res); ++ return; ++ } ++ ifs.seekg(0, std::ios::beg); ++ ++ std::string dumpData; ++ dumpData.reserve(static_cast(fileSize)); ++ ifs.read(dumpData.data(), static_cast(fileSize)); ++ ++ // Configure this to be a file download when accessed from ++ // a browser ++ asyncResp->res.addHeader("Content-Disposition", "attachment"); ++ asyncResp->res.body() = dumpData.data(); ++ }; + crow::connections::systemBus->async_method_call( + std::move(getStoredLogCallback), crashdumpObject, + crashdumpPath + std::string("/") + logID, +- "org.freedesktop.DBus.Properties", "Get", crashdumpInterface, +- "Log"); ++ "org.freedesktop.DBus.Properties", "GetAll", crashdumpInterface); + } + }; + +-- +2.25.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 54b4e1b6b..8caee0933 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 = "363c23022eb3fb0cde577405e8a084a2e819b642" +SRCREV = "12c7f4388b58a974265827ab62d3981ba98ed8f2" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" @@ -9,8 +9,16 @@ USERADD_PARAM_${PN} = "-r -s /usr/sbin/nologin -d /home/bmcweb -m -G shadow bmcw GROUPADD_PARAM_${PN} = "web; redfish " -SRC_URI += "file://0001-Firmware-update-support-for-StandBySpare.patch" +SRC_URI += "file://0001-Firmware-update-support-for-StandBySpare.patch \ + file://0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch \ +" # Enable PFR support EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE=ON', '', d)}" +# Enable NBD_PROXY +EXTRA_OECMAKE += " -DBMCWEB_ENABLE_VM_NBDPROXY=ON" + +# Enable Validation unsecure based on IMAGE_FEATURES +EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/ipmitool_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/ipmitool_%.bbappend deleted file mode 100644 index 84e250b66..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/ipmitool_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ - -# Disable the shell to remove the usage of readline lib -# to fix the license conflict issue. More information: -# https://lists.ozlabs.org/pipermail/openbmc/2019-November/019678.html - -EXTRA_OECONF_append = " --disable-ipmishell" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index fc724eb33..d7cec2d76 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -1,8 +1,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" -SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid" -SRCREV = "3165569a562983cf3c43b0b10c23e7695a031b56" +# TODO: latest is breaking sensor list, needs triage before unpin +SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid;nobranch=1" +SRCREV = "e7e8b8166a1c0e352ee6e0e1daa76abbff228ed6" SRC_URI += "file://phosphor-ipmi-host.service \ file://0010-fix-get-system-GUID-ipmi-command.patch \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb index 620a2ab51..f6a6b1f1b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb @@ -4,10 +4,12 @@ DESCRIPTION = "Daemon to handle chassis level shared resources on multi-node pla SRC_URI = "git://github.com/Intel-BMC/multi-node-manager.git;protocol=ssh" SRCREV = "34d959285a3ca12c4bfefa4040d82d571c78843b" +S = "${WORKDIR}/git/" + PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" +LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" SYSTEMD_SERVICE_${PN} = "multi-node-manager.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb index 2a561dbe1..48f740637 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb @@ -3,14 +3,14 @@ DESCRIPTION = "Daemon to read or write U-Boot environment variables" PV = "1.0+git${SRCPV}" -S = "${WORKDIR}/git/phosphor-u-boot-env-mgr" +S = "${WORKDIR}/git" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" +SRC_URI = "git://github.com/openbmc/phosphor-u-boot-env-mgr.git;protocol=ssh" -SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" +SRCREV = "7a36277b6fdf33a554a4f9e2258e39d1696b00c2" inherit cmake systemd SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service" 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 d681a6266..d48a66d65 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,4 +1,4 @@ -SRCREV = "883fb3a97b3ac47eab7d69e0841ff38ba5b9b2aa" +SRCREV = "6b1247a16d52be853c18015e7163d60abce5c00a" SRC_URI = "git://github.com/openbmc/dbus-sensors.git" DEPENDS_append = " libgpiod libmctp" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend index aef2a020f..d23480a05 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend @@ -1,3 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" DEPENDS += "gtest" + +SYSTEMD_SERVICE_${PN}-bmc += "obmc-mapper.target" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb index 97896d72a..484d6f80d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb @@ -2,7 +2,7 @@ SUMMARY = "Phosphor post code manager" DESCRIPTION = "Post Code Manager" SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git" -SRCREV = "655837973feb51da3767f5f246ec198877900b0b" +SRCREV = "993d4dd9dc583e62a84c6056edffad957d7b7b5d" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch index 12a2bda3e..91087a155 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch @@ -20,15 +20,16 @@ both getgrnam_r & groupmems and able to see proper list only in groupmems when the issue is reproduced Signed-off-by: Richard Marian Thomaiyar +Signed-off-by: jayaprakash Mutyala --- - user_service.cpp | 26 +++++++++++--------------- - 1 file changed, 11 insertions(+), 15 deletions(-) + user_service.cpp | 28 +++++++++++++--------------- + 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/user_service.cpp b/user_service.cpp -index c3c45bd..4fdf7a1 100644 +index c3c45bd..0a6b171 100644 --- a/user_service.cpp +++ b/user_service.cpp -@@ -143,28 +143,24 @@ class ShadowService : public phosphor::user::UserServiceInterface +@@ -143,28 +143,26 @@ class ShadowService : public phosphor::user::UserServiceInterface getUsersInGroup(const std::string &groupName) const override { std::vector usersInGroup; @@ -63,11 +64,13 @@ index c3c45bd..4fdf7a1 100644 + } + if (!output.empty()) + { ++ boost::algorithm::trim_right(output[0]); + boost::algorithm::split(usersInGroup, output[0], -+ boost::algorithm::is_any_of(" ")); ++ boost::algorithm::is_any_of("\t "), ++ boost::token_compress_on); } return usersInGroup; } -- -2.7.4 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb index da60ca67e..833de721b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb @@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.VirtualMedia.service" DEPENDS = "udev boost nlohmann-json systemd sdbusplus" +RDEPENDS_${PN} = "nbdkit" inherit cmake systemd diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui/config.json b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui/config.json new file mode 100644 index 000000000..348a7792d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui/config.json @@ -0,0 +1,9 @@ +{ + "customKeyEnable": true, + "keyType" : "VT100+", + "customConsoleDisplaySize": { + "width": 100, + "height": 32 + }, + "VirtualMediaEnabled" : true +} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend index e4e24c3d0..0f1d36641 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend @@ -1,2 +1,4 @@ SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2" -SRCREV = "d342b21139c40528a70a2e25c1a00fab7116441a" +FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:" + +SRCREV = "0ecbfca6ecffe61da127d2c0b61ec26e4414d6ec" 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 new file mode 100644 index 000000000..83f015a76 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch @@ -0,0 +1,71 @@ +From ad236d3f04cb2547fea33d72aeeb695ce3035bba Mon Sep 17 00:00:00 2001 +From: Iwona Winiarska +Date: Mon, 9 Dec 2019 01:58:15 +0100 +Subject: [PATCH] Force nbdkit to send PATCH as upload method + +This modifies pwrite to send PATCH rather than default upload method +used by curl. + +FIXME: This patch only works around lack of PATCH method support in curl. +It's just a hack and it should be removed if/when proper PATCH support +is implemented in curl. + +We've added it to nbdkit rather than curl, because currently PATCH +support is unlikely to be accepted in upstream curl and it is easier to +maintain this patch in nbdkit. + +Signed-off-by: Iwona Winiarska +--- + plugins/curl/curl.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +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 + curl_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset) + { + struct curl_handle *h = handle; ++ struct curl_slist *list = NULL; + CURLcode r; + char range[128]; + +@@ -535,15 +536,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_CUSTOMREQUEST, "PATCH"); + + /* Make an HTTP range request. */ +- snprintf (range, sizeof range, "%" PRIu64 "-%" PRIu64, ++ snprintf (range, sizeof range, "Range: bytes=%" PRIu64 "-%" PRIu64, + offset, offset + count); +- curl_easy_setopt (h->c, CURLOPT_RANGE, range); ++ list = curl_slist_append(list, range); ++ curl_easy_setopt(h->c, CURLOPT_HTTPHEADER, list); + + /* The assumption here is that curl will look after timeouts. */ + r = curl_easy_perform (h->c); + if (r != CURLE_OK) { ++ curl_easy_setopt (h->c, CURLOPT_RANGE, NULL); ++ curl_easy_setopt(h->c, CURLOPT_HTTPHEADER, NULL); ++ curl_slist_free_all(list); ++ curl_easy_setopt (h->c, CURLOPT_CUSTOMREQUEST, NULL); + 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) + + /* As far as I understand the cURL API, this should never happen. */ + assert (h->read_count == 0); ++ curl_easy_setopt (h->c, CURLOPT_RANGE, NULL); ++ curl_easy_setopt(h->c, CURLOPT_HTTPHEADER, NULL); ++ curl_slist_free_all(list); ++ curl_easy_setopt (h->c, CURLOPT_CUSTOMREQUEST, NULL); + + return 0; + } +-- +2.21.0 + 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 new file mode 100644 index 000000000..d74c13427 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb @@ -0,0 +1,35 @@ +SUMMARY = "nbdkit is a toolkit for creating NBD servers." +DESCRIPTION = "NBD — Network Block Device — is a protocol \ +for accessing Block Devices (hard disks and disk-like things) \ +over a Network. \ +\ +nbdkit is a toolkit for creating NBD servers." + +HOMEPAGE = "https://github.com/libguestfs/nbdkit" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4332a97808994cf2133a65b6c6f33eaf" + +SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https" +SRC_URI += "file://0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch" + +PV = "1.17.5+git${SRCPV}" +SRCREV = "0a76cae407aca6411af3c7db1efafc56dcd151ed" + +S = "${WORKDIR}/git" + +DEPENDS = "curl xz e2fsprogs zlib" + +inherit pkgconfig python3native perlnative pythonnative autotools +inherit autotools-brokensep + +# Specify any options you want to pass to the configure script using EXTRA_OECONF: +EXTRA_OECONF = "--disable-python --disable-perl --disable-ocaml \ + --disable-rust --disable-ruby --disable-tcl \ + --disable-lua --disable-vddk --without-libvirt \ + --without-libguestfs" + +do_install_append() { + rm -f ${D}/usr/share/bash-completion/completions/nbdkit + rmdir ${D}/usr/share/bash-completion/completions + rmdir ${D}/usr/share/bash-completion +} -- cgit v1.2.3