Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSI Z690-A v1.1.4 & MSI Z790-P v0.9.2 #565

Merged
merged 9 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/scripts/capsule-lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/bin/bash

function get_str() {
local cfg=$1
local name=$2
sed -n 's/^'"$name"'="\(.*\)"$/\1/p' "$cfg"
}

function get_hex() {
local cfg=$1
local name=$2
sed -n 's/^'"$name"'=\(.*\)$/\1/p' "$cfg"
}

function hex_to_ver_str() {
local hex=$1

local major=${hex:2:2}
local minor=${hex:4:2}
local bugfix=${hex:6:2}
local rc=${hex:8:2}

local ver="v$((0x$major)).$((0x$minor)).$((0x$bugfix))"
if [ "$((0x$rc))" -lt 128 ]; then
ver="$ver-rc$((rc))"
fi
echo "$ver"
}

if [ ! -d configs ]; then
echo "error: $(basename "$0") should be run from the root of coreboot's tree"
exit 1
fi

declare -A guids
fail=0

mapfile -t configs < <(grep -l 'EFI_UPDATE_CAPSULE' configs/config.*)
for c in "${configs[@]}"; do
local_ver=$(get_str "$c" 'CONFIG_LOCALVERSION')

guid=$(get_str "$c" 'CONFIG_DRIVERS_EFI_MAIN_FW_GUID')
ver=$(get_hex "$c" 'CONFIG_DRIVERS_EFI_MAIN_FW_VERSION')
lsv=$(get_hex "$c" 'CONFIG_DRIVERS_EFI_MAIN_FW_LSV')

