[coreboot-gerrit] New patch to review for coreboot: 4540f38 ARM: Remove -mno-unaligned-access

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Apr 16 10:26:50 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9728

-gerrit

commit 4540f3841f067a3ba2a725cedcbcd17e404ecbad
Author: Julius Werner <jwerner at chromium.org>
Date:   Fri Jan 16 16:06:00 2015 -0800

    ARM: Remove -mno-unaligned-access
    
    We've decided that it is generally okay for coreboot to expect unaligned
    accesses to work. Trying to find all instances of unaligned access
    opportunities and working around them in software would be an
    unsustainable whack-a-mole contest. Instead, architectures and boards
    need to make sure they conform to this, which on ARM and ARM64 requires
    setting up paging early in the bootblock.
    
    Other architectures (x86, ARM64, MIPS) already generate code in this
    manner. ARM still had an -mno-unaligned-access flag hanging around that
    has been copied so many times its initial origin was lost in time
    (probably U-Boot). Let's remove it for consistency between architectures
    and to improve code generation.
    
    BRANCH=veyron
    BUG=None
    TEST=Booted Jerry and Blaze. Looked at the disassembly for
    timestamp_sync() and confirmed that it only gives you half as much eye
    cancer as before (GCC still somehow insists on byte accesses when
    zeroing fields which is very odd, but at least that terrible AND/OR mess
    is gone). Measured a boot time increase of about 11ms on Jerry (mostly
    faster timestamp and CBFS accesses). Could not test Storm because
    despite our claimed abundance of test devices, every time I get one of
    them it magically disappears again in less than a week.
    
    Change-Id: I8fc08cc7ce4471651a51ee795269909ef69277c8
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 07591fadb89bd127fe065abf0b9ba3facecf1aeb
    Original-Change-Id: I1d046e05bb11822b86e467eafb6aa92e8fbce774
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/241732
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 toolchain.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain.inc b/toolchain.inc
index b799855..9820fa2 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -60,7 +60,7 @@ ARCHDIR-arm64	:= arm64
 ARCHDIR-riscv	:= riscv
 ARCHDIR-mips	:= mips
 
-CFLAGS_arm      := -mno-unaligned-access -ffunction-sections -fdata-sections
+CFLAGS_arm      := -ffunction-sections -fdata-sections
 
 CFLAGS_arm64 := -ffunction-sections -fdata-sections
 



More information about the coreboot-gerrit mailing list