summaryrefslogtreecommitdiff
path: root/src/cpu/allwinner/a10/Makefile.inc
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2013-12-22 18:51:29 -0500
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-01-08 23:02:49 +0100
commitbe32f51aa180bd132caa790452b8c0e7920c3afb (patch)
tree6e40d4892946d277f422bc1f4f0bc25a4253defa /src/cpu/allwinner/a10/Makefile.inc
parent14964dd3726971e47c2df6eff49d23a62e07963b (diff)
downloadcoreboot-be32f51aa180bd132caa790452b8c0e7920c3afb.tar.xz
cpu/allwinner/a10: Clarify the usage of SRAM during bootblock
We have 32KiB of usable SRAM right when we boot. The first 24KiB can be loaded with our bootblock, while the other 8KiB can be used as stack during the bootblock stage. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Change-Id: I48d3a37869031c3c1dbc1fab71204d473d64deeb Reviewed-on: http://review.coreboot.org/4563 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/cpu/allwinner/a10/Makefile.inc')
-rw-r--r--src/cpu/allwinner/a10/Makefile.inc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cpu/allwinner/a10/Makefile.inc b/src/cpu/allwinner/a10/Makefile.inc
index 48f3110605..9f7208ae26 100644
--- a/src/cpu/allwinner/a10/Makefile.inc
+++ b/src/cpu/allwinner/a10/Makefile.inc
@@ -21,15 +21,16 @@ get_bootblock_size= \
sed 's/[^0-9 ]//g')) \
$(shell echo $$(($(word 2, $(strip $(bb_s))))))
-# The boot ROM in the SoC will start loading code if a special boot0 header is
+# The boot ROM in the SoC will start loading code if a special BOOT0 header is
# found (at an offset of 8KiB in either NAND or SD), and the checksum is
-# correct. this header is normally added by the 'mxsunxiboot' tool. The file
-# passed to mksunxiboot should only include the bootblock due to size
-# limitations.
-# FIXME: Figure out how to safely integrate in coreboot.rom. For now, only copy
-# the first 15 KiB of coreboot.rom (This will not collide with stack)
+# correct. This header is normally added by the 'mxsunxiboot' tool. The boot ROM
+# will load at most 24KiB of data to SRAM, so limit the file size accordingly.
+# The BOOT0 header takes 32 bytes, so limit our file to 24KiB - 32 bytes.
+# FIXME: Figure out how to safely integrate in coreboot.rom.
+# FIXME: The file passed to mksunxiboot should only include the bootblock due
+# to size limitations.
$(obj)/BOOT0: $(obj)/coreboot.rom
@printf " BOOT0 $(subst $(obj)/,,$(^))\n"
touch $@
- dd if=$^ of=$^.tmp bs=1024 count=15
+ dd if=$^ of=$^.tmp bs=24544 count=1
-mksunxiboot $^.tmp $@