diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-05-06 01:31:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-05-14 21:54:34 +0300 |
commit | eda2c7c523d858d25fe25052254a7f393767310b (patch) | |
tree | 7c14ec3de42b7fc6c86bc3b0f9ecb4b9f21a5d14 /meta-openbmc-mods | |
parent | 794d26fa53ad7e8cb54a3a5773436b1d8e813f35 (diff) | |
download | openbmc-eda2c7c523d858d25fe25052254a7f393767310b.tar.xz |
Update to internal 0.53
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods')
119 files changed, 1187 insertions, 1531 deletions
diff --git a/meta-openbmc-mods/conf/machine/include/intel.inc b/meta-openbmc-mods/conf/machine/include/intel.inc index 3b463fd8d..8f1c9403e 100644 --- a/meta-openbmc-mods/conf/machine/include/intel.inc +++ b/meta-openbmc-mods/conf/machine/include/intel.inc @@ -14,7 +14,6 @@ VIRTUAL-RUNTIME_obmc-led-monitor = "" VIRTUAL-RUNTIME_obmc-host-state-manager = "x86-power-control" VIRTUAL-RUNTIME_obmc-chassis-state-manager = "x86-power-control" VIRTUAL-RUNTIME_obmc-discover-system-state = "x86-power-control" -VIRTUAL-RUNTIME_obmc-settings-mgmt = "settings" PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-kcs" PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-intel-apps" diff --git a/meta-openbmc-mods/meta-ast2500/conf/layer.conf b/meta-openbmc-mods/meta-ast2500/conf/layer.conf index 94fbeff2a..85a83d411 100644 --- a/meta-openbmc-mods/meta-ast2500/conf/layer.conf +++ b/meta-openbmc-mods/meta-ast2500/conf/layer.conf @@ -8,7 +8,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "ast2500" BBFILE_PATTERN_ast2500 = "" -BBFILE_PRIORITY_ast2500 = "6" +BBFILE_PRIORITY_ast2500 = "4" LAYERSERIES_COMPAT_ast2500 = "warrior zeus" INHERIT += "extrausers" diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-flash-use-readX-writeX-not-udelay.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0001-flash-use-readX-writeX-not-udelay.patch index 73ab78a65..73ab78a65 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-flash-use-readX-writeX-not-udelay.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0001-flash-use-readX-writeX-not-udelay.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0002-intel-layout-environment-addr.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0002-intel-layout-environment-addr.patch index 8937047c5..8937047c5 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0002-intel-layout-environment-addr.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0002-intel-layout-environment-addr.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-Make-sure-debug-uart-is-using-24MHz-clock-source.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0004-Make-sure-debug-uart-is-using-24MHz-clock-source.patch index e7e6c56d7..e7e6c56d7 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-Make-sure-debug-uart-is-using-24MHz-clock-source.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0004-Make-sure-debug-uart-is-using-24MHz-clock-source.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0005-enable-passthrough-in-uboot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0005-enable-passthrough-in-uboot.patch index 6bd063e39..6bd063e39 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0005-enable-passthrough-in-uboot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0005-enable-passthrough-in-uboot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-Add-Aspeed-g5-interrupt-support.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0006-Add-Aspeed-g5-interrupt-support.patch index 4f90d6dfe..4f90d6dfe 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-Add-Aspeed-g5-interrupt-support.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0006-Add-Aspeed-g5-interrupt-support.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0007-Add-espi-support.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0007-Add-espi-support.patch index 40336d3dd..40336d3dd 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0007-Add-espi-support.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0007-Add-espi-support.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch index 5fa4bffa1..5fa4bffa1 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0009-Add-basic-GPIO-support.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0009-Add-basic-GPIO-support.patch index e11f15870..e11f15870 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0009-Add-basic-GPIO-support.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0009-Add-basic-GPIO-support.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0010-Update-Force-Firmware-Update-Jumper-to-use-new-gpio.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0010-Update-Force-Firmware-Update-Jumper-to-use-new-gpio.patch index c6ee49f57..c6ee49f57 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0010-Update-Force-Firmware-Update-Jumper-to-use-new-gpio.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0010-Update-Force-Firmware-Update-Jumper-to-use-new-gpio.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0011-Add-basic-timer-support-for-Aspeed-g5-in-U-Boot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0011-Add-basic-timer-support-for-Aspeed-g5-in-U-Boot.patch index 26b4c4fc9..26b4c4fc9 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0011-Add-basic-timer-support-for-Aspeed-g5-in-U-Boot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0011-Add-basic-timer-support-for-Aspeed-g5-in-U-Boot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0012-Add-status-and-ID-LED-support.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0012-Add-status-and-ID-LED-support.patch index e376001b3..e376001b3 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0012-Add-status-and-ID-LED-support.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0012-Add-status-and-ID-LED-support.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0013-aspeed-Add-Pwm-Driver.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0013-aspeed-Add-Pwm-Driver.patch index 4714dd6cc..4714dd6cc 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0013-aspeed-Add-Pwm-Driver.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0013-aspeed-Add-Pwm-Driver.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0014-Keep-interrupts-enabled-until-last-second.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0014-Keep-interrupts-enabled-until-last-second.patch index 22191f07a..22191f07a 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0014-Keep-interrupts-enabled-until-last-second.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0014-Keep-interrupts-enabled-until-last-second.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0015-Rewrite-memmove-to-optimize-on-word-transfers.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0015-Rewrite-memmove-to-optimize-on-word-transfers.patch index d93d9c4a1..d93d9c4a1 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0015-Rewrite-memmove-to-optimize-on-word-transfers.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0015-Rewrite-memmove-to-optimize-on-word-transfers.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0019-u-boot-full-platform-reset-espi-oob-ready.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0019-u-boot-full-platform-reset-espi-oob-ready.patch index 8a63edbb7..8a63edbb7 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0019-u-boot-full-platform-reset-espi-oob-ready.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0019-u-boot-full-platform-reset-espi-oob-ready.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0020-Add-system-reset-status-support.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0020-Add-system-reset-status-support.patch index afdd610b3..afdd610b3 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0020-Add-system-reset-status-support.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0020-Add-system-reset-status-support.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0020-Enable-PCIe-L1-support.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0020-Enable-PCIe-L1-support.patch index 6949856db..6949856db 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0020-Enable-PCIe-L1-support.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0020-Enable-PCIe-L1-support.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-Config-host-uart-clock-source-using-environment-vari.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0021-Config-host-uart-clock-source-using-environment-vari.patch index 32a40261f..32a40261f 100755..100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-Config-host-uart-clock-source-using-environment-vari.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0021-Config-host-uart-clock-source-using-environment-vari.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0022-KCS-driver-support-in-uBoot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0022-KCS-driver-support-in-uBoot.patch index 2b6382967..2b6382967 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0022-KCS-driver-support-in-uBoot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0022-KCS-driver-support-in-uBoot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0022-u-boot-env-change-for-PFR-image.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0022-u-boot-env-change-for-PFR-image.patch index afba07abf..afba07abf 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0022-u-boot-env-change-for-PFR-image.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0022-u-boot-env-change-for-PFR-image.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0023-Add-TPM-enable-pulse-triggering.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0023-Add-TPM-enable-pulse-triggering.patch index f3fc0738b..f3fc0738b 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0023-Add-TPM-enable-pulse-triggering.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0023-Add-TPM-enable-pulse-triggering.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0024-IPMI-command-handler-implementation-in-uboot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0024-IPMI-command-handler-implementation-in-uboot.patch index 252a9ea1b..252a9ea1b 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0024-IPMI-command-handler-implementation-in-uboot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0024-IPMI-command-handler-implementation-in-uboot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch index 065f890bc..065f890bc 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0026-Aspeed-I2C-support-in-U-Boot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0026-Aspeed-I2C-support-in-U-Boot.patch index be2c4018d..be2c4018d 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0026-Aspeed-I2C-support-in-U-Boot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0026-Aspeed-I2C-support-in-U-Boot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch index ac458dd6c..ac458dd6c 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch index 0113fc3fe..0113fc3fe 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0029-FFUJ-FW-IPMI-commands-and-flash-support-in-u-boot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0029-FFUJ-FW-IPMI-commands-and-flash-support-in-u-boot.patch index 3c21a7c0a..3c21a7c0a 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0029-FFUJ-FW-IPMI-commands-and-flash-support-in-u-boot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0029-FFUJ-FW-IPMI-commands-and-flash-support-in-u-boot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0030-Support-Get-Set-Security-mode-command.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0030-Support-Get-Set-Security-mode-command.patch index 519977e19..519977e19 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0030-Support-Get-Set-Security-mode-command.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0030-Support-Get-Set-Security-mode-command.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0031-Make-it-so-TFTP-port-can-be-modified.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0031-Make-it-so-TFTP-port-can-be-modified.patch index b70427fe0..b70427fe0 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0031-Make-it-so-TFTP-port-can-be-modified.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0031-Make-it-so-TFTP-port-can-be-modified.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch index 392acb9ad..392acb9ad 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch index e673da7ee..e673da7ee 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0034-Disable-uart-debug-interface.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0034-Disable-uart-debug-interface.patch index 941dc7d0d..941dc7d0d 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0034-Disable-uart-debug-interface.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0034-Disable-uart-debug-interface.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0035-PFR-platform-EXTRST-reset-mask-selection.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0035-PFR-platform-EXTRST-reset-mask-selection.patch index 85cf0cc5e..f2d1ebdeb 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0035-PFR-platform-EXTRST-reset-mask-selection.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0035-PFR-platform-EXTRST-reset-mask-selection.patch @@ -1,4 +1,4 @@ -From 3886bca377525ca9a70a6e04403606e456c535ad Mon Sep 17 00:00:00 2001 +From a5dc9fb9b33aa732858dc574f1ada22bc4cbd57c Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy <vikram.bodireddy@intel.com> Date: Thu, 5 Sep 2019 15:03:21 +0530 Subject: [PATCH] PFR platform - EXTRST# reset mask selection @@ -12,13 +12,13 @@ to be reset so that Host functionality would be intact. Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com> --- - .../include/asm/arch-aspeed/ast-g5-intel.h | 31 +++++++++++++++++++ - arch/arm/include/asm/arch-aspeed/regs-scu.h | 29 +++++++++++++++++ - board/aspeed/ast-g5/ast-g5-intel.c | 9 ++++++ + arch/arm/include/asm/arch-aspeed/ast-g5-intel.h | 31 +++++++++++++++++++++++++ + arch/arm/include/asm/arch-aspeed/regs-scu.h | 29 +++++++++++++++++++++++ + board/aspeed/ast-g5/ast-g5-intel.c | 9 +++++++ 3 files changed, 69 insertions(+) diff --git a/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h b/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h -index 64f4ed17bf..b9386b2cf6 100644 +index 64f4ed1..b9386b2 100644 --- a/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h +++ b/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h @@ -12,6 +12,37 @@ @@ -60,7 +60,7 @@ index 64f4ed17bf..b9386b2cf6 100644 int intel_force_firmware_jumper_enabled(void); int intel_failed_boot(void); diff --git a/arch/arm/include/asm/arch-aspeed/regs-scu.h b/arch/arm/include/asm/arch-aspeed/regs-scu.h -index 1bdb1d8574..0a4fb6f773 100644 +index 1bdb1d8..0a4fb6f 100644 --- a/arch/arm/include/asm/arch-aspeed/regs-scu.h +++ b/arch/arm/include/asm/arch-aspeed/regs-scu.h @@ -144,6 +144,35 @@ @@ -100,13 +100,13 @@ index 1bdb1d8574..0a4fb6f773 100644 #define SCU_RESET_CRT3 (0x1 << 8) #define SCU_RESET_CRT2 (0x1 << 7) diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index f8dbae8163..e697bd17e5 100644 +index 06c6708..e6dd2e6 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c -@@ -684,6 +684,15 @@ void ast_g5_intel(void) +@@ -661,6 +661,15 @@ extern void espi_init(void); + extern void kcs_init(void); + void ast_g5_intel(void) { - int platform_id; - + /* EXTRST# mask for PFR platform + * EXTRST# is used by PFR CPLD to keep BMC in + * reset during firmware authentication, updates and recovery @@ -120,5 +120,5 @@ index f8dbae8163..e697bd17e5 100644 ast_scu_write(ast_scu_read(AST_SCU_MISC1_CTRL) | SCU_MISC_UART_DEBUG_DIS, AST_SCU_MISC1_CTRL); -- -2.17.1 +2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0036-Re-Enable-KCS.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0036-Re-Enable-KCS.patch index 976277f9e..976277f9e 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0036-Re-Enable-KCS.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0036-Re-Enable-KCS.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0037-aspeed-ast-scu.c-fix-MAC1LINK-and-MAC2LINK-pin-pads-.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0037-aspeed-ast-scu.c-fix-MAC1LINK-and-MAC2LINK-pin-pads-.patch index 9c176e998..9c176e998 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0037-aspeed-ast-scu.c-fix-MAC1LINK-and-MAC2LINK-pin-pads-.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0037-aspeed-ast-scu.c-fix-MAC1LINK-and-MAC2LINK-pin-pads-.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch index 53cdd763e..53cdd763e 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0040-Initialize-the-BMC-host-mailbox-at-reset-time.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0040-Initialize-the-BMC-host-mailbox-at-reset-time.patch index b36627d17..b36627d17 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0040-Initialize-the-BMC-host-mailbox-at-reset-time.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0040-Initialize-the-BMC-host-mailbox-at-reset-time.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0041-Disabling-boot-delay.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0041-Disabling-boot-delay.patch index 69ec33a17..69ec33a17 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0041-Disabling-boot-delay.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0041-Disabling-boot-delay.patch 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-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch index 3833d2a31..3833d2a31 100644 --- 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-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend index f1035476a..4183df7ef 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend @@ -1,3 +1,4 @@ +COMPATIBLE_MACHINE = "intel-ast2500" FILESEXTRAPATHS_append_intel-ast2500:= "${THISDIR}/files:" # the meta-phosphor layer adds this patch, which conflicts @@ -5,7 +6,6 @@ FILESEXTRAPATHS_append_intel-ast2500:= "${THISDIR}/files:" SRC_URI_remove_intel-ast2500 = " file://0001-configs-ast-Add-redundnant-env.patch" SRC_URI_append_intel-ast2500 = " \ - file://fw_env.config \ file://0001-flash-use-readX-writeX-not-udelay.patch \ file://0002-intel-layout-environment-addr.patch \ file://0004-Make-sure-debug-uart-is-using-24MHz-clock-source.patch \ diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend new file mode 120000 index 000000000..f725cd47a --- /dev/null +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend @@ -0,0 +1 @@ +./u-boot-aspeed_%.bbappend
\ No newline at end of file diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json index f5b222909..792df2dcf 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json +++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json @@ -77,6 +77,8 @@ "FOUND('WC Baseboard')", "OR", "FOUND('WP Baseboard')", + "OR", + "FOUND('CPC Baseboard')", "AND", "xyz.openbmc_project.Inventory.Item.I2CDevice({'Bus': 4, 'Address': 82})" ], diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/console/obmc-console_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/console/obmc-console_%.bbappend index e808e4929..7baf1cabc 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/console/obmc-console_%.bbappend +++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/console/obmc-console_%.bbappend @@ -1,8 +1,17 @@ FILESEXTRAPATHS_prepend_intel-ast2500 := "${THISDIR}/${PN}:" OBMC_CONSOLE_HOST_TTY = "ttyS2" -SRC_URI += "file://sol-option-check.sh" +SRC_URI += "file://sol-option-check.sh \ + file://obmc-console@.service \ + " +inherit obmc-phosphor-systemd + +SYSTEMD_SERVICE_${PN} += " \ + ${PN}@${OBMC_CONSOLE_HOST_TTY}.service \ + " do_install_append() { + rm -rf ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules + install -m 0644 ${WORKDIR}/${PN}@.service ${D}${systemd_system_unitdir} install -d ${D}${bindir} install -m 0755 ${WORKDIR}/sol-option-check.sh ${D}${bindir} } diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/workbook/wolfpass-config.bb b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/workbook/wolfpass-config.bb deleted file mode 100644 index 637b836ba..000000000 --- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/workbook/wolfpass-config.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Wolfpass board wiring" -DESCRIPTION = "Board wiring information for the Wolfpass system." -PR = "r1" - -inherit config-in-skeleton - -LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" - -SRCREV = "946064239016e38cd1cc346047b1d26960c06cdb" -SKELETON_URI = "git://github.com/Intel-BMC/skeleton.git;protocol=ssh;branch=intel" diff --git a/meta-openbmc-mods/meta-ast2500/recipes.txt b/meta-openbmc-mods/meta-ast2500/recipes.txt index 3ec3f4a42..2f89155c3 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes.txt +++ b/meta-openbmc-mods/meta-ast2500/recipes.txt @@ -1,2 +1,3 @@ +recipes-bsp - Anything with links to specific hardware or hardware configuration information recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies recipes-phosphor - Phosphor OpenBMC applications and configuration diff --git a/meta-openbmc-mods/meta-ast2600/conf/layer.conf b/meta-openbmc-mods/meta-ast2600/conf/layer.conf index becffd7e4..9c44d9b48 100644 --- a/meta-openbmc-mods/meta-ast2600/conf/layer.conf +++ b/meta-openbmc-mods/meta-ast2600/conf/layer.conf @@ -8,7 +8,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "ast2600" BBFILE_PATTERN_ast2600 = "" -BBFILE_PRIORITY_ast2600 = "6" +BBFILE_PRIORITY_ast2600 = "4" LAYERSERIES_COMPAT_ast2600 = "warrior zeus" INHERIT += "extrausers" 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-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch index 373893a44..7accd788c 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-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch @@ -1,4 +1,4 @@ -From 145ffdf95955562eddf96d0342bcdebd98f8dc95 Mon Sep 17 00:00:00 2001 +From a40cea99245e624e8fb2e39e26c7e76f1aee67fe Mon Sep 17 00:00:00 2001 From: Vernon Mauery <vernon.mauery@intel.com> Date: Thu, 24 Oct 2019 14:06:33 -0700 Subject: [PATCH] Add ast2600-intel as a new board @@ -17,10 +17,10 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> 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 +++++++++++++++ + board/aspeed/ast2600_intel/intel.c | 185 +++++++++++++++ cmd/Kconfig | 2 +- common/autoboot.c | 10 + - 13 files changed, 1181 insertions(+), 2 deletions(-) + 13 files changed, 1189 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 @@ -1126,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..a02e246d0d81 +index 000000000000..03363b80b4f5 --- /dev/null +++ b/board/aspeed/ast2600_intel/intel.c -@@ -0,0 +1,177 @@ +@@ -0,0 +1,185 @@ +/* Intel customizations of Das U-Boot */ +#include <common.h> +#include <asm/gpio.h> @@ -1175,12 +1175,20 @@ index 000000000000..a02e246d0d81 + return 0; +} + ++#define SCU_418 0x418 /* Multi-function Pin Control #6 */ ++#define SCU_418_PBIO_MASK GENMASK(6, 5) ++#define SCU_4bc 0x4bc /* Multi-function Pin Control #20 */ ++#define SCU_4bc_PASSTHRU0_MASK GENMASK(25, 24) ++#define SCU_4bc_PASSTHRU1_MASK GENMASK(27, 26) ++#define SCU_4bc_PASSTHRU2_MASK GENMASK(29, 28) ++ +static void gpio_passthru_init(void) +{ -+ /* FIXME: do this without the hard-coded SCU values */ -+ /* enable passthru gpio (for now) */ -+ writel(0x0f000000, 0x1e6e24bc); -+ writel(0xc0000060, 0x1e6e2418); ++ writel(readl(SCU_BASE | SCU_4bc) | ++ SCU_4bc_PASSTHRU0_MASK | SCU_4bc_PASSTHRU1_MASK, ++ SCU_BASE | SCU_4bc); ++ writel(readl(SCU_BASE | SCU_418) | SCU_418_PBIO_MASK, ++ SCU_BASE | SCU_418); +} + +#define AST_LPC_BASE 0x1e789000 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-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch index 326f36df1..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-ast2600/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch 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-ast2600/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch index 950382544..7868c03d6 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0004-AST2600-Adjust-default-GPIO-settings.patch @@ -1,4 +1,4 @@ -From 8dfc080bafc688ccdb3253eff79b72ad72f93761 Mon Sep 17 00:00:00 2001 +From 2e848b74af709f84d1e9fe27a58a74bfc686bfff Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Date: Fri, 3 Jan 2020 15:14:09 -0800 Subject: [PATCH] AST2600: Adjust default GPIO settings @@ -10,23 +10,28 @@ Subject: [PATCH] AST2600: Adjust default GPIO settings Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> --- - board/aspeed/ast2600_intel/intel.c | 50 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 50 insertions(+) + board/aspeed/ast2600_intel/intel.c | 44 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c -index eb9b3959625e..b4a3dd222f3f 100644 +index eb9b3959625e..25c61d1a806c 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c -@@ -151,6 +151,54 @@ static void sgpio_init(void) +@@ -151,6 +151,48 @@ static void sgpio_init(void) SCU_BASE | SCU_414); } ++#define SCU_410 0x410 /* Multi-function Pin Control #4 */ ++#define GPIO_000 0x000 /* GPIO A/B/C/D Value */ ++#define GPIO_004 0x004 /* GPIO A/B/C/D Direction */ ++#define GPIO_020 0x020 /* GPIO E/F/G/H Value */ ++#define GPIO_024 0x024 /* GPIO E/F/G/H Direction */ ++#define GPIO_070 0x070 /* GPIO I/J/K/L Value */ ++#define GPIO_074 0x074 /* GPIO I/J/K/L Direction */ ++ +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) + + /* @@ -51,28 +56,17 @@ index eb9b3959625e..b4a3dd222f3f 100644 + 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) +@@ -167,6 +209,8 @@ int board_early_init_f(void) * I am not sure if it actually does anything... */ arch_interrupt_init_early(); 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-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch index 66f3d3b12..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-ast2600/recipes-bsp/u-boot/files/0005-Ast2600-Enable-interrupt-in-u-boot.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch index 34d8b1abb..34d8b1abb 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0006-SPI-Quad-IO-Mode.patch 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-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch index e8ffb4e72..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-ast2600/recipes-bsp/u-boot/files/0007-ast2600-Override-OTP-strap-settings.patch diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch new file mode 100644 index 000000000..c737d4f95 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch @@ -0,0 +1,50 @@ +From 7903cb8540f83e9beca9386681ab6232eb288527 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Date: Wed, 25 Mar 2020 15:04:26 -0700 +Subject: [PATCH] AST2600: Add TPM pulse trigger + +This commit adds TPM pulse trigger into u-boot booting. + +Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +--- + board/aspeed/ast2600_intel/intel.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c +index 25c61d1a806c..cd90597221ea 100644 +--- a/board/aspeed/ast2600_intel/intel.c ++++ b/board/aspeed/ast2600_intel/intel.c +@@ -193,6 +193,21 @@ static void set_gpio_default_state(void) + AST_GPIO_BASE | GPIO_020); + } + ++void enable_onboard_tpm(void) ++{ ++#define GPIO_C2 BIT(18) ++ ++ writel(readl(AST_GPIO_BASE | GPIO_004) | GPIO_C2, ++ AST_GPIO_BASE | GPIO_004); ++ writel(readl(AST_GPIO_BASE | GPIO_000) | GPIO_C2, ++ AST_GPIO_BASE | GPIO_000); ++ ++ mdelay(50); ++ ++ writel(readl(AST_GPIO_BASE | GPIO_000) & ~GPIO_C2, ++ AST_GPIO_BASE | GPIO_000); ++} ++ + void espi_init(void); + int arch_interrupt_init_early(void); + +@@ -228,6 +243,8 @@ int board_early_init_r(void) + + espi_init(); + ++ enable_onboard_tpm(); ++ + return 0; + } + +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch new file mode 100644 index 000000000..259afc619 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch @@ -0,0 +1,57 @@ +From 363cb4a59bd21708465ad46553a098615abea1dd Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Date: Tue, 31 Mar 2020 13:28:31 -0700 +Subject: [PATCH] AST2600: Disable DMA arbitration options on MAC1 and MAC2 + +Aspeed added 2 new options to DMA arbitration in AST2600A1 MAC1 +and MAC2 but it has a bug in A1 so it might cause the MAC hang if +we enable these 2 new options. +Option 1: Round Robin, register MAC58[27] +Option 2: Tx Valid, register MAC58[28] + +So this commit disables options above. + +Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +--- + arch/arm/mach-aspeed/ast2600/platform.S | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S +index eb3cb2f38cb6..0316e5364b78 100644 +--- a/arch/arm/mach-aspeed/ast2600/platform.S ++++ b/arch/arm/mach-aspeed/ast2600/platform.S +@@ -60,6 +60,12 @@ + #define AST_FMC_WDT1_CTRL_MODE (AST_FMC_BASE + 0x060) + #define AST_FMC_WDT2_CTRL_MODE (AST_FMC_BASE + 0x064) + ++#define AST_MAC1_BASE (0x1E660000) ++#define AST_MAC1_CTRL2 (AST_MAC1_BASE + 0x058) ++ ++#define AST_MAC2_BASE (0x1E680000) ++#define AST_MAC2_CTRL2 (AST_MAC2_BASE + 0x058) ++ + #define AST_GPIO_BASE (0x1E780000) + #define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0) + +@@ -228,6 +234,18 @@ wait_lock: + orr r1, #0x40 + str r1, [r0] + ++ /* disable DMA arbitration on MAC1 (A1 bug) */ ++ ldr r0, =AST_MAC1_CTRL2 ++ ldr r1, [r0] ++ orr r1, #0x18000000 ++ str r1, [r0] ++ ++ /* disable DMA arbitration on MAC2 (A1 bug) */ ++ ldr r0, =AST_MAC2_CTRL2 ++ ldr r1, [r0] ++ orr r1, #0x18000000 ++ str r1, [r0] ++ + 1: + /* release display port reset */ + ldr r0, =AST_SCU_SYSRST_CTRL_CLR +-- +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-ast2600/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch index 915b0197f..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-ast2600/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch 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-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch index 1b4201f5e..1b4201f5e 100644 --- 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-ast2600/recipes-bsp/u-boot/files/0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg index 99ac5a220..99ac5a220 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/intel.cfg diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend index e8f2bb571..ff1aa58e3 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend @@ -1,10 +1,10 @@ +COMPATIBLE_MACHINE = "intel-ast2600" FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:" # the meta-phosphor layer adds this patch, which conflicts # with the intel layout for environment SRC_URI_append_intel-ast2600 = " \ - file://fw_env.config \ file://intel.cfg \ file://0001-Add-ast2600-intel-as-a-new-board.patch \ file://0021-AST2600-Enable-host-searial-port-clock-configuration.patch \ @@ -14,6 +14,7 @@ SRC_URI_append_intel-ast2600 = " \ file://0006-SPI-Quad-IO-Mode.patch \ file://0007-ast2600-Override-OTP-strap-settings.patch \ file://0008-AST2600-Add-TPM-pulse-trigger.patch \ + file://0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch \ " PFR_SRC_URI = " \ diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend index a69056ecc..2e230c2a2 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend @@ -1,7 +1,7 @@ +COMPATIBLE_MACHINE = "intel-ast2600" FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:" SRC_URI_append_intel-ast2600 = " \ - file://fw_env.config \ file://intel.cfg \ file://0001-Add-ast2600-intel-as-a-new-board.patch \ file://0003-ast2600-intel-layout-environment-addr.patch \ diff --git a/meta-openbmc-mods/meta-ast2600/recipes.txt b/meta-openbmc-mods/meta-ast2600/recipes.txt index 3ec3f4a42..2f89155c3 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes.txt +++ b/meta-openbmc-mods/meta-ast2600/recipes.txt @@ -1,2 +1,3 @@ +recipes-bsp - Anything with links to specific hardware or hardware configuration information recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies recipes-phosphor - Phosphor OpenBMC applications and configuration 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 6d5ac0e2b..ceee7f0fc 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 @@ -45,6 +45,7 @@ IMAGE_INSTALL_append = " \ mctpd \ virtual-media \ enable-nics \ + host-misc-comm-manager \ " IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'intel-pfr-manager', '', d)}" @@ -52,3 +53,4 @@ IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'inte # this package was flagged as a security risk IMAGE_INSTALL_remove += " lrzsz" +BAD_RECOMMENDATIONS += "phosphor-settings-manager" 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 deleted file mode 100644 index 9af713c99..000000000 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0008-AST2600-Add-TPM-pulse-trigger.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 9d2d9b9db7796a49d03ac8b19dfbdefbe840c506 Mon Sep 17 00:00:00 2001 -From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> -Date: Wed, 25 Mar 2020 15:04:26 -0700 -Subject: [PATCH] AST2600: Add TPM pulse trigger - -This commit adds TPM pulse trigger into u-boot booting. - -Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> ---- - 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/u-boot-%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-%.bbappend new file mode 100644 index 000000000..eee5194fb --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " \ + file://fw_env.config \ + " diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend deleted file mode 120000 index 742334ade..000000000 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -u-boot-aspeed_%.bbappend
\ No newline at end of file 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 112e77b6a..6e3e0c4de 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 @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0d1c657b2ba1e8877940a8d1614ec560" inherit cmake -DEPENDS = "sdbusplus openssl libpam libgpiod" +DEPENDS = "sdbusplus openssl libpam libgpiod safec" do_configure[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend new file mode 100644 index 000000000..81462b2d3 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend @@ -0,0 +1,3 @@ +# Enable downstream autobump +SRC_URI = "git://github.com/openbmc/host-error-monitor" +SRCREV = "53099c49b89c22cfe09c7217679ae1fb20e019eb" 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 deleted file mode 100644 index 7e08c9393..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb +++ /dev/null @@ -1,22 +0,0 @@ -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit cmake systemd - -SRC_URI = "git://github.com/Intel-BMC/host-error-monitor.git;protocol=ssh" - -DEPENDS = "boost sdbusplus libgpiod libpeci" - -PV = "0.1+git${SRCPV}" -SRCREV = "77722dd390351ce2b3877af13e1a0698a86386c1" - -S = "${WORKDIR}/git" - -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.HostErrorMonitor.service" -SECURITY_CFLAGS_pn-host-error-monitor = "${SECURITY_NOPIE_CFLAGS}" - -# linux-libc-headers guides this way to include custom uapi headers -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -do_configure[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb index 085c87e23..edbcce6f3 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb @@ -2,7 +2,7 @@ SUMMARY = "libmctp" DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)" SRC_URI = "git://github.com/openbmc/libmctp.git" -SRCREV = "7b08721ecee81c2eccf642fc6359aab7e36c37be" +SRCREV = "6a18582ba2f47f677846dc68f608effc60bbb9e7" PV = "0.1+git${SRCPV}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend index deed05704..16ee0b625 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend @@ -2,4 +2,4 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PF EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" EXTRA_OECMAKE += "-DUSING_ENTITY_MANAGER_DECORATORS=OFF" SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git" -SRCREV = "8709fbb3a396bdef42b2466011bb71fa2bcadfc0" +SRCREV = "2b664d5a185247f0448c763ba7d0e42cfc245024" diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend new file mode 100644 index 000000000..fd56781d7 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend @@ -0,0 +1,3 @@ +# Enable downstream autobump +SRC_URI = "git://github.com/openbmc/libpeci" +SRCREV = "7ef5a55777bb4d0c403a4eca98c487fa4e9c7bd1" diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb deleted file mode 100644 index 5a49156da..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit cmake - -SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" - -PV = "0.1+git${SRCPV}" -SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" - -S = "${WORKDIR}/git/libpeci" - -# linux-libc-headers guides this way to include custom uapi headers -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -do_configure[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb index 29f8e4986..cfea1a910 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb @@ -18,9 +18,9 @@ FILES_${PN} += "${systemd_system_unitdir}/security-registers-check.service" do_install() { install -d ${D}${systemd_system_unitdir} - install -m 0777 ${WORKDIR}/security-registers-check.service ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/security-registers-check.service ${D}${systemd_system_unitdir} install -d ${D}${bindir} - install -m 0777 ${S}/security-registers-check.sh ${D}/${bindir}/security-registers-check.sh + install -m 0755 ${S}/security-registers-check.sh ${D}/${bindir}/security-registers-check.sh } -SYSTEMD_SERVICE_${PN} += " security-registers-check.service"
\ No newline at end of file +SYSTEMD_SERVICE_${PN} += " security-registers-check.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Disable-LLMNR-port-5355.patch b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Disable-LLMNR-port-5355.patch new file mode 100644 index 000000000..8b978e4fb --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0002-Disable-LLMNR-port-5355.patch @@ -0,0 +1,26 @@ +From 9fb05323291ccdfbf19ac0d9428e366d6023b408 Mon Sep 17 00:00:00 2001 +From: Karthick Sundarrajan <karthick.sundarrajan@intel.com> +Date: Fri, 3 Apr 2020 10:23:41 -0700 +Subject: [PATCH] Disable LLMNR (port 5355) + +As part of OS hardening process, the port has to be +disabled. + +Signed-off-by: Karthick Sundarrajan <karthick.sundarrajan@intel.com> +--- + src/resolve/resolved.conf.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/resolve/resolved.conf.in b/src/resolve/resolved.conf.in +index 6898c78..a9125fd 100644 +--- a/src/resolve/resolved.conf.in ++++ b/src/resolve/resolved.conf.in +@@ -15,7 +15,7 @@ + #DNS= + #FallbackDNS=@DNS_SERVERS@ + #Domains= +-#LLMNR=yes ++LLMNR=no + #MulticastDNS=yes + #DNSSEC=@DEFAULT_DNSSEC_MODE@ + #DNSOverTLS=@DEFAULT_DNS_OVER_TLS_MODE@ diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend index d80714589..17f423dc3 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend @@ -5,6 +5,7 @@ LICENSE = "GPL-2.0" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch \ + file://0002-Disable-LLMNR-port-5355.patch \ file://systemd-time-wait-sync.service \ " diff --git a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb index 9adaec7bc..7e9d2f195 100644 --- a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb +++ b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b77c43ae4eaf67bd73fb6452b2f113a3" SRC_URI = "git://github.com/Intel-BMC/mtd-util;protocol=ssh" PV = "1.0+git${SRCPV}" -SRCREV = "166634ae4677a2a4bcaa99717eb522ce68e9b3d4" +SRCREV = "69016601a521a95732cc49a3f4c8c7fe4b0ee058" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend index 55fb00a77..08f8c58b0 100644 --- a/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend @@ -2,3 +2,6 @@ do_install_append () { # Remove ipmi_pass from image, if debug-tweaks is not enabled ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'rm ${D}/${sysconfdir}/ipmi_pass', d)} } + +# latest upstream HEAD until meta-phosphor autobumps +SRCREV = "c2ef3319b42d86862b479e08e652ab36a26a14db" diff --git a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend deleted file mode 100644 index 6e6348cb5..000000000 --- a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ - -#SRC_URI += "git://github.com/openbmc/sdbusplus" -SRCREV = "ddc0eba2bea1f55dff275726903deecd88ac6f3d" - diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend index 5d703b355..741ac3715 100644 --- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend @@ -2,4 +2,4 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" # Use the latest to support obmc-ikvm properly #SRC_URI = "git://github.com/LibVNC/libvncserver" -SRCREV = "b254b1c18d9a891f4996a2b980fb1089e760d53b" +SRCREV = "9409a6e6aaeaff9dc36f71c21ba5b81b10d44ace" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb new file mode 100644 index 000000000..604ee8068 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Miscellaneous host interface communication manager" +DESCRIPTION = "Daemon exposes Miscellaneous host interface communications like \ + platform reset, mail box & scratch pad" + +PV = "1.0+git${SRCPV}" + +S = "${WORKDIR}/git" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = "git://github.com/Intel-BMC/host-misc-comm-manager.git;protocol=ssh" + +SRCREV = "2f7be710dea914b975bfb20a9d7a466da85f88cc" + +inherit cmake systemd +SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Host.Misc.Manager.service" + +DEPENDS = "boost sdbusplus phosphor-logging" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend index c3443107d..1921d8e3a 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend @@ -1,2 +1,4 @@ RDEPENDS_${PN}-extrasdevtools = "libgpiod-tools" RDEPENDS_${PN}-chassis-state-mgmt_remove = "obmc-phosphor-power" + +RDEPENDS_${PN}-settings = "settings" 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 93a849001..97866ba4e 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 = "bee56d62b209088454d166d1efae4825a2b175df" +SRCREV = "6aab8bcc8fd0550753c87265036b1b7c4c8a9f71" 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 cd49a6316..7a5cc7d3e 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb @@ -2,7 +2,7 @@ SUMMARY = "SMBIOS MDR version 2 service for Intel based platform" DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom" SRC_URI = "git://github.com/Intel-BMC/mdrv2.git;protocol=ssh" -SRCREV = "d1fc2546cba818388fbef22f50dce6ef17885ff5" +SRCREV = "e1d574504a16282fe86a0ca02a821ebdcd220774" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch index 31061624c..5a01aaeed 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch @@ -1,4 +1,4 @@ -From da2fecd5d5b3f69bcc4d07fd1265415bd350e5a6 Mon Sep 17 00:00:00 2001 +From c2019bbf210e0e750478a3e6c0c9bfa557c5bc0f Mon Sep 17 00:00:00 2001 From: Yuan Li <yuan.li@linux.intel.com> Date: Tue, 19 Sep 2017 15:55:39 +0800 Subject: [PATCH] arm: dts: add DTS for Intel ast2500 platforms @@ -17,16 +17,16 @@ Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> --- - arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 460 +++++++++++++++++++++++++ - 1 file changed, 460 insertions(+) + arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 474 +++++++++++++++++++++++++ + 1 file changed, 474 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts new file mode 100644 -index 0000000..1fe6240 +index 000000000000..18fa1f804874 --- /dev/null +++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts -@@ -0,0 +1,460 @@ +@@ -0,0 +1,468 @@ +/dts-v1/; + +#include "aspeed-g5.dtsi" @@ -166,6 +166,14 @@ index 0000000..1fe6240 + bit-shift = <17>; + read-only; + }; ++ chip_id { ++ offset = <0x150>; ++ bit-mask = <0x0fffffff 0xffffffff>; ++ bit-shift = <0>; ++ read-only; ++ reg-width = <64>; ++ hash-data = "d44f9b804976fa23c2e25d62f16154d26520a7e24c5555095fd1b55c027804f1570dcd16189739c640cd7d9a6ce14944a2c4eaf1dc429eed6940e8a83498a474"; ++ }; + }; +}; + @@ -487,6 +495,6 @@ index 0000000..1fe6240 +&vhub { + status = "okay"; +}; --- +-- 2.7.4 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 885e15e4c..b3e7342c5 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch @@ -1,4 +1,4 @@ -From c8c8503401e8593860b4b78340a50d55a1a780b3 Mon Sep 17 00:00:00 2001 +From 0fca4f924e45f1968f610ad8903f18d638188784 Mon Sep 17 00:00:00 2001 From: Vernon Mauery <vernon.mauery@linux.intel.com> Date: Tue, 19 Sep 2017 15:55:39 +0800 Subject: [PATCH] arm: dts: add DTS for Intel ast2600 platforms @@ -12,16 +12,16 @@ Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> Signed-off-by: arun-pm <arun.p.m@linux.intel.com> Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com> --- - arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 498 +++++++++++++++++++++++++ - 1 file changed, 498 insertions(+) + arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 516 +++++++++++++++++++++++++ + 1 file changed, 516 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..c51ed3c57f3e +index 000000000000..6d626338232e --- /dev/null +++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -@@ -0,0 +1,498 @@ +@@ -0,0 +1,510 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + @@ -134,6 +134,18 @@ index 000000000000..c51ed3c57f3e +&syscon { + uart-clock-high-speed; + status = "okay"; ++ ++ misc_control { ++ compatible = "aspeed,bmc-misc"; ++ chip_id { ++ offset = <0x5b0>; ++ bit-mask = <0xffffffff 0xffffffff>; ++ bit-shift = <0>; ++ read-only; ++ reg-width = <64>; ++ hash-data = "d44f9b804976fa23c2e25d62f16154d26520a7e24c5555095fd1b55c027804f1570dcd16189739c640cd7d9a6ce14944a2c4eaf1dc429eed6940e8a83498a474"; ++ }; ++ }; +}; + +#if 0 @@ -186,7 +198,7 @@ index 000000000000..c51ed3c57f3e + /*I0-I7*/ "JTAG_ASD_NTRST_R_N","JTAG_ASD_TDI_R","JTAG_ASD_TCK_R","JTAG_ASD_TMS_R","JTAG_ASD_TDO","FM_BMC_PWRBTN_OUT_R_N","FM_BMC_PWR_BTN_N","", + /*J0-J7*/ "SMB_CHASSENSOR_STBY_LVC3_SCL","SMB_CHASSENSOR_STBY_LVC3_SDA","FM_NODE_ID0","FM_NODE_ID1","","","","", + /*K0-K7*/ "SMB_HSBP_STBY_LVC3_R_SCL","SMB_HSBP_STBY_LVC3_R_SDA","SMB_SMLINK0_STBY_LVC3_R2_SCL","SMB_SMLINK0_STBY_LVC3_R2_SDA","SMB_TEMPSENSOR_STBY_LVC3_R_SCL","SMB_TEMPSENSOR_STBY_LVC3_R_SDA","SMB_PMBUS_SML1_STBY_LVC3_R_SCL","SMB_PMBUS_SML1_STBY_LVC3_R_SDA", -+ /*L0-L7*/ "SMB_PCIE_STBY_LVC3_R_SCL","SMB_PCIE_STBY_LVC3_R_SDA","SMB_HOST_STBY_BMC_LVC3_R_SCL","SMB_HOST_STBY_BMC_LVC3_R_SDA","PREQ_N","DEBUG_EN_N","V_BMC_GFX_HSYNC_R","V_BMC_GFX_VSYNC_R", ++ /*L0-L7*/ "SMB_PCIE_STBY_LVC3_R_SCL","SMB_PCIE_STBY_LVC3_R_SDA","SMB_HOST_STBY_BMC_LVC3_R_SCL","SMB_HOST_STBY_BMC_LVC3_R_SDA","PREQ_N","TCK_MUX_SEL","V_BMC_GFX_HSYNC_R","V_BMC_GFX_VSYNC_R", + /*M0-M7*/ "SPA_CTS_N","SPA_DCD_N","SPA_DSR_N","PU_SPA_RI_N","SPA_DTR_N","SPA_RTS_N","SPA_SOUT","SPA_SIN", + /*N0-N7*/ "SPB_CTS_N","SPB_DCD_N","SPB_DSR_N","PU_SPB_RI_N","SPB_DTR_N","SPB_RTS_N","SPB_SOUT","SPB_SIN", + /*O0-O7*/ "FAN_BMC_PWM0","FAN_BMC_PWM1","FAN_BMC_PWM2","FAN_BMC_PWM3","FAN_BMC_PWM4","FAN_BMC_PWM5","NMI_BUTTON","SPEAKER_BMC_R", @@ -517,7 +529,7 @@ index 000000000000..c51ed3c57f3e + status = "okay"; +}; + -+&jtag { ++&jtag1 { + status = "okay"; +}; -- diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0020-misc-aspeed-add-lpc-mbox-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0020-misc-aspeed-add-lpc-mbox-driver.patch index bd468e29d..c5add2dd5 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0020-misc-aspeed-add-lpc-mbox-driver.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0020-misc-aspeed-add-lpc-mbox-driver.patch @@ -1,4 +1,4 @@ -From 5d411ed0d66d3d00232519ed7d4ab6fac45e7c6e Mon Sep 17 00:00:00 2001 +From 42326dfecd45c52918272cf6b65e6eb5b8499c46 Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Date: Wed, 10 Jul 2019 16:19:33 -0700 Subject: [PATCH] misc: aspeed: add lpc mbox driver @@ -10,13 +10,15 @@ This driver should be rewritten later. Signed-off-by: Cyril Bur <cyrilbur@gmail.com>" Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> --- arch/arm/boot/dts/aspeed-g4.dtsi | 9 + arch/arm/boot/dts/aspeed-g5.dtsi | 9 + + arch/arm/boot/dts/aspeed-g6.dtsi | 1 + drivers/soc/aspeed/Kconfig | 7 + drivers/soc/aspeed/Makefile | 1 + - drivers/soc/aspeed/aspeed-lpc-mbox.c | 376 +++++++++++++++++++++++++++++++++++ - 5 files changed, 402 insertions(+) + drivers/soc/aspeed/aspeed-lpc-mbox.c | 377 +++++++++++++++++++++++++++ + 6 files changed, 404 insertions(+) create mode 100644 drivers/soc/aspeed/aspeed-lpc-mbox.c diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi @@ -40,10 +42,10 @@ index e9fd66ab3099..f3edda4ae477 100644 }; diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi -index 20b2eb8052b7..bd6d1461e4bd 100644 +index b4ae3827ed1d..b69110b9eab9 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi -@@ -502,6 +502,15 @@ +@@ -522,6 +522,15 @@ sio_regs: regs { compatible = "aspeed,bmc-misc"; }; @@ -59,8 +61,20 @@ index 20b2eb8052b7..bd6d1461e4bd 100644 }; }; +diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi +index 825e64ce317a..183869eaf79a 100644 +--- a/arch/arm/boot/dts/aspeed-g6.dtsi ++++ b/arch/arm/boot/dts/aspeed-g6.dtsi +@@ -594,6 +594,7 @@ + reg = <0x180 0x5c>; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; + #mbox-cells = <1>; ++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>; + }; + }; + }; diff --git a/drivers/soc/aspeed/Kconfig b/drivers/soc/aspeed/Kconfig -index 78dd74c49ddb..a4be8e566bc7 100644 +index a4b3cac87ce2..464a55c7eb39 100644 --- a/drivers/soc/aspeed/Kconfig +++ b/drivers/soc/aspeed/Kconfig @@ -21,6 +21,13 @@ config ASPEED_LPC_CTRL @@ -78,22 +92,23 @@ index 78dd74c49ddb..a4be8e566bc7 100644 tristate "Aspeed ast2500 HOST LPC snoop support" depends on SOC_ASPEED && REGMAP && MFD_SYSCON diff --git a/drivers/soc/aspeed/Makefile b/drivers/soc/aspeed/Makefile -index e631b23d519b..f3ff29b874ed 100644 +index 217d876fec25..26924c111af3 100644 --- a/drivers/soc/aspeed/Makefile +++ b/drivers/soc/aspeed/Makefile -@@ -1,5 +1,6 @@ +@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_ASPEED_BMC_MISC) += aspeed-bmc-misc.o obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o +obj-$(CONFIG_ASPEED_LPC_MBOX) += aspeed-lpc-mbox.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 diff --git a/drivers/soc/aspeed/aspeed-lpc-mbox.c b/drivers/soc/aspeed/aspeed-lpc-mbox.c new file mode 100644 -index 000000000000..795107206022 +index 000000000000..583feecc4f18 --- /dev/null +++ b/drivers/soc/aspeed/aspeed-lpc-mbox.c -@@ -0,0 +1,376 @@ +@@ -0,0 +1,377 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright 2017 IBM Corporation +// TODO: Rewrite this driver @@ -452,6 +467,7 @@ index 000000000000..795107206022 +static const struct of_device_id aspeed_mbox_match[] = { + { .compatible = "aspeed,ast2400-mbox" }, + { .compatible = "aspeed,ast2500-mbox" }, ++ { .compatible = "aspeed,ast2600-mbox" }, + { }, +}; +MODULE_DEVICE_TABLE(of, aspeed_mbox_match); @@ -471,5 +487,5 @@ index 000000000000..795107206022 +MODULE_AUTHOR("Cyril Bur <cyrilbur@gmail.com>"); +MODULE_DESCRIPTION("Aspeed mailbox device driver"); -- -2.7.4 +2.17.1 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 4230c077b..db94b13fd 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 1bf4e5a8cd7ca069092bfe7ac3fd3d1879b7a87d Mon Sep 17 00:00:00 2001 +From 79d407327558f27a7df9d04b1d66cbe63129b622 Mon Sep 17 00:00:00 2001 From: "Hunt, Bryan" <bryan.hunt@intel.com> Date: Mon, 6 May 2019 10:02:14 -0700 Subject: [PATCH] Add AST2500 JTAG device @@ -7,15 +7,15 @@ Adding aspeed jtag device Signed-off-by: Hunt, Bryan <bryan.hunt@intel.com> --- - arch/arm/boot/dts/aspeed-g5.dtsi | 9 +++++++++ - arch/arm/boot/dts/aspeed-g6.dtsi | 9 +++++++++ - 2 files changed, 18 insertions(+) + arch/arm/boot/dts/aspeed-g5.dtsi | 9 +++++++++ + arch/arm/boot/dts/aspeed-g6.dtsi | 20 ++++++++++++++++++++ + 2 files changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi -index 751a8f0316d6..eb1f9c9d9cca 100644 +index f5c25dab5337..5999cd5e0f2e 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi -@@ -418,6 +418,15 @@ +@@ -438,6 +438,15 @@ pinctrl-0 = <&pinctrl_espi_default>; }; @@ -32,14 +32,14 @@ index 751a8f0316d6..eb1f9c9d9cca 100644 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 +index 09f50afea11b..4d8b561fe582 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi -@@ -333,6 +333,15 @@ - quality = <100>; +@@ -367,6 +367,26 @@ + status = "disabled"; }; -+ jtag: jtag@1e6e4000 { ++ jtag0: jtag@1e6e4000 { + compatible = "aspeed,ast2600-jtag"; + reg = <0x1e6e4000 0x40>; + clocks = <&syscon ASPEED_CLK_APB1>; @@ -48,6 +48,17 @@ index bc2ce43827fc..31903b08e731 100644 + status = "disabled"; + }; + ++ jtag1: jtag@1e6e4100 { ++ compatible = "aspeed,ast2600-jtag"; ++ reg = <0x1e6e4100 0x40>; ++ clocks = <&syscon ASPEED_CLK_APB1>; ++ resets = <&syscon ASPEED_RESET_JTAG_MASTER2>; ++ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_jtagm_default>; ++ status = "disabled"; ++ }; ++ adc: adc@1e6e9000 { compatible = "aspeed,ast2500-adc"; reg = <0x1e6e9000 0x100>; 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 69c993d86..b70629f18 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,9 +1,9 @@ -From 3b7175753cafcee67cfc13eefc30438a518ad348 Mon Sep 17 00:00:00 2001 +From e01c562db28797e3b6be9030f1f52507115c6765 Mon Sep 17 00:00:00 2001 From: "Corona, Ernesto" <ernesto.corona@intel.com> -Date: Mon, 3 Jun 2019 08:22:09 -0800 +Date: Mon, 6 Apr 2020 09:48:32 -0700 Subject: [PATCH] Add Aspeed SoC 24xx and 25xx families JTAG -Driver adds support of Aspeed 2500/2400 series SOC JTAG master controller. +Driver adds support of Aspeed 2400-2600 series SOC JTAG master controller. Driver implements the following jtag ops: - freq_get; @@ -22,6 +22,8 @@ Aspeed 2520 SoC for programming CPLD devices. It has also been tested on Intel system using Aspeed 25xx SoC for JTAG communication. +Tested on Intel system using Aspeed 26xx SoC for JTAG communication. + Signed-off-by: Oleksandr Shamray <oleksandrs@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Corona, Ernesto <ernesto.corona@intel.com> @@ -33,6 +35,10 @@ Cc: Andrew Jeffery <andrew@aj.id.au> Cc: Steven A Filary <steven.a.filary@intel.com> Cc: Bryan Hunt <bryan.hunt@intel.com> --- +v29->v30 +Comments pointed by Steven Filary <steven.a.filary@intel.com> +- Add Suport for 26xx series + v28->v29 Comments pointed by Steven Filary <steven.a.filary@intel.com> - Expand bitbang function to accept multiples bitbang operations within a @@ -199,12 +205,12 @@ Comments pointed by kbuild test robot <lkp@intel.com> --- drivers/jtag/Kconfig | 14 + drivers/jtag/Makefile | 1 + - drivers/jtag/jtag-aspeed.c | 1051 ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 1066 insertions(+) + drivers/jtag/jtag-aspeed.c | 1217 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 1232 insertions(+) create mode 100644 drivers/jtag/jtag-aspeed.c diff --git a/drivers/jtag/Kconfig b/drivers/jtag/Kconfig -index 47771fcd3c5b..0cc163f9ad44 100644 +index 47771fc..0cc163f 100644 --- a/drivers/jtag/Kconfig +++ b/drivers/jtag/Kconfig @@ -15,3 +15,17 @@ menuconfig JTAG @@ -226,7 +232,7 @@ index 47771fcd3c5b..0cc163f9ad44 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 af374939a9e6..04a855e2df28 100644 +index af37493..04a855e 100644 --- a/drivers/jtag/Makefile +++ b/drivers/jtag/Makefile @@ -1 +1,2 @@ @@ -234,10 +240,10 @@ index af374939a9e6..04a855e2df28 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 000000000000..0c9da1b8986c +index 0000000..1e6ace6 --- /dev/null +++ b/drivers/jtag/jtag-aspeed.c -@@ -0,0 +1,1051 @@ +@@ -0,0 +1,1217 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2018 Mellanox Technologies. All rights reserved. +// Copyright (c) 2018 Oleksandr Shamray <oleksandrs@mellanox.com> @@ -270,7 +276,7 @@ index 000000000000..0c9da1b8986c +#define ASPEED_JTAG_DATA_MSB 0x01 +#define ASPEED_JTAG_DATA_CHUNK_SIZE 0x20 + -+/* ASPEED_JTAG_CTRL: Engine Control */ ++/* ASPEED_JTAG_CTRL: Engine Control 24xx and 25xx series*/ +#define ASPEED_JTAG_CTL_ENG_EN BIT(31) +#define ASPEED_JTAG_CTL_ENG_OUT_EN BIT(30) +#define ASPEED_JTAG_CTL_FORCE_TMS BIT(29) @@ -283,6 +289,15 @@ index 000000000000..0c9da1b8986c +#define ASPEED_JTAG_CTL_LASPEED_DATA BIT(1) +#define ASPEED_JTAG_CTL_DATA_EN BIT(0) + ++/* ASPEED_JTAG_CTRL: Engine Control 26xx series*/ ++#define ASPEED_JTAG_CTL_26XX_RESET_FIFO BIT(21) ++#define ASPEED_JTAG_CTL_26XX_FIFO_MODE_CTRL BIT(20) ++#define ASPEED_JTAG_CTL_26XX_TRANS_LEN(x) ((x) << 8) ++#define ASPEED_JTAG_CTL_26XX_MSB_FIRST BIT(6) ++#define ASPEED_JTAG_CTL_26XX_TERM_TRANS BIT(5) ++#define ASPEED_JTAG_CTL_26XX_LASPEED_TRANS BIT(4) ++#define ASPEED_JTAG_CTL_26XX_INST_EN BIT(1) ++ +/* ASPEED_JTAG_ISR : Interrupt status and enable */ +#define ASPEED_JTAG_ISR_INST_PAUSE BIT(19) +#define ASPEED_JTAG_ISR_INST_COMPLETE BIT(18) @@ -318,6 +333,11 @@ index 000000000000..0c9da1b8986c + ASPEED_JTAG_CTL_ENG_OUT_EN | \ + ASPEED_JTAG_CTL_DATA_LEN(len)) + ++#define ASPEED_JTAG_TRANS_LEN(len) \ ++ (ASPEED_JTAG_CTL_ENG_EN | \ ++ ASPEED_JTAG_CTL_ENG_OUT_EN | \ ++ ASPEED_JTAG_CTL_26XX_TRANS_LEN(len)) ++ +#define ASPEED_JTAG_SW_TDIO (ASPEED_JTAG_SW_MODE_EN | ASPEED_JTAG_SW_MODE_TDIO) + +#define ASPEED_JTAG_GET_TDI(direction, byte) \ @@ -327,8 +347,55 @@ index 000000000000..0c9da1b8986c +#define ASPEED_JTAG_RESET_CNTR 10 +#define WAIT_ITERATIONS 75 + ++/* ASPEED JTAG HW MODE 2 (Only supported in AST26xx series) */ ++#define ASPEED_JTAG_SHDATA0 0x20 ++#define ASPEED_JTAG_SHDATA1 0x24 ++#define ASPEED_JTAG_PADCTRL0 0x28 ++#define ASPEED_JTAG_PADCTRL1 0x2C ++#define ASPEED_JTAG_SHCTRL 0x30 ++#define ASPEED_JTAG_GBLCTRL 0x34 ++#define ASPEED_JTAG_INTCTRL 0x38 ++#define ASPEED_JTAG_STAT 0x3C ++ ++/* ASPEED_JTAG_PADCTRLx : Padding control 0 and 1 */ ++#define ASPEED_JTAG_PADCTRL_PAD_DATA BIT(24) ++#define ASPEED_JTAG_PADCTRL_POSTPAD(x) (((x) & GENMASK(8, 0)) << 12) ++#define ASPEED_JTAG_PADCTRL_PREPAD(x) (((x) & GENMASK(8, 0)) << 0) ++ ++/* ASPEED_JTAG_SHCTRL: Shift Control */ ++#define ASPEED_JTAG_SHCTRL_FRUN_TCK_EN BIT(31) ++#define ASPEED_JTAG_SHCTRL_STSHIFT_EN BIT(30) ++#define ASPEED_JTAG_SHCTRL_TMS(x) (((x) & GENMASK(13, 0)) << 16) ++#define ASPEED_JTAG_SHCTRL_POST_TMS(x) (((x) & GENMASK(3, 0)) << 13) ++#define ASPEED_JTAG_SHCTRL_PRE_TMS(x) (((x) & GENMASK(3, 0)) << 10) ++#define ASPEED_JTAG_SHCTRL_PAD_SEL0 (0) ++#define ASPEED_JTAG_SHCTRL_PAD_SEL1 BIT(9) ++#define ASPEED_JTAG_SHCTRL_END_SHIFT BIT(8) ++#define ASPEED_JTAG_SHCTRL_START_SHIFT BIT(7) ++#define ASPEED_JTAG_SHCTRL_LWRDT_SHIFT(x) ((x) & GENMASK(6, 0)) ++ ++/* ASPEED_JTAG_GBLCTRL : Global Control */ ++#define ASPEED_JTAG_GBLCTRL_ENG_MODE_EN BIT(31) ++#define ASPEED_JTAG_GBLCTRL_ENG_OUT_EN BIT(30) ++#define ASPEED_JTAG_GBLCTRL_FORCE_TMS BIT(29) ++#define ASPEED_JTAG_GBLCTRL_SHIFT_COMPLETE BIT(28) ++#define ASPEED_JTAG_GBLCTRL_RESET_FIFO BIT(25) ++#define ASPEED_JTAG_GBLCTRL_FIFO_MODE BIT(24) ++#define ASPEED_JTAG_GBLCTRL_UPDT_SHIFT(x) (((x) & GENMASK(3, 0)) << 20) ++#define ASPEED_JTAG_GBLCTRL_STSHIFT(x) (((x) & GENMASK(0, 0)) << 16) ++#define ASPEED_JTAG_GBLCTRL_TRST BIT(15) ++#define ASPEED_JTAG_CLK_DIVISOR_MASK GENMASK(11, 0) ++#define ASPEED_JTAG_CLK_GET_DIV(x) ((x) & ASPEED_JTAG_CLK_DIVISOR_MASK) ++ ++/* ASPEED_JTAG_INTCTRL: Interrupt Control */ ++#define ASPEED_JTAG_INTCTRL_SHCPL_IRQ_EN BIT(16) ++#define ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT BIT(0) ++ ++/* ASPEED_JTAG_STAT: JTAG HW mode 2 status */ ++#define ASPEED_JTAG_STAT_ENG_IDLE BIT(0) ++ +/*#define USE_INTERRUPTS*/ -+/*#define DEBUG_JTAG*/ ++#define DEBUG_JTAG + +static const char * const regnames[] = { + [ASPEED_JTAG_DATA] = "ASPEED_JTAG_DATA", @@ -338,6 +405,14 @@ index 000000000000..0c9da1b8986c + [ASPEED_JTAG_SW] = "ASPEED_JTAG_SW", + [ASPEED_JTAG_TCK] = "ASPEED_JTAG_TCK", + [ASPEED_JTAG_EC] = "ASPEED_JTAG_EC", ++ [ASPEED_JTAG_SHDATA0] = "ASPEED_JTAG_SHDATA0", ++ [ASPEED_JTAG_SHDATA1] = "ASPEED_JTAG_SHDATA1", ++ [ASPEED_JTAG_PADCTRL0] = "ASPEED_JTAG_PADCTRL0", ++ [ASPEED_JTAG_PADCTRL1] = "ASPEED_JTAG_PADCTRL1", ++ [ASPEED_JTAG_SHCTRL] = "ASPEED_JTAG_SHCTRL", ++ [ASPEED_JTAG_GBLCTRL] = "ASPEED_JTAG_GBLCTRL", ++ [ASPEED_JTAG_INTCTRL] = "ASPEED_JTAG_INTCTRL", ++ [ASPEED_JTAG_STAT] = "ASPEED_JTAG_STAT", +}; + +#define ASPEED_JTAG_NAME "jtag-aspeed" @@ -352,6 +427,24 @@ index 000000000000..0c9da1b8986c + u32 flag; + wait_queue_head_t jtag_wq; + u32 mode; ++ struct jtag_low_level_functions *llops; ++}; ++ ++/* Multi generation support is enabled by fops and low level assped function ++ * mapping using asped_jtag_functions struct as config mechanism. ++ */ ++ ++struct jtag_low_level_functions { ++ void (*output_disable)(struct aspeed_jtag *aspeed_jtag); ++ int (*xfer_push_data)(struct aspeed_jtag *aspeed_jtag, ++ enum jtag_xfer_type type, u32 bits_len); ++ int (*xfer_push_data_last)(struct aspeed_jtag *aspeed_jtag, ++ enum jtag_xfer_type type, u32 bits_len); ++}; ++ ++struct aspeed_jtag_functions { ++ struct jtag_ops *aspeed_jtag_ops; ++ struct jtag_low_level_functions *aspeed_jtag_llops; +}; + +/* @@ -906,6 +999,26 @@ index 000000000000..0c9da1b8986c + } +} + ++static int aspeed_jtag_xfer_push_data_26xx(struct aspeed_jtag *aspeed_jtag, ++ enum jtag_xfer_type type, u32 bits_len) ++{ ++ int res = 0; ++ ++ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(bits_len), ++ ASPEED_JTAG_CTRL); ++ if (type == JTAG_SIR_XFER) { ++ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(bits_len) | ++ ASPEED_JTAG_CTL_26XX_INST_EN, ++ ASPEED_JTAG_CTRL); ++ res = aspeed_jtag_wait_instruction_pause(aspeed_jtag); ++ } else { ++ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(bits_len) | ++ ASPEED_JTAG_CTL_DATA_EN, ASPEED_JTAG_CTRL); ++ res = aspeed_jtag_wait_data_pause_complete(aspeed_jtag); ++ } ++ return res; ++} ++ +static int aspeed_jtag_xfer_push_data(struct aspeed_jtag *aspeed_jtag, + enum jtag_xfer_type type, u32 bits_len) +{ @@ -927,6 +1040,32 @@ index 000000000000..0c9da1b8986c + return res; +} + ++static int aspeed_jtag_xfer_push_data_last_26xx(struct aspeed_jtag *aspeed_jtag, ++ enum jtag_xfer_type type, ++ u32 shift_bits) ++{ ++ int res = 0; ++ ++ aspeed_jtag_write(aspeed_jtag, ASPEED_JTAG_TRANS_LEN(shift_bits) | ++ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS, ASPEED_JTAG_CTRL); ++ if (type == JTAG_SIR_XFER) { ++ aspeed_jtag_write(aspeed_jtag, ++ ASPEED_JTAG_TRANS_LEN(shift_bits) | ++ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS | ++ ASPEED_JTAG_CTL_26XX_INST_EN, ++ ASPEED_JTAG_CTRL); ++ res = aspeed_jtag_wait_instruction_complete(aspeed_jtag); ++ } else { ++ aspeed_jtag_write(aspeed_jtag, ++ ASPEED_JTAG_TRANS_LEN(shift_bits) | ++ ASPEED_JTAG_CTL_26XX_LASPEED_TRANS | ++ ASPEED_JTAG_CTL_DATA_EN, ++ ASPEED_JTAG_CTRL); ++ res = aspeed_jtag_wait_data_complete(aspeed_jtag); ++ } ++ return res; ++} ++ +static int aspeed_jtag_xfer_push_data_last(struct aspeed_jtag *aspeed_jtag, + enum jtag_xfer_type type, + u32 shift_bits) @@ -1002,8 +1141,8 @@ index 000000000000..0c9da1b8986c + * Transmit bytes that were not equals to column length + * and after the transfer go to Pause IR/DR. + */ -+ if (aspeed_jtag_xfer_push_data(aspeed_jtag, xfer->type, -+ shift_bits) != 0) { ++ if (aspeed_jtag->llops->xfer_push_data(aspeed_jtag, ++ xfer->type, shift_bits) != 0) { + return -EFAULT; + } + } else { @@ -1023,7 +1162,7 @@ index 000000000000..0c9da1b8986c + ASPEED_JTAG_DATA_CHUNK_SIZE, + remain_xfer); +#endif -+ if (aspeed_jtag_xfer_push_data_last( ++ if (aspeed_jtag->llops->xfer_push_data_last( + aspeed_jtag, + xfer->type, + shift_bits) != 0) { @@ -1042,7 +1181,8 @@ index 000000000000..0c9da1b8986c + ASPEED_JTAG_DATA_CHUNK_SIZE, + remain_xfer); +#endif -+ if (aspeed_jtag_xfer_push_data(aspeed_jtag, ++ if (aspeed_jtag->llops->xfer_push_data( ++ aspeed_jtag, + xfer->type, + shift_bits) + != 0) { @@ -1228,13 +1368,50 @@ index 000000000000..0c9da1b8986c + .disable = aspeed_jtag_disable +}; + ++static const struct jtag_low_level_functions ast25xx_llops = { ++ .output_disable = aspeed_jtag_output_disable, ++ .xfer_push_data = aspeed_jtag_xfer_push_data, ++ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last ++}; ++ ++static struct aspeed_jtag_functions ast25xx_functions = { ++ .aspeed_jtag_ops = &aspeed_jtag_ops, ++ .aspeed_jtag_llops = &ast25xx_llops ++}; ++ ++static const struct jtag_low_level_functions ast26xx_llops = { ++ .output_disable = aspeed_jtag_output_disable, ++ .xfer_push_data = aspeed_jtag_xfer_push_data_26xx, ++ .xfer_push_data_last = aspeed_jtag_xfer_push_data_last_26xx ++}; ++ ++static struct aspeed_jtag_functions ast26xx_functions = { ++ .aspeed_jtag_ops = &aspeed_jtag_ops, ++ .aspeed_jtag_llops = &ast26xx_llops ++}; ++ ++static const struct of_device_id aspeed_jtag_of_match[] = { ++ { .compatible = "aspeed,ast2400-jtag", .data = &ast25xx_functions }, ++ { .compatible = "aspeed,ast2500-jtag", .data = &ast25xx_functions }, ++ { .compatible = "aspeed,ast2600-jtag", .data = &ast26xx_functions }, ++ {} ++}; ++ +static int aspeed_jtag_probe(struct platform_device *pdev) +{ + struct aspeed_jtag *aspeed_jtag; + struct jtag *jtag; ++ const struct of_device_id *match; ++ struct aspeed_jtag_functions *jtag_functions; + int err; + -+ jtag = jtag_alloc(&pdev->dev, sizeof(*aspeed_jtag), &aspeed_jtag_ops); ++ match = of_match_node(aspeed_jtag_of_match, pdev->dev.of_node); ++ if (!match) ++ return -ENODEV; ++ jtag_functions = match->data; ++ ++ jtag = jtag_alloc(&pdev->dev, sizeof(*aspeed_jtag), ++ jtag_functions->aspeed_jtag_ops); + if (!jtag) + return -ENOMEM; + @@ -1242,6 +1419,8 @@ index 000000000000..0c9da1b8986c + aspeed_jtag = jtag_priv(jtag); + aspeed_jtag->dev = &pdev->dev; + ++ aspeed_jtag->llops = jtag_functions->aspeed_jtag_llops; ++ + /* Initialize device*/ + err = aspeed_jtag_init(pdev, aspeed_jtag); + if (err) @@ -1269,13 +1448,6 @@ index 000000000000..0c9da1b8986c + return 0; +} + -+static const struct of_device_id aspeed_jtag_of_match[] = { -+ { .compatible = "aspeed,ast2400-jtag", }, -+ { .compatible = "aspeed,ast2500-jtag", }, -+ { .compatible = "aspeed,ast2600-jtag", }, -+ {} -+}; -+ +static struct platform_driver aspeed_jtag_driver = { + .probe = aspeed_jtag_probe, + .remove = aspeed_jtag_remove, 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 index e67adb729..cb06f9def 100644 --- 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 @@ -1,4 +1,4 @@ -From 7094f4d8efea8e059c965ba70c73d5226af392cb Mon Sep 17 00:00:00 2001 +From d5bc758cee51d92c48f2835ca2b4ebb146f0f0b4 Mon Sep 17 00:00:00 2001 From: "Arun P. Mohanan" <arun.p.m@linux.intel.com> Date: Wed, 11 Mar 2020 17:23:49 +0530 Subject: [PATCH] [Mailbox] Enabling interrupt based mailbox @@ -7,11 +7,11 @@ Modifying the mailbox driver to use FIFO queue while using interrupt. Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> --- - drivers/soc/aspeed/aspeed-lpc-mbox.c | 101 ++++++++++++++++++--------- - 1 file changed, 68 insertions(+), 33 deletions(-) + drivers/soc/aspeed/aspeed-lpc-mbox.c | 102 ++++++++++++++++++--------- + 1 file changed, 69 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 +index 795107206022..1ca68bb3534c 100644 --- a/drivers/soc/aspeed/aspeed-lpc-mbox.c +++ b/drivers/soc/aspeed/aspeed-lpc-mbox.c @@ -12,10 +12,11 @@ @@ -95,7 +95,7 @@ index 795107206022..99f38a4e4550 100644 int i; if (!access_ok(buf, count)) -@@ -111,15 +134,29 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, +@@ -111,17 +134,32 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, return -EINVAL; #if MBX_USE_INTERRUPT @@ -104,10 +104,10 @@ index 795107206022..99f38a4e4550 100644 - ASPEED_MBOX_CTRL_RECV)) + /* + * Restrict count as per the number of mailbox registers -+ * if interrupt is enabled. ++ * to use kfifo. + */ + if (count != ASPEED_MBOX_NUM_REGS) -+ return -EINVAL; ++ goto reg_read; + + if (kfifo_is_empty(&mbox->fifo)) { + if (file->f_flags & O_NONBLOCK){ @@ -131,8 +131,11 @@ index 795107206022..99f38a4e4550 100644 + #endif ++reg_read: mutex_lock(&mbox->mutex); -@@ -134,11 +171,6 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, + + for (i = *ppos; count > 0 && i < ASPEED_MBOX_NUM_REGS; i++) { +@@ -134,11 +172,6 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, p++; count--; } @@ -144,7 +147,7 @@ index 795107206022..99f38a4e4550 100644 ret = p - buf; out_unlock: -@@ -186,16 +218,9 @@ static ssize_t aspeed_mbox_write(struct file *file, const char __user *buf, +@@ -186,16 +219,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); @@ -162,7 +165,7 @@ index 795107206022..99f38a4e4550 100644 } 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) +@@ -220,19 +246,23 @@ static irqreturn_t aspeed_mbox_irq(int irq, void *arg) #if MBX_USE_INTERRUPT int i; @@ -193,7 +196,7 @@ index 795107206022..99f38a4e4550 100644 #endif /* Clear interrupt status */ -@@ -249,7 +278,6 @@ static int aspeed_mbox_config_irq(struct aspeed_mbox *mbox, +@@ -249,7 +279,6 @@ static int aspeed_mbox_config_irq(struct aspeed_mbox *mbox, { struct device *dev = &pdev->dev; int rc; @@ -201,7 +204,7 @@ index 795107206022..99f38a4e4550 100644 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) +@@ -300,6 +329,7 @@ static int aspeed_mbox_probe(struct platform_device *pdev) return -ENODEV; } @@ -209,7 +212,7 @@ index 795107206022..99f38a4e4550 100644 mutex_init(&mbox->mutex); init_waitqueue_head(&mbox->queue); -@@ -316,6 +345,11 @@ static int aspeed_mbox_probe(struct platform_device *pdev) +@@ -316,6 +346,11 @@ static int aspeed_mbox_probe(struct platform_device *pdev) return rc; } @@ -221,7 +224,7 @@ index 795107206022..99f38a4e4550 100644 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) +@@ -349,6 +384,7 @@ static int aspeed_mbox_remove(struct platform_device *pdev) misc_deregister(&mbox->miscdev); clk_disable_unprepare(mbox->clk); 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 index 9c9704eff..b4118e169 100644 --- 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 @@ -1,4 +1,4 @@ -From 56ea1fc793c97232c12ddc3b4936081fe14c962f Mon Sep 17 00:00:00 2001 +From 9479d8f12efc845faca4bb1aef9b6e63799a7e5c Mon Sep 17 00:00:00 2001 From: "Arun P. Mohanan" <arun.p.m@linux.intel.com> Date: Wed, 18 Mar 2020 08:34:43 +0530 Subject: [PATCH] Add poll fops in eSPI driver @@ -7,11 +7,11 @@ Modify eSPI driver to support poll fops. Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> --- - drivers/misc/aspeed-espi-slave.c | 83 +++++++++++++++++++++++--------- - 1 file changed, 59 insertions(+), 24 deletions(-) + drivers/misc/aspeed-espi-slave.c | 85 +++++++++++++++++++++++--------- + 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/drivers/misc/aspeed-espi-slave.c b/drivers/misc/aspeed-espi-slave.c -index 87bc81948694..f4a0d7528414 100644 +index 87bc81948694..cb8ed585c69f 100644 --- a/drivers/misc/aspeed-espi-slave.c +++ b/drivers/misc/aspeed-espi-slave.c @@ -9,6 +9,7 @@ @@ -41,7 +41,16 @@ index 87bc81948694..f4a0d7528414 100644 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, +@@ -269,6 +274,8 @@ static int aspeed_espi_pltrstn_open(struct inode *inode, struct file *filp) + { + if ((filp->f_flags & O_ACCMODE) != O_RDONLY) + return -EACCES; ++ struct aspeed_espi *priv = to_aspeed_espi(filp); ++ priv->pltrstn_in_avail = true ; /*Setting true returns first data after file open*/ + + return 0; + } +@@ -284,41 +291,71 @@ static ssize_t aspeed_espi_pltrstn_read(struct file *filp, char __user *buf, spin_lock_irqsave(&priv->pltrstn_lock, flags); diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0102-Fix-for-dirty-node-in-jffs2-summary-entry.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0102-Fix-for-dirty-node-in-jffs2-summary-entry.patch new file mode 100644 index 000000000..f3bb26a8a --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0102-Fix-for-dirty-node-in-jffs2-summary-entry.patch @@ -0,0 +1,94 @@ +From 9d4191d2702ad5a368ca79eb253de26ce94b91c7 Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Mon, 30 Mar 2020 11:00:16 +0530 +Subject: [PATCH] From: Thomas Betker <thomas.betker@rohde-schwarz.com> + +jffs2_flash_direct_writev() always invokes jffs2_sum_add_kvec(), even +if mtd_writev() fails. Usually, this results in an extra summary entry +pointing to dirty node space, which should be ignored -- it is a bit of +a waste, but harmless. + +When mtd_writev() returns *retlen == 0, though, the node space is not +reserved as dirty, but re-used; the extra summary entry then points +into the space of the next node. After the erase block has been closed, +we get the following messages on remount: + + jffs2: error: (79) jffs2_link_node_ref: + Adding new ref c3048d18 at (0x00ec5b88-0x00ec6bcc) + not immediately after previous (0x00ec5b88-0x00ec5b88) + ... + jffs2: Checked all inodes but still 0x2088 bytes of unchecked space? + jffs2: No space for garbage collection. Aborting GC thread + +The extra summary entries amount to "unchecked space", so that +jffs2_garbage_collect_pass() returns -ENOSPC. And without garbage +collection, the filesystem becomes unuseable over time as the erase +blocks fill up. + +Fix this by skipping jffs2_sum_add_kvec() when the MTD write fails. We +don't need the summary entry anyway, and the behaviour matches that of +jffs2_flash_writev() in wbuf.c (with write buffering enabled). + +Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> +--- + fs/jffs2/writev.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/fs/jffs2/writev.c b/fs/jffs2/writev.c +index a1bda9d..eec4197 100644 +--- a/fs/jffs2/writev.c ++++ b/fs/jffs2/writev.c +@@ -16,9 +16,18 @@ + int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs, + unsigned long count, loff_t to, size_t *retlen) + { ++ int ret; ++ ++ ret = mtd_writev(c->mtd, vecs, count, to, retlen); ++ + if (!jffs2_is_writebuffered(c)) { + if (jffs2_sum_active()) { + int res; ++ ++ if (ret || ++ *retlen != iov_length((struct iovec *) vecs, count)) ++ return ret; ++ + res = jffs2_sum_add_kvec(c, vecs, count, (uint32_t) to); + if (res) { + return res; +@@ -26,19 +35,23 @@ int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs, + } + } + +- return mtd_writev(c->mtd, vecs, count, to, retlen); ++ return ret; + } + + int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, + size_t *retlen, const u_char *buf) + { + int ret; ++ + ret = mtd_write(c->mtd, ofs, len, retlen, buf); + + if (jffs2_sum_active()) { + struct kvec vecs[1]; + int res; + ++ if (ret || *retlen != len) ++ return ret; ++ + vecs[0].iov_base = (unsigned char *) buf; + vecs[0].iov_len = len; + +@@ -47,5 +60,6 @@ int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, + return res; + } + } ++ + return ret; + } +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0103-Refine-clock-settings.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0103-Refine-clock-settings.patch new file mode 100644 index 000000000..4d7440185 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0103-Refine-clock-settings.patch @@ -0,0 +1,191 @@ +From dd7498a847b3e908dabaed2e9a27b43a26d0dba0 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Date: Thu, 26 Mar 2020 14:20:19 -0700 +Subject: [PATCH] Refine clock settings + +This commit refines clock settings with cherry picking the latest +code from Aspeed SDK v00.05.05 + +Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +--- + drivers/clk/clk-ast2600.c | 104 +++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 85 insertions(+), 19 deletions(-) + +diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c +index af908b2dbeb6..e5079c5f4fcf 100644 +--- a/drivers/clk/clk-ast2600.c ++++ b/drivers/clk/clk-ast2600.c +@@ -31,6 +31,24 @@ + #define ASPEED_G6_CLK_SELECTION1 0x300 + #define ASPEED_G6_CLK_SELECTION2 0x304 + #define ASPEED_G6_CLK_SELECTION4 0x310 ++#define ASPEED_G6_CLK_SELECTION5 0x314 ++ ++#define ASPEED_G6_MAC12_CLK_CTRL0 0x340 ++#define ASPEED_G6_MAC12_CLK_CTRL1 0x348 ++#define ASPEED_G6_MAC12_CLK_CTRL2 0x34C ++ ++#define ASPEED_G6_MAC34_CLK_CTRL0 0x350 ++#define ASPEED_G6_MAC34_CLK_CTRL1 0x358 ++#define ASPEED_G6_MAC34_CLK_CTRL2 0x35C ++ ++#define ASPEED_G6_MAC34_DRIVING_CTRL 0x458 ++ ++#define ASPEED_G6_DEF_MAC12_DELAY_1G 0x0041b410 ++#define ASPEED_G6_DEF_MAC12_DELAY_100M 0x00417410 ++#define ASPEED_G6_DEF_MAC12_DELAY_10M 0x00417410 ++#define ASPEED_G6_DEF_MAC34_DELAY_1G 0x00104208 ++#define ASPEED_G6_DEF_MAC34_DELAY_100M 0x00104208 ++#define ASPEED_G6_DEF_MAC34_DELAY_10M 0x00104208 + + #define ASPEED_HPLL_PARAM 0x200 + #define ASPEED_APLL_PARAM 0x210 +@@ -40,9 +58,6 @@ + + #define ASPEED_G6_STRAP1 0x500 + +-#define ASPEED_MAC12_CLK_DLY 0x340 +-#define ASPEED_MAC34_CLK_DLY 0x350 +- + #define ASPEED_G6_GEN_UART_REF 0x338 + #define UART_192MHZ_R_N_VALUE 0x3c38e + +@@ -515,7 +530,7 @@ static int aspeed_g6_clk_probe(struct platform_device *pdev) + + /* RMII1 50MHz (RCLK) output enable */ + hw = clk_hw_register_gate(dev, "mac1rclk", "mac12rclk", 0, +- scu_g6_base + ASPEED_MAC12_CLK_DLY, 29, 0, ++ scu_g6_base + ASPEED_G6_MAC12_CLK_CTRL0, 29, 0, + &aspeed_g6_clk_lock); + if (IS_ERR(hw)) + return PTR_ERR(hw); +@@ -523,7 +538,7 @@ static int aspeed_g6_clk_probe(struct platform_device *pdev) + + /* RMII2 50MHz (RCLK) output enable */ + hw = clk_hw_register_gate(dev, "mac2rclk", "mac12rclk", 0, +- scu_g6_base + ASPEED_MAC12_CLK_DLY, 30, 0, ++ scu_g6_base + ASPEED_G6_MAC12_CLK_CTRL0, 30, 0, + &aspeed_g6_clk_lock); + if (IS_ERR(hw)) + return PTR_ERR(hw); +@@ -545,7 +560,7 @@ static int aspeed_g6_clk_probe(struct platform_device *pdev) + + /* RMII3 50MHz (RCLK) output enable */ + hw = clk_hw_register_gate(dev, "mac3rclk", "mac34rclk", 0, +- scu_g6_base + ASPEED_MAC34_CLK_DLY, 29, 0, ++ scu_g6_base + ASPEED_G6_MAC34_CLK_CTRL0, 29, 0, + &aspeed_g6_clk_lock); + if (IS_ERR(hw)) + return PTR_ERR(hw); +@@ -553,7 +568,7 @@ static int aspeed_g6_clk_probe(struct platform_device *pdev) + + /* RMII4 50MHz (RCLK) output enable */ + hw = clk_hw_register_gate(dev, "mac4rclk", "mac34rclk", 0, +- scu_g6_base + ASPEED_MAC34_CLK_DLY, 30, 0, ++ scu_g6_base + ASPEED_G6_MAC34_CLK_CTRL0, 30, 0, + &aspeed_g6_clk_lock); + if (IS_ERR(hw)) + return PTR_ERR(hw); +@@ -650,12 +665,20 @@ static struct platform_driver aspeed_g6_clk_driver = { + }; + builtin_platform_driver(aspeed_g6_clk_driver); + +-static const u32 ast2600_a0_axi_ahb_div_table[] = { +- 2, 2, 3, 5, ++static u32 ast2600_a0_axi_ahb_div_table[] = { ++ 2, 2, 3, 4, + }; + +-static const u32 ast2600_a1_axi_ahb_div_table[] = { +- 4, 6, 2, 4, ++static u32 ast2600_a1_axi_ahb_div0_table[] = { ++ 3, 2, 3, 4, ++}; ++ ++static u32 ast2600_a1_axi_ahb_div1_table[] = { ++ 3, 4, 6, 8, ++}; ++ ++static const u32 ast2600_a1_axi_ahb_default_table[] = { ++ 3, 4, 3, 4, 2, 2, 2, 2, + }; + + static void __init aspeed_g6_cc(struct regmap *map) +@@ -686,16 +709,28 @@ static void __init aspeed_g6_cc(struct regmap *map) + + /* Strap bits 12:11 define the AXI/AHB clock frequency ratio (aka HCLK)*/ + regmap_read(map, ASPEED_G6_STRAP1, &val); +- if (val & BIT(16)) +- axi_div = 1; +- else +- axi_div = 2; +- + regmap_read(map, ASPEED_G6_SILICON_REV, &chip_id); +- if (chip_id & BIT(16)) +- ahb_div = ast2600_a1_axi_ahb_div_table[(val >> 11) & 0x3]; +- else ++ if (chip_id & BIT(16)) { ++ if (val & BIT(16)) { ++ axi_div = 1; ++ ast2600_a1_axi_ahb_div1_table[0] = ++ ast2600_a1_axi_ahb_default_table[(val >> 8) & ++ 0x3]; ++ ahb_div = ast2600_a1_axi_ahb_div1_table[(val >> 11) & ++ 0x3]; ++ } else { ++ axi_div = 2; ++ ast2600_a1_axi_ahb_div0_table[0] = ++ ast2600_a1_axi_ahb_default_table[(val >> 8) & ++ 0x3]; ++ ahb_div = ast2600_a1_axi_ahb_div0_table[(val >> 11) & ++ 0x3]; ++ } ++ } else { ++ /* a0 : fix axi = hpll/2 */ ++ axi_div = 2; + ahb_div = ast2600_a0_axi_ahb_div_table[(val >> 11) & 0x3]; ++ } + + hw = clk_hw_register_fixed_factor(NULL, "ahb", "hpll", 0, 1, axi_div * ahb_div); + aspeed_g6_clk_data->hws[ASPEED_CLK_AHB] = hw; +@@ -751,6 +786,37 @@ static void __init aspeed_g6_cc_init(struct device_node *np) + return; + } + ++ /* fixed settings for RGMII/RMII clock generator */ ++ /* MAC1/2 RGMII 125MHz = EPLL / 8 */ ++ regmap_update_bits(map, ASPEED_G6_CLK_SELECTION2, GENMASK(23, 20), ++ (0x7 << 20)); ++ ++ /* MAC3/4 RMII 50MHz = HCLK / 4 */ ++ regmap_update_bits(map, ASPEED_G6_CLK_SELECTION4, GENMASK(18, 16), ++ (0x3 << 16)); ++ ++ /* ++ * BIT[31]: MAC1/2 RGMII 125M source = internal PLL ++ * BIT[28]: RGMIICK pad direction = output ++ */ ++ regmap_write(map, ASPEED_G6_MAC12_CLK_CTRL0, ++ BIT(31) | BIT(28) | ASPEED_G6_DEF_MAC12_DELAY_1G); ++ regmap_write(map, ASPEED_G6_MAC12_CLK_CTRL1, ++ ASPEED_G6_DEF_MAC12_DELAY_100M); ++ regmap_write(map, ASPEED_G6_MAC12_CLK_CTRL2, ++ ASPEED_G6_DEF_MAC12_DELAY_10M); ++ ++ /* MAC3/4 RGMII 125M source = RGMIICK pad */ ++ regmap_write(map, ASPEED_G6_MAC34_CLK_CTRL0, ++ ASPEED_G6_DEF_MAC34_DELAY_1G); ++ regmap_write(map, ASPEED_G6_MAC34_CLK_CTRL1, ++ ASPEED_G6_DEF_MAC34_DELAY_100M); ++ regmap_write(map, ASPEED_G6_MAC34_CLK_CTRL2, ++ ASPEED_G6_DEF_MAC34_DELAY_10M); ++ ++ /* MAC3/4 default pad driving strength */ ++ regmap_write(map, ASPEED_G6_MAC34_DRIVING_CTRL, 0x0000000a); ++ + aspeed_g6_cc(map); + aspeed_g6_clk_data->num = ASPEED_G6_NUM_CLKS; + ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, aspeed_g6_clk_data); +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0104-Add-chip-unique-id-reading-interface.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0104-Add-chip-unique-id-reading-interface.patch new file mode 100644 index 000000000..f366287f1 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0104-Add-chip-unique-id-reading-interface.patch @@ -0,0 +1,213 @@ +From 61fd1c976a0867deec8607183849969e2d96aef7 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Date: Fri, 27 Mar 2020 14:42:05 -0700 +Subject: [PATCH] Add chip unique id reading interface + +This commit adds an interface for reading chip unique id value. +Optionally, the id can be encrypted using a dts-supplied hash data. + +Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> +--- + drivers/soc/aspeed/aspeed-bmc-misc.c | 118 ++++++++++++++++++++++++--- + 1 file changed, 105 insertions(+), 13 deletions(-) + +diff --git a/drivers/soc/aspeed/aspeed-bmc-misc.c b/drivers/soc/aspeed/aspeed-bmc-misc.c +index 04d97ab17274..c80b2e71f254 100644 +--- a/drivers/soc/aspeed/aspeed-bmc-misc.c ++++ b/drivers/soc/aspeed/aspeed-bmc-misc.c +@@ -7,15 +7,18 @@ + #include <linux/platform_device.h> + #include <linux/regmap.h> + #include <linux/mfd/syscon.h> ++#include <crypto/hash.h> + + #define DEVICE_NAME "aspeed-bmc-misc" + + struct aspeed_bmc_ctrl { + const char *name; + u32 offset; +- u32 mask; ++ u64 mask; + u32 shift; + bool read_only; ++ u32 reg_width; ++ const char *hash_data; + struct regmap *map; + struct kobj_attribute attr; + }; +@@ -31,6 +34,7 @@ static int aspeed_bmc_misc_parse_dt_child(struct device_node *child, + struct aspeed_bmc_ctrl *ctrl) + { + int rc; ++ u32 mask; + + /* Example child: + * +@@ -38,6 +42,7 @@ static int aspeed_bmc_misc_parse_dt_child(struct device_node *child, + * offset = <0x80>; + * bit-mask = <0x1>; + * bit-shift = <6>; ++ * reg-width = <64>; + * label = "foo"; + * } + */ +@@ -48,9 +53,22 @@ static int aspeed_bmc_misc_parse_dt_child(struct device_node *child, + if (rc < 0) + return rc; + +- rc = of_property_read_u32(child, "bit-mask", &ctrl->mask); +- if (rc < 0) +- return rc; ++ /* optional reg-width, default to 32 */ ++ rc = of_property_read_u32(child, "reg-width", &ctrl->reg_width); ++ if (rc < 0 || ctrl->reg_width != 64) ++ ctrl->reg_width = 32; ++ ++ if (ctrl->reg_width == 32) { ++ rc = of_property_read_u32(child, "bit-mask", &mask); ++ if (rc < 0) ++ return rc; ++ ctrl->mask = mask; ++ } else { ++ rc = of_property_read_u64(child, "bit-mask", &ctrl->mask); ++ if (rc < 0) ++ return rc; ++ } ++ ctrl->mask <<= ctrl->shift; + + rc = of_property_read_u32(child, "bit-shift", &ctrl->shift); + if (rc < 0) +@@ -58,7 +76,9 @@ static int aspeed_bmc_misc_parse_dt_child(struct device_node *child, + + ctrl->read_only = of_property_read_bool(child, "read-only"); + +- ctrl->mask <<= ctrl->shift; ++ /* optional hash_data for obfuscating reads */ ++ if (of_property_read_string(child, "hash-data", &ctrl->hash_data)) ++ ctrl->hash_data = NULL; + + return 0; + } +@@ -88,22 +108,94 @@ static int aspeed_bmc_misc_parse_dt(struct aspeed_bmc_misc *bmc, + return 0; + } + ++#define SHA256_DIGEST_LEN 32 ++static int hmac_sha256(u8 *key, u8 ksize, const char *plaintext, u8 psize, ++ u8 *output) ++{ ++ struct crypto_shash *tfm; ++ struct shash_desc *shash; ++ int ret; ++ ++ if (!ksize) ++ return -EINVAL; ++ ++ tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); ++ if (IS_ERR(tfm)) { ++ return -ENOMEM; ++ } ++ ++ ret = crypto_shash_setkey(tfm, key, ksize); ++ if (ret) ++ goto failed; ++ ++ shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), GFP_KERNEL); ++ if (!shash) { ++ ret = -ENOMEM; ++ goto failed; ++ } ++ ++ shash->tfm = tfm; ++ ret = crypto_shash_digest(shash, plaintext, psize, output); ++ ++ kfree(shash); ++ ++failed: ++ crypto_free_shash(tfm); ++ return ret; ++} ++ + static ssize_t aspeed_bmc_misc_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) + { + struct aspeed_bmc_ctrl *ctrl; +- unsigned int val; ++ u32 val; ++ u64 val64; + int rc; ++ u8 *binbuf; ++ size_t buf_len; ++ u8 hashbuf[SHA256_DIGEST_LEN]; + + ctrl = container_of(attr, struct aspeed_bmc_ctrl, attr); ++ ++ if (ctrl->reg_width == 32) { ++ rc = regmap_read(ctrl->map, ctrl->offset, &val); ++ if (rc) ++ return rc; ++ val &= (u32)ctrl->mask; ++ val >>= ctrl->shift; ++ ++ return sprintf(buf, "%u\n", val); ++ } + rc = regmap_read(ctrl->map, ctrl->offset, &val); + if (rc) + return rc; ++ val64 = val; ++ rc = regmap_read(ctrl->map, ctrl->offset + sizeof(u32), &val); ++ if (rc) ++ return rc; ++ /* aspeed puts 64-bit regs as L, H in address space */ ++ val64 |= (u64)val << 32; ++ val64 &= ctrl->mask; ++ val64 >>= ctrl->shift; ++ buf_len = sizeof(val64); ++ ++ if (ctrl->hash_data) { ++ rc = hmac_sha256((u8*)&val64, buf_len, ctrl->hash_data, ++ strlen(ctrl->hash_data), hashbuf); ++ if (rc) ++ return rc; ++ buf_len = SHA256_DIGEST_LEN; ++ binbuf = hashbuf; ++ } else { ++ binbuf = (u8*)&val64; ++ buf_len = sizeof(val64); ++ } ++ bin2hex(buf, binbuf, buf_len); ++ buf[buf_len * 2] = '\n'; ++ rc = buf_len * 2 + 1; + +- val &= ctrl->mask; +- val >>= ctrl->shift; ++ return rc; + +- return sprintf(buf, "%u\n", val); + } + + static ssize_t aspeed_bmc_misc_store(struct kobject *kobj, +@@ -114,15 +206,15 @@ static ssize_t aspeed_bmc_misc_store(struct kobject *kobj, + long val; + int rc; + +- rc = kstrtol(buf, 0, &val); +- if (rc) +- return rc; +- + ctrl = container_of(attr, struct aspeed_bmc_ctrl, attr); + + if (ctrl->read_only) + return -EROFS; + ++ rc = kstrtol(buf, 0, &val); ++ if (rc) ++ return rc; ++ + val <<= ctrl->shift; + rc = regmap_update_bits(ctrl->map, ctrl->offset, ctrl->mask, val); + +-- +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 a829e544b..936ea4100 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 @@ -68,10 +68,13 @@ SRC_URI += " \ file://0092-SPI-Quad-IO-driver-support-AST2600.patch \ file://0093-ipmi-ipmb_dev_int-add-quick-fix-for-raw-I2C-type-reg.patch \ file://0094-Return-link-speed-and-duplex-settings-for-the-NCSI-c.patch \ - file://0095-pwm-and-tach-driver-changes-for-ast2600.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 \ + file://0102-Fix-for-dirty-node-in-jffs2-summary-entry.patch \ + file://0103-Refine-clock-settings.patch \ + file://0104-Add-chip-unique-id-reading-interface.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 ac7d7f8a7..05e26bedb 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0003-Adding-channel-specific-privilege-to-network.patch @@ -1,7 +1,7 @@ -From 8a127e2054683479d3999ad99ba7ff76c193aa1a Mon Sep 17 00:00:00 2001 +From 5dfcd6c81a9f26c6c9c867a7a49f5259c3512be2 Mon Sep 17 00:00:00 2001 From: AppaRao Puli <apparao.puli@linux.intel.com> -Date: Wed, 5 Sep 2018 14:16:54 +0530 -Subject: [PATCH] Adding channel specific privilege to network +Date: Thu, 2 Apr 2020 17:06:07 +0530 +Subject: [PATCH 1/2] Adding channel specific privilege to network - Adding the channel access information to the network interface object. This privilege will be used in @@ -18,35 +18,36 @@ Change-Id: I3b592a19363eef684e31d5f7c34dad8f2f9211df Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> Signed-off-by: Yong Li <yong.b.li@linux.intel.com> --- - ethernet_interface.cpp | 122 +++++++++++++++++++++++++++++++++++++++++ - ethernet_interface.hpp | 39 +++++++++++++- - network_manager.cpp | 104 ++++++++++++++++++++++++++++++++++++ + ethernet_interface.cpp | 123 +++++++++++++++++++++++++++++++++++++++++++++++++ + ethernet_interface.hpp | 39 +++++++++++++++- + network_manager.cpp | 104 +++++++++++++++++++++++++++++++++++++++++ network_manager.hpp | 9 ++++ - 4 files changed, 267 insertions(+), 1 deletion(-) + 4 files changed, 274 insertions(+), 1 deletion(-) diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp -index 2375482..c3edd4b 100644 +index ed1e1ba..fca86bd 100644 --- a/ethernet_interface.cpp +++ b/ethernet_interface.cpp -@@ -37,6 +37,9 @@ using namespace phosphor::logging; +@@ -37,6 +37,10 @@ using namespace phosphor::logging; using namespace sdbusplus::xyz::openbmc_project::Common::Error; using Argument = xyz::openbmc_project::Common::InvalidArgument; +static constexpr const char* networkChannelCfgFile = + "/var/channel_intf_data.json"; +static constexpr const char* defaultChannelPriv = "priv-admin"; - EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, - const std::string& objPath, - bool dhcpEnabled, Manager& parent, -@@ -56,6 +59,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, - - EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo)); ++ + struct EthernetIntfSocket + { + EthernetIntfSocket(int domain, int type, int protocol) +@@ -86,6 +90,7 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, EthernetInterfaceIntf::speed(std::get<0>(ifInfo)); + EthernetInterfaceIntf::linkUp(std::get<3>(ifInfo)); + #endif + getChannelPrivilege(intfName); // Emit deferred signal. if (emitSignal) -@@ -823,5 +827,123 @@ void EthernetInterface::deleteAll() +@@ -869,5 +874,123 @@ void EthernetInterface::deleteAll() manager.writeToConfigurationFile(); } @@ -171,7 +172,7 @@ index 2375482..c3edd4b 100644 } // namespace network } // namespace phosphor diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp -index 60c56e3..3e4cf12 100644 +index 68668d6..058d328 100644 --- a/ethernet_interface.hpp +++ b/ethernet_interface.hpp @@ -2,11 +2,14 @@ @@ -215,7 +216,7 @@ index 60c56e3..3e4cf12 100644 namespace fs = std::experimental::filesystem; class Manager; // forward declaration of network manager. -@@ -195,6 +204,14 @@ class EthernetInterface : public Ifaces +@@ -199,6 +208,14 @@ class EthernetInterface : public Ifaces */ void deleteAll(); @@ -229,8 +230,8 @@ index 60c56e3..3e4cf12 100644 + using ChannelAccessIntf::maxPrivilege; using EthernetInterfaceIntf::dHCPEnabled; using EthernetInterfaceIntf::interfaceName; - using MacAddressIntf::mACAddress; -@@ -291,6 +308,26 @@ class EthernetInterface : public Ifaces + using EthernetInterfaceIntf::linkUp; +@@ -296,6 +313,26 @@ class EthernetInterface : public Ifaces std::string objPath; friend class TestEthernetInterface; @@ -380,7 +381,7 @@ index 043d7a2..75f4e5f 100644 bool Manager::createDefaultNetworkFiles(bool force) diff --git a/network_manager.hpp b/network_manager.hpp -index edb341f..e16b205 100644 +index edb341f..5fb9fe8 100644 --- a/network_manager.hpp +++ b/network_manager.hpp @@ -137,6 +137,12 @@ class Manager : public details::VLANCreateIface @@ -396,7 +397,7 @@ index edb341f..e16b205 100644 protected: /** @brief Persistent sdbusplus DBus bus connection. */ sdbusplus::bus::bus& bus; -@@ -159,6 +162,9 @@ class Manager : public details::VLANCreateIface +@@ -159,6 +165,9 @@ class Manager : public details::VLANCreateIface /** @brief Network Configuration directory. */ fs::path confDir; @@ -407,5 +408,5 @@ index edb341f..e16b205 100644 } // namespace network -- -2.21.0 +2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch deleted file mode 100644 index b6cf8f77d..000000000 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch +++ /dev/null @@ -1,504 +0,0 @@ -From 42f361622a9c029221c8a90f92104703166e48c2 Mon Sep 17 00:00:00 2001 -From: Johnathan Mantey <johnathanx.mantey@intel.com> -Date: Thu, 30 Jan 2020 15:07:39 -0800 -Subject: [PATCH] Enhance DHCP beyond just OFF and IPv4/IPv6 enabled. - -DHCP is not a binary option. The network interface can have DHCP -disabled, IPv4 only, IPv6 only, and IPv4/IPv6. - -Tested: -Using dbus-send or busctl: -Disabled DHCP, and confirmed only link local addresses were present. - -Assigned only static addresses. Both with/and without the gateway set -to 0.0.0.0 - -Deleted static IPv4 addresses. -Reassigned static addresses. - -Enabled DHCP for ipv4 only, and witnessed a DHCP server assign a valid -address. - -Assigned static IPv4 address. -Assigned static IPv6 address. -Confirmed both IPv4 and IPv6 static addresses are active. - -Enabled DHCP for ipv6 only, and confirmed the static v4 address -remains. The ipv6 address is removed, waiting for a DHCP6 server. - -Enabled DHCP for both ipv4 and ipv6. IPv4 address was assigned. IPv6 -address is assumed to succeed, as systemd config file enables IPv6 -DHCP. - -Change-Id: I2e0ff80ac3a5e88bcff28adac419bf21e37be162 -Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> ---- - Makefile.am | 1 + - configure.ac | 1 + - ethernet_interface.cpp | 147 ++++++++++++++++++++++--------- - ethernet_interface.hpp | 31 ++++++- - test/test_ethernet_interface.cpp | 3 +- - test/test_vlan_interface.cpp | 3 +- - types.hpp | 3 + - util.cpp | 16 +++- - util.hpp | 7 +- - vlan_interface.cpp | 2 +- - vlan_interface.hpp | 4 +- - 11 files changed, 165 insertions(+), 53 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 1c47747..ff252fc 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -97,6 +97,7 @@ phosphor_network_manager_CXXFLAGS = \ - $(SDEVENTPLUS_CFLAGS) \ - $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \ - $(PHOSPHOR_LOGGING_CFLAGS) \ -+ -DBOOST_ASIO_DISABLE_THREADS \ - -flto - if FEATURE_NIC_ETHTOOL - phosphor_network_manager_CXXFLAGS += -DNIC_SUPPORTS_ETHTOOL -diff --git a/configure.ac b/configure.ac -index 12d6caa..fed3e09 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -36,6 +36,7 @@ AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) - PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging]) - PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces]) - PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0]) -+AC_CHECK_HEADER(boost/algorithm/string/split.hpp, [], [AC_MSG_ERROR([Could not find boost/algorithm/string/split.hpp])]) - - # Checks for header files. - AC_CHECK_HEADER(systemd/sd-bus.h, ,\ -diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp -index 73fd8fe..ba6195e 100644 ---- a/ethernet_interface.cpp -+++ b/ethernet_interface.cpp -@@ -3,7 +3,6 @@ - #include "ethernet_interface.hpp" - - #include "config_parser.hpp" --#include "ipaddress.hpp" - #include "neighbor.hpp" - #include "network_manager.hpp" - #include "vlan_interface.hpp" -@@ -40,9 +39,12 @@ using Argument = xyz::openbmc_project::Common::InvalidArgument; - static constexpr const char* networkChannelCfgFile = - "/var/channel_intf_data.json"; - static constexpr const char* defaultChannelPriv = "priv-admin"; -+std::map<std::string, std::string> mapDHCPToSystemd = { -+ {"both", "true"}, {"v4", "ipv4"}, {"v6", "ipv6"}, {"none", "false"}}; -+ - EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, - const std::string& objPath, -- bool dhcpEnabled, Manager& parent, -+ DHCPConf dhcpEnabled, Manager& parent, - bool emitSignal) : - Ifaces(bus, objPath.c_str(), true), - bus(bus), manager(parent), objPath(objPath) -@@ -83,6 +85,65 @@ static IP::Protocol convertFamily(int family) - throw std::invalid_argument("Bad address family"); - } - -+void EthernetInterface::disableDHCP(IP::Protocol protocol) -+{ -+ DHCPConf dhcpState = EthernetInterfaceIntf::dHCPEnabled(); -+ if (dhcpState == EthernetInterface::DHCPConf::both) -+ { -+ if (protocol == IP::Protocol::IPv4) -+ { -+ dHCPEnabled(EthernetInterface::DHCPConf::v6); -+ } -+ else if (protocol == IP::Protocol::IPv6) -+ { -+ dHCPEnabled(EthernetInterface::DHCPConf::v4); -+ } -+ } -+ else if ((dhcpState == EthernetInterface::DHCPConf::v4) && -+ (protocol == IP::Protocol::IPv4)) -+ { -+ dHCPEnabled(EthernetInterface::DHCPConf::none); -+ } -+ else if ((dhcpState == EthernetInterface::DHCPConf::v6) && -+ (protocol == IP::Protocol::IPv6)) -+ { -+ dHCPEnabled(EthernetInterface::DHCPConf::none); -+ } -+} -+ -+bool EthernetInterface::dhcpIsEnabled(IP::Protocol family, bool ignoreProtocol) -+{ -+ return ((EthernetInterfaceIntf::dHCPEnabled() == -+ EthernetInterface::DHCPConf::both) || -+ ((EthernetInterfaceIntf::dHCPEnabled() == -+ EthernetInterface::DHCPConf::v6) && -+ ((family == IP::Protocol::IPv6) || ignoreProtocol)) || -+ ((EthernetInterfaceIntf::dHCPEnabled() == -+ EthernetInterface::DHCPConf::v4) && -+ ((family == IP::Protocol::IPv4) || ignoreProtocol))); -+} -+ -+bool EthernetInterface::dhcpToBeEnabled(IP::Protocol family, -+ std::string& nextDHCPState) -+{ -+ return ((nextDHCPState == "true") || -+ ((nextDHCPState == "ipv6") && (family == IP::Protocol::IPv6)) || -+ ((nextDHCPState == "ipv4") && (family == IP::Protocol::IPv4))); -+} -+ -+bool EthernetInterface::addressIsStatic(IP::AddressOrigin origin) -+{ -+ return ( -+#ifdef LINK_LOCAL_AUTOCONFIGURATION -+ (origin == IP::AddressOrigin::Static) -+#else -+ (origin == IP::AddressOrigin::Static || -+ origin == IP::AddressOrigin::LinkLocal) -+#endif -+ -+ ); -+} -+ - void EthernetInterface::createIPAddressObjects() - { - addrs.clear(); -@@ -93,7 +154,7 @@ void EthernetInterface::createIPAddressObjects() - { - IP::Protocol addressType = convertFamily(addr.addrType); - IP::AddressOrigin origin = IP::AddressOrigin::Static; -- if (dHCPEnabled()) -+ if (dhcpIsEnabled(addressType)) - { - origin = IP::AddressOrigin::DHCP; - } -@@ -154,11 +215,11 @@ ObjectPath EthernetInterface::iP(IP::Protocol protType, std::string ipaddress, - uint8_t prefixLength, std::string gateway) - { - -- if (dHCPEnabled()) -+ if (dhcpIsEnabled(protType)) - { - log<level::INFO>("DHCP enabled on the interface"), - entry("INTERFACE=%s", interfaceName().c_str()); -- dHCPEnabled(false); -+ disableDHCP(protType); - } - - IP::AddressOrigin origin = IP::AddressOrigin::Static; -@@ -441,7 +502,7 @@ bool EthernetInterface::iPv6AcceptRA(bool value) - return value; - } - --bool EthernetInterface::dHCPEnabled(bool value) -+EthernetInterface::DHCPConf EthernetInterface::dHCPEnabled(DHCPConf value) - { - if (value == EthernetInterfaceIntf::dHCPEnabled()) - { -@@ -508,7 +569,7 @@ void EthernetInterface::loadVLAN(VlanId id) - std::string path = objPath; - path += "_" + std::to_string(id); - -- auto dhcpEnabled = -+ DHCPConf dhcpEnabled = - getDHCPValue(manager.getConfDir().string(), vlanInterfaceName); - - auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>( -@@ -530,7 +591,8 @@ ObjectPath EthernetInterface::createVLAN(VlanId id) - path += "_" + std::to_string(id); - - auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>( -- bus, path.c_str(), false, id, *this, manager); -+ bus, path.c_str(), EthernetInterface::DHCPConf::none, id, *this, -+ manager); - - // write the device file for the vlan interface. - vlanIntf->writeDeviceFile(); -@@ -603,8 +665,6 @@ void EthernetInterface::writeConfigurationFile() - // write all the static ip address in the systemd-network conf file - - using namespace std::string_literals; -- using AddressOrigin = -- sdbusplus::xyz::openbmc_project::Network::server::IP::AddressOrigin; - namespace fs = std::experimental::filesystem; - - // if there is vlan interafce then write the configuration file -@@ -673,42 +733,45 @@ void EthernetInterface::writeConfigurationFile() - } - - // Add the DHCP entry -- auto value = dHCPEnabled() ? "true"s : "false"s; -- stream << "DHCP="s + value + "\n"; -+ std::string value = convertForMessage(EthernetInterfaceIntf::dHCPEnabled()); -+ std::string::size_type loc = value.rfind("."); -+ std::string requestedDHCPState = value.substr(loc + 1); -+ std::string mappedDHCPState = mapDHCPToSystemd[requestedDHCPState]; -+ stream << "DHCP="s + mappedDHCPState + "\n"; -+ -+ bool dhcpv6Requested = dhcpToBeEnabled(IP::Protocol::IPv6, mappedDHCPState); -+ bool dhcpv4Requested = dhcpToBeEnabled(IP::Protocol::IPv4, mappedDHCPState); -+ // Static IP addresses -+ for (const auto& addr : addrs) -+ { -+ bool isValidIPv4 = isValidIP(AF_INET, addr.second->address()); -+ bool isValidIPv6 = isValidIP(AF_INET6, addr.second->address()); -+ if (((!dhcpv4Requested && isValidIPv4) || -+ (!dhcpv6Requested && isValidIPv6)) && -+ addressIsStatic(addr.second->origin())) -+ { -+ // Process all static addresses -+ std::string address = addr.second->address() + "/" + -+ std::to_string(addr.second->prefixLength()); -+ -+ // build the address entries. Do not use [Network] shortcuts to -+ // insert address entries. -+ stream << "[Address]\n"; -+ stream << "Address=" << address << "\n"; -+ } -+ } - -- // When the interface configured as dhcp, we don't need below given entries -- // in config file. -- if (dHCPEnabled() == false) -+ if (manager.getSystemConf()) - { -- // Static -- for (const auto& addr : addrs) -+ const auto& gateway = manager.getSystemConf()->defaultGateway(); -+ if (!gateway.empty()) - { -- if (addr.second->origin() == AddressOrigin::Static --#ifndef LINK_LOCAL_AUTOCONFIGURATION -- || addr.second->origin() == AddressOrigin::LinkLocal --#endif -- ) -- { -- std::string address = -- addr.second->address() + "/" + -- std::to_string(addr.second->prefixLength()); -- -- stream << "Address=" << address << "\n"; -- } -+ stream << "Gateway=" << gateway << "\n"; - } -- -- if (manager.getSystemConf()) -+ const auto& gateway6 = manager.getSystemConf()->defaultGateway6(); -+ if (!gateway6.empty()) - { -- const auto& gateway = manager.getSystemConf()->defaultGateway(); -- if (!gateway.empty()) -- { -- stream << "Gateway=" << gateway << "\n"; -- } -- const auto& gateway6 = manager.getSystemConf()->defaultGateway6(); -- if (!gateway6.empty()) -- { -- stream << "Gateway=" << gateway6 << "\n"; -- } -+ stream << "Gateway=" << gateway6 << "\n"; - } - } - -@@ -819,7 +882,7 @@ std::string EthernetInterface::mACAddress(std::string value) - - void EthernetInterface::deleteAll() - { -- if (EthernetInterfaceIntf::dHCPEnabled()) -+ if (dhcpIsEnabled(IP::Protocol::IPv4, true)) - { - log<level::INFO>("DHCP enabled on the interface"), - entry("INTERFACE=%s", interfaceName().c_str()); -diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp -index 3e4cf12..a962751 100644 ---- a/ethernet_interface.hpp -+++ b/ethernet_interface.hpp -@@ -91,7 +91,7 @@ class EthernetInterface : public Ifaces - * send. - */ - EthernetInterface(sdbusplus::bus::bus& bus, const std::string& objPath, -- bool dhcpEnabled, Manager& parent, -+ DHCPConf dhcpEnabled, Manager& parent, - bool emitSignal = true); - - /** @brief Function to create ipaddress dbus object. -@@ -157,7 +157,34 @@ class EthernetInterface : public Ifaces - } - - /** Set value of DHCPEnabled */ -- bool dHCPEnabled(bool value) override; -+ DHCPConf dHCPEnabled(DHCPConf value) override; -+ -+ /** @brief Determines if DHCP is active for the IP::Protocol supplied. -+ * @param[in] protocol - Either IPv4 or IPv6 -+ * @param[in] ignoreProtocol - Allows IPv4 and IPv6 to be checked using a -+ * single call. -+ * @returns true/false value if DHCP is active for the input protocol -+ */ -+ bool dhcpIsEnabled(IP::Protocol protocol, bool ignoreProtocol = false); -+ -+ /** @brief Determines if DHCP will be active following next reconfig -+ * @param[in] protocol - Either IPv4 or IPv6 -+ * @param[in] nextDHCPState - The new DHCP mode to take affect -+ * @returns true/false value if DHCP is active for the input protocol -+ */ -+ bool dhcpToBeEnabled(IP::Protocol family, std::string& nextDHCPState); -+ -+ /** @brief Determines if the address is manually assigned -+ * @param[in] origin - The origin entry of the IP::Address -+ * @returns true/false value if the address is static -+ */ -+ bool addressIsStatic(IP::AddressOrigin origin); -+ -+ /** @brief Selectively disables DHCP -+ * @param[in] protocol - The IPv4 or IPv6 protocol to return to static -+ * addressing mode -+ */ -+ void disableDHCP(IP::Protocol protocol); - - /** @brief sets the MAC address. - * @param[in] value - MAC address which needs to be set on the system. -diff --git a/test/test_ethernet_interface.cpp b/test/test_ethernet_interface.cpp -index 30dee8a..87fd68d 100644 ---- a/test/test_ethernet_interface.cpp -+++ b/test/test_ethernet_interface.cpp -@@ -58,7 +58,8 @@ class TestEthernetInterface : public testing::Test - { - mock_clear(); - mock_addIF("test0", 1, mac); -- return {bus, "/xyz/openbmc_test/network/test0", false, manager}; -+ return {bus, "/xyz/openbmc_test/network/test0", -+ EthernetInterface::DHCPConf::none, manager}; - } - - int countIPObjects() -diff --git a/test/test_vlan_interface.cpp b/test/test_vlan_interface.cpp -index 1dffc7e..e49b43f 100644 ---- a/test/test_vlan_interface.cpp -+++ b/test/test_vlan_interface.cpp -@@ -50,7 +50,8 @@ class TestVlanInterface : public testing::Test - { - mock_clear(); - mock_addIF("test0", 1); -- return {bus, "/xyz/openbmc_test/network/test0", false, manager}; -+ return {bus, "/xyz/openbmc_test/network/test0", -+ EthernetInterface::DHCPConf::none, manager}; - } - - void setConfDir() -diff --git a/types.hpp b/types.hpp -index 123067a..c4409fe 100644 ---- a/types.hpp -+++ b/types.hpp -@@ -1,5 +1,7 @@ - #pragma once - -+#include "ipaddress.hpp" -+ - #include <ifaddrs.h> - #include <netinet/in.h> - #include <systemd/sd-event.h> -@@ -50,6 +52,7 @@ struct AddrInfo - { - uint8_t addrType; - std::string ipaddress; -+ IP::AddressOrigin origin; - uint16_t prefix; - }; - -diff --git a/util.cpp b/util.cpp -index 13a607f..554d7f6 100644 ---- a/util.cpp -+++ b/util.cpp -@@ -410,9 +410,11 @@ std::optional<std::string> interfaceToUbootEthAddr(const char* intf) - return "eth" + std::to_string(idx) + "addr"; - } - --bool getDHCPValue(const std::string& confDir, const std::string& intf) -+EthernetInterfaceIntf::DHCPConf getDHCPValue(const std::string& confDir, -+ const std::string& intf) - { -- bool dhcp = false; -+ EthernetInterfaceIntf::DHCPConf dhcp = -+ EthernetInterfaceIntf::DHCPConf::none; - // Get the interface mode value from systemd conf - // using namespace std::string_literals; - fs::path confPath = confDir; -@@ -434,7 +436,15 @@ bool getDHCPValue(const std::string& confDir, const std::string& intf) - // There will be only single value for DHCP key. - if (values[0] == "true") - { -- dhcp = true; -+ dhcp = EthernetInterfaceIntf::DHCPConf::both; -+ } -+ else if (values[0] == "ipv4") -+ { -+ dhcp = EthernetInterfaceIntf::DHCPConf::v4; -+ } -+ else if (values[0] == "ipv6") -+ { -+ dhcp = EthernetInterfaceIntf::DHCPConf::v6; - } - return dhcp; - } -diff --git a/util.hpp b/util.hpp -index 251aa0d..ee11f4e 100644 ---- a/util.hpp -+++ b/util.hpp -@@ -13,12 +13,16 @@ - #include <sdbusplus/bus.hpp> - #include <string> - #include <string_view> -+#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp> - - namespace phosphor - { - namespace network - { - -+using EthernetInterfaceIntf = -+ sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface; -+ - constexpr auto IPV4_MIN_PREFIX_LENGTH = 1; - constexpr auto IPV4_MAX_PREFIX_LENGTH = 32; - constexpr auto IPV6_MAX_PREFIX_LENGTH = 64; -@@ -156,7 +160,8 @@ std::optional<std::string> interfaceToUbootEthAddr(const char* intf); - * @param[in] confDir - Network configuration directory. - * @param[in] intf - Interface name. - */ --bool getDHCPValue(const std::string& confDir, const std::string& intf); -+EthernetInterfaceIntf::DHCPConf getDHCPValue(const std::string& confDir, -+ const std::string& intf); - - namespace internal - { -diff --git a/vlan_interface.cpp b/vlan_interface.cpp -index 73de4e8..26282cb 100644 ---- a/vlan_interface.cpp -+++ b/vlan_interface.cpp -@@ -22,7 +22,7 @@ using namespace phosphor::logging; - using namespace sdbusplus::xyz::openbmc_project::Common::Error; - - VlanInterface::VlanInterface(sdbusplus::bus::bus& bus, -- const std::string& objPath, bool dhcpEnabled, -+ const std::string& objPath, DHCPConf dhcpEnabled, - uint32_t vlanID, EthernetInterface& intf, - Manager& parent) : - VlanIface(bus, objPath.c_str()), -diff --git a/vlan_interface.hpp b/vlan_interface.hpp -index a994d05..37ae7ee 100644 ---- a/vlan_interface.hpp -+++ b/vlan_interface.hpp -@@ -45,8 +45,8 @@ class VlanInterface : public VlanIface, - * @param[in] manager - network manager object. - */ - VlanInterface(sdbusplus::bus::bus& bus, const std::string& objPath, -- bool dhcpEnabled, uint32_t vlanID, EthernetInterface& intf, -- Manager& manager); -+ DHCPConf dhcpEnabled, uint32_t vlanID, -+ EthernetInterface& intf, Manager& manager); - - /** @brief Delete this d-bus object. - */ --- -2.24.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Enable-conditional-use-of-ETHTOOL-features-in-the-NI.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Enable-conditional-use-of-ETHTOOL-features-in-the-NI.patch deleted file mode 100644 index c05088990..000000000 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Enable-conditional-use-of-ETHTOOL-features-in-the-NI.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 6d3d50c506e2d6b4982ff6040af9fd61edaa8beb Mon Sep 17 00:00:00 2001 -From: Johnathan Mantey <johnathanx.mantey@intel.com> -Date: Fri, 24 Jan 2020 13:30:39 -0800 -Subject: [PATCH] Enable conditional use of ETHTOOL features in the NIC driver - -The retrieval of the NIC speed, duplex, and autonegotiation -capabilities using the ETHTOOL driver extensions is not supported in -every NIC. - -Depending on the driver, the use of the ETHTOOL_GSET command may -result in undesirable messages being printed by the kernel. In order -to avoid these kernel messages a compile time switch is added. By -default the switch disables the use of the ETHTOOL features. Enable -the ETHTOOL feature by adding: - EXTRA_OECONF_append = " --enable-nic-ethtool=yes" -to the phosphor-network bbappend file. - -Tested: -Compiled the source without changing the bbappend file. The code -compiled as is, and after code was added that would cause a compile -time failure. -Loaded the code, and performed a Redfish read of the NIC. The -SpeedMbps field was confirmed to be set to 0. - -Enabled compiling the code by adding the EXTRA_OECONF entry to the -bbappend file. The code compiled as is, and failed to compile after -adding invalid code to the protected blocks. -Loaded the code, and performed a Redfish read of the NIC. The -SpeedMbps reported the correct link speed. - -Change-Id: If03e7d473d439ebb4a01b5d3f45e37ede2a5a84f -Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> ---- - Makefile.am | 3 +++ - configure.ac | 10 ++++++++++ - ethernet_interface.cpp | 13 ++++++++----- - 3 files changed, 21 insertions(+), 5 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 2a54797..ff252fc 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -99,6 +99,9 @@ phosphor_network_manager_CXXFLAGS = \ - $(PHOSPHOR_LOGGING_CFLAGS) \ - -DBOOST_ASIO_DISABLE_THREADS \ - -flto -+if FEATURE_NIC_ETHTOOL -+phosphor_network_manager_CXXFLAGS += -DNIC_SUPPORTS_ETHTOOL -+endif - - xyz/openbmc_project/Network/VLAN/Create/server.cpp: xyz/openbmc_project/Network/VLAN/Create.interface.yaml xyz/openbmc_project/Network/VLAN/Create/server.hpp - @mkdir -p `dirname $@` -diff --git a/configure.ac b/configure.ac -index 00b23bc..fed3e09 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -114,6 +114,16 @@ AC_SUBST(DEFAULT_BUSNAME, ["$DEFAULT_BUSNAME"]) - AC_ARG_VAR(SYSTEMD_TARGET, "Target for starting this service") - AS_IF([test "x$SYSTEMD_TARGET" == "x"], [SYSTEMD_TARGET="multi-user.target"]) - -+AC_ARG_ENABLE([nic_ethtool], -+ [ --enable-nic-ethtool Enable/disable the use of ETHTOOL features in the NIC driver], -+ [case "${enableval}" in -+ yes) nic_ethtool=true ;; -+ no) nic_ethtool=false ;; -+ *) AC_MSG_ERROR([bad value ${nic_ethtool} for --enable-nic-ethtool]) ;; -+ esac],[nic_ethtool=false] -+ ) -+AM_CONDITIONAL([FEATURE_NIC_ETHTOOL], [test x$nic_ethtool = xtrue]) -+ - # Create configured output. - AC_CONFIG_FILES([Makefile test/Makefile]) - AC_CONFIG_FILES([xyz.openbmc_project.Network.service]) -diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp -index 7f81003..ba6195e 100644 ---- a/ethernet_interface.cpp -+++ b/ethernet_interface.cpp -@@ -57,10 +57,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::autoNeg(std::get<2>(ifInfo)); - EthernetInterfaceIntf::speed(std::get<0>(ifInfo)); -+#endif - getChannelPrivilege(intfName); - - // Emit deferred signal. -@@ -283,13 +285,13 @@ ObjectPath EthernetInterface::neighbor(std::string iPAddress, - return objectPath; - } - -+#if NIC_SUPPORTS_ETHTOOL - /* --Note: We don't have support for ethtool now --will enable this code once we bring the ethtool --in the image. --TODO: https://github.com/openbmc/openbmc/issues/1484 -+ 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() - */ -- - InterfaceInfo EthernetInterface::getInterfaceInfo() const - { - int sock{-1}; -@@ -330,6 +332,7 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const - } - return std::make_tuple(speed, duplex, autoneg); - } -+#endif - - /** @brief get the mac address of the interface. - * @return macaddress on success --- -2.24.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0009-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0009-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch index b6cf8f77d..596dfce48 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0009-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0009-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch @@ -1,4 +1,4 @@ -From 42f361622a9c029221c8a90f92104703166e48c2 Mon Sep 17 00:00:00 2001 +From 163c1756ee676859622614996be81393eb348220 Mon Sep 17 00:00:00 2001 From: Johnathan Mantey <johnathanx.mantey@intel.com> Date: Thu, 30 Jan 2020 15:07:39 -0800 Subject: [PATCH] Enhance DHCP beyond just OFF and IPv4/IPv6 enabled. @@ -35,7 +35,7 @@ Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> --- Makefile.am | 1 + configure.ac | 1 + - ethernet_interface.cpp | 147 ++++++++++++++++++++++--------- + ethernet_interface.cpp | 146 ++++++++++++++++++++++--------- ethernet_interface.hpp | 31 ++++++- test/test_ethernet_interface.cpp | 3 +- test/test_vlan_interface.cpp | 3 +- @@ -44,10 +44,10 @@ Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> util.hpp | 7 +- vlan_interface.cpp | 2 +- vlan_interface.hpp | 4 +- - 11 files changed, 165 insertions(+), 53 deletions(-) + 11 files changed, 164 insertions(+), 53 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 1c47747..ff252fc 100644 +index 3bb5e7b..0bbbc8f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,6 +97,7 @@ phosphor_network_manager_CXXFLAGS = \ @@ -56,8 +56,8 @@ index 1c47747..ff252fc 100644 $(PHOSPHOR_LOGGING_CFLAGS) \ + -DBOOST_ASIO_DISABLE_THREADS \ -flto + if FEATURE_NIC_ETHTOOL - phosphor_network_manager_CXXFLAGS += -DNIC_SUPPORTS_ETHTOOL diff --git a/configure.ac b/configure.ac index 12d6caa..fed3e09 100644 --- a/configure.ac @@ -71,7 +71,7 @@ index 12d6caa..fed3e09 100644 # Checks for header files. AC_CHECK_HEADER(systemd/sd-bus.h, ,\ diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp -index 73fd8fe..ba6195e 100644 +index fca86bd..3fb0f5e 100644 --- a/ethernet_interface.cpp +++ b/ethernet_interface.cpp @@ -3,7 +3,6 @@ @@ -82,13 +82,13 @@ index 73fd8fe..ba6195e 100644 #include "neighbor.hpp" #include "network_manager.hpp" #include "vlan_interface.hpp" -@@ -40,9 +39,12 @@ using Argument = xyz::openbmc_project::Common::InvalidArgument; - static constexpr const char* networkChannelCfgFile = - "/var/channel_intf_data.json"; - static constexpr const char* defaultChannelPriv = "priv-admin"; +@@ -62,10 +61,12 @@ struct EthernetIntfSocket + + int sock{-1}; + }; +std::map<std::string, std::string> mapDHCPToSystemd = { + {"both", "true"}, {"v4", "ipv4"}, {"v6", "ipv6"}, {"none", "false"}}; -+ + EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, const std::string& objPath, - bool dhcpEnabled, Manager& parent, @@ -96,7 +96,7 @@ index 73fd8fe..ba6195e 100644 bool emitSignal) : Ifaces(bus, objPath.c_str(), true), bus(bus), manager(parent), objPath(objPath) -@@ -83,6 +85,65 @@ static IP::Protocol convertFamily(int family) +@@ -112,6 +113,65 @@ static IP::Protocol convertFamily(int family) throw std::invalid_argument("Bad address family"); } @@ -162,7 +162,7 @@ index 73fd8fe..ba6195e 100644 void EthernetInterface::createIPAddressObjects() { addrs.clear(); -@@ -93,7 +154,7 @@ void EthernetInterface::createIPAddressObjects() +@@ -122,7 +182,7 @@ void EthernetInterface::createIPAddressObjects() { IP::Protocol addressType = convertFamily(addr.addrType); IP::AddressOrigin origin = IP::AddressOrigin::Static; @@ -171,7 +171,7 @@ index 73fd8fe..ba6195e 100644 { origin = IP::AddressOrigin::DHCP; } -@@ -154,11 +215,11 @@ ObjectPath EthernetInterface::iP(IP::Protocol protType, std::string ipaddress, +@@ -183,11 +243,11 @@ ObjectPath EthernetInterface::iP(IP::Protocol protType, std::string ipaddress, uint8_t prefixLength, std::string gateway) { @@ -185,7 +185,7 @@ index 73fd8fe..ba6195e 100644 } IP::AddressOrigin origin = IP::AddressOrigin::Static; -@@ -441,7 +502,7 @@ bool EthernetInterface::iPv6AcceptRA(bool value) +@@ -460,7 +520,7 @@ bool EthernetInterface::iPv6AcceptRA(bool value) return value; } @@ -194,7 +194,7 @@ index 73fd8fe..ba6195e 100644 { if (value == EthernetInterfaceIntf::dHCPEnabled()) { -@@ -508,7 +569,7 @@ void EthernetInterface::loadVLAN(VlanId id) +@@ -552,7 +612,7 @@ void EthernetInterface::loadVLAN(VlanId id) std::string path = objPath; path += "_" + std::to_string(id); @@ -203,7 +203,7 @@ index 73fd8fe..ba6195e 100644 getDHCPValue(manager.getConfDir().string(), vlanInterfaceName); auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>( -@@ -530,7 +591,8 @@ ObjectPath EthernetInterface::createVLAN(VlanId id) +@@ -574,7 +634,8 @@ ObjectPath EthernetInterface::createVLAN(VlanId id) path += "_" + std::to_string(id); auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>( @@ -213,7 +213,7 @@ index 73fd8fe..ba6195e 100644 // write the device file for the vlan interface. vlanIntf->writeDeviceFile(); -@@ -603,8 +665,6 @@ void EthernetInterface::writeConfigurationFile() +@@ -647,8 +708,6 @@ void EthernetInterface::writeConfigurationFile() // write all the static ip address in the systemd-network conf file using namespace std::string_literals; @@ -222,12 +222,16 @@ index 73fd8fe..ba6195e 100644 namespace fs = std::experimental::filesystem; // if there is vlan interafce then write the configuration file -@@ -673,42 +733,45 @@ void EthernetInterface::writeConfigurationFile() +@@ -717,42 +776,45 @@ void EthernetInterface::writeConfigurationFile() } // Add the DHCP entry - auto value = dHCPEnabled() ? "true"s : "false"s; - stream << "DHCP="s + value + "\n"; +- +- // When the interface configured as dhcp, we don't need below given entries +- // in config file. +- if (dHCPEnabled() == false) + std::string value = convertForMessage(EthernetInterfaceIntf::dHCPEnabled()); + std::string::size_type loc = value.rfind("."); + std::string requestedDHCPState = value.substr(loc + 1); @@ -238,33 +242,14 @@ index 73fd8fe..ba6195e 100644 + bool dhcpv4Requested = dhcpToBeEnabled(IP::Protocol::IPv4, mappedDHCPState); + // Static IP addresses + for (const auto& addr : addrs) -+ { + { +- // Static +- for (const auto& addr : addrs) + bool isValidIPv4 = isValidIP(AF_INET, addr.second->address()); + bool isValidIPv6 = isValidIP(AF_INET6, addr.second->address()); + if (((!dhcpv4Requested && isValidIPv4) || + (!dhcpv6Requested && isValidIPv6)) && + addressIsStatic(addr.second->origin())) -+ { -+ // Process all static addresses -+ std::string address = addr.second->address() + "/" + -+ std::to_string(addr.second->prefixLength()); -+ -+ // build the address entries. Do not use [Network] shortcuts to -+ // insert address entries. -+ stream << "[Address]\n"; -+ stream << "Address=" << address << "\n"; -+ } -+ } - -- // When the interface configured as dhcp, we don't need below given entries -- // in config file. -- if (dHCPEnabled() == false) -+ if (manager.getSystemConf()) - { -- // Static -- for (const auto& addr : addrs) -+ const auto& gateway = manager.getSystemConf()->defaultGateway(); -+ if (!gateway.empty()) { - if (addr.second->origin() == AddressOrigin::Static -#ifndef LINK_LOCAL_AUTOCONFIGURATION @@ -278,12 +263,22 @@ index 73fd8fe..ba6195e 100644 - - stream << "Address=" << address << "\n"; - } -+ stream << "Gateway=" << gateway << "\n"; ++ // Process all static addresses ++ std::string address = addr.second->address() + "/" + ++ std::to_string(addr.second->prefixLength()); ++ ++ // build the address entries. Do not use [Network] shortcuts to ++ // insert address entries. ++ stream << "[Address]\n"; ++ stream << "Address=" << address << "\n"; } -- ++ } + - if (manager.getSystemConf()) -+ const auto& gateway6 = manager.getSystemConf()->defaultGateway6(); -+ if (!gateway6.empty()) ++ if (manager.getSystemConf()) ++ { ++ const auto& gateway = manager.getSystemConf()->defaultGateway(); ++ if (!gateway.empty()) { - const auto& gateway = manager.getSystemConf()->defaultGateway(); - if (!gateway.empty()) @@ -295,11 +290,16 @@ index 73fd8fe..ba6195e 100644 - { - stream << "Gateway=" << gateway6 << "\n"; - } ++ stream << "Gateway=" << gateway << "\n"; ++ } ++ const auto& gateway6 = manager.getSystemConf()->defaultGateway6(); ++ if (!gateway6.empty()) ++ { + stream << "Gateway=" << gateway6 << "\n"; } } -@@ -819,7 +882,7 @@ std::string EthernetInterface::mACAddress(std::string value) +@@ -863,7 +925,7 @@ std::string EthernetInterface::mACAddress(std::string value) void EthernetInterface::deleteAll() { @@ -309,10 +309,10 @@ index 73fd8fe..ba6195e 100644 log<level::INFO>("DHCP enabled on the interface"), entry("INTERFACE=%s", interfaceName().c_str()); diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp -index 3e4cf12..a962751 100644 +index 058d328..4e36ae8 100644 --- a/ethernet_interface.hpp +++ b/ethernet_interface.hpp -@@ -91,7 +91,7 @@ class EthernetInterface : public Ifaces +@@ -92,7 +92,7 @@ class EthernetInterface : public Ifaces * send. */ EthernetInterface(sdbusplus::bus::bus& bus, const std::string& objPath, @@ -321,7 +321,7 @@ index 3e4cf12..a962751 100644 bool emitSignal = true); /** @brief Function to create ipaddress dbus object. -@@ -157,7 +157,34 @@ class EthernetInterface : public Ifaces +@@ -158,7 +158,34 @@ class EthernetInterface : public Ifaces } /** Set value of DHCPEnabled */ @@ -355,8 +355,8 @@ index 3e4cf12..a962751 100644 + */ + void disableDHCP(IP::Protocol protocol); - /** @brief sets the MAC address. - * @param[in] value - MAC address which needs to be set on the system. + /** Retrieve Link State */ + bool linkUp() const override; diff --git a/test/test_ethernet_interface.cpp b/test/test_ethernet_interface.cpp index 30dee8a..87fd68d 100644 --- a/test/test_ethernet_interface.cpp @@ -500,5 +500,5 @@ index a994d05..37ae7ee 100644 /** @brief Delete this d-bus object. */ -- -2.24.1 +2.25.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 deleted file mode 100644 index eb4efab8f..000000000 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0010-Enable-the-network-link-carrier-state-to-be-reported.patch +++ /dev/null @@ -1,225 +0,0 @@ -From 7e99cfbb5cdbf47cd0350d869be236c88f982fd3 Mon Sep 17 00:00:00 2001 -From: Johnathan Mantey <johnathanx.mantey@intel.com> -Date: Wed, 8 Jan 2020 10:38:58 -0800 -Subject: [PATCH] Enable the network link carrier state to be reported. - -This change allows networkd to keep track of, and report, the state of -the network carrier signal. When a NIC cable is pulled, or inserted, a -DBus client is able identify the condition. - -Tested: -ip link set down dev eth0 # take eth0 down -Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = LinkDown - # InterfaceEnabled = false -ip link set up dev eth0 # bring eth0 back -Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = Linkup - # InterfaceEnabled = true -Pull eth0 cable -Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = LinkDown - # InterfaceEnabled = true -Insert eth0 cable -Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = Linkup - # InterfaceEnabled = true - -Change-Id: I5530cf7882cfbfdba1436dd34b3219c735047c5e -Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> ---- - 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 ba6195e..8b8f698 100644 ---- a/ethernet_interface.cpp -+++ b/ethernet_interface.cpp -@@ -42,6 +42,28 @@ static constexpr const char* defaultChannelPriv = "priv-admin"; - std::map<std::string, std::string> mapDHCPToSystemd = { - {"both", "true"}, {"v4", "ipv4"}, {"v6", "ipv6"}, {"none", "false"}}; - -+struct EthernetIntfSocket -+{ -+ EthernetIntfSocket(int domain, int type, int protocol) -+ { -+ if ((sock = socket(domain, type, protocol)) < 0) -+ { -+ log<level::ERR>("socket creation failed:", -+ entry("ERROR=%s", strerror(errno))); -+ } -+ } -+ -+ ~EthernetIntfSocket() -+ { -+ if (sock >= 0) -+ { -+ close(sock); -+ } -+ } -+ -+ int sock{-1}; -+}; -+ - EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, - const std::string& objPath, - DHCPConf dhcpEnabled, Manager& parent, -@@ -62,6 +84,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)); - #endif - getChannelPrivilege(intfName); - -@@ -294,43 +317,33 @@ ObjectPath EthernetInterface::neighbor(std::string iPAddress, - */ - InterfaceInfo EthernetInterface::getInterfaceInfo() const - { -- int sock{-1}; - ifreq ifr{0}; - ethtool_cmd edata{0}; - LinkSpeed speed{0}; - Autoneg autoneg{0}; - DuplexMode duplex{0}; -- do -- { -- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); -- if (sock < 0) -- { -- log<level::ERR>("socket creation failed:", -- entry("ERROR=%s", strerror(errno))); -- break; -- } -+ LinkUp linkState{false}; -+ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); - -- strcpy(ifr.ifr_name, interfaceName().c_str()); -- ifr.ifr_data = reinterpret_cast<char*>(&edata); -+ if (eifSocket.sock < 0) -+ { -+ 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<char*>(&edata); - -- if (ioctl(sock, SIOCETHTOOL, &ifr) < 0) -- { -- log<level::ERR>("ioctl failed for SIOCETHTOOL:", -- entry("ERROR=%s", strerror(errno))); -- break; -- } -+ edata.cmd = ETHTOOL_GSET; -+ if (ioctl(eifSocket.sock, SIOCETHTOOL, &ifr) >= 0) -+ { - speed = edata.speed; - duplex = edata.duplex; - autoneg = edata.autoneg; -- } while (0); -- -- if (sock) -- { -- close(sock); - } -- return std::make_tuple(speed, duplex, autoneg); -+ -+ linkState = linkUp(); -+ -+ return std::make_tuple(speed, duplex, autoneg, linkState); - } - #endif - -@@ -341,17 +354,17 @@ InterfaceInfo EthernetInterface::getInterfaceInfo() const - std::string - EthernetInterface::getMACAddress(const std::string& interfaceName) const - { -- ifreq ifr{}; -- int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); -- if (sock < 0) -+ std::string activeMACAddr = MacAddressIntf::mACAddress(); -+ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); -+ -+ if (eifSocket.sock < 0) - { -- log<level::ERR>("socket creation failed:", -- entry("ERROR=%s", strerror(errno))); -- elog<InternalFailure>(); -+ return activeMACAddr; - } - -- std::strcpy(ifr.ifr_name, interfaceName.c_str()); -- if (ioctl(sock, SIOCGIFHWADDR, &ifr) != 0) -+ ifreq ifr{0}; -+ std::strncpy(ifr.ifr_name, interfaceName.c_str(), IFNAMSIZ - 1); -+ if (ioctl(eifSocket.sock, SIOCGIFHWADDR, &ifr) != 0) - { - log<level::ERR>("ioctl failed for SIOCGIFHWADDR:", - entry("ERROR=%s", strerror(errno))); -@@ -514,6 +527,31 @@ EthernetInterface::DHCPConf EthernetInterface::dHCPEnabled(DHCPConf value) - return value; - } - -+bool EthernetInterface::linkUp() const -+{ -+ EthernetIntfSocket eifSocket(PF_INET, SOCK_DGRAM, IPPROTO_IP); -+ bool value = EthernetInterfaceIntf::linkUp(); -+ -+ 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<bool>(ifr.ifr_flags & IFF_RUNNING); -+ } -+ else -+ { -+ log<level::ERR>("ioctl failed for SIOCGIFFLAGS:", -+ entry("ERROR=%s", strerror(errno))); -+ } -+ -+ return value; -+} -+ - ServerList EthernetInterface::nameservers(ServerList value) - { - for (const auto& nameserverip : value) -diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp -index a962751..4e36ae8 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 LinkUp = bool; - using VlanId = uint32_t; - using InterfaceName = std::string; --using InterfaceInfo = std::tuple<LinkSpeed, DuplexMode, Autoneg>; -+using InterfaceInfo = std::tuple<LinkSpeed, DuplexMode, Autoneg, LinkUp>; - using AddressMap = std::map<std::string, std::shared_ptr<IPAddress>>; - using NeighborMap = std::map<std::string, std::shared_ptr<Neighbor>>; - using VlanInterfaceMap = -@@ -186,6 +187,9 @@ class EthernetInterface : public Ifaces - */ - void disableDHCP(IP::Protocol protocol); - -+ /** Retrieve Link State */ -+ bool linkUp() const 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::linkUp; - 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 e1480ec1b..fe7f050c0 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 @@ -5,11 +5,9 @@ DEPENDS += "nlohmann-json boost" #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://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" +SRCREV = "ad4bf5ce1292c74ac2ecea413ff27c14cf5748fe" EXTRA_OECONF_append = " --enable-nic-ethtool=yes" 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 4e56cb963..59330e8f3 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,6 @@ # this is here just to bump faster than upstream SRC_URI = "git://github.com/openbmc/entity-manager.git" -SRCREV = "29d83258f1268b3c41f97649518fa9bb1ffe83ed" +SRCREV = "ff58eba9e7f06b60879db38e1be6b41c6b2b9092" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -EXTRA_OECMAKE = "-DYOCTO=1" - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend new file mode 100644 index 000000000..18780dfdd --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend @@ -0,0 +1,2 @@ +RDEPENDS_${PN}_remove = "phosphor-settings-manager" +RDEPENDS_${PN} += " settings" 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 580fd9038..63124074a 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 = "8aec946e2844831cfc377c0e0136de5714c08a5b" +SRCREV = "00c8527a40650650d2826d77b6e4e6d48f68f622" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend index cbd8e1171..2026a13b0 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend @@ -5,6 +5,6 @@ SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service" EXTRA_OECONF = "--enable-configure-dbus=yes" SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git" -SRCREV = "3660b3888af789266b6c84714b4e161a32e6ea54" +SRCREV = "298a95cbb192ecc678b1a496acc954a3b2adf450" FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh index 3bf1aedb5..52da21230 100755 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh @@ -29,6 +29,8 @@ if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then case $BOARD_ID in 12) NAME="D50TNP1SB" PRODID="0x99";; + 38) NAME="WilsonCity" + PRODID="0x91";; 40) NAME="CooperCity" PRODID="0x9d";; 42) NAME="WilsonCity" 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 deleted file mode 100644 index 995b62750..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch +++ /dev/null @@ -1,331 +0,0 @@ -From 7c55dfb33e035f8a31f11fd3e047a4b674f392ac Mon Sep 17 00:00:00 2001 -From: Johnathan Mantey <johnathanx.mantey@intel.com> -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 <johnathanx.mantey@intel.com> ---- - 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<const std::string *>(); -- 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_<logTime>.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> asyncResp, - const std::string &logID, - nlohmann::json &logEntryJson) - { -- auto getStoredLogCallback = [asyncResp, logID, &logEntryJson]( -- const boost::system::error_code ec, -- const std::variant<std::string> &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<std::pair<std::string, VariantType>> ¶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<std::string>( -+ &property.second); -+ if (value != nullptr) -+ { -+ timestamp = *value; -+ } -+ } -+ else if (property.first == "Filename") -+ { -+ const std::string *value = -+ sdbusplus::message::variant_ns::get_if<std::string>( -+ &property.second); -+ if (value != nullptr) -+ { -+ filename = *value; -+ } -+ } - } -- return; -- } -- const std::string *log = std::get_if<std::string>(&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<std::string> &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<std::string>(&resp); -- if (log == nullptr) -- { -- messages::internalError(asyncResp->res); -- return; -- } -+ auto getStoredLogCallback = -+ [asyncResp, logID, fileName]( -+ const boost::system::error_code ec, -+ const std::vector<std::pair<std::string, VariantType>> &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<std::string>( -+ &property.second); -+ if (value != nullptr) -+ { -+ dbusTimestamp = *value; -+ } -+ } -+ else if (property.first == "Filename") -+ { -+ const std::string *value = -+ sdbusplus::message::variant_ns::get_if<std::string>( -+ &property.second); -+ if (value != nullptr) -+ { -+ dbusFilename = *value; -+ } -+ } -+ else if (property.first == "Log") -+ { -+ const std::string *value = -+ sdbusplus::message::variant_ns::get_if<std::string>( -+ &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<unsigned int>(fileSize)); -+ ifs.read(dumpData.data(), static_cast<int>(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 8caee0933..2e59a7b78 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,6 @@ +# todo(james) remove nobranch SRC_URI = "git://github.com/openbmc/bmcweb.git" -SRCREV = "12c7f4388b58a974265827ab62d3981ba98ed8f2" +SRCREV = "e5aaf047b6b41b0837ef0846cf5356c9a6bcb030" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" @@ -10,7 +11,6 @@ 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 \ - file://0002-Match-BMCWeb-crashdump-to-the-D-Bus-interface-provid.patch \ " # Enable PFR support @@ -19,6 +19,9 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DBMCWEB_E # Enable NBD_PROXY EXTRA_OECMAKE += " -DBMCWEB_ENABLE_VM_NBDPROXY=ON" +# Disable MTLS until it passes security review +EXTRA_OECMAKE += " -DBMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION=OFF" + # 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/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index d7cec2d76..6f27959a2 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,9 +1,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" -# TODO: latest is breaking sensor list, needs triage before unpin -SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid;nobranch=1" -SRCREV = "e7e8b8166a1c0e352ee6e0e1daa76abbff228ed6" +# latest upstream HEAD until meta-phosphor autobumps +SRCREV = "6ba8d31525130dbb5ef5b60336993ef7b50a8f51" 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/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend index c82736781..6ea4aa960 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend @@ -3,7 +3,7 @@ inherit useradd # TODO: This should be removed, once up-stream bump up # issue is resolved SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid" -SRCREV = "2555e2ec1c5bd6636eb67a1a2cdf6b8b567772c9" +SRCREV = "9979e9971e17c974f29ec9ab720f5482308c119c" USERADD_PACKAGES = "${PN}" # add a group called ipmi diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl/nonLegacyNode.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl/nonLegacyNode.sh index 2a1a5ea3b..28a6bbe2a 100755 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl/nonLegacyNode.sh +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl/nonLegacyNode.sh @@ -15,6 +15,9 @@ set_fan_speed() { $(set_fan_speed) +#Stop power control service in NL mode +systemctl stop xyz.openbmc_project.Chassis.Control.Power.service + export TERM=xterm # Autologin root user to serial console (ttyS4) on boot exec /sbin/agetty -a root -J -8 -L ttyS4 115200 $TERM diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb new file mode 100644 index 000000000..f7bec2af9 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb @@ -0,0 +1,16 @@ +SUMMARY = "libmctp_intel" +DESCRIPTION = "Implementation of MCTP(DMTF DSP0236)" + +SRC_URI = "git://github.com/Intel-BMC/libmctp.git;protocol=ssh" +SRCREV = "9f0aa081fdcc1ad5a8ca9025dbd0a559a68f4005" + +S = "${WORKDIR}/git/" + +PV = "1.0+git${SRCPV}" + +LICENSE = "Apache-2.0 | GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0d30807bb7a4f16d36e96b78f9ed8fae" + +inherit cmake + +DEPENDS += "i2c-tools" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb index 72acf3127..d9a2297ac 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb @@ -1,11 +1,11 @@ SUMMARY = "MCTP Daemon" DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)" -LICENSE = "Apache-2.0 | GPLv2" +LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "df5eba0d1ea5a1e07d24eca95cc9ce5d25819c69" +SRCREV = "34e98dc5e6bac78ccee86fb1ea1837b9ef1360a5" S = "${WORKDIR}/git/mctpd/" @@ -16,11 +16,17 @@ inherit cmake systemd FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" DEPENDS += " \ - libmctp \ + libmctp-intel \ systemd \ sdbusplus \ phosphor-logging \ boost \ i2c-tools \ + cli11 \ + nlohmann-json \ + gtest \ " -SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.mctpd.service" +SMBUS_BINDING = "smbus" + +FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.mctpd@.service" +SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.mctpd@${SMBUS_BINDING}.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb index 9db4eeb56..ce6cf5998 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb @@ -3,14 +3,14 @@ DESCRIPTION = "Daemon allows to configure RestrictionMode property" PV = "1.0+git${SRCPV}" -S = "${WORKDIR}/git/prov-mode-mgr" +S = "${WORKDIR}/git" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/provisioning-mode-manager.git;protocol=ssh" -SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" +SRCREV = "8994b09bfe2eae4e3d18f3a4633e965bd945547f" inherit cmake systemd SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.RestrictionMode.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 d48a66d65..f8ca43c3c 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 = "6b1247a16d52be853c18015e7163d60abce5c00a" +SRCREV = "17aba776373e14851a04e6b9ac518622b117b2a1" SRC_URI = "git://github.com/openbmc/dbus-sensors.git" DEPENDS_append = " libgpiod libmctp" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb index 2690169ff..6f6bb860d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb @@ -3,13 +3,14 @@ DESCRIPTION = "Daemon exposes the manufacturing mode property" PV = "1.0+git${SRCPV}" -S = "${WORKDIR}/git/special-mode-mgr" +S = "${WORKDIR}/git" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" -SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" +SRC_URI = "git://github.com/Intel-BMC/special-mode-manager.git;protocol=ssh" +SRCREV = "cf2ba04cf68d76047211f66d9bb4ae1be1907323" + EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" inherit cmake systemd 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 833de721b..5b74dec5e 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,7 +13,9 @@ 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" + +# Temporarily not needed due to Legacy mode disabling +# RDEPENDS_${PN} = "nbdkit" inherit cmake systemd 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 0f1d36641..5923eb8d9 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend @@ -1,4 +1,4 @@ SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2" FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:" -SRCREV = "0ecbfca6ecffe61da127d2c0b61ec26e4414d6ec" +SRCREV = "8dea5a0000fcf9d1daada0b92811d9f1bf308a9f" diff --git a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend index 0f84062d1..9323dc003 100755 --- a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend @@ -1,3 +1,3 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh" -SRCREV = "e7520ba18a5b5ba6c8eb7a9d543704f9699295a1" +SRCREV = "fc1ecc59100d21c953501703bc5db9e02e25b333" |