Skip to content

Commit bd7938f

Browse files
Gu Zitaoopsiff
authored andcommitted
sw64: efi: fix boot failure when Secure Boot unsupported in firmware
Signed-off-by: Gu Zitao <guzitao@wxiat.com> Reviewed-by: He Sheng <hesheng@wxiat.com>
1 parent c9a5baf commit bd7938f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/firmware/efi/fdtparams.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ static __initconst const struct {
5656
[MMSIZE] = "linux,uefi-mmap-size",
5757
[DCSIZE] = "linux,uefi-mmap-desc-size",
5858
[DCVERS] = "linux,uefi-mmap-desc-ver",
59+
#ifndef CONFIG_SW64
5960
[SBMODE] = "linux,uefi-secure-boot",
61+
#else
62+
[SBMODE] = "",
63+
#endif
6064
}
6165
}
6266
};

drivers/firmware/efi/libstub/fdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,13 @@ static efi_status_t update_fdt(void *orig_fdt, unsigned long orig_fdt_size,
132132
}
133133
}
134134

135+
#ifndef CONFIG_SW64
135136
fdt_val32 = cpu_to_fdt32(efi_get_secureboot());
136137
status = fdt_setprop(fdt, node, "linux,uefi-secure-boot",
137138
&fdt_val32, sizeof(fdt_val32));
138139
if (status)
139140
goto fdt_set_fail;
141+
#endif
140142

141143
/* Shrink the FDT back to its minimum size: */
142144
fdt_pack(fdt);

0 commit comments

Comments
 (0)