# convert to lower case as normalization
guid=${guid,,*}
# remove common prefix to shorten error messages
c=${c##*/}

if [ -z "$guid" ]; then
echo "$c: missing CONFIG_DRIVERS_EFI_MAIN_FW_GUID"
fail=1
elif [ -n "${guids["$guid"]}" ]; then
echo "$c: duplicated CONFIG_DRIVERS_EFI_MAIN_FW_GUID value ($guid)"
echo "${c//?/ } also appears in ${guids["$guid"]}"
fail=1
else
guids["$guid"]=$c
fi

if [ -z "$ver" ]; then
echo "$c: missing CONFIG_DRIVERS_EFI_MAIN_FW_VERSION"
fail=1
fi
if [ -z "$lsv" ]; then
echo "$c: missing CONFIG_DRIVERS_EFI_MAIN_FW_LSV"
fail=1
fi

if [ -n "$ver" ] && [ -n "$lsv" ] && [ $(( ver < lsv )) -eq 1 ]; then
echo "$c: CONFIG_DRIVERS_EFI_MAIN_FW_VERSION < CONFIG_DRIVERS_EFI_MAIN_FW_LSV"
echo "${c//?/ } $ver < $lsv"
fail=1
fi

if [ -n "$ver" ]; then
str_ver=$(hex_to_ver_str "$ver")
if [ "$str_ver" != "$local_ver" ]; then
echo "$c: CONFIG_LOCALVERSION doesn't match CONFIG_DRIVERS_EFI_MAIN_FW_VERSION"
echo "${c//?/ } $local_ver != $str_ver ($ver)"
fail=1
fi
fi
done

exit "$fail"
2 changes: 2 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ jobs:

# Print all the differences at once and fail or do nothing
git diff --exit-code
- name: Verify update capsules support in defconfigs
run: .github/scripts/capsule-lint.sh
8 changes: 7 additions & 1 deletion configs/config.msi_ms7d25_ddr4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_LOCALVERSION="v1.1.3"
CONFIG_LOCALVERSION="v1.1.4-rc1"
CONFIG_OPTION_BACKEND_NONE=y
CONFIG_VENDOR_MSI=y
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
Expand All @@ -25,6 +25,9 @@ CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS=y
CONFIG_PCIEXP_LANE_ERR_STAT_CLEAR=y
CONFIG_DRIVERS_EFI_VARIABLE_STORE=y
CONFIG_DRIVERS_EFI_FW_INFO=y
CONFIG_DRIVERS_EFI_MAIN_FW_GUID="0f3e8ba6-19d3-461b-bbbc-8b5689fe8097"
CONFIG_DRIVERS_EFI_MAIN_FW_VERSION=0x01010401
krystian-hebel marked this conversation as resolved.
Show resolved Hide resolved
CONFIG_DRIVERS_EFI_MAIN_FW_LSV=0x01010400
CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=y
CONFIG_TPM2=y
CONFIG_BOOTMEDIA_LOCK_CONTROLLER=y
Expand Down Expand Up @@ -63,6 +66,9 @@ CONFIG_EDK2_DASHARO_CHIPSET_CONFIG=y
CONFIG_EDK2_DASHARO_POWER_CONFIG=y
CONFIG_EDK2_DASHARO_PCI_CONFIG=y
CONFIG_EDK2_DASHARO_MEMORY_CONFIG=y
CONFIG_EDK2_DASHARO_CPU_CONFIG=y
CONFIG_EDK2_CORE_DISABLE_OPTION=y
CONFIG_EDK2_HYPERTHREADING_OPTION=y
CONFIG_EDK2_BOOT_MENU_KEY=0x0015
CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
Expand Down
8 changes: 7 additions & 1 deletion configs/config.msi_ms7d25_ddr5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_LOCALVERSION="v1.1.3"
CONFIG_LOCALVERSION="v1.1.4-rc1"
CONFIG_OPTION_BACKEND_NONE=y
CONFIG_VENDOR_MSI=y
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
Expand All @@ -25,6 +25,9 @@ CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS=y
CONFIG_PCIEXP_LANE_ERR_STAT_CLEAR=y
CONFIG_DRIVERS_EFI_VARIABLE_STORE=y
CONFIG_DRIVERS_EFI_FW_INFO=y
CONFIG_DRIVERS_EFI_MAIN_FW_GUID="119059ec-1a5e-4844-b2e6-6f573b257570"
CONFIG_DRIVERS_EFI_MAIN_FW_VERSION=0x01010401
CONFIG_DRIVERS_EFI_MAIN_FW_LSV=0x01010400
CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=y
CONFIG_TPM2=y
CONFIG_BOOTMEDIA_LOCK_CONTROLLER=y
Expand Down Expand Up @@ -63,6 +66,9 @@ CONFIG_EDK2_DASHARO_CHIPSET_CONFIG=y
CONFIG_EDK2_DASHARO_POWER_CONFIG=y
CONFIG_EDK2_DASHARO_PCI_CONFIG=y
CONFIG_EDK2_DASHARO_MEMORY_CONFIG=y
CONFIG_EDK2_DASHARO_CPU_CONFIG=y
CONFIG_EDK2_CORE_DISABLE_OPTION=y
CONFIG_EDK2_HYPERTHREADING_OPTION=y
CONFIG_EDK2_BOOT_MENU_KEY=0x0015
CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
Expand Down
9 changes: 8 additions & 1 deletion configs/config.msi_ms7e06_ddr4
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_LOCALVERSION="v0.9.1"
CONFIG_LOCALVERSION="v0.9.2-rc1"
CONFIG_OPTION_BACKEND_NONE=y
CONFIG_VENDOR_MSI=y
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
CONFIG_VBOOT=y
Expand All @@ -24,6 +25,9 @@ CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS=y
CONFIG_PCIEXP_LANE_ERR_STAT_CLEAR=y
CONFIG_DRIVERS_EFI_VARIABLE_STORE=y
CONFIG_DRIVERS_EFI_FW_INFO=y
CONFIG_DRIVERS_EFI_MAIN_FW_GUID="91e6522e-25e1-4543-9b38-02e2aeafc9ed"
CONFIG_DRIVERS_EFI_MAIN_FW_VERSION=0x00090201
CONFIG_DRIVERS_EFI_MAIN_FW_LSV=0x00090200
CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=y
CONFIG_TPM2=y
CONFIG_BOOTMEDIA_LOCK_CONTROLLER=y
Expand Down Expand Up @@ -62,6 +66,9 @@ CONFIG_EDK2_DASHARO_CHIPSET_CONFIG=y
CONFIG_EDK2_DASHARO_POWER_CONFIG=y
CONFIG_EDK2_DASHARO_PCI_CONFIG=y
CONFIG_EDK2_DASHARO_MEMORY_CONFIG=y
CONFIG_EDK2_DASHARO_CPU_CONFIG=y
CONFIG_EDK2_CORE_DISABLE_OPTION=y
CONFIG_EDK2_HYPERTHREADING_OPTION=y
CONFIG_EDK2_BOOT_MENU_KEY=0x0015
CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
Expand Down
9 changes: 8 additions & 1 deletion configs/config.msi_ms7e06_ddr5
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_LOCALVERSION="v0.9.1"
CONFIG_LOCALVERSION="v0.9.2-rc1"
CONFIG_OPTION_BACKEND_NONE=y
CONFIG_VENDOR_MSI=y
CONFIG_ONBOARD_VGA_IS_PRIMARY=y
CONFIG_VBOOT=y
Expand All @@ -24,6 +25,9 @@ CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS=y
CONFIG_PCIEXP_LANE_ERR_STAT_CLEAR=y
CONFIG_DRIVERS_EFI_VARIABLE_STORE=y
CONFIG_DRIVERS_EFI_FW_INFO=y
CONFIG_DRIVERS_EFI_MAIN_FW_GUID="58301b3d-5b6d-4562-9ec1-fbce40f15253"
CONFIG_DRIVERS_EFI_MAIN_FW_VERSION=0x00090201
CONFIG_DRIVERS_EFI_MAIN_FW_LSV=0x00090200
CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=y
CONFIG_TPM2=y
CONFIG_BOOTMEDIA_LOCK_CONTROLLER=y
Expand Down Expand Up @@ -62,6 +66,9 @@ CONFIG_EDK2_DASHARO_CHIPSET_CONFIG=y
CONFIG_EDK2_DASHARO_POWER_CONFIG=y
CONFIG_EDK2_DASHARO_PCI_CONFIG=y
CONFIG_EDK2_DASHARO_MEMORY_CONFIG=y
CONFIG_EDK2_DASHARO_CPU_CONFIG=y
CONFIG_EDK2_CORE_DISABLE_OPTION=y
CONFIG_EDK2_HYPERTHREADING_OPTION=y
CONFIG_EDK2_BOOT_MENU_KEY=0x0015
CONFIG_EDK2_SETUP_MENU_KEY=0x0008
CONFIG_EDK2_RAM_DISK_ENABLE=y
Expand Down
5 changes: 5 additions & 0 deletions src/mainboard/msi/ms7d25/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ config BOARD_MSI_MS7D25
select CRB_TPM
select HAVE_INTEL_PTT
select BOARD_HAS_MSI_ROMHOLE
select MEMORY_MAPPED_TPM

if BOARD_MSI_MS7D25

Expand Down Expand Up @@ -54,6 +55,10 @@ config USE_LEGACY_8254_TIMER
config CBFS_SIZE
default 0x1000000

config TPM_PIRQ
hex
default 0x3f

config VBOOT
select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_FWMP
Expand Down
5 changes: 5 additions & 0 deletions src/mainboard/msi/ms7e06/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ config BOARD_MSI_MS7E06
select CRB_TPM
select HAVE_INTEL_PTT
select BOARD_HAS_MSI_ROMHOLE
select MEMORY_MAPPED_TPM

if BOARD_MSI_MS7E06

Expand Down Expand Up @@ -53,6 +54,10 @@ config USE_LEGACY_8254_TIMER
config CBFS_SIZE
default 0x1000000

config TPM_PIRQ
hex
default 0x3f

config VBOOT
select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_FWMP
Expand Down
8 changes: 1 addition & 7 deletions src/soc/intel/alderlake/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,7 @@ CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp2_0/iot/raptorlake_s
endif

ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_S),y)
# 06-97-00, 06-97-01, 06-97-04 are ADL-S Engineering Samples
# 06-97-02 are ADL-S/HX Quality Samples but also ADL-HX Engineering Samples
# 06-b7-00 are RPL-S Engineering Samples
# ADL-S/HX C0/H0 and RPL-S C0/H0
cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-97-05
# RPL-S/HX B0
cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-b7-01
cpu_microcode_bins += 3rdparty/dasharo-blobs/msi/ms7e06/microcode.bin
else ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_N),y)
cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-be-00
else
Expand Down
Loading