lock_chip: parametrize locking in function of board config exported config option

kexec-boot: depend on io386 presence and board config option to call lock_chip
This commit is contained in:
Thierry Laurion 2023-06-20 12:40:00 -04:00
parent 9830c6c4ed
commit 39bb6ea313
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93
2 changed files with 13 additions and 5 deletions

View File

@ -150,7 +150,7 @@ if [ "$CONFIG_TPM" = "y" ]; then
tpmr kexec_finalize
fi
if [ -x /bin/io386 ]; then
if [ -x /bin/io386 -a "$CONFIG_FINALIZE_PLATFORM_LOCKING_PRESKYLAKE" = "y" ]; then
lock_chip
fi

View File

@ -9,7 +9,15 @@
. /etc/ash_functions
TRACE "Under /bin/lock_chip"
APM_CNT=0xb2
FIN_CODE=0xcb
echo "Finalizing chipset"
io386 -o b -b x $APM_CNT $FIN_CODE
if [ "$CONFIG_FINALIZE_PLATFORM_LOCKING_PRESKYLAKE" = "y" ]; then
APM_CNT=0xb2
FIN_CODE=0xcb
fi
if [ -n "$APM_CNT" -a -n "$FIN_CODE" ]; then
echo "Finalizing chipset"
io386 -o b -b x $APM_CNT $FIN_CODE
else
echo "NOT Finalizing chipset"
echo "lock_chip called without valid APM_CNT and FIN_CODE defined under bin/lock_chip."
fi