Merge tag 'efi-2021-07-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-07-rc1-2 Documentation: man-page for fatinfo Bug fixes: memory leak in efi_capsule_scan_dir() incorrect invocations of EFI_CALL macro creating ESRT table buffer overflow in tcg2_create_digest()
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
Apalis iMX8X V1.1A Module (SoC NXP i.MX8QXP RevB)
|
||||
==========================
|
||||
=================================================
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
||||
@@ -45,7 +45,7 @@ Here is some material relevant to Chromium OS verified boot with U-Boot:
|
||||
- Presented at Open Source Firmware Conference 2018, Erlangen
|
||||
- Describes the work in progress as at the end of 2018
|
||||
- Slides at `OSFC <https://2018.osfc.io/uploads/talk/paper/26/U-Boot_with_Chrome_OS_and_firmware_packaging.pdf>`_
|
||||
- Video on `Youtube <https://www.youtube.com/watch?v=1jknxUvmwpo>`_
|
||||
- `Youtube video 'OSFC - U-Boot with Chrome OS and firmware packaging' <https://www.youtube.com/watch?v=1jknxUvmwpo>`_
|
||||
|
||||
- "Verified Boot in Chrome OS and how to make it work for you"
|
||||
|
||||
@@ -58,7 +58,7 @@ Here is some material relevant to Chromium OS verified boot with U-Boot:
|
||||
and pit/pi (`Samsung Chromebook 2 <https://www.cnet.com/products/samsung-chromebook-2-xe503c12-11-6-exynos-5-octa-4-gb-ram-16-gb-ssd/>`_
|
||||
with Exynos 5 Octa 5420 in 2014).
|
||||
- Slides at `Google research <https://research.google/pubs/pub42038/>`_
|
||||
- Video at `Youtube <https://www.youtube.com/watch?v=kdpZC9jFzZA>`_
|
||||
- `Youtube video 'Verified Boot on Chrome OS and How to do it yourself' <https://www.youtube.com/watch?v=kdpZC9jFzZA>`_
|
||||
|
||||
- "Chrome University 2018: Chrome OS Firmware and Verified Boot 201"
|
||||
|
||||
@@ -67,7 +67,7 @@ Here is some material relevant to Chromium OS verified boot with U-Boot:
|
||||
topics. This has no U-Boot information, but does cover coreboot and also
|
||||
talks about the Chrome OS EC and Security chip. This is probably the
|
||||
best introduction talk.
|
||||
- Video at `YouTube <https://www.youtube.com/watch?v=WY2sWpuda2g>`_
|
||||
- `Youtube video 'Chrome University 2018: Chrome OS Firmware and Verified Boot 201' <https://www.youtube.com/watch?v=WY2sWpuda2g>`_
|
||||
|
||||
- `Chromium OS U-Boot <https://www.chromium.org/developers/u-boot>`_
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ SIT format
|
||||
SIT is a 20 byte long structure containing of 5 32-bit words. Those encode
|
||||
bootloader B-copy area offset (called "firstSectorNumber"), magic value
|
||||
(called "tag") that is always 0x00112233, and three unused words set to 0.
|
||||
SIT is documented in [1] and [2]. Example SIT are below::
|
||||
SIT is documented in [1]_ and [2]_. Example SIT are below::
|
||||
|
||||
$ hexdump -vC sit-mx7d.bin
|
||||
00000000 00 00 00 00
|
||||
|
||||
@@ -28,6 +28,7 @@ Shell commands
|
||||
exception
|
||||
exit
|
||||
false
|
||||
fatinfo
|
||||
for
|
||||
load
|
||||
loady
|
||||
|
||||
@@ -756,8 +756,11 @@ static efi_status_t efi_capsule_scan_dir(u16 ***files, unsigned int *num)
|
||||
tmp_size = dirent_size;
|
||||
ret = EFI_CALL((*dirh->read)(dirh, &tmp_size, dirent));
|
||||
if (ret == EFI_BUFFER_TOO_SMALL) {
|
||||
struct efi_file_info *old_dirent = dirent;
|
||||
|
||||
dirent = realloc(dirent, tmp_size);
|
||||
if (!dirent) {
|
||||
dirent = old_dirent;
|
||||
ret = EFI_OUT_OF_RESOURCES;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ efi_status_t efi_esrt_allocate_install(u32 num_entries)
|
||||
|
||||
/* If there was a previous ESRT, deallocate its memory now. */
|
||||
if (esrt)
|
||||
ret = EFI_CALL(efi_free_pool(esrt));
|
||||
ret = efi_free_pool(esrt);
|
||||
|
||||
esrt = new_esrt;
|
||||
|
||||
@@ -253,8 +253,8 @@ efi_status_t efi_esrt_add_from_fmp(struct efi_firmware_management_protocol *fmp)
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
ret = EFI_CALL(efi_allocate_pool(EFI_BOOT_SERVICES_DATA, info_size,
|
||||
(void **)&img_info));
|
||||
ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, info_size,
|
||||
(void **)&img_info);
|
||||
if (ret != EFI_SUCCESS) {
|
||||
EFI_PRINT("ESRT failed to allocate memory for image info.\n");
|
||||
return ret;
|
||||
@@ -298,7 +298,7 @@ efi_status_t efi_esrt_add_from_fmp(struct efi_firmware_management_protocol *fmp)
|
||||
}
|
||||
|
||||
out:
|
||||
EFI_CALL(efi_free_pool(img_info));
|
||||
efi_free_pool(img_info);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -384,8 +384,8 @@ efi_status_t efi_esrt_populate(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = EFI_CALL(efi_allocate_pool(EFI_BOOT_SERVICES_DATA, info_size,
|
||||
(void **)&img_info));
|
||||
ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, info_size,
|
||||
(void **)&img_info);
|
||||
if (ret != EFI_SUCCESS) {
|
||||
EFI_PRINT("ESRT failed to allocate memory for image info\n");
|
||||
goto out;
|
||||
@@ -405,13 +405,13 @@ efi_status_t efi_esrt_populate(void)
|
||||
|
||||
if (ret != EFI_SUCCESS) {
|
||||
EFI_PRINT("ESRT failed to obtain image info from FMP\n");
|
||||
EFI_CALL(efi_free_pool(img_info));
|
||||
efi_free_pool(img_info);
|
||||
goto out;
|
||||
}
|
||||
|
||||
num_entries += desc_count;
|
||||
|
||||
EFI_CALL(efi_free_pool(img_info));
|
||||
efi_free_pool(img_info);
|
||||
}
|
||||
|
||||
EFI_PRINT("ESRT create table with %u entries\n", num_entries);
|
||||
@@ -430,9 +430,9 @@ efi_status_t efi_esrt_populate(void)
|
||||
*/
|
||||
it_handle = base_handle;
|
||||
for (u32 idx = 0; idx < no_handles; idx++, it_handle++) {
|
||||
ret = EFI_CALL(efi_search_protocol(*it_handle,
|
||||
&efi_guid_firmware_management_protocol,
|
||||
&handler));
|
||||
ret = efi_search_protocol(*it_handle,
|
||||
&efi_guid_firmware_management_protocol,
|
||||
&handler);
|
||||
|
||||
if (ret != EFI_SUCCESS) {
|
||||
EFI_PRINT("ESRT unable to find FMP handle (%u)\n",
|
||||
@@ -448,7 +448,7 @@ efi_status_t efi_esrt_populate(void)
|
||||
|
||||
out:
|
||||
|
||||
EFI_CALL(efi_free_pool(base_handle));
|
||||
efi_free_pool(base_handle);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -490,8 +490,8 @@ efi_status_t efi_esrt_register(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = EFI_CALL(efi_create_event(EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
|
||||
efi_esrt_new_fmp_notify, NULL, NULL, &ev));
|
||||
ret = efi_create_event(EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
|
||||
efi_esrt_new_fmp_notify, NULL, NULL, &ev);
|
||||
if (ret != EFI_SUCCESS) {
|
||||
EFI_PRINT("ESRT failed to create event\n");
|
||||
return ret;
|
||||
|
||||
@@ -515,7 +515,7 @@ static efi_status_t tcg2_create_digest(const u8 *input, u32 length,
|
||||
sha1_context ctx;
|
||||
sha256_context ctx_256;
|
||||
sha512_context ctx_512;
|
||||
u8 final[TPM2_ALG_SHA512];
|
||||
u8 final[TPM2_SHA512_DIGEST_SIZE];
|
||||
efi_status_t ret;
|
||||
u32 active;
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user