- 16 2月, 2019 3 次提交
-
-
由 Heinrich Schuchardt 提交于
If the last block in the relocation table contains only a single relocation, the current coding ignores it. Fix the determination of the end of the relocation table. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
由 Heinrich Schuchardt 提交于
- Add missing function descriptions. - Update existing function descriptions to match Sphinx style. - Add lib/efi_loader/efi_image_loader.c to the input files for Sphinx generated documentation. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
由 Heinrich Schuchardt 提交于
Up to now efi_load_pe() returns the entry point or NULL in case of an error. This does not allow to return correct error codes from LoadImage(). Let efi_load_pe() return a status code and fill in the entry point in the corresponding field of the image object. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
- 24 9月, 2018 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Create the handle of loaded images and the EFI_LOADED_IMAGE_PROTOCOL inside efi_setup_loaded_image(). Do not use local variables. Currently we expect the loaded image handle to point to the loaded image protocol. Additionally we have appended private fields to the protocol. With the patch the handle points to a loaded image object and the private fields are added here. This matches how we handle the net and the gop object. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 25 7月, 2018 1 次提交
-
-
由 Alexander Graf 提交于
The EFI image loader tries to determine which target architecture we're working with to only load PE binaries that match. So far this has worked based on CONFIG defines, because the target CPU was always indicated by a config define. With sandbox however, this is not longer true as all sandbox targets only encompass a single CONFIG option and so we need to use compiler defines to determine the CPU architecture. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 14 6月, 2018 1 次提交
-
-
由 Alexander Graf 提交于
The PE standard allows for HI20/LOW12 relocations. Within the efi_loader target we always know that our relocation target is 4k aligned, so we don't need to worry about the LOW12 part. This patch adds support for the respective relocations. With this and a few grub patches I have cooking in parallel I'm able to run grub on RISC-V. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 03 6月, 2018 2 次提交
-
-
由 Heinrich Schuchardt 提交于
asm/global_data.h is already included via common.h. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Ivan Gorinov 提交于
Instead of difference between preferred and actual image base, the actual base is added to the fields specified in the .reloc section. Use ImageBase from PE optional header to compute the delta, exit early if the image is loaded at the preferred address. Signed-off-by: NIvan Gorinov <ivan.gorinov@intel.com> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 29 5月, 2018 1 次提交
-
-
由 Alexander Graf 提交于
We were using our EFI_CACHELINE_SIZE define only in the runtime service code, but left the image loader to use plain CONFIG_SYS_CACHELINE_SIZE. This patch moves EFI_CACHELINE_SIZE into efi_loader.h and converts the image loader to use it. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 11 5月, 2018 1 次提交
-
-
由 Tom Rini 提交于
As part of the main conversion a few files were missed. These files had additional whitespace after the '*' and before the SPDX tag and my previous regex was too strict. This time I did a grep for all SPDX tags and then filtered out anything that matched the correct styles. Fixes: 83d290c5 ("SPDX: Convert all of our single license tags to Linux Kernel style") Reported-by: NHeinrich Schuchardt <xypron.debian@gmx.de> Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 28 4月, 2018 1 次提交
-
-
由 Tom Rini 提交于
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 06 4月, 2018 1 次提交
-
-
由 Ivan Gorinov 提交于
Check FileHeader.Machine to make sure the EFI executable image is built for the same architecture. For example, 32-bit U-Boot on x86 will print an error message instead of loading an x86_64 image and crashing. Signed-off-by: NIvan Gorinov <ivan.gorinov@intel.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 05 4月, 2018 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Introduce functions to print information about loaded images. If we want to analyze an exception in an EFI image we need the offset between the PC and the start of the loaded image. With efi_print_image_info() we can print the necessary information for a single image, e.g. UEFI image [0xbffe6000:0xbffe631f] pc=0x138 '/\snp.efi' efi_print_image_infos() provides output for all loaded images. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 04 4月, 2018 2 次提交
-
-
由 Heinrich Schuchardt 提交于
According to the Portable Executable and Common Object File Format Specification the image size must be a multiple of the alignment of sections. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Heinrich Schuchardt 提交于
For analyzing crash output the relocation address and size are needed. Save them in the loaded image info. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 10 2月, 2018 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Before the patch an undefined constant EFI_SUBSYSTEM was used in the crt0 code. The current version of binutils does not swallow the error. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888403 The necessary constant IMAGE_SUBSYSTEM_EFI_APPLICATION is already defined in pe.h. So let's factor out asm-generic/pe.h for the image subsystem constants and use it in our assembler code. IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER does not exist in the specification let's use IMAGE_SUBSYSTEM_EFI_ROM instead. The include pe.h is only used in code maintained by Alex so let him be the maintainer here too. Reported-by: NAndre Przywara <andre.przywara@arm.com> Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: NVagrant Cascadian <vagrant@debian.org> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 23 1月, 2018 2 次提交
-
-
由 Heinrich Schuchardt 提交于
The category of memory allocated for an EFI image should depend on its type (application, bootime service driver, runtime service driver). Our helloworld.efi built on arm64 has an illegal image type. Treat it like an EFI application. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Heinrich Schuchardt 提交于
virt_size is of type unsigned long. So it should be printed with %ul. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 20 9月, 2017 3 次提交
-
-
由 Rob Clark 提交于
These should be set according to the image type. Shell.efi and SCT.efi use these fields to determine what sort of image they are loading. Signed-off-by: NRob Clark <robdclark@gmail.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Rob Clark 提交于
Similar to a "real" UEFI implementation, the bootmgr looks at the BootOrder and BootXXXX variables to try to find an EFI payload to load and boot. This is added as a sub-command of bootefi. The idea is that the distro bootcmd would first try loading a payload via the bootmgr, and then if that fails (ie. first boot or corrupted EFI variables) it would fallback to loading bootaa64.efi. (Which would then load fallback.efi which would look for \EFI\*\boot.csv and populate BootOrder and BootXXXX based on what it found.) Signed-off-by: NRob Clark <robdclark@gmail.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Rob Clark 提交于
fallback.efi (and probably other things) use UEFI's simple-file-system protocol and file support to search for OS's to boot. Signed-off-by: NRob Clark <robdclark@gmail.com> [agraf: whitespace fixes, unsigned fixes] Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 19 7月, 2017 1 次提交
-
-
由 xypron.glpk@gmx.de 提交于
efi_open_protocol was implemented to call a protocol specific open function to retrieve the protocol interface. The UEFI specification does not know of such a function. It is not possible to implement InstallProtocolInterface with the current design. With the patch the protocol interface itself is stored in the list of installed protocols of an efi_object instead of an open function. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> [agraf: fix efi gop support] Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 04 7月, 2017 1 次提交
-
-
由 xypron.glpk@gmx.de 提交于
If a relocation type is not supported loading the EFI binary should be aborted. Writing a message only is insufficient. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> [agraf: use a() != b coding style] Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 15 11月, 2016 1 次提交
-
-
由 Simon Glass 提交于
Make sure that the cache flushes correctly by ensuring that the end address is correctly aligned. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 21 8月, 2016 1 次提交
-
-
由 Alexander Graf 提交于
We were truncating the image offset within the target image to 16 bits which again meant that we were potentially overwriting random memory in the lower 16 bits of the image. This patch casts the offset to a more reasonable 32bits. With this applied, I can successfully see Shell.efi assert because it can't find a protocol it expects to be available. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 27 3月, 2016 1 次提交
-
-
由 Alexander Graf 提交于
When switching between EFI context and U-Boot context we need to swap the register that "gd" resides in. Some functions slipped through here, with efi_allocate_pool / efi_free_pool not doing the switch correctly and efi_return_handle switching too often. Fix them all up to make sure we always have consistent register state. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 16 3月, 2016 1 次提交
-
-
由 Alexander Graf 提交于
EFI uses the PE binary format for its application images. Add support to EFI PE binaries as well as all necessary bits for the "EFI image loader" interfaces. Signed-off-by: NAlexander Graf <agraf@suse.de> Reviewed-by: NSimon Glass <sjg@chromium.org> Tested-by: NSimon Glass <sjg@chromium.org>
-