mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-19 21:01:51 +02:00
Merge patch series "Respin bootstd cros patch into a series of two"
Vincent Stehlé <vincent.stehle@arm.com> says: Hi, This is a respin of this patch [1] after discussion [2]. Thanks to Simon and Heinrich for their reviews. To use the guidcmp() function, as suggested by Heinrich, we need to make it available to bootmeth_cros.c and I think that the cleanest way to do that is (arguably) to move the guid helper functions to efi.h near the efi_guid_t definition; this is why the original patch has now become a series of two patches. The alternative would be to include efi_loader.h from bootmeth_cros.c but I think this does not sound "right". If this is in fact the preferred approach just let me know and I will respin. There is no difference in the sandbox binaries before/after this series on Arm and on PC, and all the tests I have run on the sandbox are unchanged.
This commit is contained in:
commit
0c7c9494d6
@ -163,7 +163,7 @@ static int scan_part(struct udevice *blk, int partnum,
|
||||
if (uuid_str_to_bin(info->type_guid, type.b, UUID_STR_FORMAT_GUID))
|
||||
return log_msg_ret("typ", -EINVAL);
|
||||
|
||||
if (memcmp(&cros_kern_type, &type, sizeof(type)))
|
||||
if (guidcmp(&cros_kern_type, &type))
|
||||
return log_msg_ret("typ", -ENOEXEC);
|
||||
|
||||
/* Make a buffer for the header information */
|
||||
|
@ -78,6 +78,16 @@ typedef struct {
|
||||
u8 b[16];
|
||||
} efi_guid_t __attribute__((aligned(4)));
|
||||
|
||||
static inline int guidcmp(const void *g1, const void *g2)
|
||||
{
|
||||
return memcmp(g1, g2, sizeof(efi_guid_t));
|
||||
}
|
||||
|
||||
static inline void *guidcpy(void *dst, const void *src)
|
||||
{
|
||||
return memcpy(dst, src, sizeof(efi_guid_t));
|
||||
}
|
||||
|
||||
#define EFI_BITS_PER_LONG (sizeof(long) * 8)
|
||||
|
||||
/* Bit mask for EFI status code with error */
|
||||
|
@ -21,16 +21,6 @@
|
||||
struct blk_desc;
|
||||
struct jmp_buf_data;
|
||||
|
||||
static inline int guidcmp(const void *g1, const void *g2)
|
||||
{
|
||||
return memcmp(g1, g2, sizeof(efi_guid_t));
|
||||
}
|
||||
|
||||
static inline void *guidcpy(void *dst, const void *src)
|
||||
{
|
||||
return memcpy(dst, src, sizeof(efi_guid_t));
|
||||
}
|
||||
|
||||
#if CONFIG_IS_ENABLED(EFI_LOADER)
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user