[SerialICE] New patch to review for serialice: 139edb5 Make ROM size configurable
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Fri May 18 11:47:37 CEST 2012
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1035
-gerrit
commit 139edb52b3f08a728e80db17e7c5482146ebdc81
Author: Patrick Georgi <patrick.georgi at secunet.com>
Date: Fri May 18 11:31:38 2012 +0200
Make ROM size configurable
While SerialICE always resides in the top 64K, support creating
larger images, to simplify using larger flashes.
All extra space is filled with 0xff.
Change-Id: I155853082680de88272d298d724b805d44ec7759
Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>
---
SerialICE/Kconfig | 36 ++++++++++++++++++++++++++++++++++++
SerialICE/Makefile | 2 +-
SerialICE/serialice.ld | 9 +++++++--
3 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/SerialICE/Kconfig b/SerialICE/Kconfig
index b645309..aab5249 100644
--- a/SerialICE/Kconfig
+++ b/SerialICE/Kconfig
@@ -141,6 +141,42 @@ config SUPERIO_INIT
string
default "superio/winbond-w83627thg.c" if BOARD_KONTRON_986LCD_M
+choice
+ prompt "ROM size"
+ default ROM_64K
+
+config ROM_64K
+ boolean "64 KB"
+
+config ROM_128K
+ boolean "128 KB"
+
+config ROM_256K
+ boolean "256 KB"
+
+config ROM_512K
+ boolean "512 KB"
+
+config ROM_1024K
+ boolean "1024 KB"
+
+config ROM_2048K
+ boolean "2048 KB"
+
+config ROM_4096K
+ boolean "4096 KB"
+
+endchoice
+
+config ROMSIZE
+ hex
+ default 0x10000 if ROM_64K
+ default 0x20000 if ROM_128K
+ default 0x40000 if ROM_256K
+ default 0x80000 if ROM_512K
+ default 0x100000 if ROM_1024K
+ default 0x200000 if ROM_2048K
+ default 0x400000 if ROM_4096K
choice
prompt "Target communication"
diff --git a/SerialICE/Makefile b/SerialICE/Makefile
index 102be31..c2b2802 100644
--- a/SerialICE/Makefile
+++ b/SerialICE/Makefile
@@ -61,7 +61,7 @@ CC=$(CROSS)gcc -m32
OBJCOPY=$(CROSS)objcopy
NM=$(CROSS)nm
-LDFLAGS=-Wa,--divide -nostdlib -nostartfiles -static -T serialice.ld
+LDFLAGS=-Wa,--divide -nostdlib -nostartfiles -static -T serialice.ld -Wl,--defsym,ALIGNED_ROMSIZE=$(CONFIG_ROMSIZE)
SOURCES = serialice.c serialice.h chipset.c serial.c types.h mainboard/*.c
diff --git a/SerialICE/serialice.ld b/SerialICE/serialice.ld
index 9dd1591..163a4c5 100644
--- a/SerialICE/serialice.ld
+++ b/SerialICE/serialice.ld
@@ -20,12 +20,17 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
+ALIGNED_ROMBASE = 0x100000000 - (ALIGNED_ROMSIZE);
+
_ROMSIZE = (1024 * 64);
_ROMBASE = 0x100000000 - (_ROMSIZE);
SECTIONS {
- . = _ROMBASE;
+
+ . = ALIGNED_ROMBASE;
+
.rom : {
+ . = ALIGNED_ROMSIZE - _ROMSIZE;
_main = . ;
*(.rom.text);
*(.text);
@@ -33,7 +38,7 @@ SECTIONS {
*(.data);
*(.rodata);
*(.rodata.*);
- }
+ } =0xff
. = 0xffffff40;
.messages . : {
More information about the SerialICE
mailing list