ARM: Make it possible to use a custom bootblock implementation.

Tegra needs to use a custom bootblock implementation because it starts on a
coprocessor which uses ARMv4. It doesn't have the same control registers,
caches, etc., and the regular bootblock gets exceptions and dies.

BUG=None
TEST=Built for pit. With this and other changes, built and booted on nyan and
verified that it got into the bootblock.
BRANCH=None

Change-Id: Id197db2939bc840ad64244d6e2017fc5c89e0cbd
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/171018
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Gabe Black 2013-09-29 05:40:13 -07:00 committed by chrome-internal-fetch
commit a66393fdd6
2 changed files with 11 additions and 6 deletions

View file

@ -14,9 +14,16 @@ config MAX_REBOOT_CNT
int
default 3
# If a custom bootblock is necessary, this option should be "select"-ed by
# the thing that needs it, probably the CPU.
config ARM_BOOTBLOCK_CUSTOM
bool
default n
choice
prompt "Bootblock behaviour"
default ARM_BOOTBLOCK_SIMPLE
depends on !ARM_BOOTBLOCK_CUSTOM
config ARM_BOOTBLOCK_SIMPLE
bool "Always load fallback"
@ -34,11 +41,6 @@ config MAINBOARD_HAS_BOOTBLOCK_INIT
bool
default n
config BOOTBLOCK_SOURCE
string
default "bootblock_simple.c" if ARM_BOOTBLOCK_SIMPLE
default "bootblock_normal.c" if ARM_BOOTBLOCK_NORMAL
config UPDATE_IMAGE
bool "Update existing coreboot.rom image"
default n

View file

@ -34,10 +34,13 @@ bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += early_console.c
bootblock-y += cache.c
bootblock-y += mmu.c
ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y)
bootblock-y += bootblock.S
endif
bootblock-y += id.S
$(obj)/arch/armv7/id.bootblock.o: $(obj)/build.h
bootblock-y += $(call strip_quotes,$(CONFIG_BOOTBLOCK_SOURCE))
bootblock-$(CONFIG_ARM_BOOTBLOCK_SIMPLE) += bootblock_simple.c
bootblock-$(CONFIG_ARM_BOOTBLOCK_NORMAL) += bootblock_normal.c
bootblock-y += stages.c
romstage-y += stages.c