Skip to content

Commit

Permalink
i386/skinit: don't allocate TPM event log low
Browse files Browse the repository at this point in the history
Xen somehow ends up loading Dom0 kernel over the TPM even log in this
case.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
  • Loading branch information
SergiiDmytruk committed Mar 30, 2024
1 parent 13bf69f commit 89e27fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grub-core/loader/i386/skinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ grub_skinit_boot_prepare (struct grub_relocator *rel,
if (slb == NULL)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "SLB module is missing");

err = grub_relocator_alloc_chunk_align (rel, &ch, 0x1000000,
0xffffffff - GRUB_SLAUNCH_TPM_EVT_LOG_SIZE,
GRUB_SLAUNCH_TPM_EVT_LOG_SIZE, GRUB_PAGE_SIZE,
GRUB_RELOCATOR_PREFERENCE_NONE, 1);
err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0x1000000,
UP_TO_TOP32(GRUB_SLAUNCH_TPM_EVT_LOG_SIZE),
GRUB_SLAUNCH_TPM_EVT_LOG_SIZE, GRUB_PAGE_SIZE,
GRUB_RELOCATOR_PREFERENCE_HIGH, 1);

if (err != GRUB_ERR_NONE)
return grub_error (err, "cannot alloc memory for TPM event log");
Expand Down

0 comments on commit 89e27fe

Please sign in to comment.