mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-04 10:30:50 +09:00
Pull request for UEFI sub-system for efi-2020-01-rc4
Fix errors due to unaligned memory access: * disable UEFI except for ARMv8, ARMv7, ARM11 * enable unaligned access support on ARM11 Remove an unused function. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl3UI+4ACgkQxIHbvCwF GsTyOg//ePSkbU7hP0xsvprhJTlckHQLAfZlvekbH4niAhiQXy/QlH3RFBjMQeN4 h8PXNb564PLGNnMyC8TKQ6E2AaWE1AXMwqKCUd1KdFdnsxsTunUCLZL31J1q7BfY s+/vJey1LF9FGPE7Mq9YZZMdo2VjSBqCgh5PycL40hp1BksdUX0WvgIthxB1XQxk LPTPoWdNiOikNTLheSOPozR96Jh0YhGgXJ1tA2jVXiS9rpyGz+rhMpgVSgvQDPgp rTOijVmhSZefL6/EfOTravxSBhhjt9nCDlx76SN8Oiv3WDgcmkSdhUcwAgFpkAOF VW4ujDVezc6EIamJoRPFuFS/tfYD/jBwN3Gyh6WJeHZA3pFZUJGIe5OjT/A39u7V Ynpa1LPjX7Z212U59bUg5qspSBHVneBcHQBK+e3XDkoYE13TXf7OrDigdWUfEWae EdPOrNU8dg2UaiJeMgLNFJBMAN+5txfMP/59BBo4DtObHcAPX/z3rVbij82ubKCq kgq26g1YN22uWarXVYGd3NwODScBphFuuIKZ+irhtL18m7wSG6Y4kCQbZo+CtJcj Ida/PILfiADja0/yzFqbuHhdiLdA6UVbiqhsykOkuo2GLn4oCG0rNBohDERRop/U HybGc2oFnXvbsxsY9fYnzRUXxxgJWDxfkv9MjD88X9To9d/SyB0= =ygux -----END PGP SIGNATURE----- Merge tag 'efi-2020-01-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-01-rc4 Fix errors due to unaligned memory access: * disable UEFI except for ARMv8, ARMv7, ARM11 * enable unaligned access support on ARM11 Remove an unused function.
This commit is contained in:
commit
99f9682cae
@ -4,3 +4,7 @@
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
|
||||
obj-y = cpu.o
|
||||
|
||||
ifneq ($(CONFIG_SPL_BUILD),y)
|
||||
obj-$(CONFIG_EFI_LOADER) += sctlr.o
|
||||
endif
|
||||
|
25
arch/arm/cpu/arm11/sctlr.S
Normal file
25
arch/arm/cpu/arm11/sctlr.S
Normal file
@ -0,0 +1,25 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Routines to access the system control register
|
||||
*
|
||||
* Copyright (c) 2019 Heinrich Schuchardt
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
* void allow_unaligned(void) - allow unaligned access
|
||||
*
|
||||
* This routine sets the enable unaligned data support flag and clears the
|
||||
* aligned flag in the system control register.
|
||||
* After calling this routine unaligned access does no longer leads to a
|
||||
* data abort or undefined behavior but is handled by the CPU.
|
||||
* For details see the "ARM Architecture Reference Manual" for ARMv6.
|
||||
*/
|
||||
ENTRY(allow_unaligned)
|
||||
mrc p15, 0, r0, c1, c0, 0 @ load system control register
|
||||
orr r0, r0, #1 << 22 @ set unaligned data support flag
|
||||
bic r0, r0, #2 @ clear aligned flag
|
||||
mcr p15, 0, r0, c1, c0, 0 @ write system control register
|
||||
bx lr @ return
|
||||
ENDPROC(allow_unaligned)
|
@ -543,7 +543,6 @@ struct efi_device_path *efi_dp_get_next_instance(struct efi_device_path **dp,
|
||||
/* Check if a device path contains muliple instances */
|
||||
bool efi_dp_is_multi_instance(const struct efi_device_path *dp);
|
||||
|
||||
struct efi_device_path *efi_dp_from_dev(struct udevice *dev);
|
||||
struct efi_device_path *efi_dp_from_part(struct blk_desc *desc, int part);
|
||||
/* Create a device node for a block device partition. */
|
||||
struct efi_device_path *efi_dp_part_node(struct blk_desc *desc, int part);
|
||||
|
@ -1,6 +1,11 @@
|
||||
config EFI_LOADER
|
||||
bool "Support running UEFI applications"
|
||||
depends on (ARM || X86 || RISCV || SANDBOX) && OF_LIBFDT
|
||||
depends on OF_LIBFDT && ( \
|
||||
ARM && (SYS_CPU = arm1136 || \
|
||||
SYS_CPU = arm1176 || \
|
||||
SYS_CPU = armv7 || \
|
||||
SYS_CPU = armv8) || \
|
||||
X86 || RISCV || SANDBOX)
|
||||
# We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB
|
||||
depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT
|
||||
# We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
|
||||
|
@ -422,7 +422,7 @@ bool efi_dp_is_multi_instance(const struct efi_device_path *dp)
|
||||
/* size of device-path not including END node for device and all parents
|
||||
* up to the root device.
|
||||
*/
|
||||
static unsigned dp_size(struct udevice *dev)
|
||||
__maybe_unused static unsigned int dp_size(struct udevice *dev)
|
||||
{
|
||||
if (!dev || !dev->driver)
|
||||
return sizeof(ROOT);
|
||||
@ -494,7 +494,7 @@ static unsigned dp_size(struct udevice *dev)
|
||||
* @dev device
|
||||
* @return pointer to the end of the device path
|
||||
*/
|
||||
static void *dp_fill(void *buf, struct udevice *dev)
|
||||
__maybe_unused static void *dp_fill(void *buf, struct udevice *dev)
|
||||
{
|
||||
if (!dev || !dev->driver)
|
||||
return buf;
|
||||
@ -654,20 +654,6 @@ static void *dp_fill(void *buf, struct udevice *dev)
|
||||
return dp_fill(buf, dev->parent);
|
||||
}
|
||||
}
|
||||
|
||||
/* Construct a device-path from a device: */
|
||||
struct efi_device_path *efi_dp_from_dev(struct udevice *dev)
|
||||
{
|
||||
void *buf, *start;
|
||||
|
||||
start = buf = dp_alloc(dp_size(dev) + sizeof(END));
|
||||
if (!buf)
|
||||
return NULL;
|
||||
buf = dp_fill(buf, dev);
|
||||
*((struct efi_device_path *)buf) = END;
|
||||
|
||||
return start;
|
||||
}
|
||||
#endif
|
||||
|
||||
static unsigned dp_part_size(struct blk_desc *desc, int part)
|
||||
|
Loading…
Reference in New Issue
Block a user