e2237a2c | 14-Jan-2019 |
Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> |
fdt: parse "reserved-memory" for memory reservation
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries
fdt: parse "reserved-memory" for memory reservation
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries.
Extend this to the more commonly used scheme of the "reserved-memory" node.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
0f7c51a6 | 14-Jan-2019 |
Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> |
lib: lmb: reserving overlapping regions should fail
lmb_add_region handles overlapping regions wrong: instead of merging or rejecting to add a new reserved region that overlaps an existing one, it j
lib: lmb: reserving overlapping regions should fail
lmb_add_region handles overlapping regions wrong: instead of merging or rejecting to add a new reserved region that overlaps an existing one, it just adds the new region.
Since internally the same function is used for lmb_alloc, change lmb_add_region to reject overlapping regions.
Also, to keep reserved memory correct after 'free', reserved entries created by allocating memory must not set their size to a multiple of alignment but to the original size. This ensures the reserved region is completely removed when the caller calls 'lmb_free', as this one takes the same size as passed to 'lmb_alloc' etc.
Add test to assert this.
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
show more ...
|
5c38e05e | 11-Dec-2018 |
Alexander Graf <agraf@suse.de> |
efi_loader: Make RTS relocation more robust
While changing the RTS alignment to 64KB in commit 7a82c3051c8f ("efi_loader: Align runtime section to 64kb") the relocation code started to break.
The r
efi_loader: Make RTS relocation more robust
While changing the RTS alignment to 64KB in commit 7a82c3051c8f ("efi_loader: Align runtime section to 64kb") the relocation code started to break.
The reason for that is that we didn't actually look at the real relocation data. We merely took the RUNTIME_CODE section as a hint and started to relocate based on self calculated data from that point on. That calculation was now out of sync though.
To ensure we're not running into such a situation again, this patch makes the runtime relocation code a bit more robust. We can just trust the phys/virt hints from the payload. We also should check that we really only have a single section, as the code doesn't handle multiple code relocations yet.
Fixes: 7a82c3051c8f ("efi_loader: Align runtime section to 64kb") Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reported-by: Loic Devulder <ldevulder@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Loic Devulder <ldevulder@suse.de> Tested-by: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
5bdb0a7c | 18-Dec-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
lib: crc32: mark static variable as __efi_runtime_data
In commit 483dbab9f931 ("lib: crc32: mark function crc32() as __efi_runtime") one local static variable was missed. It did not end up in the __
lib: crc32: mark static variable as __efi_runtime_data
In commit 483dbab9f931 ("lib: crc32: mark function crc32() as __efi_runtime") one local static variable was missed. It did not end up in the __efi_runtime_data section as it should.
If CONFIG_DYNAMIC_CRC_TABLE=y a data abort execption may occur when the UEFI payload calls the SetVirtualAddressMap() runtime service.
Reported-by: Dominik Adamski <dominik.adamski@northerntech.community> Fixes: 483dbab9f931 ("lib: crc32: mark function crc32() as __efi_runtime") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
51c2345b | 25-Nov-2018 |
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
Roll CRC16-CCITT into the hash infrastructure
The CRC16-CCITT checksum function is useful for space-constrained applications (such as obtaining a checksum across a 2KBit or 4KBit EEPROM) in boot app
Roll CRC16-CCITT into the hash infrastructure
The CRC16-CCITT checksum function is useful for space-constrained applications (such as obtaining a checksum across a 2KBit or 4KBit EEPROM) in boot applications. It has not been accessible from boot scripts until now (due to not having a dedicated command and not being supported by the hash infrstructure) limiting its applicability outside of custom commands.
This adds the CRC16-CCITT (poly 0x1021, init 0x0) algorithm to the list of available hashes and adds a new crc16_ccitt_wd_buf() to make this possible.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [trini: Fix building crc16.o for SPL/TPL] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
20031567 | 14-Nov-2018 |
Philippe Reynes <philippe.reynes@softathome.com> |
rsa: add a structure for the padding
The rsa signature use a padding algorithm. By default, we use the padding pkcs-1.5. In order to add some new padding algorithm, we add a padding framework to man
rsa: add a structure for the padding
The rsa signature use a padding algorithm. By default, we use the padding pkcs-1.5. In order to add some new padding algorithm, we add a padding framework to manage several padding algorithm. The choice of the padding is done in the file .its.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
1a82b341 | 05-Nov-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
efi_loader: bootmgr: add load option helper functions
In this patch, helper functions for an load option variable (BootXXXX) are added: * efi_deserialize_load_option(): parse a string into load_opti
efi_loader: bootmgr: add load option helper functions
In this patch, helper functions for an load option variable (BootXXXX) are added: * efi_deserialize_load_option(): parse a string into load_option data (renamed from parse_load_option and exported) * efi_serialize_load_option(): convert load_option data into a string
Those functions will be used to implement efishell command.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
2419b161 | 05-Nov-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
efi_loader: allow device == NULL in efi_dp_from_name()
This is a preparatory patch for use in efi_serialize_load_option() as a load option's file_path should have both a device path and a file path.
efi_loader: allow device == NULL in efi_dp_from_name()
This is a preparatory patch for use in efi_serialize_load_option() as a load option's file_path should have both a device path and a file path.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|