public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Usama Arif <usamaarif642@gmail.com>
To: Ard Biesheuvel <ardb@kernel.org>, Breno Leitao <leitao@debian.org>
Cc: linux-efi@vger.kernel.org, kexec@lists.infradead.org,
	ebiederm@xmission.com, bhe@redhat.com, vgoyal@redhat.com,
	tglx@linutronix.de, dave.hansen@linux.intel.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, rmikey@meta.com, gourry@gourry.net
Subject: Re: [RFC] efi/tpm: add efi.tpm_log as a reserved region in 820_table_firmware
Date: Thu, 12 Sep 2024 14:54:56 +0100	[thread overview]
Message-ID: <6b2cc4c4-4354-4b29-bc73-c1384b90dfc6@gmail.com> (raw)
In-Reply-To: <CAMj1kXHh-Kov8c1pto0LJL6debugz1og6GFMYCwvfu+RiQGreA@mail.gmail.com>



On 12/09/2024 14:10, Ard Biesheuvel wrote:
> Does the below help at all?
> 
> --- a/drivers/firmware/efi/tpm.c
> +++ b/drivers/firmware/efi/tpm.c
> @@ -60,7 +60,7 @@ int __init efi_tpm_eventlog_init(void)
>         }
> 
>         tbl_size = sizeof(*log_tbl) + log_tbl->size;
> -       memblock_reserve(efi.tpm_log, tbl_size);
> +       efi_mem_reserve(efi.tpm_log, tbl_size);
> 
>         if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR) {
>                 pr_info("TPM Final Events table not present\n");

Unfortunately not. efi_mem_reserve updates e820_table, while kexec looks at /sys/firmware/memmap
which is e820_table_firmware.

arch_update_firmware_area introduced in the RFC patch does the same thing as efi_mem_reserve does at
its end, just with e820_table_firmware instead of e820_table.
i.e. efi_mem_reserve does:
	e820__range_update(addr, size, E820_TYPE_RAM, E820_TYPE_RESERVED);
	e820__update_table(e820_table);

while arch_update_firmware_area does:
	e820__range_update_firmware(addr, size, E820_TYPE_RAM, E820_TYPE_RESERVED);
	e820__update_table(e820_table_firmware);

Thanks,
Usama

  reply	other threads:[~2024-09-12 13:54 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 10:41 [RFC] efi/tpm: add efi.tpm_log as a reserved region in 820_table_firmware Usama Arif
2024-09-11 11:51 ` Ard Biesheuvel
2024-09-11 14:34   ` Usama Arif
2024-09-12 10:23   ` Usama Arif
2024-09-12 10:51     ` Ard Biesheuvel
2024-09-12 11:17       ` Usama Arif
2024-09-12 13:03       ` Breno Leitao
2024-09-12 13:10         ` Ard Biesheuvel
2024-09-12 13:54           ` Usama Arif [this message]
2024-09-12 14:05             ` Ard Biesheuvel
2024-09-12 14:14               ` Ard Biesheuvel
2024-09-13 10:56                 ` Dave Young
2024-09-13 11:06                   ` Usama Arif
2024-09-13 11:13                     ` Dave Young
2024-09-13 11:49                       ` Dave Young
2024-09-13 11:56                         ` Usama Arif
2024-09-13 12:52                           ` Dave Young
2024-09-14  6:46                   ` Dave Young
2024-09-14  8:31                     ` Ard Biesheuvel
2024-09-14  9:24                       ` Dave Young
2024-09-14  9:46                         ` Dave Young
2024-09-12 14:29           ` Breno Leitao
2024-09-12 15:21             ` Ard Biesheuvel
2024-09-12 15:35               ` Usama Arif
2024-09-12 15:45                 ` Ard Biesheuvel
2024-09-12 16:22         ` James Bottomley
2024-09-13 11:57           ` Breno Leitao
2024-09-13 12:07             ` James Bottomley
2024-09-16 20:20               ` Eric W. Biederman
2024-09-17  6:45                 ` Ard Biesheuvel
2024-09-17 15:24                   ` Eric W. Biederman
2024-09-17 15:35                     ` Ard Biesheuvel
2024-09-18  3:13                       ` Eric W. Biederman
2024-09-18  7:36                         ` Ard Biesheuvel
2024-10-09  9:10                           ` Jonathan McDowell
2024-10-09 10:46                             ` Breno Leitao
2024-10-09 14:05                               ` Jonathan McDowell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b2cc4c4-4354-4b29-bc73-c1384b90dfc6@gmail.com \
    --to=usamaarif642@gmail.com \
    --cc=ardb@kernel.org \
    --cc=bhe@redhat.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=ebiederm@xmission.com \
    --cc=gourry@gourry.net \
    --cc=kexec@lists.infradead.org \
    --cc=leitao@debian.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmikey@meta.com \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox