Pull request for UEFI sub-system for efi-2020-07-rc6

Corrections for variable definitions are provided:
 
 * Correct size of secure boot related UEFI variables.
 * Do not use int for storing an enum.
 * Replace fdt_addr by fdt_size where needed.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl700zQACgkQxIHbvCwF
 GsRB2g/8DbWDoZL6YlyXdTpYqJFxVYDtPQhrzJNdFZY3/sWYQwwJeJaKRzeRQuew
 NlgoScZ9zCAVE2SQcOcUpVT2VK5pgRP/c36aqTuVK+5Il3QTnE6+wV7fD4n/RR0y
 SLOiJBaIIpzYmS8uRZ95aV9X1Q8SrvAx+ao3kW4t449EbjBkIl59ymhZO/Umjqk7
 Y8OJkITMHRN2HECaumh9JzWhdJFcicZ9yr2EXRfbMXPsAXIEo12UhpDcYA76pp2W
 HDug0bpj2oq1p+9imyLveePBdpnEMJujKsCkYOu8Gn0nWtJcYoNeC6mtjA140VcI
 +tdIr4Wo/EGHWCXxl5F9Tub4zv/EJBmgfl60jLwzFZEJ9IdWeLQGzWaRsediphYY
 VH2fHZkATV3VG9Xdv77F107+03mtRVGDjZsPMQjbSgOo0MXYM8VdHyWja46cdSzn
 sdBXnR/gfqkBC/2VjsJLaYrDtBa1y6CeROSb8fcZ8eHKhBFJpPs54rdscBjAPKbv
 oj8cw6nB5RYG/tFKJGwjvzvsVcE0xiamJnvCHekvY3j0jP7ghubJSREiZ1RKPfto
 8Z8qUOd9aT6knzdbap1sM3wG0gsoBTIWLL5VlqyJmd/TzXIN/A+4/jDRjihrnN3q
 tAgNlOgn1lZk1HAYWaeK8wpDYjrM68RD3PZiaBs3lK8jos8bKTw=
 =uCkw
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-07-rc6' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc6

Corrections for variable definitions are provided:

* Correct size of secure boot related UEFI variables.
* Do not use int for storing an enum.
* Replace fdt_addr by fdt_size where needed.
This commit is contained in:
Tom Rini 2020-06-25 13:33:15 -04:00
commit eae62ae8de
2 changed files with 9 additions and 8 deletions

View file

@ -189,7 +189,8 @@ static void efi_carve_out_dt_rsv(void *fdt)
if (nodeoffset >= 0) {
subnode = fdt_first_subnode(fdt, nodeoffset);
while (subnode >= 0) {
fdt_addr_t fdt_addr, fdt_size;
fdt_addr_t fdt_addr;
fdt_size_t fdt_size;
/* check if this subnode has a reg property */
fdt_addr = fdtdec_get_addr_size_auto_parent(

View file

@ -27,7 +27,7 @@ enum efi_secure_mode {
};
static bool efi_secure_boot;
static int efi_secure_mode;
static enum efi_secure_mode efi_secure_mode;
static u8 efi_vendor_keys;
#define READ_ONLY BIT(31)
@ -185,17 +185,17 @@ static const char *parse_attr(const char *str, u32 *attrp, u64 *timep)
/**
* efi_set_secure_state - modify secure boot state variables
* @sec_boot: value of SecureBoot
* @secure_boot: value of SecureBoot
* @setup_mode: value of SetupMode
* @audit_mode: value of AuditMode
* @deployed_mode: value of DeployedMode
*
* Modify secure boot stat-related variables as indicated.
* Modify secure boot status related variables as indicated.
*
* Return: status code
*/
static efi_status_t efi_set_secure_state(int sec_boot, int setup_mode,
int audit_mode, int deployed_mode)
static efi_status_t efi_set_secure_state(u8 secure_boot, u8 setup_mode,
u8 audit_mode, u8 deployed_mode)
{
u32 attributes;
efi_status_t ret;
@ -204,8 +204,8 @@ static efi_status_t efi_set_secure_state(int sec_boot, int setup_mode,
EFI_VARIABLE_RUNTIME_ACCESS |
READ_ONLY;
ret = efi_set_variable_common(L"SecureBoot", &efi_global_variable_guid,
attributes, sizeof(sec_boot), &sec_boot,
false);
attributes, sizeof(secure_boot),
&secure_boot, false);
if (ret != EFI_SUCCESS)
goto err;