Merge branch 'master' into master-p10
Pull the upstream 'master' branch into master-p10. This is
a necessary step in allowing us to eventually merge back
the master-p10 branch upstream.
A few highlights in solving the conflicts:
* buildroot is now the upstream openpower version (2020.08.2)
* the openpower-pnor package is the upstream version (without
Power10 support). This is due to us using openpower-pnor-p10
for Power10 recently.
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Conflicts:
.gitmodules
README.md
buildroot
openpower/package/Config.in
openpower/package/hostboot-binaries/Config.in
openpower/package/ocmb-explorer-fw/Config.in
openpower/package/ocmb-explorer-fw/ocmb-explorer-fw.mk
openpower/package/openpower-pnor/Config.in
openpower/package/openpower-pnor/openpower-pnor.mk
openpower/package/ppe42-binutils/Config.in
openpower/package/ppe42-gcc/Config.in
openpower/package/skiboot/Config.in
openpower/platform/Config.in
diff --git a/openpower/Config.in b/openpower/Config.in
index b6decad..412dedb 100644
--- a/openpower/Config.in
+++ b/openpower/Config.in
@@ -1,6 +1,7 @@
menu "OpenPower"
source "$BR2_EXTERNAL_OP_BUILD_PATH/platform/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/toolchain/Config.in"
menu "OpenPower Packages"
if BR2_OPENPOWER_PLATFORM
diff --git a/openpower/configs/barreleye_defconfig b/openpower/configs/barreleye_defconfig
deleted file mode 100644
index cde6e84..0000000
--- a/openpower/configs/barreleye_defconfig
+++ /dev/null
@@ -1,71 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
-BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
-BR2_SYSTEM_ENABLE_NLS=y
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="barreleye.config"
-BR2_OPENPOWER_MACHINE_XML_TARGET_TYPES_OPENPOWER_XML=y
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="barreleye-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="253622f22fe142ea67a0025e9bcc3044db038898"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="barreleye.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="BARRELEYE_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="BARRELEYE_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="BARRELEYE_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="barreleye"
-BR2_OPENPOWER_PNOR_FILENAME="barreleye.pnor"
-BR2_OPENPOWER_PNOR_UPDATE_FILENAME="barreleye_update.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
-BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
-BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="BARRELEYE_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="BARRELEYE_HB.targeting.bin.ecc"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
-BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
diff --git a/openpower/configs/blackbird_defconfig b/openpower/configs/blackbird_defconfig
index 8f17e8c..1d5532d 100644
--- a/openpower/configs/blackbird_defconfig
+++ b/openpower/configs/blackbird_defconfig
@@ -1,7 +1,9 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_OP_BUILD_PATH)/patches/blackbird-patches"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +18,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -48,7 +50,7 @@
BR2_OPENPOWER_POWER9=y
BR2_HOSTBOOT_CONFIG_FILE="blackbird.config"
BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="blackbird-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="17e9e84d504582c881e480b82fe1cf115312130f"
+BR2_OPENPOWER_MACHINE_XML_VERSION="e782e30829e0d6bea1018740d695633c29f53e75"
BR2_OPENPOWER_MACHINE_XML_FILENAME="blackbird.xml"
BR2_OPENPOWER_SYSTEM_XML_FILENAME="BLACKBIRD_hb.system.xml"
BR2_OPENPOWER_MRW_XML_FILENAME="BLACKBIRD_hb.mrw.xml"
diff --git a/openpower/configs/denali_defconfig b/openpower/configs/denali_defconfig
index 4696b77..ed3f2dd 100644
--- a/openpower/configs/denali_defconfig
+++ b/openpower/configs/denali_defconfig
@@ -58,7 +58,5 @@
# BR2_PACKAGE_OCC is not set
# BR2_PACKAGE_CAPP_UCODE is not set
BR2_PACKAGE_LOADKEYS=y
-# BR2_PACKAGE_HOST_PPE42_BINUTILS is not set
-# BR2_PACKAGE_HOST_PPE42_GCC is not set
# BR2_PACKAGE_IMA_CATALOG is not set
# BR2_PACKAGE_HOST_SB_SIGNING_UTILS is not set
diff --git a/openpower/configs/firenze_defconfig b/openpower/configs/firenze_defconfig
deleted file mode 100644
index 16491d6..0000000
--- a/openpower/configs/firenze_defconfig
+++ /dev/null
@@ -1,57 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
-BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
-BR2_SYSTEM_ENABLE_NLS=y
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_IPRUTILS=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-# BR2_PACKAGE_HOSTBOOT_P8 is not set
-# BR2_PACKAGE_HOSTBOOT_BINARIES is not set
-# BR2_PACKAGE_MACHINE_XML is not set
-# BR2_PACKAGE_OPENPOWER_PNOR is not set
-BR2_OPENPOWER_CONFIG_NAME="openpower-firenze"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-# BR2_PACKAGE_HOST_P8_PORE_BINUTILS is not set
-# BR2_PACKAGE_CAPP_UCODE is not set
-BR2_PACKAGE_LOADKEYS=y
-# BR2_PACKAGE_IMA_CATALOG is not set
diff --git a/openpower/configs/firestone_defconfig b/openpower/configs/firestone_defconfig
deleted file mode 100644
index 6ef5040..0000000
--- a/openpower/configs/firestone_defconfig
+++ /dev/null
@@ -1,70 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
-BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
-BR2_SYSTEM_ENABLE_NLS=y
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="firestone.config"
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="firestone-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="9df12d2653f2fbcae043d0e8effadb9aa5b84694"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="firestone.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="FIRESTONE_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="FIRESTONE_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="FIRESTONE_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="firestone"
-BR2_OPENPOWER_PNOR_FILENAME="firestone.pnor"
-BR2_OPENPOWER_PNOR_UPDATE_FILENAME="firestone_update.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
-BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
-BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="FIRESTONE_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="FIRESTONE_HB.targeting.bin.ecc"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
-BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
diff --git a/openpower/configs/garrison_defconfig b/openpower/configs/garrison_defconfig
deleted file mode 100644
index b235747..0000000
--- a/openpower/configs/garrison_defconfig
+++ /dev/null
@@ -1,70 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
-BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
-BR2_SYSTEM_ENABLE_NLS=y
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="garrison.config"
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="garrison-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="c5c35cb575ed4cd77400ef17cf954addc9fc855d"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="garrison.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="GARRISON_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="GARRISON_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="GARRISON_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="garrison"
-BR2_OPENPOWER_PNOR_FILENAME="garrison.pnor"
-BR2_OPENPOWER_PNOR_UPDATE_FILENAME="garrison_update.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="naples_sbe.img.ecc"
-BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="n1.ref_image.hdr.bin.ecc"
-BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="GARRISON_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="GARRISON_HB.targeting.bin.ecc"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
-BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
diff --git a/openpower/configs/hostboot/barreleye.config b/openpower/configs/hostboot/barreleye.config
deleted file mode 100755
index b5178f4..0000000
--- a/openpower/configs/hostboot/barreleye.config
+++ /dev/null
@@ -1,66 +0,0 @@
-# The Serial Flash Controller is the AST2400 BMC.
-set SFC_IS_AST2400
-set BMC_DOES_SFC_INIT
-unset SFC_IS_IBM_DPSS
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-set DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-set SBE_UPDATE_INDEPENDENT
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-# Enable Kingston dimm voltage workaround
-set KINGSTON_1_35_VOLT
-
-# PCA95X config
-set PCA95X_8BIT
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-set HTMGT
-set START_OCC_DURING_BOOT
-
-#PNOR flags
-set PNOR_TWO_SIDE_SUPPORT
-set BMC_BT_LPC_IPMI
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/firestone.config b/openpower/configs/hostboot/firestone.config
deleted file mode 100755
index 4dd3cde..0000000
--- a/openpower/configs/hostboot/firestone.config
+++ /dev/null
@@ -1,64 +0,0 @@
-# The Serial Flash Controller is the AST2400 BMC.
-set SFC_IS_AST2400
-set BMC_DOES_SFC_INIT
-unset SFC_IS_IBM_DPSS
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-set DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-set SBE_UPDATE_INDEPENDENT
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-# Enable Kingston dimm voltage workaround
-set KINGSTON_1_35_VOLT
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-set HTMGT
-set START_OCC_DURING_BOOT
-
-#PNOR flags
-set PNOR_TWO_SIDE_SUPPORT
-
-set BMC_BT_LPC_IPMI
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/garrison.config b/openpower/configs/hostboot/garrison.config
deleted file mode 100755
index 7fc9adf..0000000
--- a/openpower/configs/hostboot/garrison.config
+++ /dev/null
@@ -1,64 +0,0 @@
-# The Serial Flash Controller is the AST2400 BMC.
-set SFC_IS_AST2400
-set BMC_DOES_SFC_INIT
-unset SFC_IS_IBM_DPSS
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-unset DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-set SBE_UPDATE_INDEPENDENT
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-# Enable Kingston dimm voltage workaround
-set KINGSTON_1_35_VOLT
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-set HTMGT
-set START_OCC_DURING_BOOT
-
-#PNOR flags
-set PNOR_TWO_SIDE_SUPPORT
-
-set BMC_BT_LPC_IPMI
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/habanero.config b/openpower/configs/hostboot/habanero.config
deleted file mode 100755
index 138e988..0000000
--- a/openpower/configs/hostboot/habanero.config
+++ /dev/null
@@ -1,67 +0,0 @@
-# The Serial Flash Controller is the AST2400 BMC.
-set SFC_IS_AST2400
-set BMC_DOES_SFC_INIT
-unset SFC_IS_IBM_DPSS
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-set DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-set SBE_UPDATE_INDEPENDENT
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-# Enable Kingston dimm voltage workaround
-set KINGSTON_1_35_VOLT
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-
-# OCC Enablment flags
-unset SET_NOMINAL_PSTATE
-set HTMGT
-set START_OCC_DURING_BOOT
-
-#PNOR flags
-set PNOR_TWO_SIDE_SUPPORT
-
-set BMC_BT_LPC_IPMI
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/mowgli.config b/openpower/configs/hostboot/mowgli.config
new file mode 100644
index 0000000..0202229
--- /dev/null
+++ b/openpower/configs/hostboot/mowgli.config
@@ -0,0 +1,76 @@
+# The BMC MBOX Protocol is used to access PNOR
+unset SFC_IS_AST2500
+unset SFC_IS_AST2400
+set PNORDD_IS_BMCMBOX
+unset PNORDD_IS_SFC
+unset BMC_DOES_SFC_INIT
+unset SFC_IS_IBM_DPSS
+set ALLOW_MICRON_PNOR
+set ALLOW_MACRONIX_PNOR
+
+# VPD options.
+set MVPD_READ_FROM_HW
+set MVPD_WRITE_TO_HW
+set MVPD_READ_FROM_PNOR
+set MVPD_WRITE_TO_PNOR
+set DJVPD_READ_FROM_HW
+unset DJVPD_WRITE_TO_HW
+set DJVPD_READ_FROM_PNOR
+set DJVPD_WRITE_TO_PNOR
+set MEMVPD_READ_FROM_HW
+set MEMVPD_WRITE_TO_HW
+set MEMVPD_READ_FROM_PNOR
+set MEMVPD_WRITE_TO_PNOR
+set PVPD_READ_FROM_HW
+set PVPD_WRITE_TO_HW
+set PVPD_READ_FROM_PNOR
+set PVPD_WRITE_TO_PNOR
+unset CDIMM_FORMAT_FOR_CVPD
+
+# gpio config
+set GPIODD
+unset PALMETTO_VDDR
+
+# Enable Consecutive SBE Updates
+set SBE_UPDATE_CONSECUTIVE
+unset SBE_UPDATE_INDEPENDENT
+unset SBE_UPDATE_SEQUENTIAL
+unset SBE_UPDATE_SIMULTANEOUS
+unset NO_SBE_UPDATES
+
+unset PCIE_HOTPLUG_CONTROLLER
+
+# turn on console output
+set CONSOLE
+set BMC_AST2500
+
+unset DISABLE_HOSTBOOT_RUNTIME
+
+# Compile in hostboot runtime PRD
+set HBRT_PRD
+
+# Compile in hb rt HTMGT : Load/Start OCC
+set HTMGT
+set START_OCC_DURING_BOOT
+unset CONSOLE_OUTPUT_OCC_COMM
+
+#PNOR flags
+unset PNOR_TWO_SIDE_SUPPORT
+
+set BMC_BT_LPC_IPMI
+
+# Enable IPLtime + Runtime Checktop Analysis
+set ENABLE_CHECKSTOP_ANALYSIS
+set IPLTIME_CHECKSTOP_ANALYSIS
+
+# set for trace debug to console
+unset CONSOLE_OUTPUT_TRACE
+set CONSOLE_OUTPUT_FFDCDISPLAY
+
+# SECUREBOOT && TPMDD
+set SECUREBOOT
+set TPMDD
+set TPM_NUVOTON
+
+# To Disable GUARD Features
+unset NO_GARD_SUPPORT
diff --git a/openpower/configs/hostboot/p8dtu.config b/openpower/configs/hostboot/p8dtu.config
deleted file mode 100644
index 7781d39..0000000
--- a/openpower/configs/hostboot/p8dtu.config
+++ /dev/null
@@ -1,70 +0,0 @@
-# The Serial Flash Controller is the AST2400 BMC.
-set SFC_IS_AST2400
-set PNORDD_IS_IPMI
-unset PNORDD_IS_SFC
-set BMC_DOES_SFC_INIT
-unset SFC_IS_IBM_DPSS
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-unset DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-#set SBE_UPDATE_INDEPENDENT
-set SBE_UPDATE_SIMULTANEOUS
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-# Enable Kingston dimm voltage workaround
-unset KINGSTON_1_35_VOLT
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-set HTMGT
-set START_OCC_DURING_BOOT
-
-#PNOR flags
-unset PNOR_TWO_SIDE_SUPPORT
-set PNOR_IS_32MB
-
-set BMC_BT_LPC_IPMI
-
-unset SET_NOMINAL_PSTATE
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/palmetto.config b/openpower/configs/hostboot/palmetto.config
deleted file mode 100755
index 0d8ce18..0000000
--- a/openpower/configs/hostboot/palmetto.config
+++ /dev/null
@@ -1,68 +0,0 @@
-# Use IPMIDD for PNOR
-unset SFC_IS_AST2400
-set PNORDD_IS_IPMI
-unset PNORDD_IS_SFC
-unset BMC_DOES_SFC_INIT
-unset SFC_IS_IBM_DPSS
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-#PNOR flags
-unset PNOR_TWO_SIDE_SUPPORT
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-set DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-set SBE_UPDATE_INDEPENDENT
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-set PNOR_IS_32MB
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-
-# OCC Enablment flags
-unset SET_NOMINAL_PSTATE
-set HTMGT
-set START_OCC_DURING_BOOT
-
-set BMC_BT_LPC_IPMI
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/swift.config b/openpower/configs/hostboot/swift.config
new file mode 100755
index 0000000..ee791b8
--- /dev/null
+++ b/openpower/configs/hostboot/swift.config
@@ -0,0 +1,90 @@
+## Set this to pull in Axone only code (such as P9A/EXP MSS code)
+set AXONE
+
+# Allows us to put in workarounds specifically for Axone bringup
+set AXONE_BRING_UP
+
+# The BMC MBOX Protocol is used to access PNOR
+unset SFC_IS_AST2500
+unset SFC_IS_AST2400
+set PNORDD_IS_BMCMBOX
+unset PNORDD_IS_SFC
+unset BMC_DOES_SFC_INIT
+unset SFC_IS_IBM_DPSS
+set ALLOW_MICRON_PNOR
+set ALLOW_MACRONIX_PNOR
+
+
+# Force DJVPD read/write to use EEPROM layer instead of old-style VPD cache
+set DJVPD_READ_FROM_HW
+set DJVPD_WRITE_TO_HW
+unset DJVPD_READ_FROM_PNOR
+unset DJVPD_WRITE_TO_PNOR
+
+# Force MEMVPD read/write to EEPROM layer instead of old-style VPD cache
+# ( No concept of MEMVPD in Axone so should not matter )
+set MEMVPD_READ_FROM_HW
+set MEMVPD_WRITE_TO_HW
+unset MEMVPD_READ_FROM_PNOR
+unset MEMVPD_WRITE_TO_PNOR
+
+# Force MVPD read/write to use EEPROM layer instead of old-style VPD cache
+set MVPD_READ_FROM_HW
+set MVPD_WRITE_TO_HW
+unset MVPD_READ_FROM_PNOR
+unset MVPD_WRITE_TO_PNOR
+
+# Other VPD options.
+set PVPD_READ_FROM_HW
+set PVPD_WRITE_TO_HW
+unset PVPD_READ_FROM_PNOR
+unset PVPD_WRITE_TO_PNOR
+unset CDIMM_FORMAT_FOR_CVPD
+
+#enable EEPROM caching
+set SUPPORT_EEPROM_CACHING
+
+# gpio config
+set GPIODD
+unset PALMETTO_VDDR
+
+# Enable Consecutive SBE Updates
+set SBE_UPDATE_CONSECUTIVE
+unset SBE_UPDATE_INDEPENDENT
+unset SBE_UPDATE_SEQUENTIAL
+unset SBE_UPDATE_SIMULTANEOUS
+unset NO_SBE_UPDATES
+
+unset PCIE_HOTPLUG_CONTROLLER
+
+# turn on console output
+set CONSOLE
+set BMC_AST2500
+
+unset DISABLE_HOSTBOOT_RUNTIME
+
+# Compile in hostboot runtime PRD
+set HBRT_PRD
+
+# Compile in hb rt HTMGT : Load/Start OCC
+set HTMGT
+set START_OCC_DURING_BOOT
+unset CONSOLE_OUTPUT_OCC_COMM
+
+#PNOR flags
+unset PNOR_TWO_SIDE_SUPPORT
+
+set BMC_BT_LPC_IPMI
+
+# Enable Checkstop Analysis for both
+# Runtime and IPLtime scenarios
+set ENABLE_CHECKSTOP_ANALYSIS
+set IPLTIME_CHECKSTOP_ANALYSIS
+
+# set for trace debug to console
+unset CONSOLE_OUTPUT_TRACE
+set CONSOLE_OUTPUT_FFDCDISPLAY
+
+# Terminate Hostboot when errors occur in manufacturing mode
+# (relies on BMC to not trigger reboot)
+unset HANG_ON_MFG_SRC_TERM
diff --git a/openpower/configs/hostboot/vesnin.config b/openpower/configs/hostboot/vesnin.config
deleted file mode 100644
index fc3e969..0000000
--- a/openpower/configs/hostboot/vesnin.config
+++ /dev/null
@@ -1,63 +0,0 @@
-# Use IPMIDD for PNOR
-unset SFC_IS_AST2400
-unset SFC_IS_IBM_DPSS
-unset BMC_DOES_SFC_INIT
-unset PNORDD_IS_SFC
-set PNORDD_IS_IPMI
-set ALLOW_MICRON_PNOR
-set ALLOW_MACRONIX_PNOR
-
-# VPD options.
-set MVPD_READ_FROM_HW
-set MVPD_WRITE_TO_HW
-set MVPD_READ_FROM_PNOR
-set MVPD_WRITE_TO_PNOR
-set DJVPD_READ_FROM_HW
-set DJVPD_WRITE_TO_HW
-set DJVPD_READ_FROM_PNOR
-set DJVPD_WRITE_TO_PNOR
-set CVPD_READ_FROM_HW
-set CVPD_WRITE_TO_HW
-set CVPD_READ_FROM_PNOR
-set CVPD_WRITE_TO_PNOR
-set PVPD_READ_FROM_HW
-set PVPD_WRITE_TO_HW
-set PVPD_READ_FROM_PNOR
-set PVPD_WRITE_TO_PNOR
-set SKIP_RESTRICT_EX_UNITS
-unset CDIMM_FORMAT_FOR_CVPD
-
-# gpio config
-set GPIODD
-set PALMETTO_VDDR
-
-# Enable SBE updates
-set SBE_UPDATE_INDEPENDENT
-
-unset PCIE_HOTPLUG_CONTROLLER
-
-# turn on console output
-set CONSOLE
-set BMC_AST2400
-
-unset DISABLE_HOSTBOOT_RUNTIME
-
-# Compile in hostboot runtime PRD
-set HBRT_PRD
-set HTMGT
-set START_OCC_DURING_BOOT
-
-#PNOR flags
-set PNOR_TWO_SIDE_SUPPORT
-
-set BMC_BT_LPC_IPMI
-
-# Enable Checktop Analysis
-set ENABLE_CHECKSTOP_ANALYSIS
-set IPLTIME_CHECKSTOP_ANALYSIS
-
-# Hostboot will detect hardware changes
-set HOST_HCDB_SUPPORT
-
-# set for trace debug to console
-unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/configs/hostboot/witherspoon.config b/openpower/configs/hostboot/witherspoon.config
index 106b303..87a5f7c 100755
--- a/openpower/configs/hostboot/witherspoon.config
+++ b/openpower/configs/hostboot/witherspoon.config
@@ -71,3 +71,7 @@
# Terminate Hostboot when errors occur in manufacturing mode
# (relies on BMC to not trigger reboot)
unset HANG_ON_MFG_SRC_TERM
+
+# Support Physical Presence Detection and Key Clear Requests
+set PHYS_PRES_PWR_BUTTON
+set KEY_CLEAR
diff --git a/openpower/configs/linux/pseries_skiroot_defconfig b/openpower/configs/linux/pseries_skiroot_defconfig
deleted file mode 100644
index b39e5eb..0000000
--- a/openpower/configs/linux/pseries_skiroot_defconfig
+++ /dev/null
@@ -1,246 +0,0 @@
-# CONFIG_SWAP is not set
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-# CONFIG_CROSS_MEMORY_ATTACH is not set
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASK_XACCT=y
-CONFIG_TASK_IO_ACCOUNTING=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=20
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_RD_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
-# CONFIG_RD_LZO is not set
-# CONFIG_RD_LZ4 is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_PERF_EVENTS=y
-# CONFIG_COMPAT_BRK is not set
-CONFIG_PPC64=y
-CONFIG_ALTIVEC=y
-CONFIG_VSX=y
-CONFIG_NR_CPUS=2048
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_PPC_SPLPAR=y
-CONFIG_PPC_SMLPAR=y
-CONFIG_KVM_GUEST=y
-CONFIG_UDBG_RTAS_CONSOLE=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
-CONFIG_GEN_RTC=y
-CONFIG_HZ_100=y
-CONFIG_KEXEC=y
-CONFIG_IRQ_ALL_CPUS=y
-CONFIG_PPC_64K_PAGES=y
-CONFIG_SCHED_SMT=y
-CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=tty0 console=hvc0 quiet"
-# CONFIG_SECCOMP is not set
-CONFIG_JUMP_LABEL=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_SIG=y
-CONFIG_MODULE_SIG_FORCE=y
-CONFIG_MODULE_SIG_SHA512=y
-CONFIG_BLK_DEV_INTEGRITY=y
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_COMPACTION is not set
-# CONFIG_MIGRATION is not set
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_NET_IPIP=y
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-CONFIG_DNS_RESOLVER=y
-# CONFIG_WIRELESS is not set
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-CONFIG_MTD=m
-CONFIG_MTD_POWERNV_FLASH=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=65536
-CONFIG_ATA_OVER_ETH=m
-CONFIG_VIRTIO_BLK=m
-CONFIG_BLK_DEV_NVME=m
-CONFIG_EEPROM_AT24=y
-# CONFIG_CXL is not set
-CONFIG_BLK_DEV_SD=m
-CONFIG_CHR_DEV_ST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_FC_ATTRS=y
-CONFIG_SCSI_CXGB3_ISCSI=m
-CONFIG_SCSI_CXGB4_ISCSI=m
-CONFIG_SCSI_BNX2_ISCSI=m
-CONFIG_BE2ISCSI=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_MPT2SAS=m
-CONFIG_SCSI_IBMVSCSI=m
-CONFIG_SCSI_IBMVFC=m
-CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
-CONFIG_SCSI_IPR=m
-# CONFIG_SCSI_IPR_TRACE is not set
-# CONFIG_SCSI_IPR_DUMP is not set
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_VIRTIO=m
-CONFIG_SCSI_DH=y
-CONFIG_SCSI_DH_ALUA=m
-CONFIG_ATA=y
-CONFIG_SATA_AHCI=y
-# CONFIG_ATA_SFF is not set
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=m
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_MACVLAN=m
-CONFIG_MACVTAP=m
-CONFIG_NETCONSOLE=m
-CONFIG_TUN=m
-CONFIG_VETH=m
-CONFIG_VIRTIO_NET=m
-CONFIG_VORTEX=m
-CONFIG_ACENIC=m
-CONFIG_ACENIC_OMIT_TIGON_I=y
-CONFIG_PCNET32=m
-CONFIG_TIGON3=y
-CONFIG_BNX2X=m
-CONFIG_CHELSIO_T1=y
-CONFIG_BE2NET=m
-CONFIG_IBMVETH=m
-CONFIG_E100=m
-CONFIG_E1000=m
-CONFIG_E1000E=m
-CONFIG_IXGB=m
-CONFIG_IXGBE=m
-CONFIG_MYRI10GE=m
-CONFIG_S2IO=m
-CONFIG_QLGE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_SFC=m
-# CONFIG_WLAN is not set
-CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_MISC=y
-# CONFIG_SERIO_SERPORT is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_HVC_CONSOLE=y
-CONFIG_HVC_RTAS=y
-CONFIG_HVC_UDBG=y
-CONFIG_VIRTIO_CONSOLE=m
-CONFIG_IPMI_HANDLER=y
-CONFIG_IPMI_DEVICE_INTERFACE=y
-CONFIG_IPMI_POWERNV=y
-CONFIG_IPMI_WATCHDOG=y
-CONFIG_HW_RANDOM=y
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=1024
-CONFIG_TCG_TIS_I2C_NUVOTON=y
-# CONFIG_I2C_COMPAT is not set
-CONFIG_I2C_CHARDEV=y
-# CONFIG_I2C_HELPER_AUTO is not set
-CONFIG_DRM=y
-CONFIG_DRM_RADEON=y
-CONFIG_DRM_AST=m
-CONFIG_FIRMWARE_EDID=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_OF=y
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G=y
-# CONFIG_LCD_CLASS_DEVICE is not set
-# CONFIG_BACKLIGHT_GENERIC is not set
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_LOGO=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB=y
-CONFIG_USB_MON=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PPC_OF is not set
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_STORAGE=y
-CONFIG_VIRT_DRIVERS=y
-CONFIG_VIRTIO_PCI=y
-# CONFIG_IOMMU_SUPPORT is not set
-CONFIG_EXT4_FS=m
-CONFIG_EXT4_FS_POSIX_ACL=y
-CONFIG_EXT4_FS_SECURITY=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_BTRFS_FS=m
-CONFIG_BTRFS_FS_POSIX_ACL=y
-CONFIG_AUTOFS4_FS=m
-CONFIG_ISO9660_FS=m
-CONFIG_UDF_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_PROC_KCORE=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=m
-CONFIG_CIFS=m
-# CONFIG_CIFS_DEBUG is not set
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NLS_UTF8=y
-CONFIG_SECURITY=y
-CONFIG_IMA=y
-CONFIG_EVM=y
-# CONFIG_CRYPTO_ECHAINIV is not set
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_XTS=m
-CONFIG_CRYPTO_CMAC=y
-CONFIG_CRYPTO_MD4=y
-CONFIG_CRYPTO_ARC4=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_USER_API_HASH=m
-CONFIG_CRYPTO_USER_API_SKCIPHER=m
-# CONFIG_CRYPTO_HW is not set
-CONFIG_CRC16=y
-CONFIG_CRC_ITU_T=y
-CONFIG_LIBCRC32C=y
-CONFIG_PRINTK_TIME=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_FTRACE is not set
-CONFIG_XMON=y
-CONFIG_XMON_DEFAULT=y
diff --git a/openpower/configs/linux/skiroot_defconfig b/openpower/configs/linux/skiroot_defconfig
index ac3066d..02a3ea7 100644
--- a/openpower/configs/linux/skiroot_defconfig
+++ b/openpower/configs/linux/skiroot_defconfig
@@ -3,6 +3,7 @@
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
+CONFIG_AUDIT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
# CONFIG_CPU_ISOLATION is not set
@@ -49,8 +50,8 @@
CONFIG_CMDLINE="console=tty0 console=hvc0 debug ignore_loglevel bootmem_debug sched_debug"
# CONFIG_SECCOMP is not set
# CONFIG_PPC_MEM_KEYS is not set
+CONFIG_PPC_SECURE_BOOT=y
CONFIG_JUMP_LABEL=y
-CONFIG_STRICT_KERNEL_RWX=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_SIG_FORCE=y
@@ -84,7 +85,6 @@
# CONFIG_OCXL is not set
CONFIG_BLK_DEV_SD=m
CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_SCAN_ASYNC=y
@@ -209,7 +209,6 @@
CONFIG_IPMI_POWERNV=y
CONFIG_IPMI_WATCHDOG=y
CONFIG_HW_RANDOM=y
-CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_I2C_NUVOTON=y
# CONFIG_DEVPORT is not set
CONFIG_I2C=y
@@ -217,7 +216,7 @@
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_OPAL=m
+CONFIG_I2C_OPAL=y
CONFIG_PPS=y
CONFIG_SENSORS_IBMPOWERNV=m
CONFIG_DRM=m
@@ -282,9 +281,21 @@
CONFIG_FORTIFY_SOURCE=y
CONFIG_SECURITY_LOCKDOWN_LSM=y
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
-# CONFIG_INTEGRITY is not set
+CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY=y
+CONFIG_INTEGRITY_SIGNATURE=y
+CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
+CONFIG_INTEGRITY_PLATFORM_KEYRING=y
+CONFIG_IMA=y
+CONFIG_IMA_KEXEC=y
+CONFIG_IMA_SIG_TEMPLATE=y
+CONFIG_IMA_DEFAULT_HASH_SHA256=y
+CONFIG_IMA_READ_POLICY=y
+CONFIG_IMA_APPRAISE=y
+CONFIG_IMA_ARCH_POLICY=y
+CONFIG_IMA_APPRAISE_MODSIG=y
CONFIG_LSM="yama,loadpin,safesetid,integrity"
# CONFIG_CRYPTO_HW is not set
+CONFIG_SYSTEM_BLACKLIST_KEYRING=y
CONFIG_CRC16=y
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y
diff --git a/openpower/configs/mihawk_defconfig b/openpower/configs/mihawk_defconfig
index 6f0e9d8..ec40967 100644
--- a/openpower/configs/mihawk_defconfig
+++ b/openpower/configs/mihawk_defconfig
@@ -1,8 +1,9 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_OP_BUILD_PATH)/patches/mihawk-patches"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -17,7 +18,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -49,7 +50,7 @@
BR2_OPENPOWER_POWER9=y
BR2_HOSTBOOT_CONFIG_FILE="mihawk.config"
BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="mihawk-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="f6ec5aa0f9803d44b147a7670dec7ec935f59582"
+BR2_OPENPOWER_MACHINE_XML_VERSION="b1fc7ca4456b9b375b37ab2f06567698f36de0b0"
BR2_OPENPOWER_MACHINE_XML_FILENAME="mihawk.xml"
BR2_OPENPOWER_SYSTEM_XML_FILENAME="MIHAWK_hb.system.xml"
BR2_OPENPOWER_MRW_XML_FILENAME="MIHAWK_hb.mrw.xml"
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/mowgli_defconfig
similarity index 67%
rename from openpower/configs/habanero_defconfig
rename to openpower/configs/mowgli_defconfig
index bfbfac8..3be5103 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/mowgli_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +17,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -45,27 +46,27 @@
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="habanero.config"
-BR2_OPENPOWER_MACHINE_XML_TARGET_TYPES_OPENPOWER_XML=y
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="habanero-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="c3998a513e1f71de4f8e250ebb50aeaf303eb73e"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="habanero.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="HABANERO_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="HABANERO_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="HABANERO_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="habanero"
-BR2_OPENPOWER_PNOR_FILENAME="habanero.pnor"
-BR2_OPENPOWER_PNOR_UPDATE_FILENAME="habanero_update.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
+BR2_OPENPOWER_POWER9=y
+BR2_HOSTBOOT_CONFIG_FILE="mowgli.config"
+BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="mowgli-xml"
+BR2_OPENPOWER_MACHINE_XML_VERSION="fa8043624437fa2b66acd020baac7df7de5e46e0"
+BR2_OPENPOWER_MACHINE_XML_FILENAME="mowgli.xml"
+BR2_OPENPOWER_SYSTEM_XML_FILENAME="MOWGLI_hb.system.xml"
+BR2_OPENPOWER_MRW_XML_FILENAME="MOWGLI_hb.mrw.xml"
+BR2_OPENPOWER_BIOS_XML_FILENAME="MOWGLI_bios.xml"
+BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayout_64.xml"
+BR2_OPENPOWER_CONFIG_NAME="mowgli"
+BR2_OPENPOWER_PNOR_FILENAME="mowgli.pnor"
+BR2_HOSTBOOT_BINARY_SBE_FILENAME="nimbus_sbe.img.ecc"
BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
+BR2_HOSTBOOT_BINARY_WINK_FILENAME="p9n.ref_image.hdr.bin.ecc"
BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="HABANERO_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="HABANERO_HB.targeting.bin.ecc"
+BR2_OPENPOWER_TARGETING_BIN_FILENAME="MOWGLI_HB.targeting.bin"
+BR2_OPENPOWER_TARGETING_ECC_FILENAME="MOWGLI_HB.targeting.bin.ecc"
+BR2_BUILD_PNOR_SQUASHFS=y
BR2_PACKAGE_PETITBOOT=y
BR2_PACKAGE_PETITBOOT_MTD=y
+# BR2_HCODE_INCLUDE_IONV is not set
BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
+BR2_IMA_CATALOG_DTS="POWER9"
diff --git a/openpower/configs/nicole_defconfig b/openpower/configs/nicole_defconfig
index 9abf6eb..c57f807 100644
--- a/openpower/configs/nicole_defconfig
+++ b/openpower/configs/nicole_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -15,7 +16,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -44,7 +45,7 @@
BR2_OPENPOWER_POWER9=y
BR2_HOSTBOOT_CONFIG_FILE="nicole.config"
BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="nicole-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="c592dee10cab58d05a62fb1ddb98c14e5b3dfbe7"
+BR2_OPENPOWER_MACHINE_XML_VERSION="37c6311469bfe4e9669f8fedc780719888c075d4"
BR2_OPENPOWER_MACHINE_XML_FILENAME="nicole.xml"
BR2_OPENPOWER_SYSTEM_XML_FILENAME="NICOLE_hb.system.xml"
BR2_OPENPOWER_MRW_XML_FILENAME="NICOLE_hb.mrw.xml"
diff --git a/openpower/configs/opal_defconfig b/openpower/configs/opal_defconfig
index 25ddc22..3fa62fb 100644
--- a/openpower/configs/opal_defconfig
+++ b/openpower/configs/opal_defconfig
@@ -1,5 +1,6 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -12,7 +13,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -41,17 +42,17 @@
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
+BR2_OPENPOWER_POWER9=y
+# BR2_PACKAGE_PPE42_TOOLCHAIN is not set
# BR2_PACKAGE_HOST_OPENPOWER_FFS is not set
-# BR2_PACKAGE_HOSTBOOT_P8 is not set
+# BR2_PACKAGE_HOSTBOOT is not set
# BR2_PACKAGE_HOSTBOOT_BINARIES is not set
# BR2_PACKAGE_MACHINE_XML is not set
# BR2_PACKAGE_OPENPOWER_PNOR is not set
BR2_OPENPOWER_CONFIG_NAME="opal"
BR2_PACKAGE_PETITBOOT=y
BR2_PACKAGE_PETITBOOT_MTD=y
-# BR2_PACKAGE_HOST_P8_PORE_BINUTILS is not set
-# BR2_PACKAGE_OCC_P8 is not set
# BR2_PACKAGE_CAPP_UCODE is not set
BR2_SKIBOOT_DEVICETREE=y
# BR2_PACKAGE_IMA_CATALOG is not set
+# BR2_PACKAGE_HOST_SB_SIGNING_UTILS is not set
diff --git a/openpower/configs/p8dtu_defconfig b/openpower/configs/p8dtu_defconfig
deleted file mode 100644
index a77b093..0000000
--- a/openpower/configs/p8dtu_defconfig
+++ /dev/null
@@ -1,70 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_OP_BUILD_PATH)/patches/p8dtu-patches"
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
-BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
-BR2_SYSTEM_ENABLE_NLS=y
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="p8dtu.config"
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="p8dtu-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="a44ee3e29ff143053c0d0ec65e5a255402654616"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="p8dtu.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="P8DTU_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="P8DTU_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="P8DTU_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutSingleSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="p8dtu"
-BR2_OPENPOWER_PNOR_FILENAME="P8DTU.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
-BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
-BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="P8DTU_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="P8DTU_HB.targeting.bin.ecc"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
-BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
diff --git a/openpower/configs/p9dsu_defconfig b/openpower/configs/p9dsu_defconfig
index 4691443..6a525ee 100644
--- a/openpower/configs/p9dsu_defconfig
+++ b/openpower/configs/p9dsu_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +17,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/palmetto_defconfig b/openpower/configs/palmetto_defconfig
deleted file mode 100644
index a5ac30f..0000000
--- a/openpower/configs/palmetto_defconfig
+++ /dev/null
@@ -1,67 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_GENERATE_LOCALE="en_US.UTF-8"
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="palmetto.config"
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="palmetto-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="19aa4d3a0f0b39f891a7628bc41946d0dc83fb2a"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="palmetto.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="PALMETTO_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="PALMETTO_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="PALMETTO_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutSingleSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="palmetto"
-BR2_OPENPOWER_PNOR_FILENAME="palmetto.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
-BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
-BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="PALMETTO_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="PALMETTO_HB.targeting.bin.ecc"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
-BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
diff --git a/openpower/configs/pseries_defconfig b/openpower/configs/pseries_defconfig
deleted file mode 100644
index eac9cf9..0000000
--- a/openpower/configs/pseries_defconfig
+++ /dev/null
@@ -1,59 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
-BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
-BR2_SYSTEM_ENABLE_NLS=y
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/pseries_skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_I2C_TOOLS=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_IPMITOOL_USB=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_LRZSZ=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-# BR2_PACKAGE_HOSTBOOT_P8 is not set
-# BR2_PACKAGE_HOSTBOOT_BINARIES is not set
-# BR2_PACKAGE_MACHINE_XML is not set
-# BR2_PACKAGE_OPENPOWER_PNOR is not set
-BR2_OPENPOWER_CONFIG_NAME="openpower-firenze"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-# BR2_PACKAGE_HOST_P8_PORE_BINUTILS is not set
-# BR2_PACKAGE_CAPP_UCODE is not set
-BR2_PACKAGE_LOADKEYS=y
-# BR2_PACKAGE_IMA_CATALOG is not set
diff --git a/openpower/configs/romulus_defconfig b/openpower/configs/romulus_defconfig
index 9d3dfc9..70b5cca 100644
--- a/openpower/configs/romulus_defconfig
+++ b/openpower/configs/romulus_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +17,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/swift_defconfig
similarity index 67%
copy from openpower/configs/habanero_defconfig
copy to openpower/configs/swift_defconfig
index bfbfac8..8b6e7fc 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/swift_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +17,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -45,27 +46,28 @@
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="habanero.config"
-BR2_OPENPOWER_MACHINE_XML_TARGET_TYPES_OPENPOWER_XML=y
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="habanero-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="c3998a513e1f71de4f8e250ebb50aeaf303eb73e"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="habanero.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="HABANERO_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="HABANERO_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="HABANERO_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="habanero"
-BR2_OPENPOWER_PNOR_FILENAME="habanero.pnor"
-BR2_OPENPOWER_PNOR_UPDATE_FILENAME="habanero_update.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
+BR2_OPENPOWER_POWER9=y
+BR2_HOSTBOOT_CONFIG_FILE="swift.config"
+BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="swift-xml"
+BR2_OPENPOWER_MACHINE_XML_VERSION="14a1bec7d32fabf990338cc6c7a33df99d86f499"
+BR2_OPENPOWER_MACHINE_XML_FILENAME="swift.xml"
+BR2_OPENPOWER_SYSTEM_XML_FILENAME="SWIFT_hb.system.xml"
+BR2_OPENPOWER_MRW_XML_FILENAME="SWIFT_hb.mrw.xml"
+BR2_OPENPOWER_BIOS_XML_FILENAME="SWIFT_bios.xml"
+BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="axonePnorLayout_64.xml"
+BR2_OPENPOWER_CONFIG_NAME="swift"
+BR2_OPENPOWER_PNOR_FILENAME="swift.pnor"
+BR2_HOSTBOOT_BINARY_SBE_FILENAME="axone_sbe.img.ecc"
BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
+BR2_HOSTBOOT_BINARY_WINK_FILENAME="p9a.ref_image.hdr.bin.ecc"
BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="HABANERO_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="HABANERO_HB.targeting.bin.ecc"
+BR2_OPENPOWER_TARGETING_BIN_FILENAME="SWIFT_HB.targeting.bin"
+BR2_OPENPOWER_TARGETING_ECC_FILENAME="SWIFT_HB.targeting.bin.ecc"
+BR2_BUILD_PNOR_SQUASHFS=y
BR2_PACKAGE_PETITBOOT=y
BR2_PACKAGE_PETITBOOT_MTD=y
+BR2_OCC_GPU_BIN_BUILD=y
BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
+BR2_IMA_CATALOG_DTS="POWER9"
+BR2_PACKAGE_OCMB_EXPLORER_FW=y
diff --git a/openpower/configs/vesnin_defconfig b/openpower/configs/vesnin_defconfig
deleted file mode 100644
index 765f2f3..0000000
--- a/openpower/configs/vesnin_defconfig
+++ /dev/null
@@ -1,68 +0,0 @@
-BR2_powerpc64le=y
-BR2_powerpc_power8=y
-BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_OP_BUILD_PATH)/patches/vesnin-patches"
-BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
-BR2_TOOLCHAIN_BUILDROOT_CXX=y
-BR2_TARGET_GENERIC_HOSTNAME="skiroot"
-BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
-BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
-BR2_GENERATE_LOCALE="en_US.UTF-8"
-BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
-BR2_ROOTFS_OVERLAY="../openpower/overlay"
-BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
-BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
-BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
-BR2_LINUX_KERNEL_XZ=y
-BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
-BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
-BR2_PACKAGE_LINUX_FIRMWARE=y
-BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
-BR2_PACKAGE_LINUX_FIRMWARE_QLOGIC_4X=y
-BR2_PACKAGE_CRYPTSETUP=y
-BR2_PACKAGE_I2C_TOOLS=y
-BR2_PACKAGE_IPMITOOL=y
-BR2_PACKAGE_MDADM=y
-BR2_PACKAGE_PCIUTILS=y
-BR2_PACKAGE_NCURSES_WCHAR=y
-BR2_PACKAGE_DROPBEAR=y
-# BR2_PACKAGE_DROPBEAR_SERVER is not set
-BR2_PACKAGE_ETHTOOL=y
-BR2_PACKAGE_NETCAT=y
-BR2_PACKAGE_RSYNC=y
-BR2_PACKAGE_SUDO=y
-BR2_PACKAGE_UTIL_LINUX_AGETTY=y
-BR2_TARGET_ROOTFS_CPIO_XZ=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_OPENPOWER_PLATFORM=y
-BR2_OPENPOWER_POWER8=y
-BR2_HOSTBOOT_P8_CONFIG_FILE="vesnin.config"
-BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="vesnin-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="deed9ba0bc6d1d68b416ed3e14853b86838897d7"
-BR2_OPENPOWER_MACHINE_XML_FILENAME="vesnin.xml"
-BR2_OPENPOWER_SYSTEM_XML_FILENAME="VESNIN_hb.system.xml"
-BR2_OPENPOWER_MRW_XML_FILENAME="VESNIN_hb.mrw.xml"
-BR2_OPENPOWER_BIOS_XML_FILENAME="VESNIN_bios.xml"
-BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
-BR2_OPENPOWER_CONFIG_NAME="vesnin"
-BR2_OPENPOWER_PNOR_FILENAME="vesnin.pnor"
-BR2_OPENPOWER_PNOR_UPDATE_FILENAME="vesnin_update.pnor"
-BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
-BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
-BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
-BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
-BR2_OPENPOWER_TARGETING_BIN_FILENAME="VESNIN_HB.targeting.bin"
-BR2_OPENPOWER_TARGETING_ECC_FILENAME="VESNIN_HB.targeting.bin.ecc"
-BR2_PACKAGE_PETITBOOT=y
-BR2_PACKAGE_PETITBOOT_MTD=y
-BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
-BR2_PACKAGE_LOADKEYS=y
-BR2_IMA_CATALOG_DTS="POWER8"
diff --git a/openpower/configs/witherspoon_defconfig b/openpower/configs/witherspoon_defconfig
index 885491e..5066deb 100644
--- a/openpower/configs/witherspoon_defconfig
+++ b/openpower/configs/witherspoon_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +17,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -41,6 +42,7 @@
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
+BR2_PACKAGE_KEYUTILS=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
diff --git a/openpower/configs/zaius_defconfig b/openpower/configs/zaius_defconfig
index 3fa69ed..aa8a03d 100644
--- a/openpower/configs/zaius_defconfig
+++ b/openpower/configs/zaius_defconfig
@@ -1,7 +1,8 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
-BR2_GCC_VERSION_6_X=y
+BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -16,7 +17,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/zz_defconfig b/openpower/configs/zz_defconfig
index a8098eb..3195c7e 100644
--- a/openpower/configs/zz_defconfig
+++ b/openpower/configs/zz_defconfig
@@ -1,5 +1,6 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
@@ -14,7 +15,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.68"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -44,6 +45,7 @@
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_OPENPOWER_PLATFORM=y
BR2_OPENPOWER_POWER9=y
+# BR2_PACKAGE_PPE42_TOOLCHAIN is not set
# BR2_PACKAGE_HOST_OPENPOWER_FFS is not set
# BR2_PACKAGE_HOSTBOOT is not set
# BR2_PACKAGE_HOSTBOOT_BINARIES is not set
@@ -53,11 +55,7 @@
# BR2_TARGET_SKIBOOT_XZ is not set
BR2_PACKAGE_PETITBOOT=y
BR2_PACKAGE_PETITBOOT_MTD=y
-# BR2_PACKAGE_HCODE is not set
-# BR2_PACKAGE_OCC is not set
# BR2_PACKAGE_CAPP_UCODE is not set
BR2_PACKAGE_LOADKEYS=y
-# BR2_PACKAGE_HOST_PPE42_BINUTILS is not set
-# BR2_PACKAGE_HOST_PPE42_GCC is not set
# BR2_PACKAGE_IMA_CATALOG is not set
# BR2_PACKAGE_HOST_SB_SIGNING_UTILS is not set
diff --git a/openpower/external.mk b/openpower/external.mk
index e8f46f1..2e4d7ce 100644
--- a/openpower/external.mk
+++ b/openpower/external.mk
@@ -1,3 +1,7 @@
+# OpenPower Toolchain
+include $(sort $(wildcard $(BR2_EXTERNAL_OP_BUILD_PATH)/toolchain/*/*.mk))
+
+# OpenPower Packages
include $(sort $(wildcard $(BR2_EXTERNAL_OP_BUILD_PATH)/package/*.mk))
include $(sort $(wildcard $(BR2_EXTERNAL_OP_BUILD_PATH)/package/*/*.mk))
diff --git a/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch b/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
index e2dda15..bb1f1b4 100644
--- a/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
+++ b/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brian King <brking@linux.vnet.ibm.com>
Date: Wed, 25 Oct 2017 10:42:59 +1100
-Subject: [PATCH 1/3] xhci: Reset controller on xhci shutdown
+Subject: [PATCH 01/19] xhci: Reset controller on xhci shutdown
Fixes kexec boot. Without a hard reset, some USB chips will fail to
initialize in a kexec booted kernel.
@@ -14,7 +14,7 @@
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
-index 9b3b1b16eafb..2a3aa1509d40 100644
+index bad154f446f8..19a9bde309a6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -789,6 +789,9 @@ void xhci_shutdown(struct usb_hcd *hcd)
diff --git a/openpower/linux/0002-powerpc-Detect-the-secure-boot-mode-of-the-system.patch b/openpower/linux/0002-powerpc-Detect-the-secure-boot-mode-of-the-system.patch
new file mode 100644
index 0000000..2d6f5a5
--- /dev/null
+++ b/openpower/linux/0002-powerpc-Detect-the-secure-boot-mode-of-the-system.patch
@@ -0,0 +1,131 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Tue, 5 Nov 2019 17:00:22 -0600
+Subject: [PATCH 02/19] powerpc: Detect the secure boot mode of the system
+
+This patch defines a function to detect the secure boot state of a
+PowerNV system.
+
+The PPC_SECURE_BOOT config represents the base enablement of secure
+boot for powerpc.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Eric Richter <erichte@linux.ibm.com>
+[mpe: Fold in change from Nayna to add "ibm,secureboot" to ids]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/46b003b9-3225-6bf7-9101-ed6580bb748c@linux.ibm.com
+(cherry picked from commit 1a8916ee3ac29054322cdac687d36e1b5894d272)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/Kconfig | 10 ++++++++
+ arch/powerpc/include/asm/secure_boot.h | 23 +++++++++++++++++
+ arch/powerpc/kernel/Makefile | 2 ++
+ arch/powerpc/kernel/secure_boot.c | 35 ++++++++++++++++++++++++++
+ 4 files changed, 70 insertions(+)
+ create mode 100644 arch/powerpc/include/asm/secure_boot.h
+ create mode 100644 arch/powerpc/kernel/secure_boot.c
+
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index ad620637cbd1..d654bdc9e4dc 100644
+--- a/arch/powerpc/Kconfig
++++ b/arch/powerpc/Kconfig
+@@ -935,6 +935,16 @@ config PPC_MEM_KEYS
+
+ If unsure, say y.
+
++config PPC_SECURE_BOOT
++ prompt "Enable secure boot support"
++ bool
++ depends on PPC_POWERNV
++ help
++ Systems with firmware secure boot enabled need to define security
++ policies to extend secure boot to the OS. This config allows a user
++ to enable OS secure boot on systems that have firmware support for
++ it. If in doubt say N.
++
+ endmenu
+
+ config ISA_DMA_API
+diff --git a/arch/powerpc/include/asm/secure_boot.h b/arch/powerpc/include/asm/secure_boot.h
+new file mode 100644
+index 000000000000..07d0fe0ca81f
+--- /dev/null
++++ b/arch/powerpc/include/asm/secure_boot.h
+@@ -0,0 +1,23 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++/*
++ * Secure boot definitions
++ *
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Nayna Jain
++ */
++#ifndef _ASM_POWER_SECURE_BOOT_H
++#define _ASM_POWER_SECURE_BOOT_H
++
++#ifdef CONFIG_PPC_SECURE_BOOT
++
++bool is_ppc_secureboot_enabled(void);
++
++#else
++
++static inline bool is_ppc_secureboot_enabled(void)
++{
++ return false;
++}
++
++#endif
++#endif
+diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
+index dc0780f930d5..40170ee52178 100644
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -158,6 +158,8 @@ ifneq ($(CONFIG_PPC_POWERNV)$(CONFIG_PPC_SVM),)
+ obj-y += ucall.o
+ endif
+
++obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o
++
+ # Disable GCOV, KCOV & sanitizers in odd or sensitive code
+ GCOV_PROFILE_prom_init.o := n
+ KCOV_INSTRUMENT_prom_init.o := n
+diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
+new file mode 100644
+index 000000000000..583c2c4edaf0
+--- /dev/null
++++ b/arch/powerpc/kernel/secure_boot.c
+@@ -0,0 +1,35 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Nayna Jain
++ */
++#include <linux/types.h>
++#include <linux/of.h>
++#include <asm/secure_boot.h>
++
++static struct device_node *get_ppc_fw_sb_node(void)
++{
++ static const struct of_device_id ids[] = {
++ { .compatible = "ibm,secureboot", },
++ { .compatible = "ibm,secureboot-v1", },
++ { .compatible = "ibm,secureboot-v2", },
++ {},
++ };
++
++ return of_find_matching_node(NULL, ids);
++}
++
++bool is_ppc_secureboot_enabled(void)
++{
++ struct device_node *node;
++ bool enabled = false;
++
++ node = get_ppc_fw_sb_node();
++ enabled = of_property_read_bool(node, "os-secureboot-enforcing");
++
++ of_node_put(node);
++
++ pr_info("Secure boot mode %s\n", enabled ? "enabled" : "disabled");
++
++ return enabled;
++}
diff --git a/openpower/linux/0002-powerpc-configs-add-FADump-awareness-to-skiroot_defc.patch b/openpower/linux/0002-powerpc-configs-add-FADump-awareness-to-skiroot_defc.patch
deleted file mode 100644
index 3f92079..0000000
--- a/openpower/linux/0002-powerpc-configs-add-FADump-awareness-to-skiroot_defc.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Hari Bathini <hbathini@linux.ibm.com>
-Date: Wed, 9 Oct 2019 19:34:29 +0530
-Subject: [PATCH 2/3] powerpc/configs: add FADump awareness to
- skiroot_defconfig
-
-FADump is supported on PowerNV platform. To fulfill this support, the
-petitboot kernel must be FADump aware. Enable config PRESERVE_FA_DUMP
-to make the petitboot kernel FADump aware.
-
-Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
-Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-Link: https://lore.kernel.org/r/157062986936.23016.10146169203560084401.stgit@hbathini.in.ibm.com
-(cherry picked from commit aaa351504449c4babb80753c72920e4b25fbd8a9)
-Signed-off-by: Joel Stanley <joel@jms.id.au>
----
- arch/powerpc/configs/skiroot_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
-index 1253482a67c0..1e18454083ff 100644
---- a/arch/powerpc/configs/skiroot_defconfig
-+++ b/arch/powerpc/configs/skiroot_defconfig
-@@ -46,6 +46,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
- CONFIG_CPU_IDLE=y
- CONFIG_HZ_100=y
- CONFIG_KEXEC=y
-+CONFIG_PRESERVE_FA_DUMP=y
- CONFIG_IRQ_ALL_CPUS=y
- CONFIG_NUMA=y
- # CONFIG_COMPACTION is not set
diff --git a/openpower/linux/0003-powerpc-ima-Add-support-to-initialize-ima-policy-rul.patch b/openpower/linux/0003-powerpc-ima-Add-support-to-initialize-ima-policy-rul.patch
new file mode 100644
index 0000000..eef8e16
--- /dev/null
+++ b/openpower/linux/0003-powerpc-ima-Add-support-to-initialize-ima-policy-rul.patch
@@ -0,0 +1,118 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:27 -0400
+Subject: [PATCH 03/19] powerpc/ima: Add support to initialize ima policy rules
+
+PowerNV systems use a Linux-based bootloader, which rely on the IMA
+subsystem to enforce different secure boot modes. Since the
+verification policy may differ based on the secure boot mode of the
+system, the policies must be defined at runtime.
+
+This patch implements arch-specific support to define IMA policy rules
+based on the runtime secure boot mode of the system.
+
+This patch provides arch-specific IMA policies if PPC_SECURE_BOOT
+config is enabled.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-3-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit 4238fad366a660cbc6499ca1ea4be42bd4d1ac5b)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/Kconfig | 1 +
+ arch/powerpc/kernel/Makefile | 2 +-
+ arch/powerpc/kernel/ima_arch.c | 43 ++++++++++++++++++++++++++++++++++
+ include/linux/ima.h | 3 ++-
+ 4 files changed, 47 insertions(+), 2 deletions(-)
+ create mode 100644 arch/powerpc/kernel/ima_arch.c
+
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index d654bdc9e4dc..32ce6c0b43f1 100644
+--- a/arch/powerpc/Kconfig
++++ b/arch/powerpc/Kconfig
+@@ -939,6 +939,7 @@ config PPC_SECURE_BOOT
+ prompt "Enable secure boot support"
+ bool
+ depends on PPC_POWERNV
++ depends on IMA_ARCH_POLICY
+ help
+ Systems with firmware secure boot enabled need to define security
+ policies to extend secure boot to the OS. This config allows a user
+diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
+index 40170ee52178..b82f7f5e5121 100644
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -158,7 +158,7 @@ ifneq ($(CONFIG_PPC_POWERNV)$(CONFIG_PPC_SVM),)
+ obj-y += ucall.o
+ endif
+
+-obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o
++obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o ima_arch.o
+
+ # Disable GCOV, KCOV & sanitizers in odd or sensitive code
+ GCOV_PROFILE_prom_init.o := n
+diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
+new file mode 100644
+index 000000000000..d88913dc0da7
+--- /dev/null
++++ b/arch/powerpc/kernel/ima_arch.c
+@@ -0,0 +1,43 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Nayna Jain
++ */
++
++#include <linux/ima.h>
++#include <asm/secure_boot.h>
++
++bool arch_ima_get_secureboot(void)
++{
++ return is_ppc_secureboot_enabled();
++}
++
++/*
++ * The "secure_rules" are enabled only on "secureboot" enabled systems.
++ * These rules verify the file signatures against known good values.
++ * The "appraise_type=imasig|modsig" option allows the known good signature
++ * to be stored as an xattr or as an appended signature.
++ *
++ * To avoid duplicate signature verification as much as possible, the IMA
++ * policy rule for module appraisal is added only if CONFIG_MODULE_SIG_FORCE
++ * is not enabled.
++ */
++static const char *const secure_rules[] = {
++ "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig",
++#ifndef CONFIG_MODULE_SIG_FORCE
++ "appraise func=MODULE_CHECK appraise_type=imasig|modsig",
++#endif
++ NULL
++};
++
++/*
++ * Returns the relevant IMA arch-specific policies based on the system secure
++ * boot state.
++ */
++const char *const *arch_get_ima_policy(void)
++{
++ if (is_ppc_secureboot_enabled())
++ return secure_rules;
++
++ return NULL;
++}
+diff --git a/include/linux/ima.h b/include/linux/ima.h
+index 1c37f17f7203..6d904754d858 100644
+--- a/include/linux/ima.h
++++ b/include/linux/ima.h
+@@ -29,7 +29,8 @@ extern void ima_kexec_cmdline(const void *buf, int size);
+ extern void ima_add_kexec_buffer(struct kimage *image);
+ #endif
+
+-#if (defined(CONFIG_X86) && defined(CONFIG_EFI)) || defined(CONFIG_S390)
++#if (defined(CONFIG_X86) && defined(CONFIG_EFI)) || defined(CONFIG_S390) \
++ || defined(CONFIG_PPC_SECURE_BOOT)
+ extern bool arch_ima_get_secureboot(void);
+ extern const char * const *arch_get_ima_policy(void);
+ #else
diff --git a/openpower/linux/0004-powerpc-Detect-the-trusted-boot-state-of-the-system.patch b/openpower/linux/0004-powerpc-Detect-the-trusted-boot-state-of-the-system.patch
new file mode 100644
index 0000000..e2c2c78
--- /dev/null
+++ b/openpower/linux/0004-powerpc-Detect-the-trusted-boot-state-of-the-system.patch
@@ -0,0 +1,71 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Tue, 5 Nov 2019 17:02:07 -0600
+Subject: [PATCH 04/19] powerpc: Detect the trusted boot state of the system
+
+While secure boot permits only properly verified signed kernels to be
+booted, trusted boot calculates the file hash of the kernel image and
+stores the measurement prior to boot, that can be subsequently
+compared against good known values via attestation services.
+
+This patch reads the trusted boot state of a PowerNV system. The state
+is used to conditionally enable additional measurement rules in the
+IMA arch-specific policies.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Eric Richter <erichte@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/e9eeee6b-b9bf-1e41-2954-61dbd6fbfbcf@linux.ibm.com
+(cherry picked from commit 2702809a4a1ab414d75c00936cda70ea77c8234e)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/include/asm/secure_boot.h | 6 ++++++
+ arch/powerpc/kernel/secure_boot.c | 15 +++++++++++++++
+ 2 files changed, 21 insertions(+)
+
+diff --git a/arch/powerpc/include/asm/secure_boot.h b/arch/powerpc/include/asm/secure_boot.h
+index 07d0fe0ca81f..a2ff556916c6 100644
+--- a/arch/powerpc/include/asm/secure_boot.h
++++ b/arch/powerpc/include/asm/secure_boot.h
+@@ -11,6 +11,7 @@
+ #ifdef CONFIG_PPC_SECURE_BOOT
+
+ bool is_ppc_secureboot_enabled(void);
++bool is_ppc_trustedboot_enabled(void);
+
+ #else
+
+@@ -19,5 +20,10 @@ static inline bool is_ppc_secureboot_enabled(void)
+ return false;
+ }
+
++static inline bool is_ppc_trustedboot_enabled(void)
++{
++ return false;
++}
++
+ #endif
+ #endif
+diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
+index 583c2c4edaf0..4b982324d368 100644
+--- a/arch/powerpc/kernel/secure_boot.c
++++ b/arch/powerpc/kernel/secure_boot.c
+@@ -33,3 +33,18 @@ bool is_ppc_secureboot_enabled(void)
+
+ return enabled;
+ }
++
++bool is_ppc_trustedboot_enabled(void)
++{
++ struct device_node *node;
++ bool enabled = false;
++
++ node = get_ppc_fw_sb_node();
++ enabled = of_property_read_bool(node, "trusted-enabled");
++
++ of_node_put(node);
++
++ pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled");
++
++ return enabled;
++}
diff --git a/openpower/linux/0005-powerpc-ima-Define-trusted-boot-policy.patch b/openpower/linux/0005-powerpc-ima-Define-trusted-boot-policy.patch
new file mode 100644
index 0000000..fcd871c
--- /dev/null
+++ b/openpower/linux/0005-powerpc-ima-Define-trusted-boot-policy.patch
@@ -0,0 +1,69 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:29 -0400
+Subject: [PATCH 05/19] powerpc/ima: Define trusted boot policy
+
+This patch defines an arch-specific trusted boot only policy and a
+combined secure and trusted boot policy.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-5-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit 1917855f4e0658c313e280671ad87774dbfb7b24)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/kernel/ima_arch.c | 33 ++++++++++++++++++++++++++++++++-
+ 1 file changed, 32 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
+index d88913dc0da7..0ef5956c9753 100644
+--- a/arch/powerpc/kernel/ima_arch.c
++++ b/arch/powerpc/kernel/ima_arch.c
+@@ -30,6 +30,32 @@ static const char *const secure_rules[] = {
+ NULL
+ };
+
++/*
++ * The "trusted_rules" are enabled only on "trustedboot" enabled systems.
++ * These rules add the kexec kernel image and kernel modules file hashes to
++ * the IMA measurement list.
++ */
++static const char *const trusted_rules[] = {
++ "measure func=KEXEC_KERNEL_CHECK",
++ "measure func=MODULE_CHECK",
++ NULL
++};
++
++/*
++ * The "secure_and_trusted_rules" contains rules for both the secure boot and
++ * trusted boot. The "template=ima-modsig" option includes the appended
++ * signature, when available, in the IMA measurement list.
++ */
++static const char *const secure_and_trusted_rules[] = {
++ "measure func=KEXEC_KERNEL_CHECK template=ima-modsig",
++ "measure func=MODULE_CHECK template=ima-modsig",
++ "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig",
++#ifndef CONFIG_MODULE_SIG_FORCE
++ "appraise func=MODULE_CHECK appraise_type=imasig|modsig",
++#endif
++ NULL
++};
++
+ /*
+ * Returns the relevant IMA arch-specific policies based on the system secure
+ * boot state.
+@@ -37,7 +63,12 @@ static const char *const secure_rules[] = {
+ const char *const *arch_get_ima_policy(void)
+ {
+ if (is_ppc_secureboot_enabled())
+- return secure_rules;
++ if (is_ppc_trustedboot_enabled())
++ return secure_and_trusted_rules;
++ else
++ return secure_rules;
++ else if (is_ppc_trustedboot_enabled())
++ return trusted_rules;
+
+ return NULL;
+ }
diff --git a/openpower/linux/0006-ima-Make-process_buffer_measurement-generic.patch b/openpower/linux/0006-ima-Make-process_buffer_measurement-generic.patch
new file mode 100644
index 0000000..7fd748f
--- /dev/null
+++ b/openpower/linux/0006-ima-Make-process_buffer_measurement-generic.patch
@@ -0,0 +1,143 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:30 -0400
+Subject: [PATCH 06/19] ima: Make process_buffer_measurement() generic
+
+process_buffer_measurement() is limited to measuring the kexec boot
+command line. This patch makes process_buffer_measurement() more
+generic, allowing it to measure other types of buffer data (e.g.
+blacklisted binary hashes or key hashes).
+
+process_buffer_measurement() may be called directly from an IMA hook
+or as an auxiliary measurement record. In both cases the buffer
+measurement is based on policy. This patch modifies the function to
+conditionally retrieve the policy defined PCR and template for the IMA
+hook case.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+[zohar@linux.ibm.com: added comment in process_buffer_measurement()]
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-6-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit e14555e3d0e9edfad0a6840c0152f71aba97e793)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ security/integrity/ima/ima.h | 3 ++
+ security/integrity/ima/ima_main.c | 58 +++++++++++++++++++++----------
+ 2 files changed, 43 insertions(+), 18 deletions(-)
+
+diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
+index 8173982e00ab..04800f7f2351 100644
+--- a/security/integrity/ima/ima.h
++++ b/security/integrity/ima/ima.h
+@@ -219,6 +219,9 @@ void ima_store_measurement(struct integrity_iint_cache *iint, struct file *file,
+ struct evm_ima_xattr_data *xattr_value,
+ int xattr_len, const struct modsig *modsig, int pcr,
+ struct ima_template_desc *template_desc);
++void process_buffer_measurement(const void *buf, int size,
++ const char *eventname, enum ima_hooks func,
++ int pcr);
+ void ima_audit_measurement(struct integrity_iint_cache *iint,
+ const unsigned char *filename);
+ int ima_alloc_init_template(struct ima_event_data *event_data,
+diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
+index a768f37a0a4d..bc730e553053 100644
+--- a/security/integrity/ima/ima_main.c
++++ b/security/integrity/ima/ima_main.c
+@@ -626,14 +626,14 @@ int ima_load_data(enum kernel_load_data_id id)
+ * @buf: pointer to the buffer that needs to be added to the log.
+ * @size: size of buffer(in bytes).
+ * @eventname: event name to be used for the buffer entry.
+- * @cred: a pointer to a credentials structure for user validation.
+- * @secid: the secid of the task to be validated.
++ * @func: IMA hook
++ * @pcr: pcr to extend the measurement
+ *
+ * Based on policy, the buffer is measured into the ima log.
+ */
+-static void process_buffer_measurement(const void *buf, int size,
+- const char *eventname,
+- const struct cred *cred, u32 secid)
++void process_buffer_measurement(const void *buf, int size,
++ const char *eventname, enum ima_hooks func,
++ int pcr)
+ {
+ int ret = 0;
+ struct ima_template_entry *entry = NULL;
+@@ -642,19 +642,45 @@ static void process_buffer_measurement(const void *buf, int size,
+ .filename = eventname,
+ .buf = buf,
+ .buf_len = size};
+- struct ima_template_desc *template_desc = NULL;
++ struct ima_template_desc *template = NULL;
+ struct {
+ struct ima_digest_data hdr;
+ char digest[IMA_MAX_DIGEST_SIZE];
+ } hash = {};
+ int violation = 0;
+- int pcr = CONFIG_IMA_MEASURE_PCR_IDX;
+ int action = 0;
++ u32 secid;
+
+- action = ima_get_action(NULL, cred, secid, 0, KEXEC_CMDLINE, &pcr,
+- &template_desc);
+- if (!(action & IMA_MEASURE))
+- return;
++ /*
++ * Both LSM hooks and auxilary based buffer measurements are
++ * based on policy. To avoid code duplication, differentiate
++ * between the LSM hooks and auxilary buffer measurements,
++ * retrieving the policy rule information only for the LSM hook
++ * buffer measurements.
++ */
++ if (func) {
++ security_task_getsecid(current, &secid);
++ action = ima_get_action(NULL, current_cred(), secid, 0, func,
++ &pcr, &template);
++ if (!(action & IMA_MEASURE))
++ return;
++ }
++
++ if (!pcr)
++ pcr = CONFIG_IMA_MEASURE_PCR_IDX;
++
++ if (!template) {
++ template = lookup_template_desc("ima-buf");
++ ret = template_desc_init_fields(template->fmt,
++ &(template->fields),
++ &(template->num_fields));
++ if (ret < 0) {
++ pr_err("template %s init failed, result: %d\n",
++ (strlen(template->name) ?
++ template->name : template->fmt), ret);
++ return;
++ }
++ }
+
+ iint.ima_hash = &hash.hdr;
+ iint.ima_hash->algo = ima_hash_algo;
+@@ -664,7 +690,7 @@ static void process_buffer_measurement(const void *buf, int size,
+ if (ret < 0)
+ goto out;
+
+- ret = ima_alloc_init_template(&event_data, &entry, template_desc);
++ ret = ima_alloc_init_template(&event_data, &entry, template);
+ if (ret < 0)
+ goto out;
+
+@@ -686,13 +712,9 @@ static void process_buffer_measurement(const void *buf, int size,
+ */
+ void ima_kexec_cmdline(const void *buf, int size)
+ {
+- u32 secid;
+-
+- if (buf && size != 0) {
+- security_task_getsecid(current, &secid);
++ if (buf && size != 0)
+ process_buffer_measurement(buf, size, "kexec-cmdline",
+- current_cred(), secid);
+- }
++ KEXEC_CMDLINE, 0);
+ }
+
+ static int __init init_ima(void)
diff --git a/openpower/linux/0007-certs-Add-wrapper-function-to-check-blacklisted-bina.patch b/openpower/linux/0007-certs-Add-wrapper-function-to-check-blacklisted-bina.patch
new file mode 100644
index 0000000..e33fc06
--- /dev/null
+++ b/openpower/linux/0007-certs-Add-wrapper-function-to-check-blacklisted-bina.patch
@@ -0,0 +1,67 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:31 -0400
+Subject: [PATCH 07/19] certs: Add wrapper function to check blacklisted binary
+ hash
+
+The -EKEYREJECTED error returned by existing is_hash_blacklisted() is
+misleading when called for checking against blacklisted hash of a
+binary.
+
+This patch adds a wrapper function is_binary_blacklisted() to return
+-EPERM error if binary is blacklisted.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-7-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit 2434f7d2d488c3301ae81f1031e1c66c6f076fb7)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ certs/blacklist.c | 9 +++++++++
+ include/keys/system_keyring.h | 6 ++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/certs/blacklist.c b/certs/blacklist.c
+index ec00bf337eb6..6514f9ebc943 100644
+--- a/certs/blacklist.c
++++ b/certs/blacklist.c
+@@ -135,6 +135,15 @@ int is_hash_blacklisted(const u8 *hash, size_t hash_len, const char *type)
+ }
+ EXPORT_SYMBOL_GPL(is_hash_blacklisted);
+
++int is_binary_blacklisted(const u8 *hash, size_t hash_len)
++{
++ if (is_hash_blacklisted(hash, hash_len, "bin") == -EKEYREJECTED)
++ return -EPERM;
++
++ return 0;
++}
++EXPORT_SYMBOL_GPL(is_binary_blacklisted);
++
+ /*
+ * Initialise the blacklist
+ */
+diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h
+index c1a96fdf598b..fb8b07daa9d1 100644
+--- a/include/keys/system_keyring.h
++++ b/include/keys/system_keyring.h
+@@ -35,12 +35,18 @@ extern int restrict_link_by_builtin_and_secondary_trusted(
+ extern int mark_hash_blacklisted(const char *hash);
+ extern int is_hash_blacklisted(const u8 *hash, size_t hash_len,
+ const char *type);
++extern int is_binary_blacklisted(const u8 *hash, size_t hash_len);
+ #else
+ static inline int is_hash_blacklisted(const u8 *hash, size_t hash_len,
+ const char *type)
+ {
+ return 0;
+ }
++
++static inline int is_binary_blacklisted(const u8 *hash, size_t hash_len)
++{
++ return 0;
++}
+ #endif
+
+ #ifdef CONFIG_IMA_BLACKLIST_KEYRING
diff --git a/openpower/linux/0008-ima-Check-against-blacklisted-hashes-for-files-with-.patch b/openpower/linux/0008-ima-Check-against-blacklisted-hashes-for-files-with-.patch
new file mode 100644
index 0000000..7d18cc7
--- /dev/null
+++ b/openpower/linux/0008-ima-Check-against-blacklisted-hashes-for-files-with-.patch
@@ -0,0 +1,261 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:32 -0400
+Subject: [PATCH 08/19] ima: Check against blacklisted hashes for files with
+ modsig
+
+Asymmetric private keys are used to sign multiple files. The kernel
+currently supports checking against blacklisted keys. However, if the
+public key is blacklisted, any file signed by the blacklisted key will
+automatically fail signature verification. Blacklisting the public key
+is not fine enough granularity, as we might want to only blacklist a
+particular file.
+
+This patch adds support for checking against the blacklisted hash of
+the file, without the appended signature, based on the IMA policy. It
+defines a new policy option "appraise_flag=check_blacklist".
+
+In addition to the blacklisted binary hashes stored in the firmware
+"dbx" variable, the Linux kernel may be configured to load blacklisted
+binary hashes onto the .blacklist keyring as well. The following
+example shows how to blacklist a specific kernel module hash.
+
+ $ sha256sum kernel/kheaders.ko
+ 77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3
+ kernel/kheaders.ko
+
+ $ grep BLACKLIST .config
+ CONFIG_SYSTEM_BLACKLIST_KEYRING=y
+ CONFIG_SYSTEM_BLACKLIST_HASH_LIST="blacklist-hash-list"
+
+ $ cat certs/blacklist-hash-list
+ "bin:77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3"
+
+Update the IMA custom measurement and appraisal policy
+rules (/etc/ima-policy):
+
+ measure func=MODULE_CHECK template=ima-modsig
+ appraise func=MODULE_CHECK appraise_flag=check_blacklist
+ appraise_type=imasig|modsig
+
+After building, installing, and rebooting the kernel:
+
+ 545660333 ---lswrv 0 0 \_ blacklist:
+ bin:77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3
+
+ measure func=MODULE_CHECK template=ima-modsig
+ appraise func=MODULE_CHECK appraise_flag=check_blacklist
+ appraise_type=imasig|modsig
+
+ modprobe: ERROR: could not insert 'kheaders': Permission denied
+
+ 10 0c9834db5a0182c1fb0cdc5d3adcf11a11fd83dd ima-sig
+ sha256:3bc6ed4f0b4d6e31bc1dbc9ef844605abc7afdc6d81a57d77a1ec9407997c40
+ 2 /usr/lib/modules/5.4.0-rc3+/kernel/kernel/kheaders.ko
+
+ 10 82aad2bcc3fa8ed94762356b5c14838f3bcfa6a0 ima-modsig
+ sha256:3bc6ed4f0b4d6e31bc1dbc9ef844605abc7afdc6d81a57d77a1ec9407997c40
+ 2 /usr/lib/modules/5.4.0rc3+/kernel/kernel/kheaders.ko sha256:77fa889b3
+ 5a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3
+ 3082029a06092a864886f70d010702a082028b30820287020101310d300b0609608648
+ 016503040201300b06092a864886f70d01070131820264....
+
+ 10 25b72217cc1152b44b134ce2cd68f12dfb71acb3 ima-buf
+ sha256:8b58427fedcf8f4b20bc8dc007f2e232bf7285d7b93a66476321f9c2a3aa132
+ b blacklisted-hash
+ 77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+[zohar@linux.ibm.com: updated patch description]
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-8-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit 273df864cf7466fb170b8dcc1abd672cd08ad8d3)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ Documentation/ABI/testing/ima_policy | 4 ++++
+ security/integrity/ima/ima.h | 8 +++++++
+ security/integrity/ima/ima_appraise.c | 33 +++++++++++++++++++++++++++
+ security/integrity/ima/ima_main.c | 12 ++++++----
+ security/integrity/ima/ima_policy.c | 12 ++++++++--
+ security/integrity/integrity.h | 1 +
+ 6 files changed, 64 insertions(+), 6 deletions(-)
+
+diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy
+index 29ebe9afdac4..29aaedf33246 100644
+--- a/Documentation/ABI/testing/ima_policy
++++ b/Documentation/ABI/testing/ima_policy
+@@ -25,6 +25,7 @@ Description:
+ lsm: [[subj_user=] [subj_role=] [subj_type=]
+ [obj_user=] [obj_role=] [obj_type=]]
+ option: [[appraise_type=]] [template=] [permit_directio]
++ [appraise_flag=]
+ base: func:= [BPRM_CHECK][MMAP_CHECK][CREDS_CHECK][FILE_CHECK][MODULE_CHECK]
+ [FIRMWARE_CHECK]
+ [KEXEC_KERNEL_CHECK] [KEXEC_INITRAMFS_CHECK]
+@@ -38,6 +39,9 @@ Description:
+ fowner:= decimal value
+ lsm: are LSM specific
+ option: appraise_type:= [imasig] [imasig|modsig]
++ appraise_flag:= [check_blacklist]
++ Currently, blacklist check is only for files signed with appended
++ signature.
+ template:= name of a defined IMA template type
+ (eg, ima-ng). Only valid when action is "measure".
+ pcr:= decimal value
+diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
+index 04800f7f2351..7d855f2c80fa 100644
+--- a/security/integrity/ima/ima.h
++++ b/security/integrity/ima/ima.h
+@@ -258,6 +258,8 @@ int ima_policy_show(struct seq_file *m, void *v);
+ #define IMA_APPRAISE_KEXEC 0x40
+
+ #ifdef CONFIG_IMA_APPRAISE
++int ima_check_blacklist(struct integrity_iint_cache *iint,
++ const struct modsig *modsig, int pcr);
+ int ima_appraise_measurement(enum ima_hooks func,
+ struct integrity_iint_cache *iint,
+ struct file *file, const unsigned char *filename,
+@@ -273,6 +275,12 @@ int ima_read_xattr(struct dentry *dentry,
+ struct evm_ima_xattr_data **xattr_value);
+
+ #else
++static inline int ima_check_blacklist(struct integrity_iint_cache *iint,
++ const struct modsig *modsig, int pcr)
++{
++ return 0;
++}
++
+ static inline int ima_appraise_measurement(enum ima_hooks func,
+ struct integrity_iint_cache *iint,
+ struct file *file,
+diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
+index 23b04c6521b2..176249e4a7ac 100644
+--- a/security/integrity/ima/ima_appraise.c
++++ b/security/integrity/ima/ima_appraise.c
+@@ -12,6 +12,7 @@
+ #include <linux/magic.h>
+ #include <linux/ima.h>
+ #include <linux/evm.h>
++#include <keys/system_keyring.h>
+
+ #include "ima.h"
+
+@@ -309,6 +310,38 @@ static int modsig_verify(enum ima_hooks func, const struct modsig *modsig,
+ return rc;
+ }
+
++/*
++ * ima_check_blacklist - determine if the binary is blacklisted.
++ *
++ * Add the hash of the blacklisted binary to the measurement list, based
++ * on policy.
++ *
++ * Returns -EPERM if the hash is blacklisted.
++ */
++int ima_check_blacklist(struct integrity_iint_cache *iint,
++ const struct modsig *modsig, int pcr)
++{
++ enum hash_algo hash_algo;
++ const u8 *digest = NULL;
++ u32 digestsize = 0;
++ int rc = 0;
++
++ if (!(iint->flags & IMA_CHECK_BLACKLIST))
++ return 0;
++
++ if (iint->flags & IMA_MODSIG_ALLOWED && modsig) {
++ ima_get_modsig_digest(modsig, &hash_algo, &digest, &digestsize);
++
++ rc = is_binary_blacklisted(digest, digestsize);
++ if ((rc == -EPERM) && (iint->flags & IMA_MEASURE))
++ process_buffer_measurement(digest, digestsize,
++ "blacklisted-hash", NONE,
++ pcr);
++ }
++
++ return rc;
++}
++
+ /*
+ * ima_appraise_measurement - appraise file measurement
+ *
+diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
+index bc730e553053..a16c148ed90d 100644
+--- a/security/integrity/ima/ima_main.c
++++ b/security/integrity/ima/ima_main.c
+@@ -335,10 +335,14 @@ static int process_measurement(struct file *file, const struct cred *cred,
+ xattr_value, xattr_len, modsig, pcr,
+ template_desc);
+ if (rc == 0 && (action & IMA_APPRAISE_SUBMASK)) {
+- inode_lock(inode);
+- rc = ima_appraise_measurement(func, iint, file, pathname,
+- xattr_value, xattr_len, modsig);
+- inode_unlock(inode);
++ rc = ima_check_blacklist(iint, modsig, pcr);
++ if (rc != -EPERM) {
++ inode_lock(inode);
++ rc = ima_appraise_measurement(func, iint, file,
++ pathname, xattr_value,
++ xattr_len, modsig);
++ inode_unlock(inode);
++ }
+ if (!rc)
+ rc = mmap_violation_check(func, file, &pathbuf,
+ &pathname, filename);
+diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
+index e725d4187271..42f0970b3054 100644
+--- a/security/integrity/ima/ima_policy.c
++++ b/security/integrity/ima/ima_policy.c
+@@ -769,8 +769,8 @@ enum {
+ Opt_fsuuid, Opt_uid_eq, Opt_euid_eq, Opt_fowner_eq,
+ Opt_uid_gt, Opt_euid_gt, Opt_fowner_gt,
+ Opt_uid_lt, Opt_euid_lt, Opt_fowner_lt,
+- Opt_appraise_type, Opt_permit_directio,
+- Opt_pcr, Opt_template, Opt_err
++ Opt_appraise_type, Opt_appraise_flag,
++ Opt_permit_directio, Opt_pcr, Opt_template, Opt_err
+ };
+
+ static const match_table_t policy_tokens = {
+@@ -802,6 +802,7 @@ static const match_table_t policy_tokens = {
+ {Opt_euid_lt, "euid<%s"},
+ {Opt_fowner_lt, "fowner<%s"},
+ {Opt_appraise_type, "appraise_type=%s"},
++ {Opt_appraise_flag, "appraise_flag=%s"},
+ {Opt_permit_directio, "permit_directio"},
+ {Opt_pcr, "pcr=%s"},
+ {Opt_template, "template=%s"},
+@@ -1182,6 +1183,11 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
+ else
+ result = -EINVAL;
+ break;
++ case Opt_appraise_flag:
++ ima_log_string(ab, "appraise_flag", args[0].from);
++ if (strstr(args[0].from, "blacklist"))
++ entry->flags |= IMA_CHECK_BLACKLIST;
++ break;
+ case Opt_permit_directio:
+ entry->flags |= IMA_PERMIT_DIRECTIO;
+ break;
+@@ -1510,6 +1516,8 @@ int ima_policy_show(struct seq_file *m, void *v)
+ else
+ seq_puts(m, "appraise_type=imasig ");
+ }
++ if (entry->flags & IMA_CHECK_BLACKLIST)
++ seq_puts(m, "appraise_flag=check_blacklist ");
+ if (entry->flags & IMA_PERMIT_DIRECTIO)
+ seq_puts(m, "permit_directio ");
+ rcu_read_unlock();
+diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
+index d9323d31a3a8..73fc286834d7 100644
+--- a/security/integrity/integrity.h
++++ b/security/integrity/integrity.h
+@@ -32,6 +32,7 @@
+ #define EVM_IMMUTABLE_DIGSIG 0x08000000
+ #define IMA_FAIL_UNVERIFIABLE_SIGS 0x10000000
+ #define IMA_MODSIG_ALLOWED 0x20000000
++#define IMA_CHECK_BLACKLIST 0x40000000
+
+ #define IMA_DO_MASK (IMA_MEASURE | IMA_APPRAISE | IMA_AUDIT | \
+ IMA_HASH | IMA_APPRAISE_SUBMASK)
diff --git a/openpower/linux/0009-powerpc-ima-Update-ima-arch-policy-to-check-for-blac.patch b/openpower/linux/0009-powerpc-ima-Update-ima-arch-policy-to-check-for-blac.patch
new file mode 100644
index 0000000..921a675
--- /dev/null
+++ b/openpower/linux/0009-powerpc-ima-Update-ima-arch-policy-to-check-for-blac.patch
@@ -0,0 +1,47 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:33 -0400
+Subject: [PATCH 09/19] powerpc/ima: Update ima arch policy to check for
+ blacklist
+
+This patch updates the arch-specific policies for PowerNV system to
+make sure that the binary hash is not blacklisted.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-9-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit dc87f18615db9dc74a75cfb4a57ed33b07a3903a)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/kernel/ima_arch.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
+index 0ef5956c9753..b9de0fb45bb9 100644
+--- a/arch/powerpc/kernel/ima_arch.c
++++ b/arch/powerpc/kernel/ima_arch.c
+@@ -23,9 +23,9 @@ bool arch_ima_get_secureboot(void)
+ * is not enabled.
+ */
+ static const char *const secure_rules[] = {
+- "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig",
++ "appraise func=KEXEC_KERNEL_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+ #ifndef CONFIG_MODULE_SIG_FORCE
+- "appraise func=MODULE_CHECK appraise_type=imasig|modsig",
++ "appraise func=MODULE_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+ #endif
+ NULL
+ };
+@@ -49,9 +49,9 @@ static const char *const trusted_rules[] = {
+ static const char *const secure_and_trusted_rules[] = {
+ "measure func=KEXEC_KERNEL_CHECK template=ima-modsig",
+ "measure func=MODULE_CHECK template=ima-modsig",
+- "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig",
++ "appraise func=KEXEC_KERNEL_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+ #ifndef CONFIG_MODULE_SIG_FORCE
+- "appraise func=MODULE_CHECK appraise_type=imasig|modsig",
++ "appraise func=MODULE_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+ #endif
+ NULL
+ };
diff --git a/openpower/linux/0010-powerpc-powernv-Add-OPAL-API-interface-to-access-sec.patch b/openpower/linux/0010-powerpc-powernv-Add-OPAL-API-interface-to-access-sec.patch
new file mode 100644
index 0000000..8875930
--- /dev/null
+++ b/openpower/linux/0010-powerpc-powernv-Add-OPAL-API-interface-to-access-sec.patch
@@ -0,0 +1,329 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Sun, 10 Nov 2019 21:10:33 -0600
+Subject: [PATCH 10/19] powerpc/powernv: Add OPAL API interface to access
+ secure variable
+
+The X.509 certificates trusted by the platform and required to secure
+boot the OS kernel are wrapped in secure variables, which are
+controlled by OPAL.
+
+This patch adds firmware/kernel interface to read and write OPAL
+secure variables based on the unique key.
+
+This support can be enabled using CONFIG_OPAL_SECVAR.
+
+Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com>
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Eric Richter <erichte@linux.ibm.com>
+[mpe: Make secvar_ops __ro_after_init, only build opal-secvar.c if PPC_SECURE_BOOT=y]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1573441836-3632-2-git-send-email-nayna@linux.ibm.com
+(cherry picked from commit 9155e2341aa8b5df057dc1c77633b33d1a4f17d2)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/include/asm/opal-api.h | 5 +-
+ arch/powerpc/include/asm/opal.h | 7 +
+ arch/powerpc/include/asm/secvar.h | 35 +++++
+ arch/powerpc/kernel/Makefile | 2 +-
+ arch/powerpc/kernel/secvar-ops.c | 17 +++
+ arch/powerpc/platforms/powernv/Makefile | 1 +
+ arch/powerpc/platforms/powernv/opal-call.c | 3 +
+ arch/powerpc/platforms/powernv/opal-secvar.c | 140 +++++++++++++++++++
+ arch/powerpc/platforms/powernv/opal.c | 3 +
+ 9 files changed, 211 insertions(+), 2 deletions(-)
+ create mode 100644 arch/powerpc/include/asm/secvar.h
+ create mode 100644 arch/powerpc/kernel/secvar-ops.c
+ create mode 100644 arch/powerpc/platforms/powernv/opal-secvar.c
+
+diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
+index 378e3997845a..c1f25a760eb1 100644
+--- a/arch/powerpc/include/asm/opal-api.h
++++ b/arch/powerpc/include/asm/opal-api.h
+@@ -211,7 +211,10 @@
+ #define OPAL_MPIPL_UPDATE 173
+ #define OPAL_MPIPL_REGISTER_TAG 174
+ #define OPAL_MPIPL_QUERY_TAG 175
+-#define OPAL_LAST 175
++#define OPAL_SECVAR_GET 176
++#define OPAL_SECVAR_GET_NEXT 177
++#define OPAL_SECVAR_ENQUEUE_UPDATE 178
++#define OPAL_LAST 178
+
+ #define QUIESCE_HOLD 1 /* Spin all calls at entry */
+ #define QUIESCE_REJECT 2 /* Fail all calls with OPAL_BUSY */
+diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
+index a0cf8fba4d12..9986ac34b8e2 100644
+--- a/arch/powerpc/include/asm/opal.h
++++ b/arch/powerpc/include/asm/opal.h
+@@ -298,6 +298,13 @@ int opal_sensor_group_clear(u32 group_hndl, int token);
+ int opal_sensor_group_enable(u32 group_hndl, int token, bool enable);
+ int opal_nx_coproc_init(uint32_t chip_id, uint32_t ct);
+
++int opal_secvar_get(const char *key, uint64_t key_len, u8 *data,
++ uint64_t *data_size);
++int opal_secvar_get_next(const char *key, uint64_t *key_len,
++ uint64_t key_buf_size);
++int opal_secvar_enqueue_update(const char *key, uint64_t key_len, u8 *data,
++ uint64_t data_size);
++
+ s64 opal_mpipl_update(enum opal_mpipl_ops op, u64 src, u64 dest, u64 size);
+ s64 opal_mpipl_register_tag(enum opal_mpipl_tags tag, u64 addr);
+ s64 opal_mpipl_query_tag(enum opal_mpipl_tags tag, u64 *addr);
+diff --git a/arch/powerpc/include/asm/secvar.h b/arch/powerpc/include/asm/secvar.h
+new file mode 100644
+index 000000000000..4cc35b58b986
+--- /dev/null
++++ b/arch/powerpc/include/asm/secvar.h
+@@ -0,0 +1,35 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++/*
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Nayna Jain
++ *
++ * PowerPC secure variable operations.
++ */
++#ifndef SECVAR_OPS_H
++#define SECVAR_OPS_H
++
++#include <linux/types.h>
++#include <linux/errno.h>
++
++extern const struct secvar_operations *secvar_ops;
++
++struct secvar_operations {
++ int (*get)(const char *key, uint64_t key_len, u8 *data,
++ uint64_t *data_size);
++ int (*get_next)(const char *key, uint64_t *key_len,
++ uint64_t keybufsize);
++ int (*set)(const char *key, uint64_t key_len, u8 *data,
++ uint64_t data_size);
++};
++
++#ifdef CONFIG_PPC_SECURE_BOOT
++
++extern void set_secvar_ops(const struct secvar_operations *ops);
++
++#else
++
++static inline void set_secvar_ops(const struct secvar_operations *ops) { }
++
++#endif
++
++#endif
+diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
+index b82f7f5e5121..93b0336090f2 100644
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -158,7 +158,7 @@ ifneq ($(CONFIG_PPC_POWERNV)$(CONFIG_PPC_SVM),)
+ obj-y += ucall.o
+ endif
+
+-obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o ima_arch.o
++obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o ima_arch.o secvar-ops.o
+
+ # Disable GCOV, KCOV & sanitizers in odd or sensitive code
+ GCOV_PROFILE_prom_init.o := n
+diff --git a/arch/powerpc/kernel/secvar-ops.c b/arch/powerpc/kernel/secvar-ops.c
+new file mode 100644
+index 000000000000..6a29777d6a2d
+--- /dev/null
++++ b/arch/powerpc/kernel/secvar-ops.c
+@@ -0,0 +1,17 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Nayna Jain
++ *
++ * This file initializes secvar operations for PowerPC Secureboot
++ */
++
++#include <linux/cache.h>
++#include <asm/secvar.h>
++
++const struct secvar_operations *secvar_ops __ro_after_init;
++
++void set_secvar_ops(const struct secvar_operations *ops)
++{
++ secvar_ops = ops;
++}
+diff --git a/arch/powerpc/platforms/powernv/Makefile b/arch/powerpc/platforms/powernv/Makefile
+index a3ac9646119d..c0f8120045c3 100644
+--- a/arch/powerpc/platforms/powernv/Makefile
++++ b/arch/powerpc/platforms/powernv/Makefile
+@@ -20,3 +20,4 @@ obj-$(CONFIG_PPC_MEMTRACE) += memtrace.o
+ obj-$(CONFIG_PPC_VAS) += vas.o vas-window.o vas-debug.o
+ obj-$(CONFIG_OCXL_BASE) += ocxl.o
+ obj-$(CONFIG_SCOM_DEBUGFS) += opal-xscom.o
++obj-$(CONFIG_PPC_SECURE_BOOT) += opal-secvar.o
+diff --git a/arch/powerpc/platforms/powernv/opal-call.c b/arch/powerpc/platforms/powernv/opal-call.c
+index a2aa5e433ac8..5cd0f52d258f 100644
+--- a/arch/powerpc/platforms/powernv/opal-call.c
++++ b/arch/powerpc/platforms/powernv/opal-call.c
+@@ -290,3 +290,6 @@ OPAL_CALL(opal_nx_coproc_init, OPAL_NX_COPROC_INIT);
+ OPAL_CALL(opal_mpipl_update, OPAL_MPIPL_UPDATE);
+ OPAL_CALL(opal_mpipl_register_tag, OPAL_MPIPL_REGISTER_TAG);
+ OPAL_CALL(opal_mpipl_query_tag, OPAL_MPIPL_QUERY_TAG);
++OPAL_CALL(opal_secvar_get, OPAL_SECVAR_GET);
++OPAL_CALL(opal_secvar_get_next, OPAL_SECVAR_GET_NEXT);
++OPAL_CALL(opal_secvar_enqueue_update, OPAL_SECVAR_ENQUEUE_UPDATE);
+diff --git a/arch/powerpc/platforms/powernv/opal-secvar.c b/arch/powerpc/platforms/powernv/opal-secvar.c
+new file mode 100644
+index 000000000000..14133e120bdd
+--- /dev/null
++++ b/arch/powerpc/platforms/powernv/opal-secvar.c
+@@ -0,0 +1,140 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * PowerNV code for secure variables
++ *
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Claudio Carvalho
++ * Nayna Jain
++ *
++ * APIs to access secure variables managed by OPAL.
++ */
++
++#define pr_fmt(fmt) "secvar: "fmt
++
++#include <linux/types.h>
++#include <linux/platform_device.h>
++#include <linux/of_platform.h>
++#include <asm/opal.h>
++#include <asm/secvar.h>
++#include <asm/secure_boot.h>
++
++static int opal_status_to_err(int rc)
++{
++ int err;
++
++ switch (rc) {
++ case OPAL_SUCCESS:
++ err = 0;
++ break;
++ case OPAL_UNSUPPORTED:
++ err = -ENXIO;
++ break;
++ case OPAL_PARAMETER:
++ err = -EINVAL;
++ break;
++ case OPAL_RESOURCE:
++ err = -ENOSPC;
++ break;
++ case OPAL_HARDWARE:
++ err = -EIO;
++ break;
++ case OPAL_NO_MEM:
++ err = -ENOMEM;
++ break;
++ case OPAL_EMPTY:
++ err = -ENOENT;
++ break;
++ case OPAL_PARTIAL:
++ err = -EFBIG;
++ break;
++ default:
++ err = -EINVAL;
++ }
++
++ return err;
++}
++
++static int opal_get_variable(const char *key, uint64_t ksize,
++ u8 *data, uint64_t *dsize)
++{
++ int rc;
++
++ if (!key || !dsize)
++ return -EINVAL;
++
++ *dsize = cpu_to_be64(*dsize);
++
++ rc = opal_secvar_get(key, ksize, data, dsize);
++
++ *dsize = be64_to_cpu(*dsize);
++
++ return opal_status_to_err(rc);
++}
++
++static int opal_get_next_variable(const char *key, uint64_t *keylen,
++ uint64_t keybufsize)
++{
++ int rc;
++
++ if (!key || !keylen)
++ return -EINVAL;
++
++ *keylen = cpu_to_be64(*keylen);
++
++ rc = opal_secvar_get_next(key, keylen, keybufsize);
++
++ *keylen = be64_to_cpu(*keylen);
++
++ return opal_status_to_err(rc);
++}
++
++static int opal_set_variable(const char *key, uint64_t ksize, u8 *data,
++ uint64_t dsize)
++{
++ int rc;
++
++ if (!key || !data)
++ return -EINVAL;
++
++ rc = opal_secvar_enqueue_update(key, ksize, data, dsize);
++
++ return opal_status_to_err(rc);
++}
++
++static const struct secvar_operations opal_secvar_ops = {
++ .get = opal_get_variable,
++ .get_next = opal_get_next_variable,
++ .set = opal_set_variable,
++};
++
++static int opal_secvar_probe(struct platform_device *pdev)
++{
++ if (!opal_check_token(OPAL_SECVAR_GET)
++ || !opal_check_token(OPAL_SECVAR_GET_NEXT)
++ || !opal_check_token(OPAL_SECVAR_ENQUEUE_UPDATE)) {
++ pr_err("OPAL doesn't support secure variables\n");
++ return -ENODEV;
++ }
++
++ set_secvar_ops(&opal_secvar_ops);
++
++ return 0;
++}
++
++static const struct of_device_id opal_secvar_match[] = {
++ { .compatible = "ibm,secvar-backend",},
++ {},
++};
++
++static struct platform_driver opal_secvar_driver = {
++ .driver = {
++ .name = "secvar",
++ .of_match_table = opal_secvar_match,
++ },
++};
++
++static int __init opal_secvar_init(void)
++{
++ return platform_driver_probe(&opal_secvar_driver, opal_secvar_probe);
++}
++device_initcall(opal_secvar_init);
+diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
+index 38e90270280b..8355bcd00f93 100644
+--- a/arch/powerpc/platforms/powernv/opal.c
++++ b/arch/powerpc/platforms/powernv/opal.c
+@@ -1002,6 +1002,9 @@ static int __init opal_init(void)
+ /* Initialise OPAL Power control interface */
+ opal_power_control_init();
+
++ /* Initialize OPAL secure variables */
++ opal_pdev_init("ibm,secvar-backend");
++
+ return 0;
+ }
+ machine_subsys_initcall(powernv, opal_init);
diff --git a/openpower/linux/0011-powerpc-expose-secure-variables-to-userspace-via-sys.patch b/openpower/linux/0011-powerpc-expose-secure-variables-to-userspace-via-sys.patch
new file mode 100644
index 0000000..518b9c3
--- /dev/null
+++ b/openpower/linux/0011-powerpc-expose-secure-variables-to-userspace-via-sys.patch
@@ -0,0 +1,369 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Sun, 10 Nov 2019 21:10:34 -0600
+Subject: [PATCH 11/19] powerpc: expose secure variables to userspace via sysfs
+
+PowerNV secure variables, which store the keys used for OS kernel
+verification, are managed by the firmware. These secure variables need to
+be accessed by the userspace for addition/deletion of the certificates.
+
+This patch adds the sysfs interface to expose secure variables for PowerNV
+secureboot. The users shall use this interface for manipulating
+the keys stored in the secure variables.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Eric Richter <erichte@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1573441836-3632-3-git-send-email-nayna@linux.ibm.com
+(cherry picked from commit bd5d9c743d38f67d64ea1b512a461f6b5a5f6bec)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ Documentation/ABI/testing/sysfs-secvar | 46 +++++
+ arch/powerpc/Kconfig | 11 ++
+ arch/powerpc/kernel/Makefile | 1 +
+ arch/powerpc/kernel/secvar-sysfs.c | 248 +++++++++++++++++++++++++
+ 4 files changed, 306 insertions(+)
+ create mode 100644 Documentation/ABI/testing/sysfs-secvar
+ create mode 100644 arch/powerpc/kernel/secvar-sysfs.c
+
+diff --git a/Documentation/ABI/testing/sysfs-secvar b/Documentation/ABI/testing/sysfs-secvar
+new file mode 100644
+index 000000000000..feebb8c57294
+--- /dev/null
++++ b/Documentation/ABI/testing/sysfs-secvar
+@@ -0,0 +1,46 @@
++What: /sys/firmware/secvar
++Date: August 2019
++Contact: Nayna Jain <nayna@linux.ibm.com>
++Description: This directory is created if the POWER firmware supports OS
++ secureboot, thereby secure variables. It exposes interface
++ for reading/writing the secure variables
++
++What: /sys/firmware/secvar/vars
++Date: August 2019
++Contact: Nayna Jain <nayna@linux.ibm.com>
++Description: This directory lists all the secure variables that are supported
++ by the firmware.
++
++What: /sys/firmware/secvar/format
++Date: August 2019
++Contact: Nayna Jain <nayna@linux.ibm.com>
++Description: A string indicating which backend is in use by the firmware.
++ This determines the format of the variable and the accepted
++ format of variable updates.
++
++What: /sys/firmware/secvar/vars/<variable name>
++Date: August 2019
++Contact: Nayna Jain <nayna@linux.ibm.com>
++Description: Each secure variable is represented as a directory named as
++ <variable_name>. The variable name is unique and is in ASCII
++ representation. The data and size can be determined by reading
++ their respective attribute files.
++
++What: /sys/firmware/secvar/vars/<variable_name>/size
++Date: August 2019
++Contact: Nayna Jain <nayna@linux.ibm.com>
++Description: An integer representation of the size of the content of the
++ variable. In other words, it represents the size of the data.
++
++What: /sys/firmware/secvar/vars/<variable_name>/data
++Date: August 2019
++Contact: Nayna Jain h<nayna@linux.ibm.com>
++Description: A read-only file containing the value of the variable. The size
++ of the file represents the maximum size of the variable data.
++
++What: /sys/firmware/secvar/vars/<variable_name>/update
++Date: August 2019
++Contact: Nayna Jain <nayna@linux.ibm.com>
++Description: A write-only file that is used to submit the new value for the
++ variable. The size of the file represents the maximum size of
++ the variable data that can be written.
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index 32ce6c0b43f1..cc6cdf821604 100644
+--- a/arch/powerpc/Kconfig
++++ b/arch/powerpc/Kconfig
+@@ -946,6 +946,17 @@ config PPC_SECURE_BOOT
+ to enable OS secure boot on systems that have firmware support for
+ it. If in doubt say N.
+
++config PPC_SECVAR_SYSFS
++ bool "Enable sysfs interface for POWER secure variables"
++ default y
++ depends on PPC_SECURE_BOOT
++ depends on SYSFS
++ help
++ POWER secure variables are managed and controlled by firmware.
++ These variables are exposed to userspace via sysfs to enable
++ read/write operations on these variables. Say Y if you have
++ secure boot enabled and want to expose variables to userspace.
++
+ endmenu
+
+ config ISA_DMA_API
+diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
+index 93b0336090f2..b97c018a2f53 100644
+--- a/arch/powerpc/kernel/Makefile
++++ b/arch/powerpc/kernel/Makefile
+@@ -159,6 +159,7 @@ obj-y += ucall.o
+ endif
+
+ obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o ima_arch.o secvar-ops.o
++obj-$(CONFIG_PPC_SECVAR_SYSFS) += secvar-sysfs.o
+
+ # Disable GCOV, KCOV & sanitizers in odd or sensitive code
+ GCOV_PROFILE_prom_init.o := n
+diff --git a/arch/powerpc/kernel/secvar-sysfs.c b/arch/powerpc/kernel/secvar-sysfs.c
+new file mode 100644
+index 000000000000..a0a78aba2083
+--- /dev/null
++++ b/arch/powerpc/kernel/secvar-sysfs.c
+@@ -0,0 +1,248 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * Copyright (C) 2019 IBM Corporation <nayna@linux.ibm.com>
++ *
++ * This code exposes secure variables to user via sysfs
++ */
++
++#define pr_fmt(fmt) "secvar-sysfs: "fmt
++
++#include <linux/slab.h>
++#include <linux/compat.h>
++#include <linux/string.h>
++#include <linux/of.h>
++#include <asm/secvar.h>
++
++#define NAME_MAX_SIZE 1024
++
++static struct kobject *secvar_kobj;
++static struct kset *secvar_kset;
++
++static ssize_t format_show(struct kobject *kobj, struct kobj_attribute *attr,
++ char *buf)
++{
++ ssize_t rc = 0;
++ struct device_node *node;
++ const char *format;
++
++ node = of_find_compatible_node(NULL, NULL, "ibm,secvar-backend");
++ if (!of_device_is_available(node))
++ return -ENODEV;
++
++ rc = of_property_read_string(node, "format", &format);
++ if (rc)
++ return rc;
++
++ rc = sprintf(buf, "%s\n", format);
++
++ of_node_put(node);
++
++ return rc;
++}
++
++
++static ssize_t size_show(struct kobject *kobj, struct kobj_attribute *attr,
++ char *buf)
++{
++ uint64_t dsize;
++ int rc;
++
++ rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize);
++ if (rc) {
++ pr_err("Error retrieving %s variable size %d\n", kobj->name,
++ rc);
++ return rc;
++ }
++
++ return sprintf(buf, "%llu\n", dsize);
++}
++
++static ssize_t data_read(struct file *filep, struct kobject *kobj,
++ struct bin_attribute *attr, char *buf, loff_t off,
++ size_t count)
++{
++ uint64_t dsize;
++ char *data;
++ int rc;
++
++ rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize);
++ if (rc) {
++ pr_err("Error getting %s variable size %d\n", kobj->name, rc);
++ return rc;
++ }
++ pr_debug("dsize is %llu\n", dsize);
++
++ data = kzalloc(dsize, GFP_KERNEL);
++ if (!data)
++ return -ENOMEM;
++
++ rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, data, &dsize);
++ if (rc) {
++ pr_err("Error getting %s variable %d\n", kobj->name, rc);
++ goto data_fail;
++ }
++
++ rc = memory_read_from_buffer(buf, count, &off, data, dsize);
++
++data_fail:
++ kfree(data);
++ return rc;
++}
++
++static ssize_t update_write(struct file *filep, struct kobject *kobj,
++ struct bin_attribute *attr, char *buf, loff_t off,
++ size_t count)
++{
++ int rc;
++
++ pr_debug("count is %ld\n", count);
++ rc = secvar_ops->set(kobj->name, strlen(kobj->name) + 1, buf, count);
++ if (rc) {
++ pr_err("Error setting the %s variable %d\n", kobj->name, rc);
++ return rc;
++ }
++
++ return count;
++}
++
++static struct kobj_attribute format_attr = __ATTR_RO(format);
++
++static struct kobj_attribute size_attr = __ATTR_RO(size);
++
++static struct bin_attribute data_attr = __BIN_ATTR_RO(data, 0);
++
++static struct bin_attribute update_attr = __BIN_ATTR_WO(update, 0);
++
++static struct bin_attribute *secvar_bin_attrs[] = {
++ &data_attr,
++ &update_attr,
++ NULL,
++};
++
++static struct attribute *secvar_attrs[] = {
++ &size_attr.attr,
++ NULL,
++};
++
++static const struct attribute_group secvar_attr_group = {
++ .attrs = secvar_attrs,
++ .bin_attrs = secvar_bin_attrs,
++};
++__ATTRIBUTE_GROUPS(secvar_attr);
++
++static struct kobj_type secvar_ktype = {
++ .sysfs_ops = &kobj_sysfs_ops,
++ .default_groups = secvar_attr_groups,
++};
++
++static int update_kobj_size(void)
++{
++
++ struct device_node *node;
++ u64 varsize;
++ int rc = 0;
++
++ node = of_find_compatible_node(NULL, NULL, "ibm,secvar-backend");
++ if (!of_device_is_available(node)) {
++ rc = -ENODEV;
++ goto out;
++ }
++
++ rc = of_property_read_u64(node, "max-var-size", &varsize);
++ if (rc)
++ goto out;
++
++ data_attr.size = varsize;
++ update_attr.size = varsize;
++
++out:
++ of_node_put(node);
++
++ return rc;
++}
++
++static int secvar_sysfs_load(void)
++{
++ char *name;
++ uint64_t namesize = 0;
++ struct kobject *kobj;
++ int rc;
++
++ name = kzalloc(NAME_MAX_SIZE, GFP_KERNEL);
++ if (!name)
++ return -ENOMEM;
++
++ do {
++ rc = secvar_ops->get_next(name, &namesize, NAME_MAX_SIZE);
++ if (rc) {
++ if (rc != -ENOENT)
++ pr_err("error getting secvar from firmware %d\n",
++ rc);
++ break;
++ }
++
++ kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
++ if (!kobj) {
++ rc = -ENOMEM;
++ break;
++ }
++
++ kobject_init(kobj, &secvar_ktype);
++
++ rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name);
++ if (rc) {
++ pr_warn("kobject_add error %d for attribute: %s\n", rc,
++ name);
++ kobject_put(kobj);
++ kobj = NULL;
++ }
++
++ if (kobj)
++ kobject_uevent(kobj, KOBJ_ADD);
++
++ } while (!rc);
++
++ kfree(name);
++ return rc;
++}
++
++static int secvar_sysfs_init(void)
++{
++ int rc;
++
++ if (!secvar_ops) {
++ pr_warn("secvar: failed to retrieve secvar operations.\n");
++ return -ENODEV;
++ }
++
++ secvar_kobj = kobject_create_and_add("secvar", firmware_kobj);
++ if (!secvar_kobj) {
++ pr_err("secvar: Failed to create firmware kobj\n");
++ return -ENOMEM;
++ }
++
++ rc = sysfs_create_file(secvar_kobj, &format_attr.attr);
++ if (rc) {
++ kobject_put(secvar_kobj);
++ return -ENOMEM;
++ }
++
++ secvar_kset = kset_create_and_add("vars", NULL, secvar_kobj);
++ if (!secvar_kset) {
++ pr_err("secvar: sysfs kobject registration failed.\n");
++ kobject_put(secvar_kobj);
++ return -ENOMEM;
++ }
++
++ rc = update_kobj_size();
++ if (rc) {
++ pr_err("Cannot read the size of the attribute\n");
++ return rc;
++ }
++
++ secvar_sysfs_load();
++
++ return 0;
++}
++
++late_initcall(secvar_sysfs_init);
diff --git a/openpower/linux/0012-x86-efi-move-common-keyring-handler-functions-to-new.patch b/openpower/linux/0012-x86-efi-move-common-keyring-handler-functions-to-new.patch
new file mode 100644
index 0000000..e0b01c9
--- /dev/null
+++ b/openpower/linux/0012-x86-efi-move-common-keyring-handler-functions-to-new.patch
@@ -0,0 +1,251 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Sun, 10 Nov 2019 21:10:35 -0600
+Subject: [PATCH 12/19] x86/efi: move common keyring handler functions to new
+ file
+
+The handlers to add the keys to the .platform keyring and blacklisted
+hashes to the .blacklist keyring is common for both the uefi and powerpc
+mechanisms of loading the keys/hashes from the firmware.
+
+This patch moves the common code from load_uefi.c to keyring_handler.c
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Acked-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Eric Richter <erichte@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1573441836-3632-4-git-send-email-nayna@linux.ibm.com
+(cherry picked from commit ad723674d6758478829ee766e3f1a2a24d56236f)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ security/integrity/Makefile | 3 +-
+ .../platform_certs/keyring_handler.c | 80 +++++++++++++++++++
+ .../platform_certs/keyring_handler.h | 32 ++++++++
+ security/integrity/platform_certs/load_uefi.c | 67 +---------------
+ 4 files changed, 115 insertions(+), 67 deletions(-)
+ create mode 100644 security/integrity/platform_certs/keyring_handler.c
+ create mode 100644 security/integrity/platform_certs/keyring_handler.h
+
+diff --git a/security/integrity/Makefile b/security/integrity/Makefile
+index 35e6ca773734..351c9662994b 100644
+--- a/security/integrity/Makefile
++++ b/security/integrity/Makefile
+@@ -11,7 +11,8 @@ integrity-$(CONFIG_INTEGRITY_SIGNATURE) += digsig.o
+ integrity-$(CONFIG_INTEGRITY_ASYMMETRIC_KEYS) += digsig_asymmetric.o
+ integrity-$(CONFIG_INTEGRITY_PLATFORM_KEYRING) += platform_certs/platform_keyring.o
+ integrity-$(CONFIG_LOAD_UEFI_KEYS) += platform_certs/efi_parser.o \
+- platform_certs/load_uefi.o
++ platform_certs/load_uefi.o \
++ platform_certs/keyring_handler.o
+ integrity-$(CONFIG_LOAD_IPL_KEYS) += platform_certs/load_ipl_s390.o
+
+ obj-$(CONFIG_IMA) += ima/
+diff --git a/security/integrity/platform_certs/keyring_handler.c b/security/integrity/platform_certs/keyring_handler.c
+new file mode 100644
+index 000000000000..c5ba695c10e3
+--- /dev/null
++++ b/security/integrity/platform_certs/keyring_handler.c
+@@ -0,0 +1,80 @@
++// SPDX-License-Identifier: GPL-2.0
++
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/cred.h>
++#include <linux/err.h>
++#include <linux/efi.h>
++#include <linux/slab.h>
++#include <keys/asymmetric-type.h>
++#include <keys/system_keyring.h>
++#include "../integrity.h"
++
++static efi_guid_t efi_cert_x509_guid __initdata = EFI_CERT_X509_GUID;
++static efi_guid_t efi_cert_x509_sha256_guid __initdata =
++ EFI_CERT_X509_SHA256_GUID;
++static efi_guid_t efi_cert_sha256_guid __initdata = EFI_CERT_SHA256_GUID;
++
++/*
++ * Blacklist a hash.
++ */
++static __init void uefi_blacklist_hash(const char *source, const void *data,
++ size_t len, const char *type,
++ size_t type_len)
++{
++ char *hash, *p;
++
++ hash = kmalloc(type_len + len * 2 + 1, GFP_KERNEL);
++ if (!hash)
++ return;
++ p = memcpy(hash, type, type_len);
++ p += type_len;
++ bin2hex(p, data, len);
++ p += len * 2;
++ *p = 0;
++
++ mark_hash_blacklisted(hash);
++ kfree(hash);
++}
++
++/*
++ * Blacklist an X509 TBS hash.
++ */
++static __init void uefi_blacklist_x509_tbs(const char *source,
++ const void *data, size_t len)
++{
++ uefi_blacklist_hash(source, data, len, "tbs:", 4);
++}
++
++/*
++ * Blacklist the hash of an executable.
++ */
++static __init void uefi_blacklist_binary(const char *source,
++ const void *data, size_t len)
++{
++ uefi_blacklist_hash(source, data, len, "bin:", 4);
++}
++
++/*
++ * Return the appropriate handler for particular signature list types found in
++ * the UEFI db and MokListRT tables.
++ */
++__init efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type)
++{
++ if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0)
++ return add_to_platform_keyring;
++ return 0;
++}
++
++/*
++ * Return the appropriate handler for particular signature list types found in
++ * the UEFI dbx and MokListXRT tables.
++ */
++__init efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type)
++{
++ if (efi_guidcmp(*sig_type, efi_cert_x509_sha256_guid) == 0)
++ return uefi_blacklist_x509_tbs;
++ if (efi_guidcmp(*sig_type, efi_cert_sha256_guid) == 0)
++ return uefi_blacklist_binary;
++ return 0;
++}
+diff --git a/security/integrity/platform_certs/keyring_handler.h b/security/integrity/platform_certs/keyring_handler.h
+new file mode 100644
+index 000000000000..2462bfa08fe3
+--- /dev/null
++++ b/security/integrity/platform_certs/keyring_handler.h
+@@ -0,0 +1,32 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++
++#ifndef PLATFORM_CERTS_INTERNAL_H
++#define PLATFORM_CERTS_INTERNAL_H
++
++#include <linux/efi.h>
++
++void blacklist_hash(const char *source, const void *data,
++ size_t len, const char *type,
++ size_t type_len);
++
++/*
++ * Blacklist an X509 TBS hash.
++ */
++void blacklist_x509_tbs(const char *source, const void *data, size_t len);
++
++/*
++ * Blacklist the hash of an executable.
++ */
++void blacklist_binary(const char *source, const void *data, size_t len);
++
++/*
++ * Return the handler for particular signature list types found in the db.
++ */
++efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type);
++
++/*
++ * Return the handler for particular signature list types found in the dbx.
++ */
++efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type);
++
++#endif
+diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
+index 020fc7a11ef0..aa874d84e413 100644
+--- a/security/integrity/platform_certs/load_uefi.c
++++ b/security/integrity/platform_certs/load_uefi.c
+@@ -9,6 +9,7 @@
+ #include <keys/asymmetric-type.h>
+ #include <keys/system_keyring.h>
+ #include "../integrity.h"
++#include "keyring_handler.h"
+
+ static efi_guid_t efi_cert_x509_guid __initdata = EFI_CERT_X509_GUID;
+ static efi_guid_t efi_cert_x509_sha256_guid __initdata =
+@@ -69,72 +70,6 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
+ return db;
+ }
+
+-/*
+- * Blacklist a hash.
+- */
+-static __init void uefi_blacklist_hash(const char *source, const void *data,
+- size_t len, const char *type,
+- size_t type_len)
+-{
+- char *hash, *p;
+-
+- hash = kmalloc(type_len + len * 2 + 1, GFP_KERNEL);
+- if (!hash)
+- return;
+- p = memcpy(hash, type, type_len);
+- p += type_len;
+- bin2hex(p, data, len);
+- p += len * 2;
+- *p = 0;
+-
+- mark_hash_blacklisted(hash);
+- kfree(hash);
+-}
+-
+-/*
+- * Blacklist an X509 TBS hash.
+- */
+-static __init void uefi_blacklist_x509_tbs(const char *source,
+- const void *data, size_t len)
+-{
+- uefi_blacklist_hash(source, data, len, "tbs:", 4);
+-}
+-
+-/*
+- * Blacklist the hash of an executable.
+- */
+-static __init void uefi_blacklist_binary(const char *source,
+- const void *data, size_t len)
+-{
+- uefi_blacklist_hash(source, data, len, "bin:", 4);
+-}
+-
+-/*
+- * Return the appropriate handler for particular signature list types found in
+- * the UEFI db and MokListRT tables.
+- */
+-static __init efi_element_handler_t get_handler_for_db(const efi_guid_t *
+- sig_type)
+-{
+- if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0)
+- return add_to_platform_keyring;
+- return 0;
+-}
+-
+-/*
+- * Return the appropriate handler for particular signature list types found in
+- * the UEFI dbx and MokListXRT tables.
+- */
+-static __init efi_element_handler_t get_handler_for_dbx(const efi_guid_t *
+- sig_type)
+-{
+- if (efi_guidcmp(*sig_type, efi_cert_x509_sha256_guid) == 0)
+- return uefi_blacklist_x509_tbs;
+- if (efi_guidcmp(*sig_type, efi_cert_sha256_guid) == 0)
+- return uefi_blacklist_binary;
+- return 0;
+-}
+-
+ /*
+ * Load the certs contained in the UEFI databases into the platform trusted
+ * keyring and the UEFI blacklisted X.509 cert SHA256 hashes into the blacklist
diff --git a/openpower/linux/0013-powerpc-Load-firmware-trusted-keys-hashes-into-kerne.patch b/openpower/linux/0013-powerpc-Load-firmware-trusted-keys-hashes-into-kerne.patch
new file mode 100644
index 0000000..83a0346
--- /dev/null
+++ b/openpower/linux/0013-powerpc-Load-firmware-trusted-keys-hashes-into-kerne.patch
@@ -0,0 +1,163 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Sun, 10 Nov 2019 21:10:36 -0600
+Subject: [PATCH 13/19] powerpc: Load firmware trusted keys/hashes into kernel
+ keyring
+
+The keys used to verify the Host OS kernel are managed by firmware as
+secure variables. This patch loads the verification keys into the
+.platform keyring and revocation hashes into .blacklist keyring. This
+enables verification and loading of the kernels signed by the boot
+time keys which are trusted by firmware.
+
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Eric Richter <erichte@linux.ibm.com>
+[mpe: Search by compatible in load_powerpc_certs(), not using format]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1573441836-3632-5-git-send-email-nayna@linux.ibm.com
+(cherry picked from commit 8220e22d11a05049aab9693839ab82e5e177ccde)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ security/integrity/Kconfig | 9 ++
+ security/integrity/Makefile | 4 +-
+ .../integrity/platform_certs/load_powerpc.c | 96 +++++++++++++++++++
+ 3 files changed, 108 insertions(+), 1 deletion(-)
+ create mode 100644 security/integrity/platform_certs/load_powerpc.c
+
+diff --git a/security/integrity/Kconfig b/security/integrity/Kconfig
+index 0bae6adb63a9..71f0177e8716 100644
+--- a/security/integrity/Kconfig
++++ b/security/integrity/Kconfig
+@@ -72,6 +72,15 @@ config LOAD_IPL_KEYS
+ depends on S390
+ def_bool y
+
++config LOAD_PPC_KEYS
++ bool "Enable loading of platform and blacklisted keys for POWER"
++ depends on INTEGRITY_PLATFORM_KEYRING
++ depends on PPC_SECURE_BOOT
++ default y
++ help
++ Enable loading of keys to the .platform keyring and blacklisted
++ hashes to the .blacklist keyring for powerpc based platforms.
++
+ config INTEGRITY_AUDIT
+ bool "Enables integrity auditing support "
+ depends on AUDIT
+diff --git a/security/integrity/Makefile b/security/integrity/Makefile
+index 351c9662994b..7ee39d66cf16 100644
+--- a/security/integrity/Makefile
++++ b/security/integrity/Makefile
+@@ -14,6 +14,8 @@ integrity-$(CONFIG_LOAD_UEFI_KEYS) += platform_certs/efi_parser.o \
+ platform_certs/load_uefi.o \
+ platform_certs/keyring_handler.o
+ integrity-$(CONFIG_LOAD_IPL_KEYS) += platform_certs/load_ipl_s390.o
+-
++integrity-$(CONFIG_LOAD_PPC_KEYS) += platform_certs/efi_parser.o \
++ platform_certs/load_powerpc.o \
++ platform_certs/keyring_handler.o
+ obj-$(CONFIG_IMA) += ima/
+ obj-$(CONFIG_EVM) += evm/
+diff --git a/security/integrity/platform_certs/load_powerpc.c b/security/integrity/platform_certs/load_powerpc.c
+new file mode 100644
+index 000000000000..a2900cb85357
+--- /dev/null
++++ b/security/integrity/platform_certs/load_powerpc.c
+@@ -0,0 +1,96 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (C) 2019 IBM Corporation
++ * Author: Nayna Jain
++ *
++ * - loads keys and hashes stored and controlled by the firmware.
++ */
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/cred.h>
++#include <linux/err.h>
++#include <linux/slab.h>
++#include <linux/of.h>
++#include <asm/secure_boot.h>
++#include <asm/secvar.h>
++#include "keyring_handler.h"
++
++/*
++ * Get a certificate list blob from the named secure variable.
++ */
++static __init void *get_cert_list(u8 *key, unsigned long keylen, uint64_t *size)
++{
++ int rc;
++ void *db;
++
++ rc = secvar_ops->get(key, keylen, NULL, size);
++ if (rc) {
++ pr_err("Couldn't get size: %d\n", rc);
++ return NULL;
++ }
++
++ db = kmalloc(*size, GFP_KERNEL);
++ if (!db)
++ return NULL;
++
++ rc = secvar_ops->get(key, keylen, db, size);
++ if (rc) {
++ kfree(db);
++ pr_err("Error reading %s var: %d\n", key, rc);
++ return NULL;
++ }
++
++ return db;
++}
++
++/*
++ * Load the certs contained in the keys databases into the platform trusted
++ * keyring and the blacklisted X.509 cert SHA256 hashes into the blacklist
++ * keyring.
++ */
++static int __init load_powerpc_certs(void)
++{
++ void *db = NULL, *dbx = NULL;
++ uint64_t dbsize = 0, dbxsize = 0;
++ int rc = 0;
++ struct device_node *node;
++
++ if (!secvar_ops)
++ return -ENODEV;
++
++ /* The following only applies for the edk2-compat backend. */
++ node = of_find_compatible_node(NULL, NULL, "ibm,edk2-compat-v1");
++ if (!node)
++ return -ENODEV;
++
++ /*
++ * Get db, and dbx. They might not exist, so it isn't an error if we
++ * can't get them.
++ */
++ db = get_cert_list("db", 3, &dbsize);
++ if (!db) {
++ pr_err("Couldn't get db list from firmware\n");
++ } else {
++ rc = parse_efi_signature_list("powerpc:db", db, dbsize,
++ get_handler_for_db);
++ if (rc)
++ pr_err("Couldn't parse db signatures: %d\n", rc);
++ kfree(db);
++ }
++
++ dbx = get_cert_list("dbx", 4, &dbxsize);
++ if (!dbx) {
++ pr_info("Couldn't get dbx list from firmware\n");
++ } else {
++ rc = parse_efi_signature_list("powerpc:dbx", dbx, dbxsize,
++ get_handler_for_dbx);
++ if (rc)
++ pr_err("Couldn't parse dbx signatures: %d\n", rc);
++ kfree(dbx);
++ }
++
++ of_node_put(node);
++
++ return rc;
++}
++late_initcall(load_powerpc_certs);
diff --git a/openpower/linux/0014-powerpc-xmon-Allow-listing-and-clearing-breakpoints-.patch b/openpower/linux/0014-powerpc-xmon-Allow-listing-and-clearing-breakpoints-.patch
new file mode 100644
index 0000000..5559a8a
--- /dev/null
+++ b/openpower/linux/0014-powerpc-xmon-Allow-listing-and-clearing-breakpoints-.patch
@@ -0,0 +1,73 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Christopher M. Riedl" <cmr@informatik.wtf>
+Date: Sat, 7 Sep 2019 01:11:23 -0500
+Subject: [PATCH 14/19] powerpc/xmon: Allow listing and clearing breakpoints in
+ read-only mode
+
+Read-only mode should not prevent listing and clearing any active
+breakpoints.
+
+Tested-by: Daniel Axtens <dja@axtens.net>
+Reviewed-by: Daniel Axtens <dja@axtens.net>
+Signed-off-by: Christopher M. Riedl <cmr@informatik.wtf>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20190907061124.1947-2-cmr@informatik.wtf
+(cherry picked from commit 96664dee5cf1815777286227b09884b4f019727f)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/xmon/xmon.c | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
+index 6d130c89fbd8..ab6371aedfcb 100644
+--- a/arch/powerpc/xmon/xmon.c
++++ b/arch/powerpc/xmon/xmon.c
+@@ -1096,10 +1096,6 @@ cmds(struct pt_regs *excp)
+ set_lpp_cmd();
+ break;
+ case 'b':
+- if (xmon_is_ro) {
+- printf(xmon_ro_msg);
+- break;
+- }
+ bpt_cmds();
+ break;
+ case 'C':
+@@ -1368,11 +1364,16 @@ bpt_cmds(void)
+ struct bpt *bp;
+
+ cmd = inchar();
++
+ switch (cmd) {
+ #ifndef CONFIG_PPC_8xx
+ static const char badaddr[] = "Only kernel addresses are permitted for breakpoints\n";
+ int mode;
+ case 'd': /* bd - hardware data breakpoint */
++ if (xmon_is_ro) {
++ printf(xmon_ro_msg);
++ break;
++ }
+ if (!ppc_breakpoint_available()) {
+ printf("Hardware data breakpoint not supported on this cpu\n");
+ break;
+@@ -1400,6 +1401,10 @@ bpt_cmds(void)
+ break;
+
+ case 'i': /* bi - hardware instr breakpoint */
++ if (xmon_is_ro) {
++ printf(xmon_ro_msg);
++ break;
++ }
+ if (!cpu_has_feature(CPU_FTR_ARCH_207S)) {
+ printf("Hardware instruction breakpoint "
+ "not supported on this cpu\n");
+@@ -1458,7 +1463,8 @@ bpt_cmds(void)
+ break;
+ }
+ termch = cmd;
+- if (!scanhex(&a)) {
++
++ if (xmon_is_ro || !scanhex(&a)) {
+ /* print all breakpoints */
+ printf(" type address\n");
+ if (dabr.enabled) {
diff --git a/openpower/linux/0015-powerpc-ima-Indicate-kernel-modules-appended-signatu.patch b/openpower/linux/0015-powerpc-ima-Indicate-kernel-modules-appended-signatu.patch
new file mode 100644
index 0000000..69f5314
--- /dev/null
+++ b/openpower/linux/0015-powerpc-ima-Indicate-kernel-modules-appended-signatu.patch
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mimi Zohar <zohar@linux.ibm.com>
+Date: Wed, 30 Oct 2019 23:31:34 -0400
+Subject: [PATCH 15/19] powerpc/ima: Indicate kernel modules appended
+ signatures are enforced
+
+The arch specific kernel module policy rule requires kernel modules to
+be signed, either as an IMA signature, stored as an xattr, or as an
+appended signature. As a result, kernel modules appended signatures
+could be enforced without "sig_enforce" being set or reflected in
+/sys/module/module/parameters/sig_enforce. This patch sets
+"sig_enforce".
+
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/1572492694-6520-10-git-send-email-zohar@linux.ibm.com
+(cherry picked from commit d72ea4915c7e6fa5e7b9022a34df66e375bfe46c)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/kernel/ima_arch.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
+index b9de0fb45bb9..e34116255ced 100644
+--- a/arch/powerpc/kernel/ima_arch.c
++++ b/arch/powerpc/kernel/ima_arch.c
+@@ -62,13 +62,17 @@ static const char *const secure_and_trusted_rules[] = {
+ */
+ const char *const *arch_get_ima_policy(void)
+ {
+- if (is_ppc_secureboot_enabled())
++ if (is_ppc_secureboot_enabled()) {
++ if (IS_ENABLED(CONFIG_MODULE_SIG))
++ set_module_sig_enforced();
++
+ if (is_ppc_trustedboot_enabled())
+ return secure_and_trusted_rules;
+ else
+ return secure_rules;
+- else if (is_ppc_trustedboot_enabled())
++ } else if (is_ppc_trustedboot_enabled()) {
+ return trusted_rules;
++ }
+
+ return NULL;
+ }
diff --git a/openpower/linux/0016-powerpc-ima-Fix-secure-boot-rules-in-ima-arch-policy.patch b/openpower/linux/0016-powerpc-ima-Fix-secure-boot-rules-in-ima-arch-policy.patch
new file mode 100644
index 0000000..1ba2c2f
--- /dev/null
+++ b/openpower/linux/0016-powerpc-ima-Fix-secure-boot-rules-in-ima-arch-policy.patch
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nayna Jain <nayna@linux.ibm.com>
+Date: Fri, 1 May 2020 10:16:52 -0400
+Subject: [PATCH 16/19] powerpc/ima: Fix secure boot rules in ima arch policy
+
+To prevent verifying the kernel module appended signature
+twice (finit_module), once by the module_sig_check() and again by IMA,
+powerpc secure boot rules define an IMA architecture specific policy
+rule only if CONFIG_MODULE_SIG_FORCE is not enabled. This,
+unfortunately, does not take into account the ability of enabling
+"sig_enforce" on the boot command line (module.sig_enforce=1).
+
+Including the IMA module appraise rule results in failing the
+finit_module syscall, unless the module signing public key is loaded
+onto the IMA keyring.
+
+This patch fixes secure boot policy rules to be based on
+CONFIG_MODULE_SIG instead.
+
+Fixes: 4238fad366a6 ("powerpc/ima: Add support to initialize ima policy rules")
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Link: https://lore.kernel.org/r/1588342612-14532-1-git-send-email-nayna@linux.ibm.com
+(cherry picked from commit fa4f3f56ccd28ac031ab275e673ed4098855fed4)
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/kernel/ima_arch.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
+index e34116255ced..957abd592075 100644
+--- a/arch/powerpc/kernel/ima_arch.c
++++ b/arch/powerpc/kernel/ima_arch.c
+@@ -19,12 +19,12 @@ bool arch_ima_get_secureboot(void)
+ * to be stored as an xattr or as an appended signature.
+ *
+ * To avoid duplicate signature verification as much as possible, the IMA
+- * policy rule for module appraisal is added only if CONFIG_MODULE_SIG_FORCE
++ * policy rule for module appraisal is added only if CONFIG_MODULE_SIG
+ * is not enabled.
+ */
+ static const char *const secure_rules[] = {
+ "appraise func=KEXEC_KERNEL_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+-#ifndef CONFIG_MODULE_SIG_FORCE
++#ifndef CONFIG_MODULE_SIG
+ "appraise func=MODULE_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+ #endif
+ NULL
+@@ -50,7 +50,7 @@ static const char *const secure_and_trusted_rules[] = {
+ "measure func=KEXEC_KERNEL_CHECK template=ima-modsig",
+ "measure func=MODULE_CHECK template=ima-modsig",
+ "appraise func=KEXEC_KERNEL_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+-#ifndef CONFIG_MODULE_SIG_FORCE
++#ifndef CONFIG_MODULE_SIG
+ "appraise func=MODULE_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig",
+ #endif
+ NULL
diff --git a/openpower/linux/0017-powerpc-configs-Update-to-upstream-and-enable-secure.patch b/openpower/linux/0017-powerpc-configs-Update-to-upstream-and-enable-secure.patch
new file mode 100644
index 0000000..3fbe01a
--- /dev/null
+++ b/openpower/linux/0017-powerpc-configs-Update-to-upstream-and-enable-secure.patch
@@ -0,0 +1,222 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Joel Stanley <joel@jms.id.au>
+Date: Tue, 23 Jun 2020 16:22:10 +0930
+Subject: [PATCH 17/19] powerpc/configs: Update to upstream and enable
+ secureboot
+
+Pulls in the following updates from upstream:
+
+ scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled
+ powerpc/configs/skiroot: Enable some more hardening options
+ powerpc/configs/skiroot: Disable xmon default & enable reboot on panic
+ powerpc/configs/skiroot: Enable security features
+ powerpc/configs/skiroot: Update for symbol movement only
+ powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV
+ powerpc/configs/skiroot: Drop HID_LOGITECH
+ powerpc/configs: Drop NET_VENDOR_HP which moved to staging
+ powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE
+ powerpc/configs: Drop CONFIG_QLGE which moved to staging
+ powerpc/configs: remove obsolete CONFIG_INET_XFRM_MODE_* and CONFIG_INET6_XFRM_MODE_*
+ powerpc/configs: add FADump awareness to skiroot_defconfig
+
+In addition, it enables IMA and secureboot options.
+
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/configs/skiroot_defconfig | 83 ++++++++++++++++----------
+ 1 file changed, 53 insertions(+), 30 deletions(-)
+
+diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
+index 2e25b264f70f..44309e12d84a 100644
+--- a/arch/powerpc/configs/skiroot_defconfig
++++ b/arch/powerpc/configs/skiroot_defconfig
+@@ -1,13 +1,9 @@
+-CONFIG_PPC64=y
+-CONFIG_ALTIVEC=y
+-CONFIG_VSX=y
+-CONFIG_NR_CPUS=2048
+-CONFIG_CPU_LITTLE_ENDIAN=y
+ CONFIG_KERNEL_XZ=y
+ # CONFIG_SWAP is not set
+ CONFIG_SYSVIPC=y
+ CONFIG_POSIX_MQUEUE=y
+ # CONFIG_CROSS_MEMORY_ATTACH is not set
++CONFIG_AUDIT=y
+ CONFIG_NO_HZ=y
+ CONFIG_HIGH_RES_TIMERS=y
+ # CONFIG_CPU_ISOLATION is not set
+@@ -28,17 +24,15 @@ CONFIG_EXPERT=y
+ # CONFIG_AIO is not set
+ CONFIG_PERF_EVENTS=y
+ # CONFIG_COMPAT_BRK is not set
++# CONFIG_SLAB_MERGE_DEFAULT is not set
++CONFIG_SLAB_FREELIST_RANDOM=y
+ CONFIG_SLAB_FREELIST_HARDENED=y
+-CONFIG_JUMP_LABEL=y
+-CONFIG_STRICT_KERNEL_RWX=y
+-CONFIG_MODULES=y
+-CONFIG_MODULE_UNLOAD=y
+-CONFIG_MODULE_SIG=y
+-CONFIG_MODULE_SIG_FORCE=y
+-CONFIG_MODULE_SIG_SHA512=y
+-CONFIG_PARTITION_ADVANCED=y
+-# CONFIG_MQ_IOSCHED_DEADLINE is not set
+-# CONFIG_MQ_IOSCHED_KYBER is not set
++CONFIG_PPC64=y
++CONFIG_ALTIVEC=y
++CONFIG_VSX=y
++CONFIG_NR_CPUS=2048
++CONFIG_CPU_LITTLE_ENDIAN=y
++CONFIG_PANIC_TIMEOUT=30
+ # CONFIG_PPC_VAS is not set
+ # CONFIG_PPC_PSERIES is not set
+ # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
+@@ -46,16 +40,27 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+ CONFIG_CPU_IDLE=y
+ CONFIG_HZ_100=y
+ CONFIG_KEXEC=y
++CONFIG_KEXEC_FILE=y
++CONFIG_PRESERVE_FA_DUMP=y
+ CONFIG_IRQ_ALL_CPUS=y
+ CONFIG_NUMA=y
+-# CONFIG_COMPACTION is not set
+-# CONFIG_MIGRATION is not set
+ CONFIG_PPC_64K_PAGES=y
+ CONFIG_SCHED_SMT=y
+ CONFIG_CMDLINE_BOOL=y
+ CONFIG_CMDLINE="console=tty0 console=hvc0 ipr.fast_reboot=1 quiet"
+ # CONFIG_SECCOMP is not set
+ # CONFIG_PPC_MEM_KEYS is not set
++CONFIG_PPC_SECURE_BOOT=y
++CONFIG_JUMP_LABEL=y
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_SIG_FORCE=y
++CONFIG_MODULE_SIG_SHA512=y
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_MQ_IOSCHED_DEADLINE is not set
++# CONFIG_MQ_IOSCHED_KYBER is not set
++# CONFIG_COMPACTION is not set
++# CONFIG_MIGRATION is not set
+ CONFIG_NET=y
+ CONFIG_PACKET=y
+ CONFIG_UNIX=y
+@@ -63,9 +68,6 @@ CONFIG_INET=y
+ CONFIG_IP_MULTICAST=y
+ CONFIG_NET_IPIP=y
+ CONFIG_SYN_COOKIES=y
+-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+-# CONFIG_INET_XFRM_MODE_BEET is not set
+ CONFIG_DNS_RESOLVER=y
+ # CONFIG_WIRELESS is not set
+ CONFIG_DEVTMPFS=y
+@@ -139,7 +141,6 @@ CONFIG_TIGON3=m
+ CONFIG_BNX2X=m
+ # CONFIG_NET_VENDOR_BROCADE is not set
+ # CONFIG_NET_VENDOR_CADENCE is not set
+-# CONFIG_NET_CADENCE is not set
+ # CONFIG_NET_VENDOR_CAVIUM is not set
+ CONFIG_CHELSIO_T1=m
+ # CONFIG_NET_VENDOR_CISCO is not set
+@@ -148,7 +149,6 @@ CONFIG_CHELSIO_T1=m
+ # CONFIG_NET_VENDOR_DLINK is not set
+ CONFIG_BE2NET=m
+ # CONFIG_NET_VENDOR_EZCHIP is not set
+-# CONFIG_NET_VENDOR_HP is not set
+ # CONFIG_NET_VENDOR_HUAWEI is not set
+ CONFIG_E1000=m
+ CONFIG_E1000E=m
+@@ -156,7 +156,6 @@ CONFIG_IGB=m
+ CONFIG_IXGB=m
+ CONFIG_IXGBE=m
+ CONFIG_I40E=m
+-CONFIG_S2IO=m
+ # CONFIG_NET_VENDOR_MARVELL is not set
+ CONFIG_MLX4_EN=m
+ # CONFIG_MLX4_CORE_GEN2 is not set
+@@ -167,12 +166,12 @@ CONFIG_MLX5_CORE_EN=y
+ # CONFIG_NET_VENDOR_MICROSEMI is not set
+ CONFIG_MYRI10GE=m
+ # CONFIG_NET_VENDOR_NATSEMI is not set
++CONFIG_S2IO=m
+ # CONFIG_NET_VENDOR_NETRONOME is not set
+ # CONFIG_NET_VENDOR_NI is not set
+ # CONFIG_NET_VENDOR_NVIDIA is not set
+ # CONFIG_NET_VENDOR_OKI is not set
+ # CONFIG_NET_VENDOR_PACKET_ENGINES is not set
+-CONFIG_QLGE=m
+ CONFIG_NETXEN_NIC=m
+ CONFIG_QED=m
+ CONFIG_QEDE=m
+@@ -210,7 +209,6 @@ CONFIG_IPMI_DEVICE_INTERFACE=y
+ CONFIG_IPMI_POWERNV=y
+ CONFIG_IPMI_WATCHDOG=y
+ CONFIG_HW_RANDOM=y
+-CONFIG_TCG_TPM=y
+ CONFIG_TCG_TIS_I2C_NUVOTON=y
+ # CONFIG_DEVPORT is not set
+ CONFIG_I2C=y
+@@ -239,7 +237,6 @@ CONFIG_HID_CYPRESS=y
+ CONFIG_HID_EZKEY=y
+ CONFIG_HID_ITE=y
+ CONFIG_HID_KENSINGTON=y
+-CONFIG_HID_LOGITECH=y
+ CONFIG_HID_MICROSOFT=y
+ CONFIG_HID_MONTEREY=y
+ CONFIG_USB_HIDDEV=y
+@@ -276,6 +273,29 @@ CONFIG_NLS_CODEPAGE_437=y
+ CONFIG_NLS_ASCII=y
+ CONFIG_NLS_ISO8859_1=y
+ CONFIG_NLS_UTF8=y
++CONFIG_ENCRYPTED_KEYS=y
++CONFIG_SECURITY=y
++CONFIG_HARDENED_USERCOPY=y
++# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
++CONFIG_HARDENED_USERCOPY_PAGESPAN=y
++CONFIG_FORTIFY_SOURCE=y
++CONFIG_SECURITY_LOCKDOWN_LSM=y
++CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
++CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY=y
++CONFIG_INTEGRITY_SIGNATURE=y
++CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
++CONFIG_INTEGRITY_PLATFORM_KEYRING=y
++CONFIG_IMA=y
++CONFIG_IMA_KEXEC=y
++CONFIG_IMA_SIG_TEMPLATE=y
++CONFIG_IMA_DEFAULT_HASH_SHA256=y
++CONFIG_IMA_READ_POLICY=y
++CONFIG_IMA_APPRAISE=y
++CONFIG_IMA_ARCH_POLICY=y
++CONFIG_IMA_APPRAISE_MODSIG=y
++CONFIG_LSM="yama,loadpin,safesetid,integrity"
++# CONFIG_CRYPTO_HW is not set
++CONFIG_SYSTEM_BLACKLIST_KEYRING=y
+ CONFIG_CRC16=y
+ CONFIG_CRC_ITU_T=y
+ CONFIG_LIBCRC32C=y
+@@ -286,17 +306,20 @@ CONFIG_LIBCRC32C=y
+ # CONFIG_XZ_DEC_SPARC is not set
+ CONFIG_PRINTK_TIME=y
+ CONFIG_MAGIC_SYSRQ=y
++CONFIG_SLUB_DEBUG_ON=y
+ CONFIG_DEBUG_STACKOVERFLOW=y
+ CONFIG_SOFTLOCKUP_DETECTOR=y
+ CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+ CONFIG_HARDLOCKUP_DETECTOR=y
+ CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
+ CONFIG_WQ_WATCHDOG=y
++CONFIG_PANIC_ON_OOPS=y
+ # CONFIG_SCHED_DEBUG is not set
++CONFIG_SCHED_STACK_END_CHECK=y
++CONFIG_DEBUG_SG=y
++CONFIG_DEBUG_NOTIFIERS=y
++CONFIG_DEBUG_CREDENTIALS=y
+ # CONFIG_FTRACE is not set
+ # CONFIG_RUNTIME_TESTING_MENU is not set
++CONFIG_BUG_ON_DATA_CORRUPTION=y
+ CONFIG_XMON=y
+-CONFIG_XMON_DEFAULT=y
+-CONFIG_ENCRYPTED_KEYS=y
+-# CONFIG_CRYPTO_ECHAINIV is not set
+-# CONFIG_CRYPTO_HW is not set
diff --git a/openpower/linux/0018-linux-configure-CONFIG_I2C_OPAL-as-in-built.patch b/openpower/linux/0018-linux-configure-CONFIG_I2C_OPAL-as-in-built.patch
new file mode 100644
index 0000000..b679564
--- /dev/null
+++ b/openpower/linux/0018-linux-configure-CONFIG_I2C_OPAL-as-in-built.patch
@@ -0,0 +1,56 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Joel Stanley <joel@jms.id.au>
+Date: Tue, 29 Sep 2020 16:07:53 +0930
+Subject: [PATCH 18/19] linux: configure CONFIG_I2C_OPAL as in-built.
+
+Currently, skiroot_defconfig CONFIG_I2C_OPAL is built as a loadable
+module rather than builtin, even if CONFIG_I2C=y is defined. This
+results in a delay in the TPM initialization, causing IMA to go into
+TPM bypass mode. As a result, the IMA measurements are added to the
+measurement list, but do not extend the TPM. Because of this, it is
+impossible to verify or attest to the system's integrity, either from
+skiroot or the target Host OS.
+
+Mimi Zohar <zohar@linux.ibm.com> explains more:
+
+ The concept of trusted boot requires the measurement to be added to the
+ measurement list and extend the TPM, prior to allowing access to the
+ file. By allowing access to a file before its measurement is included
+ in the measurement list and extended into the TPM PCR, a malicious file
+ could potentially prevent its own measurement from being added. As the
+ PCRs are tamper proof, measuring and extending the TPM prior to giving
+ access to the file, guarantees that all file measurements are included
+ in the measurement list, including the malicious file.
+
+ IMA needs to be enabled before any files are accessed in order to
+ verify a file's integrity and extend the TPM with the file
+ measurement. Queueing file measurements breaks the measure and extend,
+ before usage, trusted boot paradigm.
+
+ The ima-evm-utils package includes a test for walking the IMA
+ measurement list, calculating the expected TPM PCRs, and comparing the
+ calculated PCR values with the physical TPM. Testing is important to
+ ensure the TPM is initialized prior to IMA. Failure to validate the
+ IMA measurement list may indicate IMA went into TPM bypass mode, like
+ in this case.
+
+Reported-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/configs/skiroot_defconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
+index 44309e12d84a..a555adb23591 100644
+--- a/arch/powerpc/configs/skiroot_defconfig
++++ b/arch/powerpc/configs/skiroot_defconfig
+@@ -216,7 +216,7 @@ CONFIG_I2C=y
+ CONFIG_I2C_CHARDEV=y
+ # CONFIG_I2C_HELPER_AUTO is not set
+ CONFIG_I2C_ALGOBIT=y
+-CONFIG_I2C_OPAL=m
++CONFIG_I2C_OPAL=y
+ CONFIG_PPS=y
+ CONFIG_SENSORS_IBMPOWERNV=m
+ CONFIG_DRM=m
diff --git a/openpower/linux/0003-Release-OpenPower-kernel.patch b/openpower/linux/0019-Release-OpenPower-kernel.patch
similarity index 75%
rename from openpower/linux/0003-Release-OpenPower-kernel.patch
rename to openpower/linux/0019-Release-OpenPower-kernel.patch
index 1121b1a..46af0ec 100644
--- a/openpower/linux/0003-Release-OpenPower-kernel.patch
+++ b/openpower/linux/0019-Release-OpenPower-kernel.patch
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Joel Stanley <joel@jms.id.au>
-Date: Tue, 16 Jul 2019 11:40:02 +0930
-Subject: [PATCH 3/3] Release OpenPower kernel
+Date: Tue, 29 Sep 2020 15:39:53 +0930
+Subject: [PATCH 19/19] Release OpenPower kernel
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
@@ -9,13 +9,13 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
-index e16d2e58ed4b..cabff177cbb4 100644
+index acb2499d9b05..6f2e1028c57b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 5
PATCHLEVEL = 4
- SUBLEVEL = 18
+ SUBLEVEL = 68
-EXTRAVERSION =
+EXTRAVERSION = -openpower1
NAME = Kleptomaniac Octopus
diff --git a/openpower/overlay/etc/init.d/S99signal-linux-complete b/openpower/overlay/etc/init.d/S99signal-linux-complete
new file mode 100755
index 0000000..daf81fd
--- /dev/null
+++ b/openpower/overlay/etc/init.d/S99signal-linux-complete
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Copyright © 2020 Stewart Smith
+# Released under the GNU GPL v3
+
+COMPAT_NODE=/sys/bus/platform/devices/ibm,opal:oppanel/of_node/compatible
+
+case "$1" in
+ start)
+ # Only talk to the rcs,ipl-observer device this way
+ # it's a little bit of a hack, but it's functionally
+ # equivalent to the Raptor build but not relying on debugfs
+ grep rcs,ipl-observer $COMPAT_NODE > /dev/null \
+ && printf '\xfe\xfe\xfe' > /dev/op_panel
+ ;;
+esac
+
+exit 0
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index ebbb6ac..c360f13 100755
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -1,10 +1,7 @@
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-ffs/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot-p8/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot-p10/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot-binaries/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-mrw/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/common-p8-xml/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/machine-xml/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/rainier-2u-xml/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/rainier-4u-xml/Config.in"
@@ -12,18 +9,14 @@
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-pnor/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-pnor-p10/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/petitboot/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/p8-pore-binutils/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hcode/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hcode-p10/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/occ/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/occ-p8/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/occ-p10/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/capp-ucode/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/skiboot/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/libflash/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/loadkeys/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-binutils/Config.in"
-source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-gcc/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ima-catalog/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sbe/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sbe-p10/Config.in"
diff --git a/openpower/package/common-p8-xml/Config.in b/openpower/package/common-p8-xml/Config.in
deleted file mode 100644
index 560c1d6..0000000
--- a/openpower/package/common-p8-xml/Config.in
+++ /dev/null
@@ -1,4 +0,0 @@
-config BR2_PACKAGE_COMMON_P8_XML
- bool "Common P8 XML files"
- default y if BR2_PACKAGE_HOSTBOOT_P8
- select BR2_PACKAGE_OPENPOWER_MRW
diff --git a/openpower/package/common-p8-xml/common-p8-xml.mk b/openpower/package/common-p8-xml/common-p8-xml.mk
deleted file mode 100644
index cd0afe4..0000000
--- a/openpower/package/common-p8-xml/common-p8-xml.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-#
-# common-p8-xml
-#
-################################################################################
-
-COMMON_P8_XML_VERSION ?= e02b6f6ddd5f225ddb70c286a10685df5b9267db
-COMMON_P8_XML_SITE ?= $(call github,open-power,common-p8-xml,$(COMMON_P8_XML_VERSION))
-
-COMMON_P8_XML_LICENSE = Apache-2.0
-COMMON_P8_XML_LICENSE_FILES = LICENSE
-COMMON_P8_XML_DEPENDENCIES =
-
-COMMON_P8_XML_INSTALL_IMAGES = YES
-COMMON_P8_XML_INSTALL_TARGET = NO
-
-XML_INSTALL_DIRECTORY=$(STAGING_DIR)/openpower_mrw_scratch/
-
-define COMMON_P8_XML_INSTALL_IMAGES_CMDS
- bash -c 'mkdir -p $(XML_INSTALL_DIRECTORY) && cp -r $(@D)/* $(XML_INSTALL_DIRECTORY)'
-endef
-
-$(eval $(generic-package))
diff --git a/openpower/package/hcode/Config.in b/openpower/package/hcode/Config.in
index 434bc99..c2a1578 100644
--- a/openpower/package/hcode/Config.in
+++ b/openpower/package/hcode/Config.in
@@ -1,7 +1,9 @@
config BR2_PACKAGE_HCODE
bool "hcode"
default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
+ depends on BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
select BR2_CPP
+ select BR2_PACKAGE_HOSTBOOT_BINARIES
help
Project to build the hcode firmware codebase
@@ -31,7 +33,7 @@
config BR2_HCODE_VERSION
string
- default "hw021320a.opmst" if BR2_HCODE_LATEST_VERSION
+ default "hw012721b.opmst" if BR2_HCODE_LATEST_VERSION
default BR2_HCODE_CUSTOM_VERSION_VALUE \
if BR2_HCODE_CUSTOM_VERSION
diff --git a/openpower/package/hcode/hcode.mk b/openpower/package/hcode/hcode.mk
index c97d54a..1e4e889 100644
--- a/openpower/package/hcode/hcode.mk
+++ b/openpower/package/hcode/hcode.mk
@@ -12,7 +12,7 @@
HCODE_INSTALL_IMAGES = YES
HCODE_INSTALL_TARGET = NO
-HCODE_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries
+HCODE_DEPENDENCIES = host-binutils host-ppe42-toolchain hostboot-binaries
HW_IMAGE_BIN_PATH=output/images/hw_image
HW_IMAGE_BIN=p9n.hw_image.bin
diff --git a/openpower/package/hostboot-binaries/hostboot_binaries.mk b/openpower/package/hostboot-binaries/hostboot_binaries.mk
index 2fa2d7f..bff9670 100644
--- a/openpower/package/hostboot-binaries/hostboot_binaries.mk
+++ b/openpower/package/hostboot-binaries/hostboot_binaries.mk
@@ -17,25 +17,11 @@
HOSTBOOT_BINARIES_INSTALL_IMAGES = YES
HOSTBOOT_BINARIES_INSTALL_TARGET = NO
-# Creating Install Commands specific to P8 and P9
-# -- P8 does not need the nimbus and axone ring files
+# Creating Install Commands specific to P9
# -- P9 does not need the SBE files ('sbe' package is used in P9)
# -- P9 uses the 'hcode' package to build the BR2_HOSTBOOT_BINARY_WINK_FILENAME
###################################
-# P8:
-ifeq ($(BR2_OPENPOWER_POWER8),y)
-define HOSTBOOT_BINARIES_INSTALL_IMAGES_CMDS
- $(INSTALL) -D $(@D)/cvpd.bin $(STAGING_DIR)/hostboot_binaries/cvpd.bin
- $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_WINK_FILENAME) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_SBE_FILENAME) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/gpu_gpe1.bin $(STAGING_DIR)/hostboot_binaries/gpu_gpe1.bin
-endef
-endif
-
-###################################
# P9:
ifeq ($(BR2_OPENPOWER_POWER9),y)
diff --git a/openpower/package/hostboot-p8/0001-Increase-uart-delay.patch b/openpower/package/hostboot-p8/0001-Increase-uart-delay.patch
deleted file mode 100644
index 5c916d2..0000000
--- a/openpower/package/hostboot-p8/0001-Increase-uart-delay.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 0c69e87e86e62253bc5a33cadf41e3d5f80971f0 Mon Sep 17 00:00:00 2001
-From: Brian Silver <bsilver@us.ibm.com>
-Date: Wed, 5 Nov 2014 14:16:36 -0600
-Subject: [PATCH] Changes for Habanero bringup, uart delay and centaur/vddr
-
-Change-Id: I381732be6facd25fb27bbd1f8ac0d75eb5b4980e
----
- src/usr/console/uart.C | 2 +-
- src/usr/hwpf/hwp/dram_training/palmetto_vddr.C | 18 +++++++++++++-----
- 2 files changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/src/usr/console/uart.C b/src/usr/console/uart.C
-index 385a05c..a269168 100644
---- a/src/usr/console/uart.C
-+++ b/src/usr/console/uart.C
-@@ -116,7 +116,7 @@ namespace CONSOLE
- // Wait for transmit FIFO to have space.
- {
- const uint64_t DELAY_NS = 100;
-- const uint64_t DELAY_LOOPS = 10000;
-+ const uint64_t DELAY_LOOPS = 100000000;
-
- uint8_t data = 0;
- uint64_t loops = 0;
---
-1.9.1
-
diff --git a/openpower/package/hostboot-p8/0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch b/openpower/package/hostboot-p8/0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch
deleted file mode 100644
index 66bc026..0000000
--- a/openpower/package/hostboot-p8/0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 005cac73915ee6f6b67e9b01ae840b798c1fc80e Mon Sep 17 00:00:00 2001
-From: Andrew Geissler <andrewg@us.ibm.com>
-Date: Mon, 16 Feb 2015 13:43:51 -0600
-Subject: [PATCH] GCC 4.9: Make compiler use ELFv1 ABI.
-
-GCC4.9 defaults to ELFv2 ABI support but we do not have all
-of the needed tools to suppor this.
-
-Change-Id: Iacf49c46b1fb25776ba60d6506ccadff7b46bf60
-RTC: 123430
----
- src/build/mkrules/cflags.env.mk | 9 ++++++---
- 1 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
-index 8ca32b1..c729341 100644
---- a/src/build/mkrules/cflags.env.mk
-+++ b/src/build/mkrules/cflags.env.mk
-@@ -36,10 +37,12 @@ CFLAGS += -D__HOSTBOOT_MODULE=$(MODULE)
- endif
-
- COMMONFLAGS += $(OPT_LEVEL) -nostdlib
-+# TODO RTC: 123994 - ELFv2 ABI support (-mabi=elfv1)
- CFLAGS += $(COMMONFLAGS) -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\
- -Wall -Werror -mtraceback=no -pipe \
-- -ffunction-sections -fdata-sections -ffreestanding -mbig-endian
--ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian
-+ -ffunction-sections -fdata-sections -ffreestanding -mbig-endian \
-+ -mabi=elfv1
-+ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian -mabi=elfv1
- CXXFLAGS += $(CFLAGS) -nostdinc++ -fno-rtti -fno-exceptions -Wall \
- -fuse-cxa-atexit
- LDFLAGS += --nostdlib --sort-common -EB $(COMMONFLAGS)
---
-1.7.4.1
-
diff --git a/openpower/package/hostboot-p8/0003-Default-to-std-gnu-03.patch b/openpower/package/hostboot-p8/0003-Default-to-std-gnu-03.patch
deleted file mode 100644
index f6c6710..0000000
--- a/openpower/package/hostboot-p8/0003-Default-to-std-gnu-03.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From bc7b8b21549752274b162c64dbce3c81d20f2cab Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 25 Aug 2016 20:22:30 +1000
-Subject: [PATCH 03/10] Default to std=gnu++03
-
-Seeing as no C++ dialect was previously selected, GCC < 6 defaulted
-to GNU++98 as the standard C++ mode. However... it seems that C++03
-is a better match for HostBoot code (confirmed by Patrick Williams
-in https://github.com/open-power/hostboot/pull/62#discussion_r76830612 )
-
-Change-Id: I6661b5b61319c85c2a90926beb6e2662e96dcf06
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/build/mkrules/cflags.env.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
-index c805999..0bae0ec 100644
---- a/src/build/mkrules/cflags.env.mk
-+++ b/src/build/mkrules/cflags.env.mk
-@@ -41,7 +41,7 @@ CFLAGS += $(COMMONFLAGS) -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\
- -ffunction-sections -fdata-sections -ffreestanding -mbig-endian
- ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian
- CXXFLAGS += $(CFLAGS) -nostdinc++ -fno-rtti -fno-exceptions -Wall \
-- -fuse-cxa-atexit
-+ -fuse-cxa-atexit -std=gnu++03
- LDFLAGS += --nostdlib --sort-common -EB $(COMMONFLAGS)
-
- INCFLAGS = $(addprefix -I, $(INCDIR) )
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0004-fix-build-error-return-statement-with-a-value-in-fun.patch b/openpower/package/hostboot-p8/0004-fix-build-error-return-statement-with-a-value-in-fun.patch
deleted file mode 100644
index b1ecacd..0000000
--- a/openpower/package/hostboot-p8/0004-fix-build-error-return-statement-with-a-value-in-fun.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6ae906e70c7209e69b750f6566263fe4998dfb48 Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 25 Aug 2016 19:22:00 +1000
-Subject: [PATCH 04/10] fix build error: return-statement with a value, in
- function returning 'void'
-
-Change-Id: I9dc8b698fec95488e209cbc40b928769a26b6de6
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/include/usr/devicefw/driverif.H | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H
-index a148725..fb43073 100644
---- a/src/include/usr/devicefw/driverif.H
-+++ b/src/include/usr/devicefw/driverif.H
-@@ -266,7 +266,7 @@ namespace DeviceFW
- TargType i_targetType,
- deviceOp_t i_regRoute)
- {
-- return InvalidParameterType(); // Cause a compile fail if not one of
-+ InvalidParameterType(); // Cause a compile fail if not one of
- // the explicit template specializations.
- }
-
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0005-error-dereferencing-type-punned-pointer-will-break-s.patch b/openpower/package/hostboot-p8/0005-error-dereferencing-type-punned-pointer-will-break-s.patch
deleted file mode 100644
index fcfe570..0000000
--- a/openpower/package/hostboot-p8/0005-error-dereferencing-type-punned-pointer-will-break-s.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 550d36dca3cdec84d47f05711c2569990d3b4708 Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 25 Aug 2016 19:27:04 +1000
-Subject: [PATCH 05/10] error: dereferencing type-punned pointer will break
- strict-aliasing rules
-
-Change-Id: I63accd3e881c941736ece4b4498c2c9d06ff8761
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H | 7 +++++++
- .../usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H | 1 -
- src/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.C | 6 +++---
- 3 files changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H
-index e5af2c9..7edf2bf 100755
---- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H
-+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H
-@@ -227,6 +227,13 @@ namespace getAttrData
- uint8_t iv_systemType;
- uint8_t iv_systemType_ext;
- uint8_t iv_dataVersion;
-+ public:
-+ MBvpdVMKeyword() : iv_version(0),iv_systemType(0),
-+ iv_systemType_ext(0),iv_dataVersion(0) {};
-+ operator uint32_t() const {
-+ return iv_version << 24 | iv_systemType << 16 |
-+ iv_systemType_ext << 8 | iv_dataVersion;
-+ }
- };
- // Attribute definition
- struct MBvpdAttrDef
-diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H
-index f172508..85460b2 100644
---- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H
-+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H
-@@ -33,7 +33,6 @@
- #define _HWP_GETMBVPDMEMDATAVERSION_
-
- #include <fapi.H>
--#define VM_KEYWORD_DEFAULT_VALUE 0x00000000
-
- // function pointer typedef definition for HWP call support
- typedef fapi::ReturnCode (*getMBvpdMemoryDataVersion_FP_t)
-diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.C
-index 2f83fa2..ef64515 100644
---- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.C
-+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.C
-@@ -50,7 +50,7 @@ fapi::ReturnCode getMBvpdMemoryDataVersion(
- fapi::ReturnCode l_fapirc;
- DimmType l_dimmType = ISDIMM;
- fapi::MBvpdRecord l_record = fapi::MBVPD_RECORD_SPDX;
-- uint32_t l_vpdMemoryDataVersion = VM_KEYWORD_DEFAULT_VALUE;
-+ MBvpdVMKeyword l_vpdMemoryDataVersion;
- uint32_t l_bufSize = sizeof(l_vpdMemoryDataVersion);
-
- FAPI_DBG("getMBvpdMemoryDataVersion: entry ");
-@@ -140,8 +140,8 @@ fapi::ReturnCode getMBvpdMemoryDataVersion(
- }
-
- // Check if the format byte in the value returned is in between valid range
-- if (( ((MBvpdVMKeyword *)(&l_vpdMemoryDataVersion))->iv_version > VM_SUPPORTED_HIGH_VER )||
-- ( ((MBvpdVMKeyword *)(&l_vpdMemoryDataVersion))->iv_version == VM_NOT_SUPPORTED ))
-+ if ((l_vpdMemoryDataVersion.iv_version > VM_SUPPORTED_HIGH_VER )||
-+ (l_vpdMemoryDataVersion.iv_version == VM_NOT_SUPPORTED ))
- {
- FAPI_ERR("getMBvpdMemoryDataVersion:"
- " keyword data returned is invalid : %d ",
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch b/openpower/package/hostboot-p8/0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch
deleted file mode 100644
index 666c747..0000000
--- a/openpower/package/hostboot-p8/0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 74d099aaffa37498859c0840771052f50253ce4d Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 25 Aug 2016 19:33:42 +1000
-Subject: [PATCH 06/10] Change cv_forcedMemPeriodic to uint8_t as bool is
- invalid
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GCC6 throws the following error:
-operand type ‘bool*’ is incompatible with argument 1 of ‘__sync_fetch_and_and’
-
-GCC documents that bool is invalid for __sync builtins over at:
-https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins
-" GCC allows any scalar type that is 1, 2, 4 or 8 bytes in size other than the C type _Bool or the C++ type bool"
-
-Change-Id: Iab6415348cb19f590921d8ccc5349867fa57a42d
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/include/kernel/cpumgr.H | 2 +-
- src/kernel/cpumgr.C | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H
-index 68f8972..6e9b697 100644
---- a/src/include/kernel/cpumgr.H
-+++ b/src/include/kernel/cpumgr.H
-@@ -215,7 +215,7 @@ class CpuManager
- */
- static uint64_t cv_cpuSeq;
-
-- static bool cv_forcedMemPeriodic; //!< force free / coalesce.
-+ static uint8_t cv_forcedMemPeriodic; //!< force free / coalesce.
-
- // If a shutdown of all CPUs is requested
- static bool cv_shutdown_requested;
-diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C
-index 44f61a1..ce7516f 100644
---- a/src/kernel/cpumgr.C
-+++ b/src/kernel/cpumgr.C
-@@ -50,7 +50,7 @@ cpu_t** CpuManager::cv_cpus[KERNEL_MAX_SUPPORTED_NODES];
- bool CpuManager::cv_shutdown_requested = false;
- uint64_t CpuManager::cv_shutdown_status = 0;
- size_t CpuManager::cv_cpuSeq = 0;
--bool CpuManager::cv_forcedMemPeriodic = false;
-+uint8_t CpuManager::cv_forcedMemPeriodic = 0;
- InteractiveDebug CpuManager::cv_interactive_debug;
-
- CpuManager::CpuManager() : iv_lastStartTimebase(0)
-@@ -361,7 +361,7 @@ void CpuManager::executePeriodics(cpu_t * i_cpu)
- }
-
- bool forceMemoryPeriodic = __sync_fetch_and_and(&cv_forcedMemPeriodic,
-- false);
-+ 0);
-
- ++(i_cpu->periodic_count);
- if((0 == (i_cpu->periodic_count % CPU_PERIODIC_CHECK_MEMORY)) ||
-@@ -461,7 +461,7 @@ size_t CpuManager::getThreadCount()
-
- void CpuManager::forceMemoryPeriodic()
- {
-- cv_forcedMemPeriodic = true;
-+ cv_forcedMemPeriodic = 1;
- }
-
-
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0007-error-the-compiler-can-assume-that-the-address-of-r-.patch b/openpower/package/hostboot-p8/0007-error-the-compiler-can-assume-that-the-address-of-r-.patch
deleted file mode 100644
index 9c2c8f4..0000000
--- a/openpower/package/hostboot-p8/0007-error-the-compiler-can-assume-that-the-address-of-r-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 8797f215a09a89c271dab484b892ceedd2486615 Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 25 Aug 2016 20:13:11 +1000
-Subject: [PATCH 07/10] =?UTF-8?q?error:=20the=20compiler=20can=20assume=20?=
- =?UTF-8?q?that=20the=20address=20of=20=E2=80=98r=E2=80=99=20will=20never?=
- =?UTF-8?q?=20be=20NULL?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
- PRDF_ASSERT( &r != NULL );
-
-Change-Id: I2d60075f9e2232512efe45a5c6aa5563f3a565f5
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C
-index 9ee1358..ef7279b 100755
---- a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C
-+++ b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C
-@@ -120,8 +120,6 @@ ErrorRegister::ErrorRegister( SCAN_COMM_REGISTER_CLASS & r, ResolutionMap & rm,
- ErrorRegisterType(), scr(r), scr_rc(SUCCESS), rMap(rm),
- xNoErrorOnZeroScr(false), xScrId(scrId)
- {
-- PRDF_ASSERT( &r != NULL );
-- PRDF_ASSERT( &rm != NULL );
- }
-
- /*---------------------------------------------------------------------*/
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch b/openpower/package/hostboot-p8/0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch
deleted file mode 100644
index 73adecc..0000000
--- a/openpower/package/hostboot-p8/0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From b315c53f2803b84e35fe646aa82702b82e8ecd98 Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 25 Aug 2016 20:07:58 +1000
-Subject: [PATCH 08/10] Fix compiler can assume address will never be NULL
- error with GCC6
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-So, it turns out that relying on the address of something passed by
-reference being able to be NULL isn't exactly a good idea, or remotely
-obvious code. So, instead, do the sane thing and pass a pointer and
-check it.
-
-../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:
-In constructor ‘PRDF::AttnTypeRegister::AttnTypeRegister(PRDF::SCAN_COMM_REGISTE
-R_CLASS&, PRDF::SCAN_COMM_REGISTER_CLASS&, PRDF::SCAN_COMM_REGISTER_CLASS&, PRDF
-::SCAN_COMM_REGISTER_CLASS&)’:
-../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4
-42:21: error: the compiler can assume that the address of ‘i_check’ will never b
-e NULL [-Werror=address]
- iv_check( NULL == &i_check ? &cv_null : &i_check),
- ~~^~~~~~~~~~~
-../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4
-43:21: error: the compiler can assume that the address of ‘i_recov’ will never b
-e NULL [-Werror=address]
- iv_recov( NULL == &i_recov ? &cv_null : &i_recov),
- ~~^~~~~~~~~~~
-../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4
-44:22: error: the compiler can assume that the address of ‘i_special’ will never
- be NULL [-Werror=address]
- iv_special(NULL == &i_special ? &cv_null : &i_special),
- ~~^~~~~~~~~~~~~
-../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4
-45:22: error: the compiler can assume that the address of ‘i_proccs’ will never
-be NULL [-Werror=address]
- iv_proccs( NULL == &i_proccs ? &cv_null : &i_proccs),
- ~~^~~~~~~~~~~~
-
-Change-Id: Iecd8636da67aac24f64f73fd82b1f7ccbfced900
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- .../common/framework/register/prdfOperatorRegister.H | 16 ++++++++--------
- .../prdf/common/framework/register/prdfScanFacility.C | 2 +-
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H b/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H
-index b0513e4..a26a76e 100755
---- a/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H
-+++ b/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H
-@@ -434,15 +434,15 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS
- iv_bs = &iv_iBS;
- }
-
-- AttnTypeRegister( SCAN_COMM_REGISTER_CLASS & i_check,
-- SCAN_COMM_REGISTER_CLASS & i_recov,
-- SCAN_COMM_REGISTER_CLASS & i_special,
-- SCAN_COMM_REGISTER_CLASS & i_proccs ) :
-+ AttnTypeRegister( SCAN_COMM_REGISTER_CLASS *i_check,
-+ SCAN_COMM_REGISTER_CLASS *i_recov,
-+ SCAN_COMM_REGISTER_CLASS *i_special,
-+ SCAN_COMM_REGISTER_CLASS *i_proccs ) :
- SCAN_COMM_REGISTER_CLASS( ),
-- iv_check( NULL == &i_check ? &cv_null : &i_check),
-- iv_recov( NULL == &i_recov ? &cv_null : &i_recov),
-- iv_special(NULL == &i_special ? &cv_null : &i_special),
-- iv_proccs( NULL == &i_proccs ? &cv_null : &i_proccs),
-+ iv_check( NULL == i_check ? &cv_null : i_check),
-+ iv_recov( NULL == i_recov ? &cv_null : i_recov),
-+ iv_special(NULL == i_special ? &cv_null : i_special),
-+ iv_proccs( NULL == i_proccs ? &cv_null : i_proccs),
- iv_iBS(0) // will fully initialize this inside ctor.
- {
- uint32_t l_length = 1024;
-diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C
-index 0d379cf..cad5ce8 100755
---- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C
-+++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C
-@@ -166,7 +166,7 @@ SCAN_COMM_REGISTER_CLASS & ScanFacility::GetAttnTypeRegister(
- SCAN_COMM_REGISTER_CLASS * i_special,
- SCAN_COMM_REGISTER_CLASS * i_proccs )
- {
-- AttnTypeRegister r(*i_check, *i_recov, *i_special, *i_proccs);
-+ AttnTypeRegister r(i_check, i_recov, i_special, i_proccs);
- return iv_attnRegFw.get(r);
- }
-
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch b/openpower/package/hostboot-p8/0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch
deleted file mode 100644
index 7e17bf9..0000000
--- a/openpower/package/hostboot-p8/0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9279a2bf255392321594b9457a67b796195b0891 Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Wed, 31 Aug 2016 13:07:17 +1000
-Subject: [PATCH 09/10] =?UTF-8?q?error:=20in=20C++98=20=E2=80=98l=5FvmVers?=
- =?UTF-8?q?ionBuf=E2=80=99=20must=20be=20initialized=20by=20constructor?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-fix GCC6 thrown error
-
-Change-Id: I9aa508843f54c99ebb59822c39590811423ad0b1
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C
-index 3739c75..a4685ad 100755
---- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C
-+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C
-@@ -392,7 +392,7 @@ fapi::ReturnCode getVersion (const fapi::Target & i_mbaTarget,
- fapi::Target l_mbTarget;
- fapi::MBvpdKeyword l_keyword = fapi::MBVPD_KEYWORD_VM; // try VM first
- fapi::MBvpdRecord l_record = fapi::MBVPD_RECORD_SPDX; // default to SPDX
-- MBvpdVMKeyword l_vmVersionBuf={};
-+ MBvpdVMKeyword l_vmVersionBuf;
- uint32_t l_version = 0;
- uint32_t l_vmBufSize = sizeof(MBvpdVMKeyword); // VM keyword is of 4 bytes.
- uint16_t l_versionBuf = 0;
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0010-Use-std-gnu-03-for-host-g-invocations.patch b/openpower/package/hostboot-p8/0010-Use-std-gnu-03-for-host-g-invocations.patch
deleted file mode 100644
index a9cef3f..0000000
--- a/openpower/package/hostboot-p8/0010-Use-std-gnu-03-for-host-g-invocations.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 9852975319c864b47759cc8d7814bf6f9f0f1f4c Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@linux.vnet.ibm.com>
-Date: Thu, 3 Nov 2016 14:36:19 +1100
-Subject: [PATCH 10/10] Use -std=gnu++03 for host g++ invocations
-
-Seeing as the ancient GCC on RHEL6 doesn't actually support -std=gnu++03
-we have to go through some hoops to detect it (we use the same magic
-Make as we use in skiboot to do the same)
-
-Change-Id: I338560ae2ebdac842c8055c07519d542564c3923
-Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
----
- src/usr/hwpf/makefile | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile
-index 8d0bb72..ee8cf13 100644
---- a/src/usr/hwpf/makefile
-+++ b/src/usr/hwpf/makefile
-@@ -5,7 +5,7 @@
- #
- # OpenPOWER HostBoot Project
- #
--# Contributors Listed Below - COPYRIGHT 2011,2015
-+# Contributors Listed Below - COPYRIGHT 2011,2016
- # [+] International Business Machines Corp.
- #
- #
-@@ -402,18 +402,26 @@ $(call GENTARGET, ${IF_CMP_FLEX_TARGET}) : \
- $(C2) " FLEX $(notdir $<)"
- $(C1)flex -o$@ $^
-
-+try = $(shell set -e; if ($(1)) >/dev/null 2>&1; \
-+ then echo "$(2)"; \
-+ else echo "$(3)"; fi )
-+
-+try-cflag = $(call try,$(1) $(2) -x c -c /dev/null -o /dev/null,$(2))
-+HOSTCFLAGS:=-O3
-+HOSTCFLAGS+=$(call try-cflag,$(HOST_PREFIX)g++,-std=gnu++03)
-+
- $(GENDIR)/$(IF_CMP_SUBDIR)/%.host.o: \
- ifcompiler/%.C $(IF_COMPILER_H_FILES) \
- $(GENDIR)/$(IF_CMP_YACC_H_TARGET)
- $(C2) " CXX $(notdir $<)"
-- $(C1)$(CCACHE) $(HOST_PREFIX)g++ -O3 $< -I ifcompiler -I $(GENDIR) \
-+ $(C1)$(CCACHE) $(HOST_PREFIX)g++ $(HOSTCFLAGS) $< -I ifcompiler -I $(GENDIR) \
- -I $(GENDIR)/$(IF_CMP_SUBDIR) \
- -I $(ROOTPATH)/src/include/usr/hwpf/hwp -c -o $@
-
- $(GENDIR)/$(IF_CMP_YACC_C_TARGET:.c=.host.o): \
- $(GENDIR)/$(IF_CMP_YACC_C_TARGET) $(IF_COMPILER_H_FILES)
- $(C2) " CXX $(notdir $<)"
-- $(C1)$(CCACHE) $(HOST_PREFIX)g++ -O3 $< -I ifcompiler -I $(GENDIR) \
-+ $(C1)$(CCACHE) $(HOST_PREFIX)g++ $(HOSTCFLAGS) $< -I ifcompiler -I $(GENDIR) \
- -I $(GENDIR)/$(IF_CMP_SUBDIR) \
- -I $(ROOTPATH)/src/include/usr/hwpf/hwp -c -o $@
-
-@@ -421,7 +429,7 @@ $(GENDIR)/$(IF_CMP_FLEX_TARGET:.c=.host.o): \
- $(GENDIR)/$(IF_CMP_FLEX_TARGET) $(IF_COMPILER_H_FILES) \
- $(GENDIR)/$(IF_CMP_YACC_H_TARGET)
- $(C2) " CXX $(notdir $<)"
-- $(C1)$(CCACHE) $(HOST_PREFIX)g++ -O3 -DHOSTBOOT_COMPILE $< -I ifcompiler -I $(GENDIR) \
-+ $(C1)$(CCACHE) $(HOST_PREFIX)g++ $(HOSTCFLAGS) -DHOSTBOOT_COMPILE $< -I ifcompiler -I $(GENDIR) \
- -I $(GENDIR)/$(IF_CMP_SUBDIR) \
- -I $(ROOTPATH)/src/include/usr/hwpf/hwp -c -o $@
-
---
-2.7.4
-
diff --git a/openpower/package/hostboot-p8/0012-kernel-Update-assembly-for-modern-binutils.patch b/openpower/package/hostboot-p8/0012-kernel-Update-assembly-for-modern-binutils.patch
deleted file mode 100644
index 2c51fd3..0000000
--- a/openpower/package/hostboot-p8/0012-kernel-Update-assembly-for-modern-binutils.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 63c3b788eebfa28f0b4032c209e90cc2df7b2c98 Mon Sep 17 00:00:00 2001
-From: Joel Stanley <joel.stanley@au1.ibm.com>
-Date: Tue, 27 Jun 2017 18:00:09 +0930
-Subject: [PATCH] kernel: Update assembly for modern binutils
-
-From Linux 80f23935cadb ("powerpc: Convert cmp to cmpd in idle enter sequence"):
-
- PowerPC's "cmp" instruction has four operands. Normally people write
- "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently
- people forget, and write "cmp" with just three operands.
-
- With older binutils this is silently accepted as if this was "cmpw",
- while often "cmpd" is wanted. With newer binutils GAS will complain
- about this for 64-bit code. For 32-bit code it still silently assumes
- "cmpw" is what is meant.
-
-The first two instances are dealing with SPRs, which are 32-bit, so cmpw is correct.
-
-It is not clear what to do in the third use of cmp, but given old toolchains
-have generated cmpw lets assume that we should maintain the behaviour.
-
-Change-Id: Iee5dd5903dcd7ac4028bab0176e08ce3db23b2d5
-Signed-off-by: Joel Stanley <joel.stanley@au1.ibm.com>
----
- src/kernel/shutdown.S | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/src/kernel/shutdown.S b/src/kernel/shutdown.S
-index 629645b26c81..cad5c66b8137 100644
---- a/src/kernel/shutdown.S
-+++ b/src/kernel/shutdown.S
-@@ -5,7 +5,9 @@
- #
- # OpenPOWER HostBoot Project
- #
--# COPYRIGHT International Business Machines Corp. 2012,2014
-+# Contributors Listed Below - COPYRIGHT 2012,2017
-+# [+] International Business Machines Corp.
-+#
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
-@@ -92,7 +94,7 @@ kernel_shutdown_ea0_1_mode:
- ;// as it was the one that updated the cpu_count & lowest_pir
- ;// barrier - 1 wait for all nodes to report
- mfspr r10, PIR
-- cmp cr0, r10, r7
-+ cmpw cr0, r10, r7
- bne+ 2f ;// inside KERNEL_BARRIER below
-
- ;// Perform barrier - 1
-@@ -131,7 +133,7 @@ kernel_shutdown_ea0_1_mode:
- addi r8, r8, 8
- ;// Check for PIR == r7.
- mfspr r10, PIR
-- cmp cr0, r10, r7
-+ cmpw cr0, r10, r7
- beq 3f
- ;// Increment thread count.
- 1:
-@@ -164,7 +166,7 @@ kernel_shutdown_ea0_1_mode:
- 1:
- or 1,1,1
- ld r11, 0(r8)
-- cmp cr0, r3, r11
-+ cmpw cr0, r3, r11
- bne+ 1b
- isync
- ;// All other threads have left, so wait a little bit...
---
-2.13.1
-
diff --git a/openpower/package/hostboot-p8/Config.in b/openpower/package/hostboot-p8/Config.in
deleted file mode 100644
index 4dacfab..0000000
--- a/openpower/package/hostboot-p8/Config.in
+++ /dev/null
@@ -1,17 +0,0 @@
-config BR2_PACKAGE_HOSTBOOT_P8
- bool "hostboot-p8"
- default y if (BR2_OPENPOWER_POWER8)
- select BR2_CPP
- help
- Project to build the hostboot firmware codebase
-
-if BR2_PACKAGE_HOSTBOOT_P8
-
-config BR2_HOSTBOOT_P8_CONFIG_FILE
- string "Hostboot configuration file for compilation"
- default default
- help
- String used to define hw specific make config file
-
-endif
-
diff --git a/openpower/package/hostboot-p8/hostboot-p8.mk b/openpower/package/hostboot-p8/hostboot-p8.mk
deleted file mode 100644
index fed9f12..0000000
--- a/openpower/package/hostboot-p8/hostboot-p8.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-#
-# hostboot for POWER8
-#
-################################################################################
-HOSTBOOT_P8_VERSION ?= 4eee07524dfdac2bd515605ca796b701562b3e95
-
-HOSTBOOT_P8_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_P8_VERSION))
-
-HOSTBOOT_P8_LICENSE = Apache-2.0
-HOSTBOOT_P8_LICENSE_FILES = LICENSE
-HOSTBOOT_P8_DEPENDENCIES = host-binutils
-
-HOSTBOOT_P8_INSTALL_IMAGES = YES
-HOSTBOOT_P8_INSTALL_TARGET = NO
-
-HOSTBOOT_P8_ENV_VARS=$(TARGET_MAKE_ENV) \
- CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hostboot/$(BR2_HOSTBOOT_P8_CONFIG_FILE) \
- OPENPOWER_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \
- HOSTBOOT_P8_VERSION=`cat $(HOSTBOOT_P8_VERSION_FILE)`
-
-HOSTBOOT_P8_POST_PATCH_HOOKS += HOSTBOOT_P8_APPLY_PATCHES
-
-define HOSTBOOT_P8_BUILD_CMDS
- $(HOSTBOOT_P8_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE)'
-endef
-
-define HOSTBOOT_P8_INSTALL_IMAGES_CMDS
- cd $(@D) && source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower $(STAGING_DIR)/hostboot_build_images/
-endef
-
-$(eval $(generic-package))
diff --git a/openpower/package/hostboot/Config.in b/openpower/package/hostboot/Config.in
index 3ec891c..8c16ba0 100644
--- a/openpower/package/hostboot/Config.in
+++ b/openpower/package/hostboot/Config.in
@@ -25,7 +25,7 @@
config BR2_HOSTBOOT_VERSION
string
- default "46174931e05562140af4ef53b5074420cf142332" if BR2_HOSTBOOT_LATEST_VERSION
+ default "15795187349adc018e36cb88f865acbb0e20834f" if BR2_HOSTBOOT_LATEST_VERSION
default BR2_HOSTBOOT_CUSTOM_VERSION_VALUE \
if BR2_HOSTBOOT_CUSTOM_VERSION
diff --git a/openpower/package/machine-xml/Config.in b/openpower/package/machine-xml/Config.in
index 63d31e2..c9d7082 100755
--- a/openpower/package/machine-xml/Config.in
+++ b/openpower/package/machine-xml/Config.in
@@ -3,7 +3,6 @@
config BR2_PACKAGE_MACHINE_XML
bool "machine_xml"
default y if (BR2_OPENPOWER_PLATFORM)
- select BR2_PACKAGE_COMMON_P8_XML if (BR2_OPENPOWER_POWER8)
choice
prompt "Machine XML location"
diff --git a/openpower/package/machine-xml/machine-xml.mk b/openpower/package/machine-xml/machine-xml.mk
index 61070e3..2f625d3 100644
--- a/openpower/package/machine-xml/machine-xml.mk
+++ b/openpower/package/machine-xml/machine-xml.mk
@@ -21,9 +21,6 @@
ifeq ($(BR2_OPENPOWER_POWER9),y)
MACHINE_XML_DEPENDENCIES += hostboot
endif
-ifeq ($(BR2_OPENPOWER_POWER8),y)
-MACHINE_XML_DEPENDENCIES += hostboot-p8 openpower-mrw common-p8-xml
-endif
MACHINE_XML_INSTALL_IMAGES = YES
MACHINE_XML_INSTALL_TARGET = YES
diff --git a/openpower/package/occ-p8/Config.in b/openpower/package/occ-p8/Config.in
deleted file mode 100644
index 0137e94..0000000
--- a/openpower/package/occ-p8/Config.in
+++ /dev/null
@@ -1,16 +0,0 @@
-config BR2_PACKAGE_OCC_P8
- bool "OCC for P8"
- default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER8)
- select BR2_CPP
- help
- Project to build OCC
-
-if BR2_PACKAGE_OCC_P8
-
-config BR2_OCC_P8_BIN_FILENAME
- string "Name of OCC P8 image file"
- default "occ.bin"
- help
- String used to define name of the OCC binary image file
-
-endif
diff --git a/openpower/package/occ-p8/occ-p8.mk b/openpower/package/occ-p8/occ-p8.mk
deleted file mode 100644
index 0ef38a2..0000000
--- a/openpower/package/occ-p8/occ-p8.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-################################################################################
-#
-# occ for power8
-#
-################################################################################
-
-OCC_P8_VERSION ?= 28b9f6edc698d19ccb721beaf8de8b786c11f990
-OCC_P8_SITE ?= $(call github,open-power,occ,$(OCC_P8_VERSION))
-OCC_P8_LICENSE = Apache-2.0
-
-OCC_P8_LICENSE_FILES = src/LICENSE
-
-OCC_P8_INSTALL_IMAGES = YES
-OCC_P8_INSTALL_TARGET = NO
-
-OCC_P8_STAGING_DIR = $(STAGING_DIR)/occ
-
-OCC_P8_IMAGE_BIN_PATH = src/image.bin
-OCC_P8_DEPENDENCIES = host-binutils host-p8-pore-binutils
-
-define OCC_P8_BUILD_CMDS
- cd $(@D)/src && \
- make POREPATH=$(P8_PORE_BINUTILS_BIN)/bin/ OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) all && \
- make tracehash && \
- make combineImage
-endef
-
-OCC_P8_BUILD_CMDS ?= $(OCC_P8_BUILD_CMDS_P8)
-
-define OCC_P8_INSTALL_IMAGES_CMDS
- mkdir -p $(STAGING_DIR)/occ
- cp $(@D)/$(OCC_P8_IMAGE_BIN_PATH) $(OCC_P8_STAGING_DIR)/$(BR2_OCC_P8_BIN_FILENAME)
-endef
-
-$(eval $(generic-package))
diff --git a/openpower/package/occ/Config.in b/openpower/package/occ/Config.in
index 4ebb73d..b55a58a 100644
--- a/openpower/package/occ/Config.in
+++ b/openpower/package/occ/Config.in
@@ -1,6 +1,7 @@
config BR2_PACKAGE_OCC
bool "OCC (POWER9)"
default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
+ depends on BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
select BR2_CPP
help
Project to build OCC
@@ -43,7 +44,7 @@
config BR2_OCC_VERSION
string
- default "3ab29212518e6574019fd569588a58cba9ba9823" if BR2_OCC_LATEST_VERSION
+ default "16131c38c2e593206447403c3ac79b18fb86e21a" if BR2_OCC_LATEST_VERSION
default BR2_OCC_CUSTOM_VERSION_VALUE \
if BR2_OCC_CUSTOM_VERSION
diff --git a/openpower/package/occ/occ.mk b/openpower/package/occ/occ.mk
index 39ad15e..7d8c582 100644
--- a/openpower/package/occ/occ.mk
+++ b/openpower/package/occ/occ.mk
@@ -18,7 +18,7 @@
OCC_IMAGE_BIN_PATH = obj/image.bin
-OCC_DEPENDENCIES = host-binutils host-ppe42-gcc
+OCC_DEPENDENCIES = host-binutils host-ppe42-toolchain
ifeq ($(BR2_OCC_GPU_BIN_BUILD),y)
OCC_DEPENDENCIES += hostboot-binaries
endif
diff --git a/openpower/package/ocmb-explorer-fw/ocmb_explorer_fw.mk b/openpower/package/ocmb-explorer-fw/ocmb-explorer-fw.mk
similarity index 92%
rename from openpower/package/ocmb-explorer-fw/ocmb_explorer_fw.mk
rename to openpower/package/ocmb-explorer-fw/ocmb-explorer-fw.mk
index c456b0d..c3f6796 100644
--- a/openpower/package/ocmb-explorer-fw/ocmb_explorer_fw.mk
+++ b/openpower/package/ocmb-explorer-fw/ocmb-explorer-fw.mk
@@ -23,7 +23,7 @@
# Commands to extract and install the Open Capi Memory Buffer Firmware (OCMBFW)
define OCMB_EXPLORER_FW_INSTALL_IMAGES_CMDS
- $(INSTALL) -D $(@D)/$(OCMBFW_FILENAME) $(BINARIES_DIR)/
+ $(INSTALL) -D $(@D)/$(call qstrip,$(BR2_OCMBFW_FILENAME)) $(BINARIES_DIR)/
endef
define OCMB_EXPLORER_FW_EXTRACT_CMDS
diff --git a/openpower/package/openpower-mrw/Config.in b/openpower/package/openpower-mrw/Config.in
deleted file mode 100644
index ea052b4..0000000
--- a/openpower/package/openpower-mrw/Config.in
+++ /dev/null
@@ -1,3 +0,0 @@
-config BR2_PACKAGE_OPENPOWER_MRW
- bool "Machine Readable Workbook (MRW) infrastructure"
- default y if BR2_PACKAGE_HOSTBOOT_P8
diff --git a/openpower/package/openpower-mrw/openpower-mrw.mk b/openpower/package/openpower-mrw/openpower-mrw.mk
deleted file mode 100644
index e70cbd6..0000000
--- a/openpower/package/openpower-mrw/openpower-mrw.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-################################################################################
-#
-# openpower-mrw
-#
-################################################################################
-
-OPENPOWER_MRW_VERSION = 0729a4a68c0e731a8d3720f1a5aee190d165400b
-OPENPOWER_MRW_SITE = $(call github,open-power,openpower-mrw,$(OPENPOWER_MRW_VERSION))
-
-OPENPOWER_MRW_LICENSE = Apache-2.0
-OPENPOWER_MRW_LICENSE_FILES = LICENSE
-OPENPOWER_MRW_DEPENDENCIES =
-
-OPENPOWER_MRW_INSTALL_IMAGES = YES
-OPENPOWER_MRW_INSTALL_TARGET = NO
-
-OPENPOWER_MRW_ENV_VARS=INSTALL_DIRECTORY=$(STAGING_DIR)/usr/bin/
-
-define OPENPOWER_MRW_BUILD_CMDS
- $(OPENPOWER_MRW_ENV_VARS) bash -c 'cd $(@D) && $(MAKE)'
-endef
-
-define OPENPOWER_MRW_INSTALL_IMAGES_CMDS
- $(OPENPOWER_MRW_ENV_VARS) bash -c 'cd $(@D) && $(MAKE) install'
-endef
-
-$(eval $(generic-package))
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
index a25bf52..18443b4 100644
--- a/openpower/package/openpower-pnor/Config.in
+++ b/openpower/package/openpower-pnor/Config.in
@@ -1,22 +1,17 @@
config BR2_PACKAGE_OPENPOWER_PNOR
bool "openpower_pnor"
- default y if (BR2_OPENPOWER_PLATFORM)
+ default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
depends on (!BR2_PACKAGE_OPENPOWER_PNOR_P10)
- select BR2_PACKAGE_HOSTBOOT_P10 if (! (BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9) )
- select BR2_PACKAGE_HOSTBOOT if BR2_OPENPOWER_POWER9
- select BR2_PACKAGE_HOSTBOOT_P8 if BR2_OPENPOWER_POWER8
+ select BR2_PACKAGE_HOSTBOOT
select BR2_PACKAGE_HOSTBOOT_BINARIES
select BR2_PACKAGE_SKIBOOT
select BR2_PACKAGE_OPENPOWER_FFS
- select BR2_PACKAGE_OCC_P10 if (! (BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9 ) )
- select BR2_PACKAGE_OCC if BR2_OPENPOWER_POWER9
- select BR2_PACKAGE_OCC_P8 if BR2_OPENPOWER_POWER8
+ select BR2_PACKAGE_OCC
select BR2_PACKAGE_CAPP_UCODE
select BR2_PACKAGE_IMA_CATALOG
select BR2_PACKAGE_HOST_OPENPOWER_VPNOR
select BR2_PACKAGE_MACHINE_XML
- select BR2_PACKAGE_HCODE_P10 if (BR2_OPENPOWER_POWER10)
- select BR2_PACKAGE_HCODE if (BR2_OPENPOWER_POWER9)
+ select BR2_PACKAGE_HCODE if BR2_OPENPOWER_POWER9
help
Utilites for building a targeting binary image
@@ -178,8 +173,4 @@
bool "Create a virtual PNOR image along with the standard image"
default n
-config BR2_OPENPOWER_MAKE_LIDS
- bool "Create a package of content and signature binaries to be used for lid creation"
- default n
-
endmenu
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index e5fa930..a114c3c 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -4,28 +4,29 @@
#
################################################################################
-OPENPOWER_PNOR_VERSION ?= aa76df051c5196b311039337e757e0fbe1ae78a9
-
-# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
-# after that, when code is propagated to a public repo
-#OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
-OPENPOWER_PNOR_SITE = git@github.ibm.com:open-power/pnor.git
-OPENPOWER_PNOR_SITE_METHOD=git
+OPENPOWER_PNOR_VERSION ?= aa4c350255616b6406830fd6b564aebefaf7add4
+OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
OPENPOWER_PNOR_LICENSE = Apache-2.0
OPENPOWER_PNOR_LICENSE_FILES = LICENSE
OPENPOWER_PNOR_DEPENDENCIES = hostboot-binaries machine-xml skiboot host-openpower-ffs capp-ucode host-openpower-pnor-util
-SBE_P10_VERSION = $(call qstrip,$(BR2_SBE_P10_VERSION))
-
ifeq ($(BR2_OPENPOWER_POWER9),y)
- OPENPOWER_PNOR_DEPENDENCIES += hcode
+OPENPOWER_PNOR_DEPENDENCIES += hcode
endif
ifeq ($(BR2_PACKAGE_IMA_CATALOG),y)
OPENPOWER_PNOR_DEPENDENCIES += ima-catalog
endif
+ifneq ($(BR2_PACKAGE_SKIBOOT_EMBED_PAYLOAD),y)
+
+ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+OPENPOWER_PNOR_DEPENDENCIES += linux
+endif
+
+endif
+
ifeq ($(BR2_OPENPOWER_PNOR_XZ_ENABLED),y)
OPENPOWER_PNOR_DEPENDENCIES += host-xz
XZ_ARG=-xz_compression
@@ -43,12 +44,8 @@
SIGN_MODE_ARG=-sign_mode $(BR2_OPENPOWER_SECUREBOOT_SIGN_MODE)
endif
-ifeq ($(BR2_OPENPOWER_POWER10),y)
- OPENPOWER_RELEASE=p10
-else ifeq ($(BR2_OPENPOWER_POWER9),y)
+ifeq ($(BR2_OPENPOWER_POWER9),y)
OPENPOWER_RELEASE=p9
-else
- OPENPOWER_RELEASE=p8
endif
OPENPOWER_PNOR_INSTALL_IMAGES = YES
@@ -66,14 +63,8 @@
OUTPUT_BUILD_DIR = $(STAGING_DIR)/../../../build/
OUTPUT_IMAGES_DIR = $(STAGING_DIR)/../../../images/
HOSTBOOT_BUILD_IMAGES_DIR = $(STAGING_DIR)/hostboot_build_images/
-FSP_TRACE_IMAGES_DIR = $(STAGING_DIR)/fsp-trace/
-SBE_IMAGE_DIR = $(STAGING_DIR)/../../../build/sbe-p10-"$(SBE_P10_VERSION)"/images
-DEVTREE_BIN_DIR = $(STAGING_DIR)/usr/share/pdata/
-# The pdata generated device tree file name will be based on machine xml filename
-QSTRIP_OP_MACHINE_XML_FILENAME = $(call qstrip,$(BR2_OPENPOWER_MACHINE_XML_FILENAME))
-$(eval BMC_POWER_TARGET_FILENAME = $$(patsubst %.xml,%.dtb,$(QSTRIP_OP_MACHINE_XML_FILENAME)))
# See Open-Power's Hostboot repo, file: src/build/buildpnor/PnorUtils.pm,
-# function: loadPnorLayout(); at the end of that function the generated PNOR layout XML file
+# function: loadPnorLayout(); at the end of that function the generated XML file
# is concatenated with "WithOffsets.xml"
GENERATED_PNOR_LAYOUT_FILES = $(shell find "$(OPENPOWER_PNOR_SCRATCH_DIR)" -maxdepth 1 -name "*WithOffsets.xml")
@@ -83,22 +74,18 @@
$(OUTPUT_BUILD_DIR)/linux-$(LINUX_VERSION)/.config \
$(OUTPUT_BUILD_DIR)/linux-$(LINUX_VERSION)/vmlinux \
$(OUTPUT_BUILD_DIR)/linux-$(LINUX_VERSION)/System.map \
- $(FSP_TRACE_IMAGES_DIR)/fsp-trace \
$(OUTPUT_IMAGES_DIR)/zImage.epapr \
$(GENERATED_PNOR_LAYOUT_FILES)
# Subpackages we want to include in the version info (do not include openpower-pnor)
OPENPOWER_VERSIONED_SUBPACKAGES = skiboot
-ifeq ($(BR2_PACKAGE_HOSTBOOT_P8),y)
- OPENPOWER_VERSIONED_SUBPACKAGES += hostboot-p8 occ-p8
-else ifeq ($(BR2_PACKAGE_HOSTBOOT_P10),y)
- OPENPOWER_VERSIONED_SUBPACKAGES += hostboot-p10 occ-p10 sbe-p10 hcode-p10 ocmb-explorer-fw
- OPENPOWER_PNOR_DEPENDENCIES += hostboot-p10 occ-p10 sbe-p10 hcode-p10 ocmb-explorer-fw
-else ifeq ($(BR2_PACKAGE_HOSTBOOT),y)
- OPENPOWER_VERSIONED_SUBPACKAGES += hostboot occ
+ifeq ($(BR2_PACKAGE_HOSTBOOT),y)
+OPENPOWER_VERSIONED_SUBPACKAGES += hostboot occ
endif
-
+ifeq ($(BR2_PACKAGE_OCMB_EXPLORER_FW),y)
+OPENPOWER_VERSIONED_SUBPACKAGES += ocmb-explorer-fw
+endif
OPENPOWER_VERSIONED_SUBPACKAGES += linux petitboot machine-xml hostboot-binaries capp-ucode
OPENPOWER_PNOR = openpower-pnor
@@ -107,11 +94,7 @@
OPENPOWER_VERSIONED_SUBPACKAGES += sbe hcode
endif
-ifeq ($(BR2_PACKAGE_OCC_P10),y)
- OCC_BIN_FILENAME=$(BR2_OCC_P10_BIN_FILENAME)
-else ifeq ($(BR2_PACKAGE_OCC_P8),y)
- OCC_BIN_FILENAME=$(BR2_OCC_P8_BIN_FILENAME)
-else
+ifeq ($(BR2_PACKAGE_OCC),y)
OCC_BIN_FILENAME=$(BR2_OCC_BIN_FILENAME)
endif
@@ -119,12 +102,6 @@
OCMB_EXPLORER_FW_URL=$(call qstrip,$(OCMB_EXPLORER_FW_SITE)/$(OCMB_EXPLORER_FW_SOURCE))
endif
-DEVTREE_BLOB_FILENAME = ""
-ifeq ($(BR2_OPENPOWER_POWER10),y)
- DEVTREE_BLOB_FILENAME = $(DEVTREE_BIN_DIR)/$(BMC_POWER_TARGET_FILENAME)
- OPENPOWER_PNOR_DEPENDENCIES += pdata
-endif
-
define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
@@ -160,8 +137,6 @@
-ocmbfw_original_filename $(BINARIES_DIR)/$(BR2_OCMBFW_FILENAME) \
-ocmbfw_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_OCMBFW_PROCESSED_FILENAME) \
-pnor_layout $(@D)/"$(OPENPOWER_RELEASE)"Layouts/$(BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME) \
- -sbe_img_dir $(SBE_IMAGE_DIR) \
- -devtree_binary_filename $(DEVTREE_BLOB_FILENAME) \
$(XZ_ARG) $(KEY_TRANSITION_ARG) $(SIGN_MODE_ARG) \
mkdir -p $(STAGING_DIR)/pnor/
@@ -184,8 +159,7 @@
-wofdata_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_WOFDATA_BINARY_FILENAME) \
-memddata_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_MEMDDATA_BINARY_FILENAME) \
-ocmbfw_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_OCMBFW_PROCESSED_FILENAME) \
- -openpower_version_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/openpower_pnor_version.bin \
- -devtree_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/DEVTREE.bin
+ -openpower_version_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/openpower_pnor_version.bin
$(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR)
@@ -201,22 +175,11 @@
if [ "$(BR2_BUILD_PNOR_SQUASHFS)" == "y" ]; then \
PATH=$(HOST_DIR)/usr/bin:$(PATH) $(HOST_DIR)/usr/bin/generate-tar -i squashfs -m $(BR2_OPENPOWER_CONFIG_NAME) -f $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).squashfs.tar $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) -s; \
$(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).squashfs.tar $(BINARIES_DIR); \
- cd $(STAGING_DIR)/pnor/; PATH=$(HOST_DIR)/usr/sbin:$(PATH) $(HOST_DIR)/usr/bin/generate-ubi $(BR2_OPENPOWER_PNOR_FILENAME).squashfs.tar; \
- $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).ubi.mtd $(BINARIES_DIR); \
else \
PATH=$(HOST_DIR)/usr/bin:$(PATH) $(HOST_DIR)/usr/bin/generate-tar -i static -m $(BR2_OPENPOWER_CONFIG_NAME) -f $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).static.tar.gz $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) -s; \
$(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).static.tar.gz $(BINARIES_DIR); \
fi
- # Make the lids
- if [ "$(BR2_OPENPOWER_MAKE_LIDS)" == "y" ]; then \
- $(TARGET_MAKE_ENV) $(@D)/makelidpkg \
- $(OUTPUT_IMAGES_DIR)/ebmc_lids.tar.gz \
- $(OPENPOWER_PNOR_SCRATCH_DIR); \
- else \
- echo "Not making LIDs"; \
- fi
-
#Create Debug Tarball
mkdir -p $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/
cp -r $(FILES_TO_TAR) $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/
@@ -226,4 +189,4 @@
$(eval $(generic-package))
# Generate openPOWER pnor version string by combining subpackage version string files
-$(eval $(OPENPOWER_VERSION))
+$(eval $(call OPENPOWER_VERSION,$(OPENPOWER_PNOR)))
diff --git a/openpower/package/p8-pore-binutils/Config.in b/openpower/package/p8-pore-binutils/Config.in
deleted file mode 100644
index a29397a..0000000
--- a/openpower/package/p8-pore-binutils/Config.in
+++ /dev/null
@@ -1,6 +0,0 @@
-config BR2_PACKAGE_HOST_P8_PORE_BINUTILS
- bool "p8-pore-binutils"
- default y if (BR2_OPENPOWER_POWER8)
- select BR2_CPP
- help
- Project to build the P8 PORE binutils
diff --git a/openpower/package/p8-pore-binutils/p8-pore-binutils.mk b/openpower/package/p8-pore-binutils/p8-pore-binutils.mk
deleted file mode 100644
index 880dc09..0000000
--- a/openpower/package/p8-pore-binutils/p8-pore-binutils.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-#
-# p8-pore-binutils
-#
-################################################################################
-
-P8_PORE_BINUTILS_VERSION ?= 91069b732e4c253055cd94fff6ad179116563df9
-P8_PORE_BINUTILS_SITE ?= $(call github,open-power,p8-pore-binutils,$(P8_PORE_BINUTILS_VERSION))
-P8_PORE_BINUTILS_LICENSE = GPLv3+
-P8_PORE_BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB
-HOST_P8_PORE_BINUTILS_DEPENDENCIES = host-binutils
-
-P8_PORE_BINUTILS_DIR = $(STAGING_DIR)/p8-pore-binutils
-P8_PORE_BINUTILS_BIN = $(STAGING_DIR)/p8-pore-binutils/linux
-
-define HOST_P8_PORE_BINUTILS_BUILD_CMDS
- cd $(@D) && \
- ./configure --prefix=$(P8_PORE_BINUTILS_DIR) \
- --exec-prefix=$(P8_PORE_BINUTILS_BIN) \
- --target=pore-elf64 && \
- make configure-host && \
- make CFLAGS=-Wno-error LDFLAGS=-all-static
-endef
-
-define HOST_P8_PORE_BINUTILS_INSTALL_CMDS
- bash -c 'cd $(@D) && make install'
-endef
-
-$(eval $(host-generic-package))
diff --git a/openpower/package/ppe42-binutils/Config.in b/openpower/package/ppe42-binutils/Config.in
index 341e8ad..a878732 100644
--- a/openpower/package/ppe42-binutils/Config.in
+++ b/openpower/package/ppe42-binutils/Config.in
@@ -1,6 +1,5 @@
config BR2_PACKAGE_HOST_PPE42_BINUTILS
bool "ppe42-binutils"
- default y if (BR2_OPENPOWER_PLATFORM && (BR2_OPENPOWER_POWER10 || BR2_OPENPOWER_POWER9))
select BR2_CPP
help
Project to build the PPE42 PORE binutils
diff --git a/openpower/package/ppe42-binutils/ppe42-binutils.mk b/openpower/package/ppe42-binutils/ppe42-binutils.mk
index 0c365b8..90abbf4 100644
--- a/openpower/package/ppe42-binutils/ppe42-binutils.mk
+++ b/openpower/package/ppe42-binutils/ppe42-binutils.mk
@@ -10,8 +10,8 @@
PPE42_BINUTILS_DEPENDENCIES = host-binutils
-PPE42_BINUTILS_DIR = $(STAGING_DIR)/ppe42-binutils
-PPE42_BINUTILS_BIN = $(STAGING_DIR)/ppe42-binutils/linux
+PPE42_BINUTILS_DIR = $(HOST_DIR)/$(PPE42_TOOLCHAIN_DIR)
+PPE42_BINUTILS_BIN = $(HOST_DIR)/$(PPE42_TOOLCHAIN_BIN)
define HOST_PPE42_BINUTILS_BUILD_CMDS
cd $(@D) && \
diff --git a/openpower/package/ppe42-gcc/Config.in b/openpower/package/ppe42-gcc/Config.in
index 54ae38b..b7361bb 100644
--- a/openpower/package/ppe42-gcc/Config.in
+++ b/openpower/package/ppe42-gcc/Config.in
@@ -1,6 +1,12 @@
config BR2_PACKAGE_HOST_PPE42_GCC
bool "ppe42-gcc"
- default y if (BR2_OPENPOWER_PLATFORM && (BR2_OPENPOWER_POWER10 || BR2_OPENPOWER_POWER9))
+ select BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
+ select BR2_PACKAGE_PPE42_BINUTILS
select BR2_CPP
help
Project to build the PPE42 gcc
+
+if BR2_PACKAGE_HOST_PPE42_GCC
+config BR2_PACKAGE_PROVIDES_PPE42_TOOLCHAIN
+ default "ppe42-gcc"
+endif
diff --git a/openpower/package/ppe42-gcc/ppe42-gcc.mk b/openpower/package/ppe42-gcc/ppe42-gcc.mk
index 31496cc..faae762 100644
--- a/openpower/package/ppe42-gcc/ppe42-gcc.mk
+++ b/openpower/package/ppe42-gcc/ppe42-gcc.mk
@@ -10,9 +10,10 @@
PPE42_GCC_DEPENDENCIES = ppe42-binutils gmp mpfr mpc
HOST_PPE42_GCC_DEPENDENCIES = host-ppe42-binutils host-gmp host-mpfr host-mpc
+PPE42_GCC_PROVIDES = ppe42-toolchain
-PPE42_GCC_DIR = $(STAGING_DIR)/ppe42-binutils
-PPE42_GCC_BIN = $(STAGING_DIR)/ppe42-binutils/linux
+PPE42_GCC_DIR = $(HOST_DIR)/$(PPE42_TOOLCHAIN_DIR)
+PPE42_GCC_BIN = $(HOST_DIR)/$(PPE42_TOOLCHAIN_BIN)
define HOST_PPE42_GCC_BUILD_CMDS
cd $(@D) && \
diff --git a/openpower/package/ppe42-toolchain-external/Config.in b/openpower/package/ppe42-toolchain-external/Config.in
new file mode 100644
index 0000000..10b58db
--- /dev/null
+++ b/openpower/package/ppe42-toolchain-external/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_PPE42_TOOLCHAIN_EXTERNAL
+ bool "ppe42-toolchain-external"
+ select BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
+ help
+ Use an external PPE42 toolchain
+
+if BR2_PACKAGE_PPE42_TOOLCHAIN_EXTERNAL
+config BR2_PACKAGE_PROVIDES_PPE42_TOOLCHAIN
+ default "ppe42-toolchain-external"
+
+config BR2_PPE42_TOOLCHAIN_EXTERNAL_PATH
+ string "External PPE42 toolchain path"
+ help
+ Pathname to where the external PPE42 toolchain is
+ installed. The compiler is expected to be fully
+ contained within the "sysroot/ppe42-toolchain"
+ directory
+endif
diff --git a/openpower/package/ppe42-toolchain-external/ppe42-toolchain-external.mk b/openpower/package/ppe42-toolchain-external/ppe42-toolchain-external.mk
new file mode 100644
index 0000000..1fb9f00
--- /dev/null
+++ b/openpower/package/ppe42-toolchain-external/ppe42-toolchain-external.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# ppe42-toolchain-external
+#
+################################################################################
+PPE42_TOOLCHAIN_EXTERNAL_REDISTRIBUTE = NO
+PPE42_TOOLCHAIN_EXTERNAL_SITE =
+PPE42_TOOLCHAIN_EXTERNAL_SOURCE =
+PPE42_TOOLCHAIN_EXTERNAL_PROVIDES = ppe42-toolchain
+PPE42_TOOLCHAIN_EXTERNAL_PATH = \
+ $(call qstrip,$(BR2_PPE42_TOOLCHAIN_EXTERNAL_PATH))/$(PPE42_TOOLCHAIN_DIR)
+
+define HOST_PPE42_TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
+ test -e $(PPE42_TOOLCHAIN_EXTERNAL_PATH)
+endef
+
+define HOST_PPE42_TOOLCHAIN_EXTERNAL_INSTALL_CMDS
+ ln -snf $(PPE42_TOOLCHAIN_EXTERNAL_PATH) $(HOST_DIR)/$(PPE42_TOOLCHAIN_DIR)
+
+endef
+
+$(eval $(host-generic-package))
+
diff --git a/openpower/package/sb-signing-utils/keys/README.md b/openpower/package/sb-signing-utils/keys/README.md
index f70e6c2..b4c4835 100644
--- a/openpower/package/sb-signing-utils/keys/README.md
+++ b/openpower/package/sb-signing-utils/keys/README.md
@@ -2,7 +2,7 @@
## Background
-IBM P8 OpenPOWER systems support a limited set of Secure and Trusted Boot
+IBM P9 OpenPOWER systems support a limited set of Secure and Trusted Boot
functionality. Secure Boot implements a processor based chain of trust. The
chain starts with an implicitly trusted component with other components being
authenticated and integrity checked before being executed on the host processor
@@ -10,7 +10,7 @@
for Measurement (CRTM). Immutable Read Only Memory (ROM - fixed in the POWER
processor chip) verifies the initial firmware load. That firmware verifies
cryptographic signatures on all subsequent "to be trusted" firmware that is
-loaded for execution on the P8 cores. Trusted Boot also makes use of this same
+loaded for execution on the P9 cores. Trusted Boot also makes use of this same
CRTM by measuring and recording FW images via a Trusted Platform Module (TPM)
before control is passed on to the next layer in the boot stack. The CRTM
design is based on a Public Key Infrastructure (PKI) process to validate the
@@ -20,7 +20,7 @@
hypervisors, and operating systems. Each platform manufacturer wants to
maintain control over its own code and sign it with its own keys. A single key
hash is stored in host processor module SEEPROM representing the anchoring root
-set of hardware keys. The P8 Trusted Boot supports a key management flow that
+set of hardware keys. The P9 Trusted Boot supports a key management flow that
makes use of two kinds of hardware root keys, a wide open, well-known, openly
published public/private key pair (imprint keys) and a set of production keys
where the private key is protected by a hardware security module (HSM) internal
diff --git a/openpower/package/sb-signing-utils/sb-signing-utils.mk b/openpower/package/sb-signing-utils/sb-signing-utils.mk
index 70b1ae4..efc0f64 100644
--- a/openpower/package/sb-signing-utils/sb-signing-utils.mk
+++ b/openpower/package/sb-signing-utils/sb-signing-utils.mk
@@ -8,7 +8,7 @@
SB_SIGNING_UTILS_LICENSE = Apache-2.0
SB_SIGNING_UTILS_LICENSE_FILES = LICENSE
-SB_SIGNING_UTILS_VERSION ?= v0.8
+SB_SIGNING_UTILS_VERSION ?= v0.9
HOST_SB_SIGNING_UTILS_DEPENDENCIES = host-openssl
diff --git a/openpower/package/sbe/Config.in b/openpower/package/sbe/Config.in
index fe2bc97..ba1030a 100644
--- a/openpower/package/sbe/Config.in
+++ b/openpower/package/sbe/Config.in
@@ -3,6 +3,7 @@
default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
select BR2_CPP
depends on BR2_PACKAGE_HCODE
+ depends on BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
help
Project to build the sbe firmware codebase
@@ -26,7 +27,7 @@
config BR2_SBE_VERSION
string
- default "512f92467c65876005f92ebe1d3f2abe078db265" if BR2_SBE_LATEST_VERSION
+ default "57ebdcc1478d96220d8e71e0397a128b09df5435" if BR2_SBE_LATEST_VERSION
default BR2_SBE_CUSTOM_VERSION_VALUE \
if BR2_SBE_CUSTOM_VERSION
diff --git a/openpower/package/sbe/sbe.mk b/openpower/package/sbe/sbe.mk
index 121e2c4..2f6d5b4 100644
--- a/openpower/package/sbe/sbe.mk
+++ b/openpower/package/sbe/sbe.mk
@@ -8,7 +8,7 @@
SBE_SITE = $(call github,open-power,sbe,$(SBE_VERSION))
SBE_LICENSE = Apache-2.0
-SBE_DEPENDENCIES = host-ppe42-gcc hcode
+SBE_DEPENDENCIES = host-ppe42-toolchain hcode
SBE_INSTALL_IMAGES = YES
SBE_INSTALL_TARGET = NO
diff --git a/openpower/package/skiboot/skiboot.mk b/openpower/package/skiboot/skiboot.mk
index 708cef7..6b7d6aa 100644
--- a/openpower/package/skiboot/skiboot.mk
+++ b/openpower/package/skiboot/skiboot.mk
@@ -18,40 +18,34 @@
SKIBOOT_INSTALL_IMAGES = YES
SKIBOOT_INSTALL_TARGET = NO
-ifeq ($(BR2_SKIBOOT_DEVICETREE),y)
-SKIBOOT_DEPENDENCIES += host-dtc
-endif
-SKIBOOT_MAKE_OPTS += CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
- AS="$(TARGET_AS)" AR="$(TARGET_AR)" NM="$(TARGET_NM)" \
- OBJCOPY="$(TARGET_OBJCOPY)" OBJDUMP="$(TARGET_OBJDUMP)" \
- SIZE="$(TARGET_CROSS)size"
-
-ifeq ($(BR2_TARGET_SKIBOOT_EMBED_PAYLOAD),y)
-SKIBOOT_MAKE_OPTS += KERNEL="$(BINARIES_DIR)/$(LINUX_IMAGE_NAME)"
-
-ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
-SKIBOOT_DEPENDENCIES += linux-rebuild-with-initramfs
-else
+ifeq ($(BR2_PACKAGE_SKIBOOT_EMBED_PAYLOAD),y)
+SKIBOOT_MAKE_OPTS += KERNEL=$(BINARIES_DIR)/$(LINUX_IMAGE_NAME)
SKIBOOT_DEPENDENCIES += linux
endif
+ifeq ($(BR2_SKIBOOT_DEVICETREE),y)
+SKIBOOT_DEPENDENCIES += host-dtc
+define SKIBOOT_BUILD_DEVICETREE
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/external/devicetree all
+endef
+define SKIBOOT_INSTALL_DEVICETREE
+ $(INSTALL) -D -m 644 $(@D)/external/devicetree/*.dtb $(BINARIES_DIR)
+endef
endif
+# Pass Configure opts as env to not override Skiboot's
+# Additionally, Skiboot expects SKIBOOT_VERSION as env
define SKIBOOT_BUILD_CMDS
- $(TARGET_CONFIGURE_OPTS) SKIBOOT_VERSION=`cat $(SKIBOOT_VERSION_FILE)` \
- $(MAKE) $(SKIBOOT_MAKE_OPTS) -C $(@D) all
-
- $(if $(BR2_SKIBOOT_DEVICETREE), \
- $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/external/devicetree)
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
+ SKIBOOT_VERSION=`cat $(SKIBOOT_VERSION_FILE)` \
+ $(MAKE) -C $(@D) $(SKIBOOT_MAKE_OPTS) all
+ $(SKIBOOT_BUILD_DEVICETREE)
endef
define SKIBOOT_INSTALL_IMAGES_CMDS
$(INSTALL) -D -m 755 $(@D)/skiboot.lid $(BINARIES_DIR)
-
- $(if $(BR2_SKIBOOT_DEVICETREE), \
- $(INSTALL) -D -m 644 \
- $(@D)/external/devicetree/*.dtb $(BINARIES_DIR))
+ $(SKIBOOT_INSTALL_DEVICETREE)
endef
$(eval $(generic-package))
diff --git a/openpower/patches/blackbird-patches/hostboot/0001-Add-detailed-ISTEP-output-option-to-hostboot.patch b/openpower/patches/blackbird-patches/hostboot/0001-Add-detailed-ISTEP-output-option-to-hostboot.patch
new file mode 100644
index 0000000..67baa48
--- /dev/null
+++ b/openpower/patches/blackbird-patches/hostboot/0001-Add-detailed-ISTEP-output-option-to-hostboot.patch
@@ -0,0 +1,71 @@
+From d90e6c513094231f622a427030f3dbca1eeb5ed5 Mon Sep 17 00:00:00 2001
+From: Timothy Pearson <tpearson@raptorengineering.com>
+Date: Thu, 18 Apr 2019 06:28:50 +0000
+Subject: [PATCH] Add detailed ISTEP output option to hostboot
+
+Output detailed ISTEP data over LPC port 81h/82h in support of RCS
+Talos II systems. These systems will deadlock due to FSI silicon bugs
+in the CPUs unless the BMC is aware of the current ISTEP data in order
+to properly sequence BMC-side FSI service startup.
+---
+ src/usr/initservice/istepdispatcher/HBconfig | 5 ++++
+ .../istepdispatcher/istepdispatcher.C | 27 +++++++++++++++++++
+ 2 files changed, 32 insertions(+)
+
+diff --git a/src/usr/initservice/istepdispatcher/HBconfig b/src/usr/initservice/istepdispatcher/HBconfig
+index 7987f8ef3..ccbd43854 100644
+--- a/src/usr/initservice/istepdispatcher/HBconfig
++++ b/src/usr/initservice/istepdispatcher/HBconfig
+@@ -21,6 +21,11 @@ config ISTEP_LPC_PORT80_DEBUG
+ help
+ Writes ISTEP progress to LPC port 80h.
+
++config ISTEP_LPC_PORT8X_DEBUG
++ default n
++ help
++ Writes detailed ISTEP progress to LPC port 81h / 82h.
++
+ config HANG_ON_MFG_SRC_TERM
+ default y
+ help
+diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
+index e8db88f33..8f2d57298 100644
+--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
++++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
+@@ -2521,6 +2521,33 @@ errlHndl_t IStepDispatcher::sendProgressCode(bool i_needsLock)
+ port80_val++;
+ #endif
+
++#ifdef CONFIG_ISTEP_LPC_PORT8X_DEBUG
++ // Detailed istep output for consumption by BMC on e.g. RCS Talos II systems.
++ //
++ // Due to FSI silicon issues, those platforms may fail to start correctly
++ // if the BMC is not aware of the exact ISTEP being run to control BMC
++ // service sequencing.
++ //
++ // NEVER output fake values here, only real ISTEP data.
++ // Data is latched in on write to port 82h
++ uint8_t port81_val = iv_curIStep & 0xff;
++ uint8_t port82_val = iv_curSubStep & 0xff;
++ size_t port81_len = sizeof(port81_val);
++ size_t port82_len = sizeof(port82_val);
++ // Write port 81h first
++ err = deviceWrite(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
++ &port81_val, port81_len,
++ DEVICE_LPC_ADDRESS(LPC::TRANS_IO, 0x81));
++ delete err; // this is debug only, ignore any errors
++ err = NULL;
++ // Then write port 82h, latching in the full 16-bit value for read
++ err = deviceWrite(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
++ &port82_val, port82_len,
++ DEVICE_LPC_ADDRESS(LPC::TRANS_IO, 0x82));
++ delete err; // this is debug only, ignore any errors
++ err = NULL;
++#endif
++
+ #ifdef CONFIG_CONSOLE_OUTPUT_PROGRESS
+ //--- Display step on serial console
+ if ((iv_curIStep != lastIstep) || (iv_curSubStep != lastSubstep))
+--
+2.23.0
+
diff --git a/openpower/patches/mihawk-patches/hostboot/hostboot-20200728-changed-Delay-registers-and-RD-VERF-registers-values.patch b/openpower/patches/mihawk-patches/hostboot/hostboot-20200728-changed-Delay-registers-and-RD-VERF-registers-values.patch
new file mode 100644
index 0000000..98198ad
--- /dev/null
+++ b/openpower/patches/mihawk-patches/hostboot/hostboot-20200728-changed-Delay-registers-and-RD-VERF-registers-values.patch
@@ -0,0 +1,378 @@
+diff -Nuar hostboot-A/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_training.C hostboot-B/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_training.C
+--- hostboot-A/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_training.C 2020-06-23 00:00:29.000000000 +0800
++++ hostboot-B/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_training.C 2020-07-28 14:01:06.787757875 +0800
+@@ -473,6 +473,8 @@
+
+ // Sets up the RD VREF sense workaround
+ FAPI_TRY( mss::workarounds::dp16::rd_vref_vref_sense_cleanup( i_target ) );
++
++ FAPI_TRY( mss::workarounds::dp16::Modify_rd_vref_val( i_target ) );
+
+ fapi_try_exit:
+ return fapi2::current_err;
+diff -Nuar hostboot-A/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C hostboot-B/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C
+--- hostboot-A/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C 2020-06-23 00:00:29.000000000 +0800
++++ hostboot-B/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C 2020-07-28 15:05:57.606781063 +0800
+@@ -130,6 +130,204 @@
+ return fapi2::current_err;
+ }
+
++fapi2::ReturnCode delay_setting_registers(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,const uint64_t i_rp )
++{
++ // Runs the cleanup here
++ static const std::vector<uint64_t> l_addrs =
++ {
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY0_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY1_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY2_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY3_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY4_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY5_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY6_RANK_PAIR3_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR0_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR0_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR0_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR0_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR0_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR1_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR1_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR1_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR1_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR1_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR2_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR2_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR2_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR2_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR2_P0_4,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR3_P0_0,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR3_P0_1,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR3_P0_2,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR3_P0_3,
++ MCA_DDRPHY_DP16_READ_DELAY7_RANK_PAIR3_P0_4,
++ };
++
++ char dest[19];
++ char ans[]="pu.mca:k0:n0:s0:p00";
++ const char*src = mss::c_str(i_target);
++ strncpy(dest, src, 19);
++ int add = 0;
++
++ if(strncmp(dest,ans,19) == 0){
++ add = 1542;
++ }
++ else{
++ add = 1028;
++ }
++
++ for(const auto& l_reg : l_addrs)
++ {
++ fapi2::buffer<uint64_t> l_data;
++
++ // Gets the data
++ FAPI_TRY(mss::getScom(i_target, l_reg, l_data));
++
++ l_data=l_data+add;
++
++ // Writes the data
++ FAPI_TRY(mss::putScom(i_target, l_reg, l_data));
++ }
++
++
++fapi_try_exit:
++ return fapi2::current_err;
++}
++
+ } // close namespace nvdimm
+
+ namespace dp16
+@@ -216,6 +414,104 @@
+ return fapi2::current_err;
+ }
+
++fapi2::ReturnCode MCBIST0_modify_vref_val(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target)
++{
++ // Runs the cleanup here
++ //MCBIST0
++ static const std::vector<uint64_t> l_addrs_mcbist0 =
++ {
++ // DP0
++ MCA_DDRPHY_DP16_RD_VREF_DAC_0_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_1_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_2_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_3_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_4_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_5_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_6_P0_0,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_7_P0_0,
++
++ // DP1
++ MCA_DDRPHY_DP16_RD_VREF_DAC_0_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_1_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_2_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_3_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_4_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_5_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_6_P0_1,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_7_P0_1,
++
++ // DP2
++ MCA_DDRPHY_DP16_RD_VREF_DAC_0_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_1_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_2_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_3_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_4_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_5_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_6_P0_2,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_7_P0_2,
++
++ // DP3
++ MCA_DDRPHY_DP16_RD_VREF_DAC_0_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_1_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_2_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_3_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_4_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_5_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_6_P0_3,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_7_P0_3,
++
++ // DP4 - we only have 8 bits here, so 4 registers
++ MCA_DDRPHY_DP16_RD_VREF_DAC_0_P0_4,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_1_P0_4,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_2_P0_4,
++ MCA_DDRPHY_DP16_RD_VREF_DAC_3_P0_4,
++ };
++
++ char dest[19];
++ char ans[]="pu.mca:k0:n0:s0:p00";
++ const char*src = mss::c_str(i_target);
++ strncpy(dest, src, 19);
++ int decrease = 0;
++ if(strncmp(dest,ans,19) == 0){
++ decrease=2;
++ }
++ else{
++ decrease=3;
++ }
++
++ // Note: this bit does not exist in our scom def, so constexpr'ing it here
++ //constexpr uint64_t VREFSENSE_BIT = 62; //62
++
++ for(const auto& l_reg : l_addrs_mcbist0)
++ {
++ fapi2::buffer<uint64_t> l_data;
++ // Gets the data
++ FAPI_TRY(mss::getScom(i_target, l_reg, l_data));
++
++ l_data=l_data-decrease;
++
++ // Writes the data
++ FAPI_TRY(mss::putScom(i_target, l_reg, l_data));
++ }
++
++fapi_try_exit:
++ return fapi2::current_err;
++}
++
++fapi2::ReturnCode Modify_rd_vref_val( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target )
++{
++ // If the workaround does not need to be run, return success
++ if(mss::chip_ec_feature_skip_rd_vref_vrefsense_override(i_target))
++ {
++ return fapi2::FAPI2_RC_SUCCESS;
++ }
++
++ //Modify the value for MCBIST0 (decrease p00:5 p01:3)
++ MCBIST0_modify_vref_val( i_target);
++
++ return fapi2::FAPI2_RC_SUCCESS;
++}
++
+ ///
+ /// @brief Workarounds for after training
+ /// @param[in] i_target the fapi2 target of the port
+diff -Nuar hostboot-A/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H hostboot-B/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H
+--- hostboot-A/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H 2020-06-23 00:00:29.000000000 +0800
++++ hostboot-B/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H 2020-07-28 14:01:06.803758043 +0800
+@@ -92,6 +92,8 @@
+ ///
+ fapi2::ReturnCode adjust_rd_dq_delay( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, const uint64_t i_rp );
+
++fapi2::ReturnCode delay_setting_registers(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,const uint64_t i_rp );
++
+ } // close namespace nvdimm
+
+ namespace dp16
+@@ -311,6 +313,14 @@
+
+ ///
+ /// @brief Cleans up the VREF sense values after training
++/// @param[in] i_target the fapi2 target of the port
++/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok
++/// @note This function is called after training - it will only be run after coarse wr/rd
++///
++fapi2::ReturnCode Modify_rd_vref_val( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target );
++
++///
++/// @brief Cleans up the VREF sense values after training
+ /// @param[in] i_target the fapi2 target of the port
+ /// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok
+ /// @note This function is called after training - it will only be run after coarse wr/rd
+diff -Nuar hostboot-A/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_training_adv.C hostboot-B/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_training_adv.C
+--- hostboot-A/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_training_adv.C 2020-06-23 00:00:29.000000000 +0800
++++ hostboot-B/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_training_adv.C 2020-07-28 14:01:06.767757666 +0800
+@@ -112,9 +112,11 @@
+ // Returned from set_rank_pairs, it tells us how many rank pairs
+ // we configured on this port.
+ std::vector<uint64_t> l_pairs;
+-
++ int size;
++
+ // Get our rank pairs.
+ FAPI_TRY( mss::rank::get_rank_pairs(p, l_pairs), "Error in p9_mss_draminit_training" );
++ size=l_pairs.size();
+
+ // For each rank pair we need to calibrate, pop a ccs instruction in an array and execute it.
+ // NOTE: IF YOU CALIBRATE MORE THAN ONE RANK PAIR PER CCS PROGRAM, MAKE SURE TO CHANGE
+@@ -129,6 +131,12 @@
+
+ // Adjusts values for NVDIMM's
+ FAPI_TRY(mss::workarounds::nvdimm::adjust_rd_dq_delay(p, rp));
++
++ if (rp ==l_pairs[size-1])
++ {
++ //Modify the value for delay
++ FAPI_TRY( mss::workarounds::nvdimm::delay_setting_registers(p,rp));
++ }
diff --git a/openpower/patches/mihawk-patches/openpower-pnor/openpower-pnor-20191118-change-kernel-size-to-24MB.patch b/openpower/patches/mihawk-patches/openpower-pnor/openpower-pnor-20200618-change-kernel-size-to-24MB.patch
similarity index 69%
rename from openpower/patches/mihawk-patches/openpower-pnor/openpower-pnor-20191118-change-kernel-size-to-24MB.patch
rename to openpower/patches/mihawk-patches/openpower-pnor/openpower-pnor-20200618-change-kernel-size-to-24MB.patch
index 92a70a2..d8a20a5 100644
--- a/openpower/patches/mihawk-patches/openpower-pnor/openpower-pnor-20191118-change-kernel-size-to-24MB.patch
+++ b/openpower/patches/mihawk-patches/openpower-pnor/openpower-pnor-20200618-change-kernel-size-to-24MB.patch
@@ -1,5 +1,3 @@
-diff --git a/p9Layouts/defaultPnorLayout_64.xml b/p9Layouts/defaultPnorLayout_64.xml
-index 3f74223..86b8053 100644
--- a/p9Layouts/defaultPnorLayout_64.xml
+++ b/p9Layouts/defaultPnorLayout_64.xml
@@ -222,10 +222,10 @@ Layout Description
@@ -9,7 +7,7 @@
- <description>Bootloader Kernel (15.5MB)</description>
+ <description>Bootloader Kernel (24MB)</description>
<eyeCatch>BOOTKERNEL</eyeCatch>
- <physicalOffset>0x2141000</physicalOffset>
+ <physicalOffset>0x21C1000</physicalOffset>
- <physicalRegionSize>0xF80000</physicalRegionSize>
+ <physicalRegionSize>0x1800000</physicalRegionSize>
<side>A</side>
@@ -19,8 +17,8 @@
<section>
<description>OCC Lid (1.125M)</description>
<eyeCatch>OCC</eyeCatch>
-- <physicalOffset>0x30C1000</physicalOffset>
-+ <physicalOffset>0x3941000</physicalOffset>
+- <physicalOffset>0x3141000</physicalOffset>
++ <physicalOffset>0x39C1000</physicalOffset>
<physicalRegionSize>0x120000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -28,8 +26,8 @@
<section>
<description>Checkstop FIR data (12K)</description>
<eyeCatch>FIRDATA</eyeCatch>
-- <physicalOffset>0x31E1000</physicalOffset>
-+ <physicalOffset>0x3A61000</physicalOffset>
+- <physicalOffset>0x3261000</physicalOffset>
++ <physicalOffset>0x3AE1000</physicalOffset>
<physicalRegionSize>0x3000</physicalRegionSize>
<side>A</side>
<ecc/>
@@ -37,8 +35,8 @@
<section>
<description>CAPP Lid (144K)</description>
<eyeCatch>CAPP</eyeCatch>
-- <physicalOffset>0x31E4000</physicalOffset>
-+ <physicalOffset>0x3A64000</physicalOffset>
+- <physicalOffset>0x3264000</physicalOffset>
++ <physicalOffset>0x3AE4000</physicalOffset>
<physicalRegionSize>0x24000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -46,8 +44,8 @@
<section>
<description>BMC Inventory (36K)</description>
<eyeCatch>BMC_INV</eyeCatch>
-- <physicalOffset>0x3208000</physicalOffset>
-+ <physicalOffset>0x3A88000</physicalOffset>
+- <physicalOffset>0x3288000</physicalOffset>
++ <physicalOffset>0x3B08000</physicalOffset>
<physicalRegionSize>0x9000</physicalRegionSize>
<side>sideless</side>
<reprovision/>
@@ -55,8 +53,8 @@
<section>
<description>Hostboot Bootloader (28K)</description>
<eyeCatch>HBBL</eyeCatch>
-- <physicalOffset>0x3211000</physicalOffset>
-+ <physicalOffset>0x3A91000</physicalOffset>
+- <physicalOffset>0x3291000</physicalOffset>
++ <physicalOffset>0x3B11000</physicalOffset>
<!-- Physical Size includes Header rounded to ECC valid size -->
<!-- Max size of actual HBBL content is 20K and 22.5K with ECC -->
<physicalRegionSize>0x7000</physicalRegionSize>
@@ -64,8 +62,8 @@
<section>
<description>Temporary Attribute Override (32K)</description>
<eyeCatch>ATTR_TMP</eyeCatch>
-- <physicalOffset>0x3218000</physicalOffset>
-+ <physicalOffset>0x3A98000</physicalOffset>
+- <physicalOffset>0x3298000</physicalOffset>
++ <physicalOffset>0x3B18000</physicalOffset>
<physicalRegionSize>0x8000</physicalRegionSize>
<side>A</side>
<reprovision/>
@@ -73,8 +71,8 @@
<section>
<description>Permanent Attribute Override (32K)</description>
<eyeCatch>ATTR_PERM</eyeCatch>
-- <physicalOffset>0x3220000</physicalOffset>
-+ <physicalOffset>0x3AA0000</physicalOffset>
+- <physicalOffset>0x32A0000</physicalOffset>
++ <physicalOffset>0x3B20000</physicalOffset>
<physicalRegionSize>0x8000</physicalRegionSize>
<side>A</side>
<ecc/>
@@ -82,8 +80,8 @@
<section>
<description>PNOR Version (4K)</description>
<eyeCatch>VERSION</eyeCatch>
-- <physicalOffset>0x3228000</physicalOffset>
-+ <physicalOffset>0x3AA8000</physicalOffset>
+- <physicalOffset>0x32A8000</physicalOffset>
++ <physicalOffset>0x3B28000</physicalOffset>
<physicalRegionSize>0x2000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -91,8 +89,8 @@
<section>
<description>IMA Catalog (256K)</description>
<eyeCatch>IMA_CATALOG</eyeCatch>
-- <physicalOffset>0x322A000</physicalOffset>
-+ <physicalOffset>0x3AAA000</physicalOffset>
+- <physicalOffset>0x32AA000</physicalOffset>
++ <physicalOffset>0x3B2A000</physicalOffset>
<physicalRegionSize>0x40000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -100,8 +98,8 @@
<section>
<description>Ref Image Ring Overrides (128K)</description>
<eyeCatch>RINGOVD</eyeCatch>
-- <physicalOffset>0x326A000</physicalOffset>
-+ <physicalOffset>0x3AEA000</physicalOffset>
+- <physicalOffset>0x32EA000</physicalOffset>
++ <physicalOffset>0x3B6A000</physicalOffset>
<physicalRegionSize>0x20000</physicalRegionSize>
<side>A</side>
</section>
@@ -109,8 +107,8 @@
<!-- We need 266KB per module sort, going to support
10 sorts by default, plus ECC -->
<eyeCatch>WOFDATA</eyeCatch>
-- <physicalOffset>0x328A000</physicalOffset>
-+ <physicalOffset>0x3B0A000</physicalOffset>
+- <physicalOffset>0x330A000</physicalOffset>
++ <physicalOffset>0x3B8A000</physicalOffset>
<physicalRegionSize>0x300000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -118,8 +116,8 @@
<section>
<description>Hostboot deconfig area (64KB)</description>
<eyeCatch>HB_VOLATILE</eyeCatch>
-- <physicalOffset>0x358A000</physicalOffset>
-+ <physicalOffset>0x3E0A000</physicalOffset>
+- <physicalOffset>0x360A000</physicalOffset>
++ <physicalOffset>0x3E8A000</physicalOffset>
<physicalRegionSize>0x5000</physicalRegionSize>
<side>A</side>
<reprovision/>
@@ -127,8 +125,8 @@
<section>
<description>Memory config data (28K)</description>
<eyeCatch>MEMD</eyeCatch>
-- <physicalOffset>0x358F000</physicalOffset>
-+ <physicalOffset>0x3E0F000</physicalOffset>
+- <physicalOffset>0x360F000</physicalOffset>
++ <physicalOffset>0x3E8F000</physicalOffset>
<physicalRegionSize>0xE000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -136,8 +134,8 @@
<section>
<description>SecureBoot Key Transition Partition (16K)</description>
<eyeCatch>SBKT</eyeCatch>
-- <physicalOffset>0x359D000</physicalOffset>
-+ <physicalOffset>0x3E1D000</physicalOffset>
+- <physicalOffset>0x361D000</physicalOffset>
++ <physicalOffset>0x3E9D000</physicalOffset>
<physicalRegionSize>0x4000</physicalRegionSize>
<side>A</side>
<sha512Version/>
@@ -145,8 +143,8 @@
<section>
<description>HDAT binary data (32KB)</description>
<eyeCatch>HDAT</eyeCatch>
-- <physicalOffset>0x35A1000</physicalOffset>
-+ <physicalOffset>0x3E21000</physicalOffset>
+- <physicalOffset>0x3621000</physicalOffset>
++ <physicalOffset>0x3EA1000</physicalOffset>
<physicalRegionSize>0x8000</physicalRegionSize>
<side>sideless</side>
<sha512Version/>
@@ -154,8 +152,17 @@
<section>
<description>Ultravisor binary image (1MB)</description>
<eyeCatch>UVISOR</eyeCatch>
-- <physicalOffset>0x35A9000</physicalOffset>
-+ <physicalOffset>0x3E29000</physicalOffset>
+- <physicalOffset>0x3629000</physicalOffset>
++ <physicalOffset>0x3EA9000</physicalOffset>
<physicalRegionSize>0x100000</physicalRegionSize>
<side>sideless</side>
<sha512Version/>
+@@ -389,7 +389,7 @@ Layout Description
+ <section>
+ <description>Hostboot Runtime Proxy (32KB)</description>
+ <eyeCatch>HBRT_PROXY</eyeCatch>
+- <physicalOffset>0x3729000</physicalOffset>
++ <physicalOffset>0x3FA9000</physicalOffset>
+ <physicalRegionSize>0x8000</physicalRegionSize>
+ <side>A</side>
+ <sha512Version/>
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0001-Memory-Interleaving-Grouping-change-for-p8dtu.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0001-Memory-Interleaving-Grouping-change-for-p8dtu.patch
deleted file mode 100644
index acdb1c0..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0001-Memory-Interleaving-Grouping-change-for-p8dtu.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From e6db702ece6f5d13c7d0b288203a0715b4a2a35b Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 18 Oct 2016 16:08:13 -0700
-Subject: [PATCH 01/14] Memory Interleaving Grouping change for p8dtu. Allow
- not adjacent pair for p8dtu.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/targeting/common/xmltohb/attribute_types.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
-index 0fc5f4eac..d7fc183a4 100644
---- a/src/usr/targeting/common/xmltohb/attribute_types.xml
-+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
-@@ -13812,7 +13812,7 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
- </description>
- <simpleType>
- <uint8_t>
-- <default>1</default>
-+ <default>0</default>
- </uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0002-Support-130W-Turismo-Parts.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0002-Support-130W-Turismo-Parts.patch
deleted file mode 100644
index 9b3c4b0..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0002-Support-130W-Turismo-Parts.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3040a458385e82d7d9edf7b926fcdba641d0a048 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 18 Oct 2016 16:12:21 -0700
-Subject: [PATCH 02/14] Support 130W Turismo Parts.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/targeting/common/xmltohb/attribute_types.xml | 2 +-
- src/usr/targeting/common/xmltohb/target_types.xml | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
-index d7fc183a4..0f0e2f6a7 100644
---- a/src/usr/targeting/common/xmltohb/attribute_types.xml
-+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
-@@ -15890,7 +15890,7 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
- <simpleType>
- <enumeration>
- <id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id>
-- <default>UNSUPPORTED_FREQ</default>
-+ <default>2000_MHZ_OR_2400_MHZ</default>
- </enumeration>
- </simpleType>
- <persistency>non-volatile</persistency>
-diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
-index b28607ca2..a150ce64d 100644
---- a/src/usr/targeting/common/xmltohb/target_types.xml
-+++ b/src/usr/targeting/common/xmltohb/target_types.xml
-@@ -681,7 +681,7 @@
- </attribute>
- <attribute>
- <id>DEFAULT_PROC_MODULE_NEST_FREQ_MHZ</id>
-- <default>2400</default>
-+ <default>2000</default>
- </attribute>
- </targetType>
-
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0003-Add-support-for-memory-voltage-control-for-p8dtu.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0003-Add-support-for-memory-voltage-control-for-p8dtu.patch
deleted file mode 100644
index 4f6b021..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0003-Add-support-for-memory-voltage-control-for-p8dtu.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 783332cc9afcf3c8581760112162b650a9e01c7e Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 4 Oct 2016 16:07:44 -0700
-Subject: [PATCH 03/14] Adds support for memory voltage control specific to the p8dtu platform.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/hwpf/hwp/dram_training/palmetto_vddr.C | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C b/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C
-index b0f6bed4c..95c3924b8 100644
---- a/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C
-+++ b/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C
-@@ -168,6 +168,7 @@ static errlHndl_t for_each_vddr_domain_with_functional_memory(
- std::sort(l_membufTargetList.begin(), l_membufTargetList.end(),
- compareTargetsGpioInfos);
-
-+/*
- // Prune out targets with non-unique GPIO info
- std::vector<TARGETING::TargetHandle_t>::iterator
- pInvalidEntries = std::unique(
-@@ -175,6 +176,7 @@ static errlHndl_t for_each_vddr_domain_with_functional_memory(
- l_membufTargetList.end(),
- areTargetsGpioInfoEqual);
- l_membufTargetList.erase(pInvalidEntries,l_membufTargetList.end());
-+*/
-
- // Invoke callback for one Centaur per unique VDDR domain
- for (TargetHandleList::iterator
-@@ -274,6 +276,7 @@ static errlHndl_t pca95xGpioWriteBit(TARGETING::Target * i_target,
- i_val);
-
- // Configure gpio bit as output (if necessary).
-+/*
- if(!err)
- {
- err = pca95xGpioSetBit(i_target,
-@@ -281,6 +284,7 @@ static errlHndl_t pca95xGpioWriteBit(TARGETING::Target * i_target,
- i_gpio_pin,
- PCA95X_GPIO_CONFIG_OUTPUT);
- }
-+*/
-
- return err;
- }
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0004-change-esel-command-netfn-to-IBM-0x3a.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0004-change-esel-command-netfn-to-IBM-0x3a.patch
deleted file mode 100644
index 3215bc2..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0004-change-esel-command-netfn-to-IBM-0x3a.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From eee0dcae475618bef686198baf28c750de9a63a5 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 11 Oct 2016 10:00:15 -0700
-Subject: [PATCH 04/14] change esel command netfn to IBM 0x3a
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/include/usr/ipmi/ipmiif.H | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
-index 5c2444f26..94fca5fb6 100644
---- a/src/include/usr/ipmi/ipmiif.H
-+++ b/src/include/usr/ipmi/ipmiif.H
-@@ -265,7 +265,7 @@ namespace IPMI
-
- //AMI-specific storage messages
- inline const command_t partial_add_esel(void)
-- { return std::make_pair(NETFUN_AMI, 0xf0); }
-+ { return std::make_pair(NETFUN_IBM, 0xf0); }
-
- // event messages
- inline const command_t platform_event(void)
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0005-change-pnor-response-command-to-0x7.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0005-change-pnor-response-command-to-0x7.patch
deleted file mode 100644
index 943b471..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0005-change-pnor-response-command-to-0x7.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 50ae9cf95223a5f6492e7e515ccef9d4499ef823 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 11 Oct 2016 10:03:01 -0700
-Subject: [PATCH 05/14] change pnor response command to 0x7
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/include/usr/ipmi/ipmiif.H | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
-index 94fca5fb6..4b41cb3bc 100644
---- a/src/include/usr/ipmi/ipmiif.H
-+++ b/src/include/usr/ipmi/ipmiif.H
-@@ -289,7 +289,7 @@ namespace IPMI
- { return std::make_pair(NETFUN_IBM, 0x07); }
-
- inline const command_t pnor_response(void)
-- { return std::make_pair(NETFUN_IBM, 0x08); }
-+ { return std::make_pair(NETFUN_IBM, 0x07); }
-
- inline const command_t hiomap_event(void)
- { return std::make_pair(NETFUN_IBM, 0x0f); }
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0006-send-board-ID-to-ipmi.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0006-send-board-ID-to-ipmi.patch
deleted file mode 100644
index 58ddb2d..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0006-send-board-ID-to-ipmi.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 73ba34b74551c5f61a1f2c93f48a7f59cb576cd6 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 11 Oct 2016 10:26:14 -0700
-Subject: [PATCH 06/14] send board ID to ipmi
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/include/usr/ipmi/ipmiif.H | 6 ++++-
- src/include/usr/ipmi/ipmipowerstate.H | 2 +-
- .../initservice/istepdispatcher/istepdispatcher.C | 11 ++++++++
- src/usr/ipmiext/ipmipowerstate.C | 29 ++++++++++++++++++++++
- 4 files changed, 46 insertions(+), 2 deletions(-)
-
-diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
-index 4b41cb3bc..8039adbf7 100644
---- a/src/include/usr/ipmi/ipmiif.H
-+++ b/src/include/usr/ipmi/ipmiif.H
-@@ -299,7 +299,11 @@ namespace IPMI
- // user defined power limit from the BMC.
- inline const command_t get_power_limit(void)
- { return std::make_pair(NETFUN_GRPEXT, 0x03); }
--
-+
-+ //SMC
-+ inline const command_t set_board_id(void)
-+ { return std::make_pair(NETFUN_NONE, 0x20); }
-+
- // Some helper messages
- // Used to create an empty message for reception
- inline const command_t no_command(void)
-diff --git a/src/include/usr/ipmi/ipmipowerstate.H b/src/include/usr/ipmi/ipmipowerstate.H
-index b65275075..e943e8b66 100644
---- a/src/include/usr/ipmi/ipmipowerstate.H
-+++ b/src/include/usr/ipmi/ipmipowerstate.H
-@@ -78,7 +78,7 @@ enum ACPI_DEVICE_POWER_STATE_TO_SET
- */
- errlHndl_t setACPIPowerState();
-
--
-+errlHndl_t SmcsetBoardId();
- } // namespace
-
- #endif
-diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
-index 16f1c8a01..0f9731094 100644
---- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
-+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
-@@ -284,6 +284,17 @@ void IStepDispatcher::init(errlHndl_t &io_rtaskRetErrl)
- err_ipmi->collectTrace("INITSVC", 1024);
- errlCommit(err_ipmi, INITSVC_COMP_ID );
- }
-+ //send board ID
-+ errlHndl_t err_ipmi1 = IPMI::SmcsetBoardId();
-+
-+ if(err_ipmi1)
-+ {
-+ TRACFCOMP(g_trac_initsvc,
-+ "init: ERROR: IPMI set Board Id Failed");
-+ err_ipmi->collectTrace("INITSVC", 1024);
-+ errlCommit(err_ipmi1, INITSVC_COMP_ID );
-+ }
-+
- #endif
-
-
-diff --git a/src/usr/ipmiext/ipmipowerstate.C b/src/usr/ipmiext/ipmipowerstate.C
-index 30c2a70ef..f8e61f82b 100644
---- a/src/usr/ipmiext/ipmipowerstate.C
-+++ b/src/usr/ipmiext/ipmipowerstate.C
-@@ -50,6 +50,35 @@ namespace IPMI
- /******************************************************************************/
- // Functions
- /******************************************************************************/
-+errlHndl_t SmcsetBoardId()
-+{
-+ errlHndl_t err_ipmi = NULL;
-+
-+ size_t len = 10;
-+
-+ //create request data buffer
-+ uint8_t* data = new uint8_t[len];
-+
-+ IPMI::completion_code cc = IPMI::CC_UNKBAD;
-+ //P8DTU board ID 0933
-+ data[0] = 0x33;
-+ data[1] = 0x9;
-+ memset(&data[2], 0, 8);
-+ err_ipmi = IPMI::sendrecv(IPMI::set_board_id(), cc, len, data);
-+
-+ //cleanup buffer
-+ delete[] data;
-+
-+ if(cc != IPMI::CC_OK)
-+ {
-+ IPMI_TRAC("Set board id: BMC returned not ok CC[%x]",cc);
-+ // should we log error and then retry?
-+ // what happens if the communication is broken
-+ // reset will try and set it again.
-+ }
-+
-+ return err_ipmi;
-+}
-
- errlHndl_t setACPIPowerState()
- {
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0007-read-riser-id-from-CPLD.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0007-read-riser-id-from-CPLD.patch
deleted file mode 100644
index af19f74..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0007-read-riser-id-from-CPLD.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 94de2f7f944a2cabbdf699adcbc6679a091ad324 Mon Sep 17 00:00:00 2001
-From: Leoluo <leoluo@supermicro.com>
-Date: Tue, 8 Mar 2016 17:01:26 -0800
-Subject: [PATCH 07/14] read riser id from CPLD
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/include/usr/ipmi/ipmiif.H | 3 ++
- src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C | 42 +++++++++++++++++++++++++-
- 2 files changed, 44 insertions(+), 1 deletion(-)
-
-diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
-index 8039adbf7..9dfd8ee63 100644
---- a/src/include/usr/ipmi/ipmiif.H
-+++ b/src/include/usr/ipmi/ipmiif.H
-@@ -238,6 +238,9 @@ namespace IPMI
- inline const command_t get_capabilities(void)
- { return std::make_pair(NETFUN_APP, 0x36); }
-
-+ inline const command_t master_readwrite(void)
-+ { return std::make_pair(NETFUN_APP, 0x52); }
-+
-
- // Chassis messages
- inline const command_t chassis_power_off(void)
-diff --git a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
-index d122ae4de..73f1a0a3f 100644
---- a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
-+++ b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
-@@ -58,6 +58,8 @@
- // MVPD
- #include <devicefw/userif.H>
- #include <vpd/mvpdenums.H>
-+#include <ipmi/ipmiif.H>
-+
-
- #include <config.h>
-
-@@ -1743,7 +1745,40 @@ errlHndl_t computeProcPcieConfigAttrs(
- effectiveLaneSwap[iop] = laneSwap;
- }
- #endif
--
-+ uint8_t riser_id = 0 ;
-+ errlHndl_t l_err = NULL;
-+
-+
-+ size_t len = 4;
-+
-+ //create request data buffer
-+ uint8_t* data = new uint8_t[len];
-+
-+ IPMI::completion_code cc = IPMI::CC_UNKBAD;
-+
-+ data[0] = 0x3;
-+ data[1] = 0x70;
-+ data[2] = 0x1;
-+ data[3] = 0x1;
-+ l_err = IPMI::sendrecv(IPMI::master_readwrite(), cc, len, data);
-+
-+ if( l_err == NULL )
-+ {
-+ if( cc == IPMI::CC_OK )
-+ {
-+ riser_id = data[0];
-+ }
-+
-+ delete[] data;
-+ }
-+
-+
-+ if((i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>()) == 0x50001 && (riser_id == 0xE) ){
-+ effectiveLaneMask[1][0] = 0xFFFF;
-+ effectiveLaneMask[1][1] = 0x0000;
-+ effectiveLaneSwap[1] = 0x0;
-+ }
-+
- i_pProcChipTarget->setAttr<
- TARGETING::ATTR_PROC_PCIE_LANE_MASK>(effectiveLaneMask);
-
-@@ -1797,6 +1832,11 @@ errlHndl_t computeProcPcieConfigAttrs(
- iopConfig = laneConfigItr->laneConfig;
- phbActiveMask = laneConfigItr->phbActive;
-
-+ if((i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>()) == 0x50001 && (riser_id == 0xE) ){
-+ iopConfig = 0 ;
-+ phbActiveMask = PHB0_MASK|PHB1_MASK;
-+ }
-+
- // Disable applicable PHBs
- phbActiveMask &= (~disabledPhbs);
- (void)_deconfigPhbsBasedOnPciState(
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0008-Fill-board-mfg-time-and-date-in-FRU3.-It-is-read-fro.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0008-Fill-board-mfg-time-and-date-in-FRU3.-It-is-read-fro.patch
deleted file mode 100644
index 41c24b3..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0008-Fill-board-mfg-time-and-date-in-FRU3.-It-is-read-fro.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From ed60d5736559c4e100e5db20de942a584b58b6f0 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Wed, 25 May 2016 15:24:40 -0700
-Subject: [PATCH 08/14] Fill board mfg time and date in FRU3. It is read from
- PVPD:VNDR:IN.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/ipmiext/ipmifruinv.C | 65 +++++++++++++++++++++++++++++++++-----------
- 1 file changed, 49 insertions(+), 16 deletions(-)
-
-diff --git a/src/usr/ipmiext/ipmifruinv.C b/src/usr/ipmiext/ipmifruinv.C
-index 23aaf9b97..11fbd7677 100644
---- a/src/usr/ipmiext/ipmifruinv.C
-+++ b/src/usr/ipmiext/ipmifruinv.C
-@@ -1279,31 +1279,64 @@ errlHndl_t backplaneIpmiFruInv::buildChassisInfoArea(
- return l_errl;
- }
-
-+// Quick hexdigit to binary converter.
-+// Hopefull someday to replaced by strtoul
-+uint8_t aschex2bin(char c)
-+{
-+ if(c >= 'a' && c <= 'f')
-+ {
-+ c = c + 10 - 'a';
-+ }
-+ else if (c >= 'A' && c <= 'F')
-+ {
-+ c = c + 10 - 'A';
-+ }
-+ else if (c >= '0' && c <= '9')
-+ {
-+ c -= '0';
-+ }
-+ else return 0;// else it's not a hex digit, return 0
-+
-+ return c;
-+}
-+
-+
- errlHndl_t backplaneIpmiFruInv::buildBoardInfoArea(
- std::vector<uint8_t> &io_data)
- {
- errlHndl_t l_errl = NULL;
-+ std::vector<uint8_t> oem_data; //jim052316
-+ uint8_t i, data1, data2, data3;//jim052316
-
- do {
- //Set formatting data that goes at the beginning of the record
- preFormatProcessing(io_data, true);
-
-- // Set Mfg Build date
-- // Grab VPD data into seperate data vector
-- std::vector<uint8_t> mfgDateData;
-- l_errl = addVpdData(mfgDateData, PVPD::OPFR, PVPD::MB, false, false);
-- if (l_errl)
-- {
-- // The MB keyword was optional on older cards so just ignore
-- // any errors
-- delete l_errl;
-- l_errl = NULL;
-- }
-- else
-- {
-- // Pass that to the function that sets the Build date
-- setMfgData(io_data, mfgDateData);
-- }
-+ l_errl = addVpdData(oem_data, PVPD::VNDR, PVPD::IN, true);
-+ if (l_errl) { break; }
-+
-+ for (i=0; i < oem_data.size(); i++)
-+ TRACFCOMP(g_trac_ipmi,"Jimdebug board VNDR:IN data is 0x%x", oem_data[i]);
-+
-+ data1 = (aschex2bin(oem_data[5]) << 4) | aschex2bin(oem_data[6]);//jim052416
-+ data2 = (aschex2bin(oem_data[3]) << 4) | aschex2bin(oem_data[4]);
-+ data3 = (aschex2bin(oem_data[1]) << 4) | aschex2bin(oem_data[2]);
-+
-+
-+ TRACFCOMP(g_trac_ipmi,"Jimdebug push data1 is 0x%x", data1);
-+ TRACFCOMP(g_trac_ipmi,"Jimdebug push data2 is 0x%x", data2);
-+ TRACFCOMP(g_trac_ipmi,"Jimdebug push data3 is 0x%x", data3);
-+
-+
-+ io_data.push_back(data1);
-+ io_data.push_back(data2);
-+ io_data.push_back(data3);
-+
-+
-+ //Set MFG Date/Time - Blank
-+ //io_data.push_back(0x5E); //jim52016
-+ //io_data.push_back(0x9A);
-+ //io_data.push_back(0xA3);
-
- //Set Vendor Name - ascii formatted data
- l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VN, true);
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0009-Hardcode-DIMM-pairing-for-RAS.-Fix-the-issue-that-MB.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0009-Hardcode-DIMM-pairing-for-RAS.-Fix-the-issue-that-MB.patch
deleted file mode 100644
index c6f4a1c..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0009-Hardcode-DIMM-pairing-for-RAS.-Fix-the-issue-that-MB.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 9d8e17897f398f1f750c87c4dcf58fe9e64ffed9 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Thu, 7 Jul 2016 15:53:31 -0700
-Subject: [PATCH 09/14] Hardcode DIMM pairing for RAS. Fix the issue that MBA0
- Memory UE on Cenatur Chip4 brought all dimms under Proc2 offline.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/hwas/common/deconfigGard.C | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
-index fa266c881..bd4e4fe4c 100644
---- a/src/usr/hwas/common/deconfigGard.C
-+++ b/src/usr/hwas/common/deconfigGard.C
-@@ -980,8 +980,25 @@ Target * findPartnerForMcs(const Target *i_startMcs)
- // Declare partner MCS CHIP_UNIT
- ATTR_CHIP_UNIT_type partnerMcsUnit = 0;
-
-+ // Add temp code to handle different MCS pairing
-+ if (startMcsUnit == 0)
-+ {
-+ partnerMcsUnit = 4;
-+ }
-+ else if (startMcsUnit == 1)
-+ {
-+ partnerMcsUnit = 5;
-+ }
-+ else if (startMcsUnit == 4)
-+ {
-+ partnerMcsUnit = 0;
-+ }
-+ else if (startMcsUnit == 5)
-+ {
-+ partnerMcsUnit = 1;
-+ }
- // If CHIP_UNIT is even, its partner will be the next MCS
-- if (!(startMcsUnit % 2))
-+ else if (!(startMcsUnit % 2))
- {
- partnerMcsUnit = startMcsUnit + 1;
- }
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0010-Adjust-APSS-gain-and-offset-from-PWS-FRU-information.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0010-Adjust-APSS-gain-and-offset-from-PWS-FRU-information.patch
deleted file mode 100644
index 172d6ac..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0010-Adjust-APSS-gain-and-offset-from-PWS-FRU-information.patch
+++ /dev/null
@@ -1,308 +0,0 @@
-From bdd6ce1bbfe0ee77feefe84662e961fb253c6195 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Fri, 22 Jul 2016 17:50:57 -0700
-Subject: [PATCH 10/14] Adjust APSS gain and offset from PWS FRU information.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/include/usr/ipmi/ipmiif.H | 4 +-
- src/usr/htmgt/htmgt_cfgdata.C | 2 +
- src/usr/hwpf/hwp/start_payload/start_payload.C | 212 +++++++++++++++++++++
- .../common/xmltohb/attribute_types_hb.xml | 2 +
- 4 files changed, 218 insertions(+), 2 deletions(-)
-
-diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
-index 9dfd8ee63..5416ddca0 100644
---- a/src/include/usr/ipmi/ipmiif.H
-+++ b/src/include/usr/ipmi/ipmiif.H
-@@ -251,8 +251,8 @@ namespace IPMI
- inline const command_t set_sel_time(void)
- { return std::make_pair(NETFUN_STORAGE, 0x49); }
-
-- inline const command_t read_fru_data(void)
-- { return std::make_pair(NETFUN_STORAGE, 0x11); }
-+ inline const command_t read_fru_data(void)
-+ { return std::make_pair(NETFUN_STORAGE, 0x11); }
-
- inline const command_t write_fru_data(void)
- { return std::make_pair(NETFUN_STORAGE, 0x12); }
-diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C
-index 19e7b21bf..7c42abdb6 100644
---- a/src/usr/htmgt/htmgt_cfgdata.C
-+++ b/src/usr/htmgt/htmgt_cfgdata.C
-@@ -1025,6 +1025,8 @@ void getApssMessageData(uint8_t* o_data,
- ATTR_ADC_CHANNEL_OFFSETS_type offset;
- sys->tryGetAttr<ATTR_ADC_CHANNEL_OFFSETS>(offset);
-
-+ TMGT_INF("getApssMessageData: gain is %d, offset is %d", gain[15], offset[15]); //jim
-+
- CPPASSERT(sizeof(function) == sizeof(ground));
- CPPASSERT(sizeof(function) == sizeof(gain));
- CPPASSERT(sizeof(function) == sizeof(offset));
-diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C
-index 5d7865a12..ad155f19e 100644
---- a/src/usr/hwpf/hwp/start_payload/start_payload.C
-+++ b/src/usr/hwpf/hwp/start_payload/start_payload.C
-@@ -88,6 +88,7 @@
- #include <algorithm>
- #include <config.h>
- #include <ipmi/ipmiwatchdog.H>
-+#include <ipmi/ipmiif.H> //jim
- #include <vpd/vpd_if.H>
-
- #include <hwpf/hwpf_reasoncodes.H>
-@@ -95,6 +96,7 @@
- // Uncomment these files as they become available:
- // #include "host_start_payload/host_start_payload.H"
-
-+
- namespace START_PAYLOAD
- {
-
-@@ -277,6 +279,214 @@ errlHndl_t setMaxPstate ( void )
- }
- #endif
-
-+//jim-start
-+enum
-+{
-+PWS_1600 = 0,
-+PWS_1000 = 1,
-+PWS_1200 = 2,
-+PWS_UNKNOWN = 0xFE,
-+};
-+
-+uint8_t getPSUFRUFromIPMICommands(void)
-+{
-+ errlHndl_t l_err = NULL;
-+ uint8_t* frudata = new uint8_t[120];
-+ size_t len = 4;
-+ uint8_t fru_header_version = 0;
-+ uint8_t j = 0, loop_break = 0, read_offset = 0;
-+
-+ //create request data buffer
-+ uint8_t* data = new uint8_t[len];
-+
-+ IPMI::completion_code cc = IPMI::CC_UNKBAD;
-+
-+ data[0] = 60; //try to read from PWS1. 60-PWS1, 61-PWS2
-+ data[1] = 0x0;
-+ data[2] = 0x0;
-+ data[3] = 8;
-+ l_err = IPMI::sendrecv(IPMI::read_fru_data(), cc, len, data);
-+
-+ for (uint8_t i = 0; i <= 8; i++ )
-+ fru_header_version = data[1] & 0xF; //normal should be 0x01.
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "fru header version is %x", fru_header_version);
-+ delete[] data;
-+
-+ if((l_err == NULL) && (cc == IPMI::CC_OK) && (fru_header_version == 1))
-+ {
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "could get FRU from PWS1");
-+
-+ while ((l_err == NULL) && (loop_break == 0) && (read_offset < 100))
-+ {
-+ //create request data buffer
-+ len = 4; //must set len every time
-+ uint8_t* data = new uint8_t[len];
-+
-+ IPMI::completion_code cc = IPMI::CC_UNKBAD;
-+
-+ data[0] = 60; //read from PWS1
-+ data[1] = read_offset;
-+ data[2] = 0x0;
-+ data[3] = 8;
-+ l_err = IPMI::sendrecv(IPMI::read_fru_data(), cc, len, data);
-+
-+ if (cc != IPMI::CC_OK) loop_break = 1;
-+
-+ read_offset += 8;
-+ for (uint8_t i = 1; i <= 8; i++ )
-+ {
-+ frudata[j] = data[i];
-+ j++;
-+ }
-+ delete[] data;
-+ }
-+
-+
-+ }
-+ else
-+ {
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "could get FRU from PWS2");
-+
-+ while ((l_err == NULL) && (loop_break == 0) && (read_offset < 100))
-+ {
-+ //create request data buffer
-+ len = 4;//must set len every time
-+ uint8_t* data = new uint8_t[len];
-+
-+ IPMI::completion_code cc = IPMI::CC_UNKBAD;
-+
-+ data[0] = 61; //read from PWS2
-+ data[1] = read_offset;
-+ data[2] = 0x0;
-+ data[3] = 8;
-+ l_err = IPMI::sendrecv(IPMI::read_fru_data(), cc, len, data);
-+
-+ if (cc != IPMI::CC_OK) loop_break = 1;
-+
-+ read_offset += 8;
-+ for (uint8_t i = 1; i <= 8; i++ )
-+ {
-+ frudata[j] = data[i];
-+ j++;
-+ }
-+ delete[] data;
-+ }
-+
-+ }
-+
-+ uint8_t product_info_offset, manufacture_name_offset, manufacture_name_length, product_name_offset, product_name_length;
-+ uint8_t product_partnumber_offset, product_partnumber_length;
-+ uint8_t fru_offset, powerSupplyFru = PWS_UNKNOWN;
-+ uint8_t pws1600[] = {'P','W','S','-','1','K','6','2','A','-','1','R'};
-+ uint8_t pws1000[] = {'P','W','S','-','1','K','0','2','A','-','1','R'};
-+ uint8_t pws1200[] = {'P','W','S','-','1','K','2','2','A','-','1','R'};
-+
-+ //code to calculate product part number size and offset. should use structure. refer to FRU spec.
-+ product_info_offset = frudata[4] * 8;
-+ manufacture_name_offset = product_info_offset + 3;
-+ manufacture_name_length = frudata[manufacture_name_offset] & 0x3F;
-+ product_name_offset = manufacture_name_offset + manufacture_name_length + 1;
-+ product_name_length = frudata[product_name_offset] & 0x3F;
-+ product_partnumber_offset = product_name_offset + product_name_length + 1;
-+ product_partnumber_length = frudata[product_partnumber_offset] & 0x3F;
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "product_partnumber_length is %x", product_partnumber_length);
-+ fru_offset = product_partnumber_offset + 1;
-+
-+ if (product_partnumber_length == 12)
-+ {
-+ for (uint8_t i = 0; pws1600[i] == frudata[fru_offset + i] ; i ++)
-+ if (i == 11)
-+ powerSupplyFru = PWS_1600;
-+
-+ for (uint8_t i = 0; pws1000[i] == frudata[fru_offset + i] ; i ++)
-+ if (i == 11)
-+ powerSupplyFru = PWS_1000;
-+
-+ for (uint8_t i = 0; pws1200[i] == frudata[fru_offset + i] ; i ++)
-+ if (i == 11)
-+ powerSupplyFru = PWS_1200;
-+ }
-+ else
-+ powerSupplyFru = PWS_UNKNOWN;
-+
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "powerSupplyFru is %x", powerSupplyFru);
-+
-+ return powerSupplyFru;
-+
-+}
-+//find apss channel number from XML.
-+enum
-+{
-+V12_SENSE = 0,
-+PROC0_POWER = 1,
-+PROC1_POWER = 2,
-+PCIE_PROC0_POWER = 5,
-+PCIE_PROC1_POWER = 6,
-+TOTAL_SYSTEM_POWER = 15,
-+};
-+
-+void setAPSSGainOffsetFromPWSInfo(void)
-+{
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "before load OCC");
-+
-+ //Get Gain/Offset ATTR
-+ TARGETING::Target* sys = NULL;
-+ targetService().getTopLevelTarget(sys);
-+
-+ ATTR_ADC_CHANNEL_GAINS_type gain;
-+ sys->tryGetAttr<ATTR_ADC_CHANNEL_GAINS>(gain);
-+
-+ ATTR_ADC_CHANNEL_OFFSETS_type offset;
-+ sys->tryGetAttr<ATTR_ADC_CHANNEL_OFFSETS>(offset);
-+
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "gain is %d, offset is %d", gain[15], offset[15]);
-+
-+ //Note that the function/ APSS channel ids can be indirect. I've hardcoded here, you will need to look at the XML to find the channel/function number that matches
-+ //const uint8_t SYS_CHANNEL = 15; //APSS Channel 15 is sys power, ie the gain/offset we need to tweak
-+
-+ //Get power supply data from BMC
-+ uint8_t powerSupplyFru = getPSUFRUFromIPMICommands();
-+
-+ switch(powerSupplyFru)
-+ {
-+ case PWS_1600: //PWS-1K62A-1R (1600W):
-+ gain[TOTAL_SYSTEM_POWER] = 67800;
-+ offset[TOTAL_SYSTEM_POWER] = 0;
-+ break;
-+
-+ case PWS_1000: //PWS-1K02A-1R (1000W):
-+ gain[TOTAL_SYSTEM_POWER] = 41500;
-+ offset[TOTAL_SYSTEM_POWER] = 0;
-+ break;
-+
-+ case PWS_1200: //PWS-1K22A-1R (1200W):
-+ gain[TOTAL_SYSTEM_POWER] = 50000;
-+ offset[TOTAL_SYSTEM_POWER] = 0;
-+ break;
-+
-+ default:
-+ //Do nothing, leave defaults
-+ //Gen error for user attention?
-+ break;
-+ }
-+
-+ //Now write the attributes back so they get picked up by OCC code
-+ if (!sys->trySetAttr<ATTR_ADC_CHANNEL_GAINS>(gain))
-+ {
-+ //unlikely, crash
-+ //Emit failing trace/console data
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "set gain failed");
-+ assert(0);
-+ }
-+
-+ if (!sys->trySetAttr<ATTR_ADC_CHANNEL_OFFSETS>(offset))
-+ {
-+ //unlikely, crash
-+ //Emit failing trace/console data
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "set offset failed");
-+ assert(0);
-+ }
-+}
- //
- // Wrapper function to call host_runtime_setup
- //
-@@ -318,6 +528,8 @@ void* call_host_runtime_setup( void *io_pArgs )
- break;
- }
-
-+ setAPSSGainOffsetFromPWSInfo(); //jim add code before activate OCC. START_OCC_DURING_BOOT is defined in config.
-+
- bool l_activateOCC = is_avp_load();
-
- #ifdef CONFIG_START_OCC_DURING_BOOT
-diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-index c4eb6603d..64a0c9bae 100644
---- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-+++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-@@ -747,6 +747,7 @@
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
-+ <writeable/>
- </attribute>
-
- <attribute>
-@@ -758,6 +759,7 @@
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
-+ <writeable/>
- </attribute>
-
- <attribute>
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0012-Set-OPAL_MODEL-to-p8dtu1u-or-p8dtu2u-for-1U-and-2U-s.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0012-Set-OPAL_MODEL-to-p8dtu1u-or-p8dtu2u-for-1U-and-2U-s.patch
deleted file mode 100644
index bc4f492..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0012-Set-OPAL_MODEL-to-p8dtu1u-or-p8dtu2u-for-1U-and-2U-s.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 1e6bb450cf94fc3ade70f82703e6c57a30bbebaa Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Wed, 10 Aug 2016 10:41:32 -0700
-Subject: [PATCH 12/14] Set OPAL_MODEL to p8dtu1u or p8dtu2u for 1U and 2U
- system.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/hwpf/hwp/start_payload/start_payload.C | 66 +++++++++++++++++++++-
- .../common/xmltohb/attribute_types_hb.xml | 1 +
- 2 files changed, 66 insertions(+), 1 deletion(-)
-
-diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C
-index ad155f19e..80e62a0b6 100644
---- a/src/usr/hwpf/hwp/start_payload/start_payload.C
-+++ b/src/usr/hwpf/hwp/start_payload/start_payload.C
-@@ -89,6 +89,8 @@
- #include <config.h>
- #include <ipmi/ipmiwatchdog.H>
- #include <ipmi/ipmiif.H> //jim
-+#include <string.h> //jim
-+
- #include <vpd/vpd_if.H>
-
- #include <hwpf/hwpf_reasoncodes.H>
-@@ -487,6 +489,67 @@ void setAPSSGainOffsetFromPWSInfo(void)
- assert(0);
- }
- }
-+
-+
-+void setOpalMode (void)
-+{
-+
-+ uint8_t riser_id = 0 ;
-+ errlHndl_t l_err = NULL;
-+ size_t len = 4;
-+
-+ //create request data buffer
-+ uint8_t* data = new uint8_t[len];
-+
-+ IPMI::completion_code cc = IPMI::CC_UNKBAD;
-+
-+ data[0] = 0x3;
-+ data[1] = 0x70;
-+ data[2] = 0x1;
-+ data[3] = 0x2; //offset 0x2 for UIO info
-+ l_err = IPMI::sendrecv(IPMI::master_readwrite(), cc, len, data);
-+
-+ if( l_err == NULL )
-+ {
-+ if( cc == IPMI::CC_OK )
-+ {
-+ riser_id = data[0];
-+ }
-+
-+ delete[] data;
-+ }
-+
-+ATTR_OPAL_MODEL_type l_model = {0};
-+
-+TARGETING::Target* sys = NULL;
-+targetService().getTopLevelTarget(sys);
-+
-+sys->tryGetAttr<TARGETING::ATTR_OPAL_MODEL>(l_model);
-+TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "OPAL Mode is %s", l_model);
-+TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Riser ID is %d", riser_id);
-+
-+if (riser_id == 0x9)
-+ {
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "1U OPAL Mode");
-+ strcpy (l_model, "supermicro,p8dtu1u");
-+
-+ }
-+else //(riser_id == 0x19)
-+ {
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "2U OPAL Mode");
-+ strcpy (l_model, "supermicro,p8dtu2u");
-+ }
-+
-+if (!sys->trySetAttr<TARGETING::ATTR_OPAL_MODEL>(l_model))
-+ {
-+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "set OPAL Mode failed");
-+ assert(0);
-+ }
-+
-+sys->tryGetAttr<TARGETING::ATTR_OPAL_MODEL>(l_model);
-+TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "after set, OPAL Mode is %s", l_model);
-+
-+}
- //
- // Wrapper function to call host_runtime_setup
- //
-@@ -529,7 +592,8 @@ void* call_host_runtime_setup( void *io_pArgs )
- }
-
- setAPSSGainOffsetFromPWSInfo(); //jim add code before activate OCC. START_OCC_DURING_BOOT is defined in config.
--
-+ setOpalMode(); //jim
-+
- bool l_activateOCC = is_avp_load();
-
- #ifdef CONFIG_START_OCC_DURING_BOOT
-diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-index 64a0c9bae..3cfdb9aa0 100644
---- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-+++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-@@ -966,6 +966,7 @@
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
-+ <writeable/>
- </attribute>
-
- <attribute>
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0013-enable-TPM-required-sensor.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0013-enable-TPM-required-sensor.patch
deleted file mode 100644
index 64709c0..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0013-enable-TPM-required-sensor.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From db0d855457974d520d829259f56488e6c896be0e Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Thu, 27 Oct 2016 10:42:48 -0700
-Subject: [PATCH 13/14] enable TPM required sensor.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-index 3cfdb9aa0..84536fbb4 100644
---- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-+++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
-@@ -1200,7 +1200,7 @@
- </enumerator>
- <enumerator>
- <name>TPM_REQUIRED</name>
-- <value>0xFFFF</value>
-+ <value>0xCC03</value>
- </enumerator>
- </enumerationType>
-
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/p8dtu-patches/hostboot-p8/0014-add-gain-and-offset-for-1300w-48V-DC-power-supply.patch b/openpower/patches/p8dtu-patches/hostboot-p8/0014-add-gain-and-offset-for-1300w-48V-DC-power-supply.patch
deleted file mode 100644
index fe5d816..0000000
--- a/openpower/patches/p8dtu-patches/hostboot-p8/0014-add-gain-and-offset-for-1300w-48V-DC-power-supply.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From a3283c6922dee8ebfb3ea9ac7d22047e6e7bca00 Mon Sep 17 00:00:00 2001
-From: Jim Yuan <jim.yuan@supermicro.com>
-Date: Tue, 9 May 2017 14:34:56 -0700
-Subject: [PATCH 14/14] add gain and offset for 1300w 48V DC power supply.
-
-Signed-off-by: Jim Yuan <jim.yuan@supermicro.com>
----
- src/usr/hwpf/hwp/start_payload/start_payload.C | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C
-index 80e62a0b6..309122785 100644
---- a/src/usr/hwpf/hwp/start_payload/start_payload.C
-+++ b/src/usr/hwpf/hwp/start_payload/start_payload.C
-@@ -287,6 +287,7 @@ enum
- PWS_1600 = 0,
- PWS_1000 = 1,
- PWS_1200 = 2,
-+PWS_1300 = 3,
- PWS_UNKNOWN = 0xFE,
- };
-
-@@ -382,6 +383,7 @@ uint8_t getPSUFRUFromIPMICommands(void)
- uint8_t pws1600[] = {'P','W','S','-','1','K','6','2','A','-','1','R'};
- uint8_t pws1000[] = {'P','W','S','-','1','K','0','2','A','-','1','R'};
- uint8_t pws1200[] = {'P','W','S','-','1','K','2','2','A','-','1','R'};
-+ uint8_t pws1300[] = {'P','W','S','-','1','K','3','0','D','-','1','R'};
-
- //code to calculate product part number size and offset. should use structure. refer to FRU spec.
- product_info_offset = frudata[4] * 8;
-@@ -407,6 +409,10 @@ uint8_t getPSUFRUFromIPMICommands(void)
- for (uint8_t i = 0; pws1200[i] == frudata[fru_offset + i] ; i ++)
- if (i == 11)
- powerSupplyFru = PWS_1200;
-+
-+ for (uint8_t i = 0; pws1300[i] == frudata[fru_offset + i] ; i ++)
-+ if (i == 11)
-+ powerSupplyFru = PWS_1300;
- }
- else
- powerSupplyFru = PWS_UNKNOWN;
-@@ -466,6 +472,11 @@ void setAPSSGainOffsetFromPWSInfo(void)
- offset[TOTAL_SYSTEM_POWER] = 0;
- break;
-
-+ case PWS_1300: //PWS-1K30D-1R (1300W 48V AC):
-+ gain[TOTAL_SYSTEM_POWER] = 51900;
-+ offset[TOTAL_SYSTEM_POWER] = 0;
-+ break;
-+
- default:
- //Do nothing, leave defaults
- //Gen error for user attention?
---
-2.16.2.windows.1
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0001-Increase-default-watchdog-timeout-to-300-seconds.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0001-Increase-default-watchdog-timeout-to-300-seconds.patch
deleted file mode 100644
index b1d816a..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0001-Increase-default-watchdog-timeout-to-300-seconds.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From a4259b9799ebb0f31223d52def871f4851217315 Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 14:50:56 +0300
-Subject: [PATCH] Increase default watchdog timeout to 300 seconds
-
-We need more than 2 minutes to go through some IPL, for instance
-step "13.10 mss_draminit_trainadv" tooks 215 seconds to initialize 8 TiB RAM.
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/include/usr/ipmi/ipmiwatchdog.H | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/usr/ipmi/ipmiwatchdog.H b/src/include/usr/ipmi/ipmiwatchdog.H
-index d730e6bc4..37f73624b 100644
---- a/src/include/usr/ipmi/ipmiwatchdog.H
-+++ b/src/include/usr/ipmi/ipmiwatchdog.H
-@@ -58,7 +58,7 @@ namespace IPMIWATCHDOG
- #ifdef CONFIG_BMC_IPMI_LONG_WATCHDOG
- const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 2400;
- #else
--const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 120;
-+const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 300;
- #endif
-
- /**
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0002-Fix-POS-and-SPD-VPD_REC_NUM.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0002-Fix-POS-and-SPD-VPD_REC_NUM.patch
deleted file mode 100644
index cb8a796..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0002-Fix-POS-and-SPD-VPD_REC_NUM.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1dcf087af57a93ec7f24aa8be73e7ff0ffad22ca Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 15:03:41 +0300
-Subject: [PATCH] Fix POS and SPD-VPD_REC_NUM
-
-Hank Chang: When bringup this 4Socket 128DIMMs system, we hit the following
-VPD/SPD issue and suspected it might be related to the VPD_REC_NUM numbering
-algorithm issue then caused the SPD cache overlap for the 4 sockets case.
-So we simply tried to jump the $aff_pos offset from 16 to 64 for each Proc and
-the issue was fixed/gone.
-
-Originally created by MSI (S188)
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/usr/targeting/common/Targets.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm
-index 35f08428c..4eaba16e7 100644
---- a/src/usr/targeting/common/Targets.pm
-+++ b/src/usr/targeting/common/Targets.pm
-@@ -744,7 +744,7 @@ sub processMcs
- $self->setAttribute($dimm,"MBA_PORT",$port_num);
- $self->setAttribute($dimm,"MBA_DIMM",$dimm_num);
-
-- my $aff_pos=16*$proc+$mcs*$self->{MAX_MCS}+4*$mba+
-+ my $aff_pos=64*$proc+$mcs*$self->{MAX_MCS}+4*$mba+
- 2*$port_num+$dimm_num;
- $self->setAttribute($dimm, "AFFINITY_PATH",
- $parent_affinity
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch
deleted file mode 100644
index 02f6c29..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0003-Add-present-bits-info-based-on-pos.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 4310ba2a3b6e6439b0938e10435e435cef1d5738 Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Thu, 29 Mar 2018 11:19:14 +0300
-Subject: [PATCH] Add present bits info based on pos
-
-Originally created by MSI (S188)
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/usr/hwas/hostbootIstep.C | 50 ++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 50 insertions(+)
-
-diff --git a/src/usr/hwas/hostbootIstep.C b/src/usr/hwas/hostbootIstep.C
-index af3770295..1330a7e65 100644
---- a/src/usr/hwas/hostbootIstep.C
-+++ b/src/usr/hwas/hostbootIstep.C
-@@ -188,6 +188,11 @@ void* host_discover_targets( void *io_pArgs )
-
- // Put out some helpful messages that show which targets we actually found
- std::map<TARGETING::TYPE,uint64_t> l_presData;
-+ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P0; //for dimms on CPU P0
-+ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P1; //for dimms on CPU P1
-+ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P2; //for dimms on CPU P2
-+ std::map<TARGETING::TYPE,uint64_t> Present_Dimm_P3; //for dimms on CPU P3
-+
- for (TargetIterator target = targetService().begin();
- target != targetService().end();
- ++target)
-@@ -198,11 +203,49 @@ void* host_discover_targets( void *io_pArgs )
- }
- TARGETING::TYPE l_type = target->getAttr<TARGETING::ATTR_TYPE>();
- TARGETING::ATTR_POSITION_type l_pos = 0;
-+ TARGETING::ATTR_HUID_type l_huid = target->getAttr<TARGETING::ATTR_HUID>(); //for showing HUID
-+
- if( target->tryGetAttr<TARGETING::ATTR_POSITION>(l_pos) )
- {
- l_presData[l_type] |= (0x8000000000000000 >> l_pos);
-+
-+ if (l_type == TARGETING::TYPE_DIMM)
-+ {
-+ if (l_pos < 64)
-+ {
-+ //for dimms on CPU P0
-+ Present_Dimm_P0[l_type] |= (0x8000000000000000 >> l_pos);
-+ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P0[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P0[l_type] >> 32, Present_Dimm_P0[l_type] & 0xFFFFFFFF);
-+ }
-+ else if ((l_pos >= 64) && (l_pos < 128))
-+ {
-+ //for dimms on CPU P1
-+ Present_Dimm_P1[l_type] |= (0x8000000000000000 >> (l_pos - 64));
-+ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P1[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P1[l_type] >> 32, Present_Dimm_P1[l_type] & 0xFFFFFFFF);
-+ }
-+ else if ((l_pos >= 128) && (l_pos < 192))
-+ {
-+ //for dimms on CPU P2
-+ Present_Dimm_P2[l_type] |= (0x8000000000000000 >> (l_pos - 128));
-+ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P2[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P2[l_type] >> 32, Present_Dimm_P2[l_type] & 0xFFFFFFFF);
-+ }
-+ else if (l_pos >= 192)
-+ {
-+ //for dimms on CPU P3
-+ Present_Dimm_P3[l_type] |= (0x8000000000000000 >> (l_pos - 192));
-+ CONSOLE::displayf(NULL, "MEMORY-INFO| l_pos=0x%X, l_type=0x%0X, l_huid=0x%X, Present_Dimm_P3[l_type]=%.8X%.8X", l_pos, l_type, l_huid, Present_Dimm_P3[l_type] >> 32, Present_Dimm_P3[l_type] & 0xFFFFFFFF);
-+ }
-+ }
- }
- }
-+
-+ CONSOLE::displayf("HWAS", "=========================================");
-+ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P0=%.8X%.8X", Present_Dimm_P0[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P0[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
-+ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P1=%.8X%.8X", Present_Dimm_P1[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P1[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
-+ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P2=%.8X%.8X", Present_Dimm_P2[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P2[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
-+ CONSOLE::displayf("HWAS", "PRESENT> DIMM_P3=%.8X%.8X", Present_Dimm_P3[TARGETING::TYPE_DIMM] >> 32, Present_Dimm_P3[TARGETING::TYPE_DIMM] & 0xFFFFFFFF);
-+ CONSOLE::displayf("HWAS", "=========================================");
-+
- TARGETING::EntityPath l_epath; //use EntityPath's translation functions
- for( std::map<TARGETING::TYPE,uint64_t>::iterator itr = l_presData.begin();
- itr != l_presData.end();
-@@ -210,6 +253,13 @@ void* host_discover_targets( void *io_pArgs )
- {
- uint8_t l_type = itr->first;
- uint64_t l_val = itr->second;
-+
-+ if (l_type == TARGETING::TYPE_DIMM)
-+ {
-+ //to skip DIMM type
-+ continue;
-+ }
-+
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"PRESENT> %s[%.2X]=%.8X%.8X",
- l_epath.pathElementTypeAsString(itr->first), l_type, l_val>>32, l_val&0xFFFFFFFF);
- #if (!defined(CONFIG_CONSOLE_OUTPUT_TRACE) && defined(CONFIG_CONSOLE))
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0004-Force-print-MCS-grouping-info-to-console.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0004-Force-print-MCS-grouping-info-to-console.patch
deleted file mode 100644
index 9744e1d..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0004-Force-print-MCS-grouping-info-to-console.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 9eea226dc3be928ae297ff2d7284a43f8e43efac Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 15:32:45 +0300
-Subject: [PATCH] Force print MCS grouping info to console
-
-Used to dump interleave mode state.
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- .../mc_config/mss_eff_config/mss_eff_grouping.C | 25 +++++++++++++---------
- 1 file changed, 15 insertions(+), 10 deletions(-)
-
-diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
-index 98f76cd0a..fa4c78f72 100644
---- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
-+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C
-@@ -85,6 +85,12 @@
- #include <mss_eff_grouping.H>
- #include <cen_scom_addresses.H>
- #include <mss_error_support.H>
-+#include <console/consoleif.H>
-+
-+#define GRP_TRACE(_fmt_, _args_...) { \
-+ CONSOLE::displayf(NULL, "GROUP-INFO| " _fmt_, ##_args_); \
-+ CONSOLE::flush(); \
-+}
-
- extern "C"
- {
-@@ -900,10 +906,10 @@ void grouping_group4McsPerGroup(const EffGroupingMemInfo & i_memInfo,
- {
- if (config4_gp[i] && config4_gp[i + 1])
- {
-- FAPI_INF("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
-+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
- CFG_4MCS[i][0], CFG_4MCS[i][1],
- CFG_4MCS[i][2], CFG_4MCS[i][3]);
-- FAPI_INF("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
-+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
- CFG_4MCS[i + 1][0], CFG_4MCS[i + 1][1],
- CFG_4MCS[i + 1][2], CFG_4MCS[1 + 1][3]);
- gp1 = i;
-@@ -919,7 +925,7 @@ void grouping_group4McsPerGroup(const EffGroupingMemInfo & i_memInfo,
- {
- if (config4_gp[i])
- {
-- FAPI_INF("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
-+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u, %u, %u, %u",
- CFG_4MCS[i][0], CFG_4MCS[i][1],
- CFG_4MCS[i][2], CFG_4MCS[i][3]);
- gp1 = i;
-@@ -1024,7 +1030,7 @@ void grouping_group2McsPerGroup(const EffGroupingMemInfo & i_memInfo,
- {
- // These 2 MCSs are not already grouped and have the same amount of
- // memory
-- FAPI_INF("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
-+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
- o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
- o_groupData.iv_data[g][MCS_IN_GROUP] = 2;
- o_groupData.iv_data[g][GROUP_SIZE] = 2 * i_memInfo.iv_mcsSize[pos];
-@@ -1084,7 +1090,7 @@ void grouping_group2McsPerGroup_oddpair(const EffGroupingMemInfo & i_memInfo,
- {
- // These 2 MCSs are not already grouped and have the same amount of
- // memory
-- FAPI_INF("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
-+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u and %u", pos, pos + 1);
- o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
- o_groupData.iv_data[g][MCS_IN_GROUP] = 2;
- o_groupData.iv_data[g][GROUP_SIZE] = 2 * i_memInfo.iv_mcsSize[pos];
-@@ -1145,7 +1151,7 @@ void grouping_group2McsPerGroup_usecase(const EffGroupingMemInfo & i_memInfo,
- {
- // These 2 MCSs are not already grouped and have the same amount of
- // memory
-- FAPI_INF("mss_eff_grouping: Grouped MCSs %u and %u", pos, var);
-+ GRP_TRACE("mss_eff_grouping: Grouped MCSs %u and %u", pos, var);
- o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
- o_groupData.iv_data[g][MCS_IN_GROUP] = 2;
- o_groupData.iv_data[g][GROUP_SIZE] = 2 * i_memInfo.iv_mcsSize[pos];
-@@ -1199,7 +1205,7 @@ void grouping_group1McsPerGroup(const EffGroupingMemInfo & i_memInfo,
- (i_memInfo.iv_mcsSize[pos] != 0))
- {
- // This MCS is not already grouped and has memory
-- FAPI_INF("mss_eff_grouping: MCS %u grouped", pos);
-+ GRP_TRACE("mss_eff_grouping: MCS %u grouped", pos);
- o_groupData.iv_data[g][MCS_SIZE] = i_memInfo.iv_mcsSize[pos];
- o_groupData.iv_data[g][MCS_IN_GROUP] = 1;
- o_groupData.iv_data[g][GROUP_SIZE] = i_memInfo.iv_mcsSize[pos];
-@@ -1564,12 +1570,11 @@ void grouping_traceData(const EffGroupingSysAttrs & i_sysAttrs,
- {
- for (uint8_t i = 0; i < i_groupData.iv_numGroups; i++)
- {
-- FAPI_INF("mss_eff_grouping: Group %u, MCS Size %u GB, "
-+ GRP_TRACE("mss_eff_grouping: Group %u, MCS Size %u GB, "
- "Num MCSs %u, GroupSize %u GB", i,
- i_groupData.iv_data[i][MCS_SIZE],
- i_groupData.iv_data[i][MCS_IN_GROUP],
- i_groupData.iv_data[i][GROUP_SIZE]);
--
- FAPI_INF("mss_eff_grouping: Group %u, Base Add 0x%08x", i,
- i_groupData.iv_data[i][BASE_ADDR]);
-
-@@ -2248,7 +2253,7 @@ fapi::ReturnCode mss_eff_grouping(const fapi::Target & i_target,
- std::vector<fapi::Target> &i_associated_centaurs)
- {
- fapi::ReturnCode rc;
-- FAPI_INF("mss_eff_grouping: Start, chip %s", i_target.toEcmdString());
-+ GRP_TRACE("mss_eff_grouping: Start, chip %s", i_target.toEcmdString());
-
- do
- {
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0005-Fill-empty-sensor-id-to-reserved-id-0xFF.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0005-Fill-empty-sensor-id-to-reserved-id-0xFF.patch
deleted file mode 100644
index 5b4bcc7..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0005-Fill-empty-sensor-id-to-reserved-id-0xFF.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From f03937aa32b79e8bde0fa5ff09a0e11e4750bb6f Mon Sep 17 00:00:00 2001
-From: Corey Swenson <cswenson@us.ibm.com>
-Date: Mon, 14 Jan 2019 12:46:22 -0600
-Subject: [PATCH] Vesnin patch
-
-Change-Id: I1116c92f9176d53630a9316312656c03f2a16723
-
-Hank Chang: This patch achieves the following goals:
-a. Auto set all empty sensors with reserved ID - 0xFF instead of being 0x0 in
- the mrw process (would cause some duplicate sensor@0 in skiboot)
-b. In this way, they could simply save 128 empty DIMM_Temp* IDs to become
- all 0xFF, and OCC would still report all the non-zero ID's DIMM_Temp*
- reading in the poll response.
- And then, apply another "occ-0001-Add-DIMM-temperature-sensors.patch"
- can customize/override these 0xFF temp_sid again based on the different
- CPU/Cen/DIMM index which can be decoded by OpenBMC accordingly.
-c. Just simply prints the "N/A" (0xFF) string in the *.rpt file for reviewing
- all the undefined/reserved sensor targets.
-
-Originally created by MSI (S188)
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/usr/ipmiext/ipmisensor.C | 6 ++----
- src/usr/targeting/common/processMrw.pl | 25 ++++++++++++++++++++-----
- 2 files changed, 22 insertions(+), 9 deletions(-)
-
-diff --git a/src/usr/ipmiext/ipmisensor.C b/src/usr/ipmiext/ipmisensor.C
-index e3c6405..63a4196 100644
---- a/src/usr/ipmiext/ipmisensor.C
-+++ b/src/usr/ipmiext/ipmisensor.C
-@@ -6,6 +6,7 @@
- /* OpenPOWER HostBoot Project */
- /* */
- /* Contributors Listed Below - COPYRIGHT 2014,2019 */
-+/* [+] International Business Machines Corp. */
- /* */
- /* */
- /* Licensed under the Apache License, Version 2.0 (the "License"); */
-@@ -214,14 +215,11 @@ namespace SENSOR
- }
- else
- {
-- TRACFCOMP(g_trac_ipmi,"We were not able to find a sensor number in"
-+ TRACFCOMP(g_trac_ipmi,"Found a reserved sensor number (0xFF) in"
- " the IPMI_SENSORS attribute for sensor_name=0x%x"
- "for target with huid=0x%x, skipping call to "
- "sendSetSensorReading()",
- iv_name, TARGETING::get_huid( iv_target ));
--
-- assert(false);
--
- }
-
- return l_err;
-diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl
-index 8bfa7bd..66783c8 100644
---- a/src/usr/targeting/common/processMrw.pl
-+++ b/src/usr/targeting/common/processMrw.pl
-@@ -6,7 +6,7 @@
- #
- # OpenPOWER HostBoot Project
- #
--# Contributors Listed Below - COPYRIGHT 2015,2017
-+# Contributors Listed Below - COPYRIGHT 2015,2019
- # [+] International Business Machines Corp.
- #
- #
-@@ -239,14 +239,29 @@ sub processIpmiSensors {
- $sensor_name=$name."_".$name_suffix;
- }
- my $attribute_name="";
-- my $s=sprintf("0x%02X%02X,0x%02X",
-- oct($sensor_type),oct($entity_id),oct($sensor_id));
-- push(@sensors,$s);
-+
-+ if ($sensor_id ne "")
-+ {
-+ my $s = sprintf("0x%02X%02X,0x%02X",
-+ oct($sensor_type), oct($entity_id), oct($sensor_id));
-+ push(@sensors, $s);
-+ }
-+ else
-+ {
-+ my $s = sprintf("0x%02X%02X,0xFF",
-+ oct($sensor_type), oct($entity_id));
-+ push(@sensors, $s);
-+ }
-+
- my $sensor_id_str = "";
- if ($sensor_id ne "")
- {
- $sensor_id_str = sprintf("0x%02X",oct($sensor_id));
- }
-+ else
-+ {
-+ $sensor_id_str = sprintf("N/A");
-+ }
- my $str=sprintf(
- " %30s | %10s | 0x%02X | 0x%02X | 0x%02x |" .
- " %4s | %4d | %4d | %10s | %s\n",
-@@ -1428,7 +1443,7 @@ Options:
- exit(1);
- }
-
--# eliminate extra whitespace
-+# eliminate extra whitespace
- # Input: string to chop
- sub nowhitespace
- {
---
-1.8.2.2
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0006-Delay-for-Centaure-1.2V-ready-on-128-DIMM-system.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0006-Delay-for-Centaure-1.2V-ready-on-128-DIMM-system.patch
deleted file mode 100644
index 35ce1ea..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0006-Delay-for-Centaure-1.2V-ready-on-128-DIMM-system.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 45c23dab36e6dd76023670f4c0766b6104ff0011 Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 15:47:30 +0300
-Subject: [PATCH] Delay for Centaure 1.2V ready on 128 DIMM system
-
-Resolves issue with full equipped DIMM lost.
-Originally created by MSI (S188).
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/usr/hwpf/hwp/dram_training/dram_training.C | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.C b/src/usr/hwpf/hwp/dram_training/dram_training.C
-index bf20b7464..2d8a80e5f 100644
---- a/src/usr/hwpf/hwp/dram_training/dram_training.C
-+++ b/src/usr/hwpf/hwp/dram_training/dram_training.C
-@@ -329,6 +329,7 @@ void* call_host_disable_vddr( void *io_pArgs )
- {
- errlHndl_t l_err = NULL;
- IStepError l_StepError;
-+ uint8_t i;
-
- TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ENTER_MRK"call_host_disable_vddr");
-@@ -348,6 +349,12 @@ void* call_host_disable_vddr( void *io_pArgs )
-
- }
-
-+ //Delay 2 seconds for Centaure 1.2V ready on 128 DIMM system.
-+ for (i = 0; i < 1; ++i)
-+ {
-+ fapiDelay(1000 * 1000000, 10000); // 1,000,000 ns = 1ms, 1000*1ms
-+ }
-+
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- EXIT_MRK"call_host_disable_vddr");
-
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0007-Set-IBM-instead-of-AMI-for-eSEL.patch b/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0007-Set-IBM-instead-of-AMI-for-eSEL.patch
deleted file mode 100644
index a94ada2..0000000
--- a/openpower/patches/vesnin-patches/hostboot-p8/hostboot-0007-Set-IBM-instead-of-AMI-for-eSEL.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 177df7658cbd8c78d5f3cf043e78d02880945b85 Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 15:50:51 +0300
-Subject: [PATCH] Set IBM instead of AMI for eSEL
-
-Originally created by MSI (S188).
-The root cause is that the latest openbmc replace the NETFUN_AMI with
-NETFUN_IBM, so bmc can't log the eSEL from PNOR.
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/include/usr/ipmi/ipmiif.H | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
-index 44283cc0b..0f1309e31 100644
---- a/src/include/usr/ipmi/ipmiif.H
-+++ b/src/include/usr/ipmi/ipmiif.H
-@@ -258,7 +258,7 @@ namespace IPMI
-
- //AMI-specific storage messages
- inline const command_t partial_add_esel(void)
-- { return std::make_pair(NETFUN_AMI, 0xf0); }
-+ { return std::make_pair(NETFUN_IBM, 0xf0); }
-
- // event messages
- inline const command_t platform_event(void)
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/occ-p8/occ-0001-Add-DIMM-temperature-sensors.patch b/openpower/patches/vesnin-patches/occ-p8/occ-0001-Add-DIMM-temperature-sensors.patch
deleted file mode 100644
index 51f273f..0000000
--- a/openpower/patches/vesnin-patches/occ-p8/occ-0001-Add-DIMM-temperature-sensors.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 7d9fc8ec22199e7fc7eca6079cb42f25554851f7 Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 13 Mar 2018 14:17:00 +0300
-Subject: [PATCH] Add DIMM temperature sensors
-
-Customize/override 0xFF temp_sid based on the different CPU/Cen/DIMM index
-which can be decoded by OpenBMC accordingly.
-See also: hostboot-0005-Fill-empty-sensor-id-to-reserved-id-0xFF.patch.
-
-Originally created by MSI (S188)
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/occ/cmdh/cmdh_fsp_cmds.c | 54 ++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 52 insertions(+), 2 deletions(-)
-
-diff --git a/src/occ/cmdh/cmdh_fsp_cmds.c b/src/occ/cmdh/cmdh_fsp_cmds.c
-index 74e45da..fb2f72d 100755
---- a/src/occ/cmdh/cmdh_fsp_cmds.c
-+++ b/src/occ/cmdh/cmdh_fsp_cmds.c
-@@ -355,10 +355,40 @@ ERRL_RC cmdh_poll_v10(cmdh_fsp_rsp_t * o_rsp_ptr)
- l_sensorHeader.length = sizeof(cmdh_poll_temp_sensor_t);
- l_sensorHeader.count = 0;
-
-+ uint16_t CpuIpmiId = 0;
-+
-+ //Check the current OCC
-+ if (l_poll_rsp->occ_pres_mask == 0x02)
-+ {
-+ CpuIpmiId = 0x0D; //CPU1
-+ }
-+ else if (l_poll_rsp->occ_pres_mask == 0x04)
-+ {
-+ CpuIpmiId = 0x02; //CPU2
-+ }
-+ else if (l_poll_rsp->occ_pres_mask == 0x08)
-+ {
-+ CpuIpmiId = 0x0A; //CPU3
-+ }
-+ else
-+ {
-+ CpuIpmiId = 0x0B; //CPU0
-+ }
-+
- //Initialize to max number of possible temperature sensors.
-- cmdh_poll_temp_sensor_t l_tempSensorList[MAX_NUM_CORES + MAX_NUM_MEM_CONTROLLERS + (MAX_NUM_MEM_CONTROLLERS * NUM_DIMMS_PER_CENTAUR)];
-+ cmdh_poll_temp_sensor_t l_tempSensorList[MAX_NUM_CORES + MAX_NUM_MEM_CONTROLLERS + (MAX_NUM_MEM_CONTROLLERS * NUM_DIMMS_PER_CENTAUR) + 2]; //Add two items for peak/average core temperature.
- memset(l_tempSensorList, 0x00, sizeof(l_tempSensorList));
-
-+ //The average value of core temperature. Currently not used.
-+ l_tempSensorList[l_sensorHeader.count].id = G_amec_sensor_list[TEMP2MSP0]->ipmi_sid;
-+ l_tempSensorList[l_sensorHeader.count].value = G_amec_sensor_list[TEMP2MSP0]->sample;
-+ l_sensorHeader.count++;
-+
-+ //The peak value of core temperature
-+ l_tempSensorList[l_sensorHeader.count].id = CpuIpmiId;
-+ l_tempSensorList[l_sensorHeader.count].value = G_amec_sensor_list[TEMP2MSP0PEAK]->sample;
-+ l_sensorHeader.count++;
-+
- for (k=0; k<MAX_NUM_CORES; k++)
- {
- if(CORE_PRESENT(k))
-@@ -370,6 +400,26 @@ ERRL_RC cmdh_poll_v10(cmdh_fsp_rsp_t * o_rsp_ptr)
- }
-
- uint8_t l_cent, l_dimm = 0;
-+ uint16_t CpuId = 0;
-+
-+ //Check the current OCC
-+ if(l_poll_rsp->occ_pres_mask == 0x02)
-+ {
-+ CpuId = 0x0200; //CPU1
-+ }
-+ else if (l_poll_rsp->occ_pres_mask == 0x04)
-+ {
-+ CpuId = 0x0300; //CPU2
-+ }
-+ else if (l_poll_rsp->occ_pres_mask == 0x08)
-+ {
-+ CpuId = 0x0400; //CPU3
-+ }
-+ else
-+ {
-+ CpuId = 0x0100; //CPU0
-+ }
-+
- for (l_cent=0; l_cent < MAX_NUM_MEM_CONTROLLERS; l_cent++)
- {
- if (CENTAUR_PRESENT(l_cent))
-@@ -391,7 +441,7 @@ ERRL_RC cmdh_poll_v10(cmdh_fsp_rsp_t * o_rsp_ptr)
- {
- if (g_amec->proc[0].memctl[l_cent].centaur.dimm_temps[l_dimm].temp_sid != 0)
- {
-- l_tempSensorList[l_sensorHeader.count].id = g_amec->proc[0].memctl[l_cent].centaur.dimm_temps[l_dimm].temp_sid;
-+ l_tempSensorList[l_sensorHeader.count].id = CpuId + (l_cent * 8) + l_dimm; //Add extra temperature IDs for all DIMMs.
- //If a dimm timed out long enough, we should return 0xFFFF for that sensor.
- if (G_dimm_temp_expired_bitmap.bytes[l_cent] & (DIMM_SENSOR0 >> l_dimm))
- {
---
-2.14.1
-
diff --git a/openpower/patches/vesnin-patches/occ-p8/occ-0002-Add-temperature-sensor-support-for-CPU-cores.patch b/openpower/patches/vesnin-patches/occ-p8/occ-0002-Add-temperature-sensor-support-for-CPU-cores.patch
deleted file mode 100644
index 7556b97..0000000
--- a/openpower/patches/vesnin-patches/occ-p8/occ-0002-Add-temperature-sensor-support-for-CPU-cores.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0ec6ab11dcec304876802d1ed7bb01bd059ae311 Mon Sep 17 00:00:00 2001
-From: Artem Senichev <a.senichev@yadro.com>
-Date: Tue, 18 Dec 2018 14:16:56 +0300
-Subject: [PATCH] Add temperature sensor support for CPU cores
-
-IPMI protocol imposes limits on numbers of sensors identifiers (1 byte).
-This limitation doesn't allow us to use unique temperature sensor ID for
-each CPU core (4 CPU * 12 cores = 48 sensors).
-
-OCC uses temperature sensor ID as channel label, these labels are handled
-by phosphor-hwmon service to identify the core:
-
- I2C sysfs config.yaml
-OCC -----> BMC Kernel -------> Phosphor-hwmon -------------> DBus
- ID label label->core
-
-This patch makes OCC use own ID as channel label instead of using IPMI
-temperature sensor ID. The new identifier consists of constant prefix
-(0x0f) and core index:
-ID = 0x0f00 + INDEX(core)
-
-Signed-off-by: Artem Senichev <a.senichev@yadro.com>
----
- src/occ/cmdh/cmdh_fsp_cmds.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/occ/cmdh/cmdh_fsp_cmds.c b/src/occ/cmdh/cmdh_fsp_cmds.c
-index 6276992..69c646e 100755
---- a/src/occ/cmdh/cmdh_fsp_cmds.c
-+++ b/src/occ/cmdh/cmdh_fsp_cmds.c
-@@ -393,7 +393,8 @@ ERRL_RC cmdh_poll_v10(cmdh_fsp_rsp_t * o_rsp_ptr)
- {
- if(CORE_PRESENT(k))
- {
-- l_tempSensorList[l_sensorHeader.count].id = G_amec_sensor_list[TEMP2MSP0C0 + k]->ipmi_sid;
-+ // Set the core label as a constant prefix with index
-+ l_tempSensorList[l_sensorHeader.count].id = 0x0f00 + k;
- l_tempSensorList[l_sensorHeader.count].value = G_amec_sensor_list[TEMP2MSP0C0 + k]->sample;
- l_sensorHeader.count++;
- }
---
-2.19.2
-
diff --git a/openpower/platform/Config.in b/openpower/platform/Config.in
index b6baa4d..efe480b 100644
--- a/openpower/platform/Config.in
+++ b/openpower/platform/Config.in
@@ -1,12 +1,7 @@
config BR2_OPENPOWER_PLATFORM
bool "Enables only one openPower platform"
default n
- depends on ((BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9 || BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER9) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER9 && BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER9 && BR2_OPENPOWER_POWER10))
-
-config BR2_OPENPOWER_POWER8
- bool "Enables the OpenPower p8 platform"
- default n
- depends on BR2_powerpc64 || BR2_powerpc64le
+ depends on ((BR2_OPENPOWER_POWER9 || BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER9 && BR2_OPENPOWER_POWER10))
config BR2_OPENPOWER_POWER9
bool "Enables the OpenPower p9 platform"
diff --git a/openpower/scripts/update-defconfigs.sh b/openpower/scripts/update-defconfigs.sh
old mode 100644
new mode 100755
index c82900c..f51fc8f
--- a/openpower/scripts/update-defconfigs.sh
+++ b/openpower/scripts/update-defconfigs.sh
@@ -10,6 +10,9 @@
echo $PLATFORM
ODIR=`mktemp -d`
op-build O=$ODIR $PLATFORM_DEFCONFIG
+ if [ $# -gt 0 ]; then
+ buildroot/utils/config --file $ODIR/.config "$@"
+ fi
op-build O=$ODIR olddefconfig
op-build O=$ODIR savedefconfig
rm -rf $ODIR
diff --git a/openpower/toolchain/Config.in b/openpower/toolchain/Config.in
new file mode 100644
index 0000000..c2eeb2e
--- /dev/null
+++ b/openpower/toolchain/Config.in
@@ -0,0 +1,5 @@
+menu "OpenPower Toolchain"
+
+source "$BR2_EXTERNAL_OP_BUILD_PATH/toolchain/ppe42-toolchain/Config.in"
+
+endmenu
diff --git a/openpower/toolchain/ppe42-toolchain/Config.in b/openpower/toolchain/ppe42-toolchain/Config.in
new file mode 100644
index 0000000..a2d6aa3
--- /dev/null
+++ b/openpower/toolchain/ppe42-toolchain/Config.in
@@ -0,0 +1,33 @@
+
+menuconfig BR2_PACKAGE_PPE42_TOOLCHAIN
+ bool "ppe42-toolchain"
+ default y if (BR2_OPENPOWER_POWER9)
+ help
+ Build the PPE42 toolchain required to build the
+ POWER9 firmware for OCC, SBE and HCODE
+
+if BR2_PACKAGE_PPE42_TOOLCHAIN
+
+choice
+ prompt "PPE42 Toolchain Type"
+ help
+ Select whether to build the PPE42 toolchain or
+ provide an external one
+
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-gcc/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-toolchain-external/Config.in"
+
+endchoice
+
+if BR2_PACKAGE_HOST_PPE42_GCC
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-binutils/Config.in"
+endif
+
+config BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
+ bool
+
+config BR2_PACKAGE_PROVIDES_PPE42_TOOLCHAIN
+ depends on BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
+ string
+
+endif
diff --git a/openpower/toolchain/ppe42-toolchain/ppe42-toolchain.mk b/openpower/toolchain/ppe42-toolchain/ppe42-toolchain.mk
new file mode 100644
index 0000000..cca0af3
--- /dev/null
+++ b/openpower/toolchain/ppe42-toolchain/ppe42-toolchain.mk
@@ -0,0 +1,9 @@
+################################################################################
+#
+# ppe42-toolchain
+#
+################################################################################
+PPE42_TOOLCHAIN_DIR = $(STAGING_SUBDIR)/ppe42-toolchain
+PPE42_TOOLCHAIN_BIN = $(STAGING_SUBDIR)/ppe42-toolchain/linux
+
+$(eval $(host-virtual-package))