24 Jul, 2019
1 commit
-
Pull request for UEFI sub-system for v2019.10-rc1 (2)
* Implement the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.
* Address errors of type -Werror=address-of-packed-member when building
with GCC9.1
* Fix an error when adding memory add addres 0x00000000.
* Rework some code comments for Sphinx compliance.
18 Jul, 2019
1 commit
-
There are multiple other openssl engines used by HSMs that can be used to
sign FIT images instead of forcing users to use pkcs11 type of service.Relax engine selection so that other openssl engines can be specified and
use generic key id definition formula.Signed-off-by: Vesa Jääskeläinen
Cc: Tom Rini
17 Jul, 2019
14 commits
-
The device path structure is packed. So no assumption on the alignment is
possible. Copy the file name in efi_file_from_path() to assure there is no
unaligned access.Signed-off-by: Heinrich Schuchardt
-
Properly convert UTF-8 file names to UTF-16.
Signed-off-by: Heinrich Schuchardt
-
Allow unaligned u16 strings as arguments to u16_strdup() and u16_strlen().
Signed-off-by: Heinrich Schuchardt
-
Convert function descriptions to Sphinx style.
Signed-off-by: Heinrich Schuchardt
-
Change comment for struct efi_pool_allocation to match Sphinx style.
Describe all structure fields.Signed-off-by: Heinrich Schuchardt
-
Add missing parameter descriptions.
Remove an invalid link.
Correct the formatting of a function comment.Signed-off-by: Heinrich Schuchardt
-
Use Sphinx style comments for describing function parameters.
Signed-off-by: Heinrich Schuchardt
-
Add missing colons after parameter descriptions.
Signed-off-by: Heinrich Schuchardt
-
scripts/kernel-doc pointed out some errors in the function comments in
efi_boottime.c.Add missing and remove superfluous parameter descriptions.
Escape * in a function description.
Add empty lines for readability.Signed-off-by: Heinrich Schuchardt
-
We currently have some inconsistent use of efi_add_memory_map()
throughout the code. In particular the return value of efi_add_memory_map()
is not interpreted the same way by various users in the codebase.This patch does the following:
- Changes efi_add_memory_map() to return efi_status_t.
- Adds a method description to efi_add_memory_map().
- Changes efi_add_memory_map() to return EFI_SUCCESS
- Returns non-zero for error in efi_add_memory_map()
- Updates efi_allocate_pages() to new efi_add_memory_map()
- Updates efi_free_pages() to new efi_add_memory_map()
- Updates efi_carve_out_dt_rsv() to new efi_add_memory_map()
- Updates efi_add_runtime_mmio() to new efi_add_memory_map()Fixes: 5d00995c361c ("efi_loader: Implement memory allocation and map")
Fixes: 74c16acce30b ("efi_loader: Don't allocate from memory holes")
Suggested-by: Heinrich Schuchardt
Cc: Alexander Graf
Signed-off-by: Bryan O'Donoghue
Reviewed-by: Heinrich Schuchardt -
Provide a unit test for SetVirtualAddressMap() and ConvertPointer().
As ConvertPointer() is not implemented yet this will spit out some
warnings.Signed-off-by: Heinrich Schuchardt
-
Implement the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.
This requires allocating the event and the event list from runtime data.
Signed-off-by: Heinrich Schuchardt
-
efi_set_virtual_address_map_runtime() must be of type __efi_runtime.
Fixes: ee8ebaaaaedc ("efi_loader: split off detaching SetVirtualAddress()")
Signed-off-by: Heinrich Schuchardt -
Boot services are not available after calling ExitBootServices(). So we
should not try to close an event here.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Oleksandr Suvorov
13 Jul, 2019
1 commit
-
The USE_TINY_PRINTF symbol only changes things within SPL and TPL
builds, so make it depend on that support. Next, make it default as
within these cases we should rarely have need of more advanced print
formats outside of the debug context.To do this, in a few cases we need to correct our Kconfig dependencies
as we had cases of non-SPL targets select'ing this symbol. Finally, in
the case of a few boards we really do need the full printf
functionality.Signed-off-by: Tom Rini
11 Jul, 2019
5 commits
-
There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass -
Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass -
An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass -
Free the memory allocated to store the test FDT upon test completion to
avoid leaking the memory. We don't bother cleaning up on test failure
since the code is broken in that case and should be fixed, in which case
the leak would also go away.Reported-by: Tom Rini
Suggested-by: Heinrich Schuchardt
Signed-off-by: Thierry Reding
Reviewed-by: Simon Glass -
It doesn't make a lot of sense to hang on sandbox when hang() is called,
since the only way out is Ctrl-C. In fact, Ctrl-C does not work if the
terminal is in raw mode, which it will be if the command-line has not been
reached yet. In that case, Ctrl-Z / kill -9 must be used, which is not
very friendly.Avoid all of this by quiting when hang() is called.
Signed-off-by: Simon Glass
07 Jul, 2019
13 commits
-
Linux can be called with a command line parameter efi=novamap, cf.
commit 4e46c2a95621 ("efi/arm/arm64: Allow SetVirtualAddressMap() to be
omitted"). In this case SetVirtualAddressMap() is not called after
ExitBootServices().OpenBSD 32bit does not call SetVirtualAddressMap() either.
Runtime services must be set to an implementation supported at runtime
in ExitBootServices().Reported-by: Ard Biesheuvel
Suggested-by: Alexander Graf
Signed-off-by: Heinrich Schuchardt -
We do not need any array typed detach list. Let's simply update the
pointers directly.Signed-off-by: Heinrich Schuchardt
-
Move the logic determining which board supports reset at runtime to Kconfig.
Signed-off-by: Heinrich Schuchardt
-
The runtime services SetVirtualAddress() and ConvertPointer() become
unavailable after SetVirtualAddress(). Other runtime services become
unavailable after ExitBootServices.Move the update of SetVirtualAddress() and ConvertPointer() to
efi_relocate_runtime_table().Use functions with the correct signature when detaching.
Signed-off-by: Heinrich Schuchardt
-
Provide a unit test for the variable services at runtime.
Currently we expect EFI_UNSUPPORTED to be returned as the runtime
implementation is still missing.Signed-off-by: Heinrich Schuchardt
-
Unimplemented runtime services should always return EFI_UNSUPPORTED as
described in the UEFI 2.8 spec.Signed-off-by: Heinrich Schuchardt
-
Our variable services are only provided at boottime. Therefore when
leaving boottime the variable function are replaced by dummy functions
returning EFI_UNSUPPORTED. Move this patching of the runtime table to the
variable services implementation. Executed it in ExitBootServices().Signed-off-by: Heinrich Schuchardt
-
The detaching of the runtime will have to move to ExitBootServices() to
encompass operating system that do not call SetVirtualAddressMap().This patch changes the logic for the relocation of the pointers in the
runtime table such that the relocation becomes independent of the entries
in the detach list.Signed-off-by: Heinrich Schuchardt
-
Some entries in the system table are set to NULL in ExitBootServices(). We
had them in the runtime detach list to avoid relocation of NULL. Let's
instead assign the pointers dynamically in efi_initialize_system_table() to
avoid the relocation entry.Signed-off-by: Heinrich Schuchardt
-
Provide an initialization routine for variable services.
Signed-off-by: Heinrich Schuchardt
-
Let's keep similar things together.
Move efi_query_variable_info() to lib/efi_loader/efi_variable.c
Signed-off-by: Heinrich Schuchardt
-
Leave only a single space after * if not aligning.
Signed-off-by: Heinrich Schuchardt
-
The current short description has a typo. Let it stand out clear that we
provide unit tests.Improve the description of the CMD_BOOTEFI_SELFTEST configuration option.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Alexander Graf
22 Jun, 2019
1 commit
-
Pull request for UEFI sub-system for v2019.07-rc5 (3)
This pull request provides error fixes for the graphical output protocol,
the text output protocol, and the extended text input protocol.Setting the boot device for the bootefi command is now not only supported
by the 'load' command but also for the file system specific commands like
'fatload'.
21 Jun, 2019
4 commits
-
When build SPL_OF_PLATDATA on i.MX6, meet issue the fdtdec_get_int
not defined, however fdtdec.c will use fdtdec_get_int, so let's
compile fdtdec_common.c when OF_LIBFDT selected.Since there is also SPL_OF_LIBFDT, so need to use
CONFIG_$(SPL_TPL_)OF_LIBFDT.Signed-off-by: Peng Fan
-
%s/efi_efi_/efi_/
Signed-off-by: Heinrich Schuchardt
-
If EFI_FILE_PROTOCOL.Delete() fails, always close the handle and return
EFI_WARN_DELETE_FAILURE.Signed-off-by: Heinrich Schuchardt
-
If no matching package list is found in ListPackageLists(), return
EFI_NOT_FOUND.If we do not support a package type, we will not find a matching package
list. Remove the unreachable EFI_PRINTF() statements.Signed-off-by: Heinrich Schuchardt