CBMEM: always initialize early if the board supports it

This allows to drop some special cases in romstage.c

Change-Id: I53fdfcd1bb6ec21a5280afa07a40e3f0cba11c5d
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/2551
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Stefan Reinauer 2013-02-28 01:18:29 +01:00 committed by Ronald G. Minnich
parent f2e1f6a862
commit 1bc9efaf65
15 changed files with 11 additions and 38 deletions

View File

@ -162,12 +162,13 @@ config INCLUDE_CONFIG_FILE
(empty) 0x8e480 null 3610440
config EARLY_CBMEM_INIT
bool "Initialize CBMEM while in ROM stage"
bool
default n
help
Make coreboot initialize the cbmem structures while running in ROM
stage. This could be useful when the ROM stage wants to communicate
some, for instance, execution timestamps.
stage. This is useful when the ROM stage wants to communicate
some, for instance, execution timestamps. It needs support in
romstage.c and should be enabled by the board's Kconfig.
config COLLECT_TIMESTAMPS
bool "Create a table of timestamps collected during boot"

View File

@ -10,6 +10,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_ACPI_TABLES
select HAVE_ACPI_RESUME
select BOARD_ROMSIZE_KB_256
select EARLY_CBMEM_INIT
config MAINBOARD_DIR
string

View File

@ -49,12 +49,7 @@ void main(unsigned long bist)
//print_pci_devices();
//dump_pci_devices();
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_COLLECT_TIMESTAMPS
timestamp_init(rdtsc());
timestamp_add_now(TS_START_ROMSTAGE);

View File

@ -18,6 +18,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select GFXUMA
select CHROMEOS
select EXTERNAL_MRC_BLOB
select EARLY_CBMEM_INIT
# Workaround for EC/KBC IRQ1.
select SERIRQ_CONTINUOUS_MODE

View File

@ -258,12 +258,7 @@ void main(unsigned long bist)
post_code(0x3e);
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so

View File

@ -20,6 +20,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select EXTERNAL_MRC_BLOB
select SERIRQ_CONTINUOUS_MODE
select MAINBOARD_HAS_NATIVE_VGA_INIT
select EARLY_CBMEM_INIT
config MAINBOARD_DIR
string

View File

@ -301,12 +301,7 @@ void main(unsigned long bist)
post_code(0x3e);
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so

View File

@ -18,6 +18,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select GFXUMA
select CHROMEOS
select EXTERNAL_MRC_BLOB
select EARLY_CBMEM_INIT
# Workaround for EC/KBC IRQ1.
select SERIRQ_CONTINUOUS_MODE

View File

@ -258,12 +258,7 @@ void main(unsigned long bist)
post_code(0x3e);
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so

View File

@ -15,6 +15,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select GFXUMA
#select CHROMEOS
select EXTERNAL_MRC_BLOB
select EARLY_CBMEM_INIT
config MAINBOARD_DIR
string

View File

@ -313,12 +313,7 @@ void main(unsigned long bist)
post_code(0x3e);
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so

View File

@ -17,6 +17,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SOUTHBRIDGE_INTEL_BD82X6X
select SUPERIO_SMSC_MEC1308
select DRIVERS_GENERIC_IOAPIC
select EARLY_CBMEM_INIT
config MAINBOARD_DIR
string

View File

@ -333,12 +333,7 @@ void main(unsigned long bist)
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so

View File

@ -15,6 +15,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SOUTHBRIDGE_INTEL_BD82X6X
select SUPERIO_ITE_IT8772F
select EARLY_CBMEM_INIT
config MAINBOARD_DIR
string

View File

@ -336,12 +336,7 @@ void main(unsigned long bist)
post_code(0x3e);
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- HIGH_MEMORY_SIZE));
#endif
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so