Skip to content

Commit

Permalink
lock_chip: parametrize locking in function of board config exported c…
Browse files Browse the repository at this point in the history
…onfig option

kexec-boot: depend on io386 presence and board config option to call lock_chip
  • Loading branch information
tlaurion committed Jun 20, 2023
1 parent 9830c6c commit 39bb6ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion initrd/bin/kexec-boot
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 12 additions & 4 deletions initrd/bin/lock_chip
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 39bb6ea

Please sign in to comment.