coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memmap.c File Reference
#include <arch/romstage.h>
#include <commonlib/helpers.h>
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <console/console.h>
#include <cbmem.h>
#include <northbridge/intel/pineview/pineview.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.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 Graphics Stolen Memory (GSM) to kilobytes. More...
 
static 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 76 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 Graphics Stolen Memory (GSM) to kilobytes.

Definition at line 31 of file memmap.c.

References BIOS_DEBUG, and printk.

◆ 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 BIOS_DEBUG, and printk.

◆ decode_tseg_size()

static u32 decode_tseg_size ( const u32  esmramc)
static

Decodes used TSEG size to bytes.

Definition at line 43 of file memmap.c.

References die(), and MiB.

Here is the call graph for this function:

◆ fill_postcar_frame()

void fill_postcar_frame ( struct postcar_frame pcf)

Definition at line 88 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 67 of file memmap.c.

References HOST_BRIDGE, pci_read_config32(), and TSEG.

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 61 of file memmap.c.

References decode_tseg_size(), ESMRAMC, 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 82 of file memmap.c.

References northbridge_get_tseg_base(), and northbridge_get_tseg_size().

Here is the call graph for this function: