intel post-car: Separate files for setup_stack_and_mtrrs()

Have a common romstage.c file to prepare CAR stack guards.

MTRR setup around cbmem_top() is somewhat northbridge specific,
place stubs under northbridge for platrform that will move
to RELOCATABLE_RAMSTAGE.

Change-Id: I3d4fe4145894e83e5980dc2a7bbb8a91acecb3c6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15762
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki
2016-06-27 13:24:11 +03:00
parent 9b9915284f
commit a4ffe9dda0
7 changed files with 103 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
#include <arch/io.h>
#include <device/pci_def.h>
#include <console/console.h>
#include <cpu/intel/romstage.h>
#include <cbmem.h>
#include "gm45.h"
@@ -105,3 +106,8 @@ void *cbmem_top(void)
{
return (void *) smm_region_start();
}
void *setup_stack_and_mtrrs(void)
{
return (void*)CONFIG_RAMTOP;
}

View File

@@ -20,6 +20,7 @@
#include <cbmem.h>
#include "i945.h"
#include <console/console.h>
#include <cpu/intel/romstage.h>
static uintptr_t smm_region_start(void)
{
@@ -69,3 +70,8 @@ u32 decode_igd_memory_size(const u32 gms)
return ggc2uma[gms] << 10;
}
void *setup_stack_and_mtrrs(void)
{
return (void*)CONFIG_RAMTOP;
}

View File

@@ -17,6 +17,7 @@
#include <arch/io.h>
#include <cbmem.h>
#include <cpu/intel/romstage.h>
#include "nehalem.h"
static uintptr_t smm_region_start(void)
@@ -30,3 +31,8 @@ void *cbmem_top(void)
{
return (void *) smm_region_start();
}
void *setup_stack_and_mtrrs(void)
{
return (void*)CONFIG_RAMTOP;
}

View File

@@ -17,6 +17,7 @@
#include <arch/io.h>
#include <cbmem.h>
#include <cpu/intel/romstage.h>
#include "sandybridge.h"
static uintptr_t smm_region_start(void)
@@ -30,3 +31,8 @@ void *cbmem_top(void)
{
return (void *) smm_region_start();
}
void *setup_stack_and_mtrrs(void)
{
return (void*)CONFIG_RAMTOP;
}

View File

@@ -23,6 +23,7 @@
#include <arch/io.h>
#include <device/pci_def.h>
#include <console/console.h>
#include <cpu/intel/romstage.h>
#include <northbridge/intel/x4x/x4x.h>
/** Decodes used Graphics Mode Select (GMS) to kilobytes. */
@@ -93,3 +94,8 @@ void *cbmem_top(void)
u32 ramtop = pci_read_config32(PCI_DEV(0,0,0), D0F0_TSEG);
return (void*)(ramtop);
}
void *setup_stack_and_mtrrs(void)
{
return (void*)CONFIG_RAMTOP;
}