diff --git a/initrd/bin/kexec-boot b/initrd/bin/kexec-boot index dfbfccd9..de59db6e 100755 --- a/initrd/bin/kexec-boot +++ b/initrd/bin/kexec-boot @@ -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 diff --git a/initrd/bin/lock_chip b/initrd/bin/lock_chip index 1331aebf..8bf316b7 100755 --- a/initrd/bin/lock_chip +++ b/initrd/bin/lock_chip @@ -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