2013-06-19 21:02:47 +02:00
|
|
|
config CPU_SAMSUNG_EXYNOS5250
|
Introduce stage-specific architecture for coreboot
Make all three coreboot stages (bootblock, romstage and ramstage) aware of the
architecture specific to that stage i.e. we will have CONFIG_ARCH variables for
each of the three stages. This allows us to have an SOC with any combination of
architectures and thus every stage can be made to run on a completely different
architecture independent of others. Thus, bootblock can have an x86 arch whereas
romstage and ramstage can have arm32 and arm64 arch respectively. These stage
specific CONFIG_ARCH_ variables enable us to select the proper set of toolchain
and compiler flags for every stage.
These options can be considered as either arch or modes eg: x86 running in
different modes or ARM having different arch types (v4, v7, v8). We have got rid
of the original CONFIG_ARCH option completely as every stage can have any
architecture of its own. Thus, almost all the components of coreboot are
identified as being part of one of the three stages (bootblock, romstage or
ramstage). The components which cannot be classified as such e.g. smm, rmodules
can have their own compiler toolset which is for now set to *_i386. Hence, all
special classes are treated in a similar way and the compiler toolset is defined
using create_class_compiler defined in Makefile.
In order to meet these requirements, changes have been made to CC, LD, OBJCOPY
and family to add CC_bootblock, CC_romstage, CC_ramstage and similarly others.
Additionally, CC_x86_32 and CC_armv7 handle all the special classes. All the
toolsets are defined using create_class_compiler.
Few additional macros have been introduced to identify the class to be used at
various points, e.g.: CC_$(class) derives the $(class) part from the name of
the stage being compiled.
We have also got rid of COREBOOT_COMPILER, COREBOOT_ASSEMBLER and COREBOOT_LINKER
as they do not make any sense for coreboot as a whole. All these attributes are
associated with each of the stages.
Change-Id: I923f3d4fb097d21071030b104c372cc138c68c7b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: http://review.coreboot.org/5577
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@gmail.com>
2014-04-23 19:18:48 +02:00
|
|
|
select ARCH_BOOTBLOCK_ARMV7
|
|
|
|
select ARCH_ROMSTAGE_ARMV7
|
|
|
|
select ARCH_RAMSTAGE_ARMV7
|
2013-09-29 12:02:55 +02:00
|
|
|
select CPU_HAS_BOOTBLOCK_INIT
|
2013-06-19 21:02:47 +02:00
|
|
|
select HAVE_MONOTONIC_TIMER
|
|
|
|
select HAVE_UART_SPECIAL
|
2013-06-20 00:54:19 +02:00
|
|
|
select DYNAMIC_CBMEM
|
2013-06-19 21:02:47 +02:00
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
|
|
|
if CPU_SAMSUNG_EXYNOS5250
|
|
|
|
|
2013-06-12 06:55:58 +02:00
|
|
|
# ROM image layout.
|
|
|
|
#
|
|
|
|
# 0x0000: vendor-provided BL1 (8k).
|
|
|
|
# 0x2000: bootblock
|
2013-12-08 21:48:45 +01:00
|
|
|
# 0x9FFC-0xA000: BL2 checksum
|
|
|
|
# 0xA000-0xA080: reserved for CBFS master header.
|
|
|
|
# 0xA080: Free for CBFS data.
|
2013-06-12 06:55:58 +02:00
|
|
|
|
|
|
|
config BOOTBLOCK_ROM_OFFSET
|
|
|
|
hex
|
2013-12-08 21:48:45 +01:00
|
|
|
default 0
|
2013-06-12 06:55:58 +02:00
|
|
|
|
|
|
|
config CBFS_HEADER_ROM_OFFSET
|
|
|
|
hex "offset of master CBFS header in ROM"
|
2013-12-08 21:48:45 +01:00
|
|
|
default 0x9F80
|
2013-06-12 06:55:58 +02:00
|
|
|
|
|
|
|
config CBFS_ROM_OFFSET
|
|
|
|
# Calculated by BOOTBLOCK_ROM_OFFSET + max bootblock size.
|
|
|
|
hex "offset of CBFS data in ROM"
|
2013-12-08 21:48:45 +01:00
|
|
|
default 0x0A080
|
2013-06-12 06:55:58 +02:00
|
|
|
|
2013-09-09 23:37:03 +02:00
|
|
|
config SYS_SDRAM_BASE
|
|
|
|
hex
|
|
|
|
default 0x40000000
|
2013-02-09 04:10:33 +01:00
|
|
|
|
2013-01-18 05:52:21 +01:00
|
|
|
# Example SRAM/iRAM map for Exynos5250 platform:
|
|
|
|
#
|
|
|
|
# 0x0202_0000: vendor-provided BL1
|
|
|
|
# 0x0202_3400: bootblock, assume up to 32KB in size
|
|
|
|
# 0x0203_0000: romstage, assume up to 128KB in size.
|
2013-02-15 01:41:54 +01:00
|
|
|
# 0x0207_8000: stack pointer
|
2012-12-08 02:18:43 +01:00
|
|
|
|
2013-01-18 05:52:21 +01:00
|
|
|
config BOOTBLOCK_BASE
|
2012-12-08 02:18:43 +01:00
|
|
|
hex
|
2013-01-18 05:52:21 +01:00
|
|
|
default 0x02023400
|
|
|
|
|
|
|
|
config ROMSTAGE_BASE
|
2012-12-27 22:50:32 +01:00
|
|
|
hex
|
2013-01-18 05:52:21 +01:00
|
|
|
default 0x02030000
|
2012-12-27 22:50:32 +01:00
|
|
|
|
2013-09-09 23:37:03 +02:00
|
|
|
config RAMSTAGE_BASE
|
2012-12-27 22:50:32 +01:00
|
|
|
hex
|
2013-09-09 23:37:03 +02:00
|
|
|
default SYS_SDRAM_BASE
|
2012-12-27 22:50:32 +01:00
|
|
|
|
2013-02-15 01:41:54 +01:00
|
|
|
# Stack may reside in either IRAM or DRAM. We will define it to live
|
|
|
|
# at the top of IRAM for now.
|
|
|
|
#
|
|
|
|
# Stack grows downward, push operation stores register contents in
|
|
|
|
# consecutive memory locations ending just below SP
|
|
|
|
config STACK_TOP
|
|
|
|
hex
|
|
|
|
default 0x02078000
|
|
|
|
|
|
|
|
config STACK_BOTTOM
|
|
|
|
hex
|
2013-08-10 03:19:29 +02:00
|
|
|
default 0x02074000
|
2013-02-15 01:41:54 +01:00
|
|
|
|
|
|
|
config STACK_SIZE
|
|
|
|
hex
|
2013-08-10 03:19:29 +02:00
|
|
|
default 0x4000
|
2013-02-15 01:41:54 +01:00
|
|
|
|
Extend CBFS to support arbitrary ROM source media.
Summary:
Isolate CBFS underlying I/O to board/arch-specific implementations as
"media stream", to allow loading and booting romstage on non-x86.
CBFS functions now all take a new "media source" parameter; use
CBFS_DEFAULT_MEDIA if you simply want to load from main firmware.
API Changes:
cbfs_find => cbfs_get_file.
cbfs_find_file => cbfs_get_file_content.
cbfs_get_file => cbfs_get_file_content with correct type.
CBFS used to work only on memory-mapped ROM (all x86). For platforms like ARM,
the ROM may come from USB, UART, or SPI -- any serial devices and not available
for memory mapping.
To support these devices (and allowing CBFS to read from multiple source
at the same time), CBFS operations are now virtual-ized into "cbfs_media". To
simplify porting existing code, every media source must support both "reading
into pre-allocated memory (read)" and "read and return an allocated buffer
(map)". For devices without native memory-mapped ROM, "cbfs_simple_buffer*"
provides simple memory mapping simulation.
Every CBFS function now takes a cbfs_media* as parameter. CBFS_DEFAULT_MEDIA
is defined for CBFS functions to automatically initialize a per-board default
media (CBFS will internally calls init_default_cbfs_media). Also revised CBFS
function names relying on memory mapped backend (ex, "cbfs_find" => actually
loads files). Now we only have two getters:
struct cbfs_file *entry = cbfs_get_file(media, name);
void *data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, name, type);
Test results:
- Verified to work on x86/qemu.
- Compiles on ARM, and follow up commit will provide working SPI driver.
Change-Id: Iac911ded25a6f2feffbf3101a81364625bb07746
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2182
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-01-22 11:57:56 +01:00
|
|
|
# TODO We may probably move this to board-specific implementation files instead
|
|
|
|
# of KConfig values.
|
|
|
|
config CBFS_CACHE_ADDRESS
|
|
|
|
hex "memory address to put CBFS cache data"
|
2013-08-10 03:19:29 +02:00
|
|
|
default 0x0205c000
|
Extend CBFS to support arbitrary ROM source media.
Summary:
Isolate CBFS underlying I/O to board/arch-specific implementations as
"media stream", to allow loading and booting romstage on non-x86.
CBFS functions now all take a new "media source" parameter; use
CBFS_DEFAULT_MEDIA if you simply want to load from main firmware.
API Changes:
cbfs_find => cbfs_get_file.
cbfs_find_file => cbfs_get_file_content.
cbfs_get_file => cbfs_get_file_content with correct type.
CBFS used to work only on memory-mapped ROM (all x86). For platforms like ARM,
the ROM may come from USB, UART, or SPI -- any serial devices and not available
for memory mapping.
To support these devices (and allowing CBFS to read from multiple source
at the same time), CBFS operations are now virtual-ized into "cbfs_media". To
simplify porting existing code, every media source must support both "reading
into pre-allocated memory (read)" and "read and return an allocated buffer
(map)". For devices without native memory-mapped ROM, "cbfs_simple_buffer*"
provides simple memory mapping simulation.
Every CBFS function now takes a cbfs_media* as parameter. CBFS_DEFAULT_MEDIA
is defined for CBFS functions to automatically initialize a per-board default
media (CBFS will internally calls init_default_cbfs_media). Also revised CBFS
function names relying on memory mapped backend (ex, "cbfs_find" => actually
loads files). Now we only have two getters:
struct cbfs_file *entry = cbfs_get_file(media, name);
void *data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, name, type);
Test results:
- Verified to work on x86/qemu.
- Compiles on ARM, and follow up commit will provide working SPI driver.
Change-Id: Iac911ded25a6f2feffbf3101a81364625bb07746
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2182
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-01-22 11:57:56 +01:00
|
|
|
|
|
|
|
config CBFS_CACHE_SIZE
|
|
|
|
hex "size of CBFS cache data"
|
2013-08-10 03:19:29 +02:00
|
|
|
default 0x00018000
|
Extend CBFS to support arbitrary ROM source media.
Summary:
Isolate CBFS underlying I/O to board/arch-specific implementations as
"media stream", to allow loading and booting romstage on non-x86.
CBFS functions now all take a new "media source" parameter; use
CBFS_DEFAULT_MEDIA if you simply want to load from main firmware.
API Changes:
cbfs_find => cbfs_get_file.
cbfs_find_file => cbfs_get_file_content.
cbfs_get_file => cbfs_get_file_content with correct type.
CBFS used to work only on memory-mapped ROM (all x86). For platforms like ARM,
the ROM may come from USB, UART, or SPI -- any serial devices and not available
for memory mapping.
To support these devices (and allowing CBFS to read from multiple source
at the same time), CBFS operations are now virtual-ized into "cbfs_media". To
simplify porting existing code, every media source must support both "reading
into pre-allocated memory (read)" and "read and return an allocated buffer
(map)". For devices without native memory-mapped ROM, "cbfs_simple_buffer*"
provides simple memory mapping simulation.
Every CBFS function now takes a cbfs_media* as parameter. CBFS_DEFAULT_MEDIA
is defined for CBFS functions to automatically initialize a per-board default
media (CBFS will internally calls init_default_cbfs_media). Also revised CBFS
function names relying on memory mapped backend (ex, "cbfs_find" => actually
loads files). Now we only have two getters:
struct cbfs_file *entry = cbfs_get_file(media, name);
void *data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, name, type);
Test results:
- Verified to work on x86/qemu.
- Compiles on ARM, and follow up commit will provide working SPI driver.
Change-Id: Iac911ded25a6f2feffbf3101a81364625bb07746
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2182
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-01-22 11:57:56 +01:00
|
|
|
|
2013-08-14 06:05:43 +02:00
|
|
|
# TTB needs to be aligned to 16KB.
|
|
|
|
config TTB_BUFFER
|
|
|
|
hex "memory address of the TTB buffer"
|
|
|
|
default 0x02058000
|
|
|
|
|
2013-06-19 21:02:47 +02:00
|
|
|
endif
|