Intel FSP: Move to DYNAMIC_CBMEM

Flag the boards with BROKEN_CAR_MIGRATE, as testing for EARLY_CBMEM_INIT
is not enough to disable CBMEM console for romstage on these platforms.

To have CBMEM early in ramstage, define get_top_of_ram() on sandy/ivy.

Change-Id: Ieefc12099a0e043eb1a7e14bdc7c6e3d209b3d8f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7468
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Martin Roth <gaumless@gmail.com>
This commit is contained in:
Kyösti Mälkki 2014-11-10 19:12:53 +02:00
parent cb0dd58b37
commit 13a845acb3
6 changed files with 14 additions and 10 deletions

View File

@ -40,6 +40,8 @@ config CPU_SPECIFIC_OPTIONS
select PARALLEL_CPU_INIT select PARALLEL_CPU_INIT
select TSC_SYNC_MFENCE select TSC_SYNC_MFENCE
select LAPIC_MONOTONIC_TIMER select LAPIC_MONOTONIC_TIMER
select BROKEN_CAR_MIGRATE
select DYNAMIC_CBMEM
config BOOTBLOCK_CPU_INIT config BOOTBLOCK_CPU_INIT
string string

View File

@ -36,6 +36,7 @@ config CPU_SPECIFIC_OPTIONS
select TSC_SYNC_MFENCE select TSC_SYNC_MFENCE
select LAPIC_MONOTONIC_TIMER select LAPIC_MONOTONIC_TIMER
select BROKEN_CAR_MIGRATE select BROKEN_CAR_MIGRATE
select DYNAMIC_CBMEM
choice choice
prompt "Rangeley CPU Stepping" prompt "Rangeley CPU Stepping"

View File

@ -11,8 +11,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select MMCONF_SUPPORT select MMCONF_SUPPORT
select SUPERIO_SMSC_SIO1007 select SUPERIO_SMSC_SIO1007
select ENABLE_VMX select ENABLE_VMX
select EARLY_CBMEM_INIT
select BROKEN_CAR_MIGRATE
select INTEL_INT15 select INTEL_INT15
select VGA select VGA

View File

@ -243,9 +243,16 @@ static void pci_domain_set_resources(device_t dev)
add_fixed_resources(dev, 6); add_fixed_resources(dev, 6);
assign_resources(dev->link_list); assign_resources(dev->link_list);
}
/* Leave some space for the HOB data above CBMem */ unsigned long get_top_of_ram(void)
set_top_of_ram((tomk - 2048) * 1024); {
struct device *dev = dev_find_slot(0, PCI_DEVFN(0, 0));
/* Base of TSEG is top of usable DRAM */
u32 tom = pci_read_config32(dev, TSEG) & ~(1UL << 0);
tom -= 0x200000; /* 2MB for FSP HOB */
return (unsigned long) tom;
} }
/* TODO We could determine how many PCIe busses we need in /* TODO We could determine how many PCIe busses we need in

View File

@ -23,7 +23,7 @@
#include <broadwell/pci_devs.h> #include <broadwell/pci_devs.h>
#include <broadwell/systemagent.h> #include <broadwell/systemagent.h>
static unsigned long get_top_of_ram(void) unsigned long get_top_of_ram(void)
{ {
/* /*
* Base of DPR is top of usable DRAM below 4GiB. The register has * Base of DPR is top of usable DRAM below 4GiB. The register has
@ -39,8 +39,3 @@ static unsigned long get_top_of_ram(void)
return (unsigned long)tom; return (unsigned long)tom;
} }
void *cbmem_top(void)
{
return (void *)get_top_of_ram();
}

View File

@ -31,6 +31,7 @@ config CPU_SPECIFIC_OPTIONS
select ARCH_ROMSTAGE_X86_32 select ARCH_ROMSTAGE_X86_32
select ARCH_RAMSTAGE_X86_32 select ARCH_RAMSTAGE_X86_32
select DYNAMIC_CBMEM select DYNAMIC_CBMEM
select BROKEN_CAR_MIGRATE
select HAVE_SMI_HANDLER select HAVE_SMI_HANDLER
select HAVE_HARD_RESET select HAVE_HARD_RESET
select MMCONF_SUPPORT select MMCONF_SUPPORT