coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memmap.c File Reference
Include dependency graph for memmap.c:

Go to the source code of this file.

Macros

#define __SIMPLE_DEVICE__
 
#define EXT_TSEG_MBYTES   0x50
 
#define SMRAMC   0x9d
 
#define C_BASE_SEG   ((0 << 2) | (1 << 1) | (0 << 0))
 
#define G_SMRAME   (1 << 3)
 
#define D_LCK   (1 << 4)
 
#define D_CLS   (1 << 5)
 
#define D_OPEN   (1 << 6)
 
#define ESMRAMC   0x9e
 
#define T_EN   (1 << 0)
 
#define TSEG_SZ_MASK   (3 << 1)
 
#define H_SMRAME   (1 << 7)
 

Functions

static uint32_t encode_pciexbar_length (void)
 
uint32_t make_pciexbar (void)
 
void mainboard_machine_check (void)
 
void smm_region (uintptr_t *start, size_t *size)
 
void smm_lock (void)
 

Macro Definition Documentation

◆ __SIMPLE_DEVICE__

#define __SIMPLE_DEVICE__

Definition at line 3 of file memmap.c.

◆ C_BASE_SEG

#define C_BASE_SEG   ((0 << 2) | (1 << 1) | (0 << 0))

Definition at line 40 of file memmap.c.

◆ D_CLS

#define D_CLS   (1 << 5)

Definition at line 43 of file memmap.c.

◆ D_LCK

#define D_LCK   (1 << 4)

Definition at line 42 of file memmap.c.

◆ D_OPEN

#define D_OPEN   (1 << 6)

Definition at line 44 of file memmap.c.

◆ ESMRAMC

#define ESMRAMC   0x9e

Definition at line 45 of file memmap.c.

◆ EXT_TSEG_MBYTES

#define EXT_TSEG_MBYTES   0x50

Definition at line 38 of file memmap.c.

◆ G_SMRAME

#define G_SMRAME   (1 << 3)

Definition at line 41 of file memmap.c.

◆ H_SMRAME

#define H_SMRAME   (1 << 7)

Definition at line 48 of file memmap.c.

◆ SMRAMC

#define SMRAMC   0x9d

Definition at line 39 of file memmap.c.

◆ T_EN

#define T_EN   (1 << 0)

Definition at line 46 of file memmap.c.

◆ TSEG_SZ_MASK

#define TSEG_SZ_MASK   (3 << 1)

Definition at line 47 of file memmap.c.

Function Documentation

◆ encode_pciexbar_length()

static uint32_t encode_pciexbar_length ( void  )
static

Definition at line 15 of file memmap.c.

References dead_code_t.

Referenced by make_pciexbar().

Here is the caller graph for this function:

◆ mainboard_machine_check()

void mainboard_machine_check ( void  )

Definition at line 31 of file memmap.c.

References D0F0_PCIEXBAR_LO, die(), HOST_BRIDGE, make_pciexbar(), and pci_read_config32().

Referenced by bootblock_northbridge_init(), and mainboard_romstage_entry().

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

◆ make_pciexbar()

uint32_t make_pciexbar ( void  )

Definition at line 25 of file memmap.c.

References encode_pciexbar_length().

Referenced by bootblock_northbridge_init(), and mainboard_machine_check().

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

◆ smm_lock()

void smm_lock ( void  )

Definition at line 72 of file memmap.c.

References BIOS_DEBUG, C_BASE_SEG, D_LCK, ESMRAMC, G_SMRAME, PCI_DEV, pci_or_config8(), pci_write_config8(), printk, SMRAMC, and T_EN.

Here is the call graph for this function:

◆ smm_region()

void smm_region ( uintptr_t start,
size_t size 
)

Definition at line 50 of file memmap.c.

Referenced by cbmem_top_chipset().

Here is the caller graph for this function: