[PATCH 21/32] efi: arm: Drop exception code when running as an EFI app

Tom Rini trini at konsulko.com
Fri Feb 7 02:42:15 CET 2025


On Thu, Feb 06, 2025 at 05:49:43PM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Thu, 6 Feb 2025 at 16:22, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Thu, Feb 06, 2025 at 02:27:13PM -0700, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Thu, 6 Feb 2025 at 10:08, Tom Rini <trini at konsulko.com> wrote:
> > > >
> > > > On Thu, Feb 06, 2025 at 05:33:06AM -0700, Simon Glass wrote:
> > > > > Hi Tom,
> > > > >
> > > > > On Mon, 3 Feb 2025 at 19:00, Tom Rini <trini at konsulko.com> wrote:
> > > > > >
> > > > > > On Mon, Feb 03, 2025 at 05:38:52PM -0700, Simon Glass wrote:
> > > > > > > Hi Tom,
> > > > > > >
> > > > > > > On Mon, 3 Feb 2025 at 13:09, Tom Rini <trini at konsulko.com> wrote:
> > > > > > > >
> > > > > > > > On Mon, Feb 03, 2025 at 10:42:14AM -0700, Simon Glass wrote:
> > > > > > > >
> > > > > > > > > This code cannot be used since EFI is in charge of managing exceptions.
> > > > > > > > > Drop it.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > > > > > > > ---
> > > > > > > > >
> > > > > > > > >  arch/arm/cpu/armv8/Makefile | 2 +-
> > > > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > >
> > > > > > > > Why is SPL on in this case?
> > > > > > >
> > > > > > > SPL is enabled by a specific Kconfig option, which seems to have
> > > > > > > exceptions but not exception levels. That seemed to match what the EFI
> > > > > > > app wants, for now.
> > > > > >
> > > > > > OK, so why aren't you turning off SPL? You're not using SPL at all,
> > > > > > right?
> > > > >
> > > > > Not using SPL, but using the same code as SPL happens to use.
> > > >
> > > > But is CONFIG_SPL enabled, or not? It shouldn't be if I follow you.
> > >
> > > No, it isn't enabled. But we do want that exceptions.o both for the
> > > EFI app and for whatever boards use SPL.
> >
> > Um. Isn't that the opposite of what your commit message says?
> 
> Would it be clearer if I said 'exception-level code'?

Since we have exception_level.o and exception.o yes, you should be clear
about the code you're talking about.

> 
> > And the
> > Makefile snippet today is:
> > ifdef CONFIG_XPL_BUILD
> > obj-$(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) += exceptions.o
> 
> ^^^ this is the line that I want enabled for the EFI app
> 
> > else
> > obj-y   += exceptions.o
> > obj-y   += exception_level.o
> > endif

Then you should be working in the non-XPL stanza and not enabling an SPL
symbol for your not SPL build. I gather you're trying to not include
exception_level.o because since you can't use --gc-sections you're
having some undefined symbol problem. How about you file an issue for
me to tidy up ARMV8_SPL_EXCEPTION_VECTORS and exception_level.o
handling.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250206/e10f40e0/attachment.sig>


More information about the U-Boot mailing list