From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
U-Boot Mailing List <u-boot@lists.denx.de>,
AKASHI Takahiro <akashi.tkhro@gmail.com>,
Bin Meng <bmeng.cn@gmail.com>,
Eddie James <eajames@linux.ibm.com>,
Manorit Chawdhry <m-chawdhry@ti.com>,
Michal Simek <michal.simek@amd.com>,
Oleksandr Suvorov <oleksandr.suvorov@foundries.io>,
Sean Anderson <sean.anderson@seco.com>
Subject: Re: [PATCH v2 2/9] tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL
Date: Fri, 21 Jun 2024 13:19:15 -0600 [thread overview]
Message-ID: <20240621191915.GZ68077@bill-the-cat> (raw)
In-Reply-To: <CAFLszTi45oeCoLRQK_noh2dHXTMGGteadT83M9Ce9cC2fcR9wA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]
On Fri, Jun 21, 2024 at 11:55:42AM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 21 Jun 2024 at 10:05, Tom Rini <trini@konsulko.com> wrote:
[snip]
> > Yes, I very much do not like guessing about 3 numbers instead of
> > guessing about 1 number and using the standard mechanism we already
> > have. Please use BOARD_SIZE_LIMIT as this is the standard mechanism to
> > enforce size limits on U-Boot itself.
>
> If it were that easy I would have sent a patch :-)
>
> Here is the map for this board:
>
> ImagePos Offset Size Name
> 00000000 00000000 00800000 rom
> ff800000 ff800000 00001000 intel-descriptor
> ff801000 ff801000 001ff000 intel-me
> ffef0000 ffef0000 000999f0 u-boot-with-ucode-ptr
> fff899f0 fff899f0 00005554 u-boot-dtb-with-ucode
> fff8ef50 fff8ef50 00000000 u-boot-ucode
> fff8ef50 fff8ef50 00000571 fdtmap
> fff90000 fff90000 00010000 intel-vga
> fffa0000 fffa0000 0002fc94 intel-mrc
> fffcfc94 fffcfc94 00000000 private-files
> fffff800 fffff800 00000070 x86-start16
> fffffff0 fffffff0 00000005 x86-reset16
> fffffff8 fffffff8 00000008 image-header
>
> What limit should I set on what?
Is this a trick question?
$ printf %d\\n $(( 0xfff90000 - 0xffef0000))
655360
Of course since we're less than that today, you can reduce it by
whatever other magic numbers I'm not seeing but are part of your assumed
sizes.
> - the U-Boot is the thing you are wanting to limit
> - the dtb has microcode added
> - the ucode is empty in this case
> - the fdtmap is variable in size
>
> So this all seems a bit backwards. The actual limit is that
> (u-boot-with-ucode-ptr + u-boot-dtb-with-ucode + u-boot-ucode +
> fdtmap) fits in the space available. Note that some boards don't have
> intel-vga or intel-mrc.
>
> With the other patch I sent I can have a sensible limit for all x86 boards.
And you can set the same sensible limit with the existing mechanism with
the bonus of it not making x86 different from the rest?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2024-06-21 19:19 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 14:59 [PATCH v2 0/9] Bug-fixes for a few boards Simon Glass
2024-06-10 14:59 ` [PATCH v2 1/9] nvidia: nyan-big: Disable debug UART Simon Glass
2024-06-10 14:59 ` [PATCH v2 2/9] tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL Simon Glass
2024-06-14 6:03 ` Ilias Apalodimas
2024-06-14 6:59 ` Heinrich Schuchardt
2024-06-14 7:01 ` Ilias Apalodimas
2024-06-14 9:04 ` Heinrich Schuchardt
2024-06-15 7:01 ` Ilias Apalodimas
2024-06-15 7:03 ` Ilias Apalodimas
2024-06-17 13:53 ` Simon Glass
2024-06-17 17:16 ` Tom Rini
2024-06-18 12:43 ` Simon Glass
2024-06-18 14:15 ` Tom Rini
2024-06-19 3:03 ` Simon Glass
2024-06-19 15:32 ` Tom Rini
2024-06-20 23:05 ` Simon Glass
2024-06-20 23:19 ` Tom Rini
2024-06-21 14:57 ` Simon Glass
2024-06-21 16:05 ` Tom Rini
2024-06-21 17:55 ` Simon Glass
2024-06-21 19:19 ` Tom Rini [this message]
2024-06-21 19:38 ` Simon Glass
2024-06-21 22:12 ` Tom Rini
2024-06-23 21:52 ` Simon Glass
2024-06-24 17:28 ` Tom Rini
2024-06-10 14:59 ` [PATCH v2 3/9] rockchip: veyron: Add logging for power init Simon Glass
2024-06-10 17:02 ` Quentin Schulz
2024-06-10 14:59 ` [PATCH v2 4/9] power: regulator: Handle autoset in regulators_enable_boot_on() Simon Glass
2024-06-10 14:59 ` [PATCH v2 5/9] fdt: Correct condition for bloblist existing Simon Glass
2024-06-10 14:59 ` [PATCH v2 6/9] spl: Allow ATF to work when dcache is disabled Simon Glass
2024-06-10 14:59 ` [PATCH v2 7/9] rockchip: Ensure memory size is available in RK3399 SPL Simon Glass
2024-06-11 11:27 ` Quentin Schulz
2024-06-11 13:43 ` Jonas Karlman
2024-06-11 13:50 ` Quentin Schulz
2024-06-11 19:13 ` Simon Glass
2024-06-10 14:59 ` [PATCH v2 8/9] rockchip: bob: kevin: Disable dcache in SPL Simon Glass
2024-06-10 14:59 ` [PATCH v2 9/9] Drop the special am335x_boneblack_vboot target Simon Glass
2024-06-10 16:29 ` Tom Rini
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=20240621191915.GZ68077@bill-the-cat \
--to=trini@konsulko.com \
--cc=akashi.tkhro@gmail.com \
--cc=bmeng.cn@gmail.com \
--cc=eajames@linux.ibm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=m-chawdhry@ti.com \
--cc=michal.simek@amd.com \
--cc=oleksandr.suvorov@foundries.io \
--cc=sean.anderson@seco.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/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