diff options
author | Julius Werner <jwerner@chromium.org> | 2014-09-23 20:53:20 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-02 17:27:54 +0200 |
commit | 635ee51b0d5cffc155e09fbbe644c2914ce54b6a (patch) | |
tree | 9ff1e4fc092a3ed618ae74e53d1700b667034265 /src/arch | |
parent | af9cbaa1827f796fff13c5d73351454ea683fc34 (diff) | |
download | coreboot-635ee51b0d5cffc155e09fbbe644c2914ce54b6a.tar.xz |
arm: Prevent compilation of old, experimental SMP support
The ARM SMP feature was added a long time ago and has never really been
used by anyone since. We are still always compiling cpu_info() even
though we don't use it, and it makes some dangerous assumptions about
stack alignment that are not guaranteed anywhere.
I'm planning to change the way the stack boundaries are defined. Rather
than trying to work that into this unsafe, unused and hard to test
feature, I think we should just seal it off with police tape and make
sure that if anyone ever tries to use it again (which currently seems
unlikely), they get forced to do their due diligence on making sure it
works as intended.
BUG=None
TEST=Compiled Veyron_Pinky.
Change-Id: Id25545cab88f29200c7672ef02c7804f0ac26399
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: 5b517fc46b030a6e50ef2f5e4d4a449b98ce16c6
Original-Change-Id: I8a60bd30e8b27a22bb3da68ca84daea99424dee9
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/219680
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/9222
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/Makefile.inc | 2 | ||||
-rw-r--r-- | src/arch/arm/cpu.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/arm/Makefile.inc b/src/arch/arm/Makefile.inc index 25f764c25f..e739d0b8d5 100644 --- a/src/arch/arm/Makefile.inc +++ b/src/arch/arm/Makefile.inc @@ -117,7 +117,7 @@ ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM),y) ramstage-y += stages.c ramstage-y += div0.c -ramstage-y += cpu.c +ramstage-$(CONFIG_COOP_MULTITASKING) += cpu.c ramstage-y += eabi_compat.c ramstage-y += boot.c ramstage-y += tables.c diff --git a/src/arch/arm/cpu.c b/src/arch/arm/cpu.c index f90c759559..e02fed30a2 100644 --- a/src/arch/arm/cpu.c +++ b/src/arch/arm/cpu.c @@ -34,6 +34,11 @@ */ struct cpu_info *cpu_info(void) { +#error "This is BROKEN! ARM stacks are currently not guaranteed to be " \ + "STACK_SIZE-aligned in any way. If you ever plan to revive this " \ + "feature, make sure you add the proper assertions " \ + "(and maybe consider revising the whole thing to work closer to what " \ + "arm64 is doing now)." uintptr_t addr = ALIGN((uintptr_t)__builtin_frame_address(0), CONFIG_STACK_SIZE); addr -= sizeof(struct cpu_info); |