coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memmap.c File Reference
#include <cbmem.h>
#include <commonlib/helpers.h>
#include <arch/romstage.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <console/console.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.h>
#include <northbridge/intel/x4x/x4x.h>
#include <program_loading.h>
#include <cpu/intel/smm_reloc.h>
#include <types.h>
Include dependency graph for memmap.c:

Go to the source code of this file.

Macros

#define __SIMPLE_DEVICE__
 

Functions

u32 decode_igd_memory_size (const u32 gms)
 Decodes used Graphics Mode Select (GMS) to kilobytes. More...
 
u32 decode_igd_gtt_size (const u32 gsm)
 Decodes used GTT Graphics Memory Size (GGMS) to kilobytes. More...
 
u32 decode_tseg_size (const u32 esmramc)
 Decodes used TSEG size to bytes. More...
 
static size_t northbridge_get_tseg_size (void)
 
static uintptr_t northbridge_get_tseg_base (void)
 
voidcbmem_top_chipset (void)
 
void smm_region (uintptr_t *start, size_t *size)
 
void fill_postcar_frame (struct postcar_frame *pcf)
 

Macro Definition Documentation

◆ __SIMPLE_DEVICE__

#define __SIMPLE_DEVICE__

Definition at line 3 of file memmap.c.

Function Documentation

◆ cbmem_top_chipset()

void* cbmem_top_chipset ( void  )

Definition at line 74 of file memmap.c.

References ALIGN_DOWN, MiB, and northbridge_get_tseg_base().

Here is the call graph for this function:

◆ decode_igd_gtt_size()

u32 decode_igd_gtt_size ( const u32  gsm)

Decodes used GTT Graphics Memory Size (GGMS) to kilobytes.

Decodes used Graphics Stolen Memory (GSM) to kilobytes.

Definition at line 30 of file memmap.c.

References ARRAY_SIZE, and die().

Referenced by mch_domain_read_resources(), and program_memory_map().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_igd_memory_size()

u32 decode_igd_memory_size ( const u32  gms)

Decodes used Graphics Mode Select (GMS) to kilobytes.

Definition at line 19 of file memmap.c.

References ARRAY_SIZE, and die().

Referenced by intel_gma_init_lvds(), intel_gma_init_vga(), mch_domain_read_resources(), and program_memory_map().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_tseg_size()

u32 decode_tseg_size ( const u32  esmramc)

Decodes used TSEG size to bytes.

Definition at line 41 of file memmap.c.

References die().

Here is the call graph for this function:

◆ fill_postcar_frame()

void fill_postcar_frame ( struct postcar_frame pcf)

Definition at line 86 of file memmap.c.

References cbmem_top(), MiB, MTRR_TYPE_WRBACK, northbridge_get_tseg_base(), northbridge_get_tseg_size(), and postcar_frame_add_mtrr().

Here is the call graph for this function:

◆ northbridge_get_tseg_base()

static uintptr_t northbridge_get_tseg_base ( void  )
static

Definition at line 65 of file memmap.c.

References D0F0_TSEG, HOST_BRIDGE, and pci_read_config32().

Referenced by cbmem_top_chipset(), fill_postcar_frame(), and smm_region().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ northbridge_get_tseg_size()

static size_t northbridge_get_tseg_size ( void  )
static

Definition at line 59 of file memmap.c.

References D0F0_ESMRAMC, decode_tseg_size(), HOST_BRIDGE, and pci_read_config8().

Referenced by fill_postcar_frame(), and smm_region().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ smm_region()

void smm_region ( uintptr_t start,
size_t size 
)

Definition at line 80 of file memmap.c.

References northbridge_get_tseg_base(), and northbridge_get_tseg_size().

Here is the call graph for this function: