From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2C17C07E96 for ; Thu, 15 Jul 2021 15:30:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF34E61360 for ; Thu, 15 Jul 2021 15:30:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF34E61360 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CE14782917; Thu, 15 Jul 2021 17:30:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="Lr/wzM15"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ABA2A82BDC; Thu, 15 Jul 2021 17:30:06 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D50B481FC6 for ; Thu, 15 Jul 2021 17:30:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1626362998; bh=b/CE5WybdDH8zBu35Qfr2dH4zqMOBIfOMF9lFq3sXos=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Lr/wzM15M9yMxzHpGqJwz/J1ZEXgJN8VK/JcvchwC9dnSOYAJLDkSe+z8UqijQDqc O6U3F/N1Y/jdaMyivz1cUGAtR+Y/Zx81CAGUcl9QRPCGfQhJUoWyRo/XOLuqBprUmj ViBmnaieusLWbJXsT1cJsKBY08zJI5YpJXSs7JEw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.55] ([88.152.144.157]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MfHEJ-1lTc1l28y3-00gpuI; Thu, 15 Jul 2021 17:29:58 +0200 Subject: Re: [PATCH 1/5] efi_loader: increase eventlog buffer size To: Simon Glass Cc: Ilias Apalodimas , Masahisa Kojima , Alexander Graf , Dhananjay Phadke , U-Boot Mailing List References: <20210707133638.12630-1-masahisa.kojima@linaro.org> <20210707133638.12630-2-masahisa.kojima@linaro.org> <303be904-9580-b7be-c059-d0fd65e8b709@gmx.de> <626ee1fc-69eb-a716-b88b-2bb85f073b6f@gmx.de> From: Heinrich Schuchardt Message-ID: <2206d858-ca5f-4b8a-aadf-55fa3c384714@gmx.de> Date: Thu, 15 Jul 2021 17:29:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:x5+JJvOg2v2an774zDxzTOd8KM/3LL3kaUn1RxZorEk9oaVOQPp qBrmlkJL9O5dYFAgjfotOO4X96kXPE/DYy6zG2iaUncHPP1+QrU2eRmHcGdLLIiQSK5i7cb J/QO+Wbt2P+NS+ZPoeMu4vxYLQJZ4lXBrFFEzc5Id0+/lA9DSVKSSsopRiIuFxG/g162pQ3 OhfVkvf93DGzm7SSUpA1Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:fQc/trE3CrU=:p/DoNOKQrnQKEOJcyMe/Mw Wd4fDQEy04Dza/jF6p3JVtG0gha1kcdlu72Rhrlsm890ehYVmXgwo/TalyIcl+CGT2O4hGb4m CzF7sy3n74N/++BAVyPSmEvO1iii6NaSlU3uESOui71TcHiw1+/IAEE2pV+r0lpQn6jUpgBvt JnL+TF+I52r5a54SIaItLLfhDRCX1+5D4tIxrqbG86/kDCNeij8TQ8zNqPjaYPcVl8O8nv7DX 90us8gcxHC9eRVgAbWewWOceFUQSQLlX/ZaP2t45V5BAzj772sdGNzOZ4iFUJPhs6UIadhMQ9 hvoUYnRZyPMexe2lW0AKWF3QLLkptVTWn3Co2uXmErKZQjt/ZGSsL5O0Kam35rtMsYSqdpsuy hcnlVvnDJ9r+n36/PAnupR8hbX8phuNTTcoTxGqVFpNvM8zkTuT4+UKwN1FakcHpDkbhNyEsh wl2Yoms8NvVaB5EPFwSUX87JYObHdv5gKSOyL1Jg4R+jPeHq6dVjFujI8I6/rW07hheU1VQOK fQbpnEy8v4gyhTJiiGx0jN69dIT6nskF2UuDDGLAtm//FgNjP2gQ8dUXJMKIly5v7NnhzCZ36 TD07jSBa8+YKRBwKbMQIMHf1I36fdGrtUwvLyxRBsLrrtZaEtSu78EAaaX7X4WxA/npzGT+/K cBmwb+HZ7EhrF6D6hJzia+Earzkk6OP3Vbm9r3q6K2WVKybL5tvq9bIJGDKUtYVC1cMvE+MQN j5x4EtBvyx6J4R/WpZKTywSixQXxUGki/XuEual2sl2KF6b+rZjTh90YpeShYepQ7p3ic38Xu mwvvBG2U8pPIavJzhz0JoQGwK2DzpKfwpIZl+DCx0s4yUSW6RZ1ZRU8evJqzJxG1c3hD1DHKP k4N8q7sxZmq96ozPswKw1aXcxsMNQOcJzy3njo0CgEUtxgi74BsSzRo81T+VkPPFW7+HFbqC2 K7nivv4yOrpy09M//8ZJS7BE0EcoOIZ6OiurVPTHBrgoIpmN+DcE37Udzf7dGOgP/TZSMaD7e TreFjlprRouK1qvEugwdlCedhWES66vLevBa9IQw0RJxVM9pnTDQSLa8P6v85KXnsX7WBdLgc ZRHWtbmnuBkuG/3GEnhRsy+zbzqPmnp4McKLj2NTiv9aEDKx7lIm/v90e4dujdlU3kaNz2SxM eht0cxaVdn0d4/QUHE5ZFn3+61oGR7va292sLhG/wpfzzCZYewDLaxiZ3yCiaefBjRvas= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 15.07.21 17:18, Simon Glass wrote: > Hi Heinrich, > > On Thu, 15 Jul 2021 at 08:38, Heinrich Schuchardt w= rote: >> >> On 7/15/21 2:57 PM, Simon Glass wrote: >>> Hi Ilias, >>> >>> On Thu, 15 Jul 2021 at 00:20, Ilias Apalodimas >>> wrote: >>>> >>>> On Wed, Jul 14, 2021 at 08:52:07AM -0600, Simon Glass wrote: >>>>> Hi Ilias, >>>>> >>>>> On Mon, 12 Jul 2021 at 03:28, Ilias Apalodimas >>>>> wrote: >>>>>> >>>>>> On Mon, 12 Jul 2021 at 11:40, Masahisa Kojima >>>>>> wrote: >>>>>>> >>>>>>> Hi Simon, >>>>>>> >>>>>>> On Sun, 11 Jul 2021 at 09:01, Simon Glass wrote= : >>>>>>>> >>>>>>>> Hi Masahisa, >>>>>>>> >>>>>>>> On Wed, 7 Jul 2021 at 20:21, Masahisa Kojima wrote: >>>>>>>>> >>>>>>>>> On Wed, 7 Jul 2021 at 22:47, Heinrich Schuchardt wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 7/7/21 3:36 PM, Masahisa Kojima wrote: >>>>>>>>>>> This is a preperation to add eventlog support >>>>>>>>>>> described in TCG PC Client PFP spec. >>>>>>>>>>> >>>>>>>>>>> Signed-off-by: Masahisa Kojima >>>>>>>>>>> --- >>>>>>>>>>> lib/efi_loader/Kconfig | 2 +- >>>>>>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>>>>>>> >>>>>>>>>>> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig >>>>>>>>>>> index b2ab48a048..a87bf3cc98 100644 >>>>>>>>>>> --- a/lib/efi_loader/Kconfig >>>>>>>>>>> +++ b/lib/efi_loader/Kconfig >>>>>>>>>>> @@ -327,7 +327,7 @@ config EFI_TCG2_PROTOCOL >>>>>>>>>>> config EFI_TCG2_PROTOCOL_EVENTLOG_SIZE >>>>>>>>>>> int "EFI_TCG2_PROTOCOL EventLog size" >>>>>>>>>>> depends on EFI_TCG2_PROTOCOL >>>>>>>>>>> - default 4096 >>>>>>>>>>> + default 16384 >>>>>>>>>> >>>>>>>>>> I found this text in EDK II: >>>>>>>>>> >>>>>>>>>> Minimum length(in bytes) of the system preboot TCG event log ar= ea(LAML) >>>>>>>>>> ---------------------------------------------------------------= -------- >>>>>>>>>> >>>>>>>>>> For PC Client Implementation spec up to and including 1.2 the m= inimum >>>>>>>>>> log size is 64KB. (SecurityPkg/SecurityPkg.dec) >>>>>>>>> >>>>>>>>> Thank you for your feedback. >>>>>>>>> I have not checked this. >>>>>>>>> TCG spec also says "The Log Area Minimum Length for the TCG even= t log >>>>>>>>> MUST be at least 64KB." in ACPI chapter. >>>>>>>>> I will update to set 64KB as default. >>>>>>>>> >>>>>>>> >>>>>>>> Is this the same as the BLOBLISTT_TPM2_TCG_LOG thing? If so, can = we >>>>>>>> put this in the bloblist? We want to avoid adding code in EFI whi= ch is >>>>>>>> in U-Boot. >>>>>>> >>>>>>> I think bloblist is used for data passing from SPL/TPL to u-boot. >>>>>>> Is your comment saying that the eventlog generated >>>>>>> in u-boot(done in efi_tcg2.c with this patch series) should be app= ended >>>>>>> into the buffer pointed by BLOBLISTT_TPM2_TCG_LOG blob? >>>>>>> >>>>>> >>>>>> Even in that case the eventlog can't be appended. The TCG eventlog >>>>>> hould be copied into EFI memory, since the kernel expects to find i= t >>>>>> there. >>>>> >>>>> Typically bloblist is relocated by U-Boot. There are lots of tables >>>>> that must be passed to linux, including ACPI and SMBIOS. With blobli= st >>>>> they can all be in one place. >>>> >>>> >>>> The eventlog must be allocated in EFI memory though. >>> >>> There is really only one memory in U-Boot. I feel that all stuff that >>> EFI passes on to linux should be in a single bloblist. >> >> We have should follow existing standards and not invent our own. LInux >> is not the only OS booted via U-Boot. > > Perhaps we can talk about it in the next call. My point is not about > avoiding standards! > > What I am saying is that if we put things in a bloblist, and make that > available to Linux (or other OS) via EFI, things should work, but Which operating would be aware of your bloblist? Windows, BSD, Haiku? We want U-Boot to be interchangable with other UEFI firmware like EDK II. This will only work if we program against the same specs and don't invent new interfaces. Best regards Heinrich > non-EFI people are happy too. See the ACPI stuff for example - we put > all of those bits in a bloblist, which is really just a contiguous > area of memory. It is more convenient for U-Boot than allocating > memory willy nilly. Plus the 'bloblist' command lets you see what is > there. > > Anyway I really don't understand all of this well enough to say what > we should do. I am just passing on hints. There is way too much > 'separate' EFI code in U-Boot at present and we need to work to reduce > that and hopefully not add more. > > [..] > > Regards, > Simon >