[U-Boot] efi_loader: arch/arm/include/asm/setjmp.h

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Oct 7 20:23:35 UTC 2017


Hello Alex,

our current logic for removing the handler of the loaded image is wrong:

If a driver image calls Exit() with EFI_SUCCESS the image has to remain.

I tried to rework the logic and needed a second setjmp in cmd/bootefi.c
to handle 'bootefi selftest'.

On arm this resulted in:

Building current source for 1 boards (1 thread, 4 jobs per thread)
       arm:  +   vexpress_ca15_tc2
+{standard input}: Assembler messages:
+{standard input}:638: Error: symbol `jmp_target' is already defined
+{standard input}:633: Error: symbol .text.do_bootefi_exec is in a
different section
+make[2]: *** [cmd/bootefi.o] Error 1
+make[1]: *** [cmd] Error 2
+make: *** [sub-make] Error 2

All registers that have to be restored should be stored in jmp_buf and
not at any static address (jmp_target).

Otherwise nesting of setjmp will not work:
U-Boot calling an EFI application, which loads another EFI application
which exits to the first application which in turn exits to the U-Boot.

Are you able to rework this? Unfortunately I lack the assembler
experience. The uClibc implementation might be a good starting point.

Best regards

Heinrich


More information about the U-Boot mailing list