coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
biosram.c File Reference
#include <amdblocks/acpimmio.h>
#include <amdblocks/biosram.h>
#include <device/mmio.h>
#include <stdint.h>
Include dependency graph for biosram.c:

Go to the source code of this file.

Macros

#define BIOSRAM_AP_ENTRY   0xe8 /* 8 bytes */
 
#define BIOSRAM_CBMEM_TOP   0xf0 /* 4 bytes */
 
#define BIOSRAM_UMA_SIZE   0xf4 /* 4 bytes */
 
#define BIOSRAM_UMA_BASE   0xf8 /* 8 bytes */
 

Functions

static uint8_t biosram_read8 (uint8_t reg)
 
static void biosram_write8 (uint8_t reg, uint8_t value)
 
static uint16_t biosram_read16 (uint8_t reg)
 
static void biosram_write16 (uint8_t reg, uint16_t value)
 
static uint32_t biosram_read32 (uint8_t reg)
 
static void biosram_write32 (uint8_t reg, uint32_t value)
 
voidget_ap_entry_ptr (void)
 
void set_ap_entry_ptr (void *entry)
 
void backup_top_of_low_cacheable (uintptr_t ramtop)
 
uintptr_t restore_top_of_low_cacheable (void)
 
void save_uma_size (uint32_t size)
 
void save_uma_base (uint64_t base)
 
uint32_t get_uma_size (void)
 
uint64_t get_uma_base (void)
 

Macro Definition Documentation

◆ BIOSRAM_AP_ENTRY

#define BIOSRAM_AP_ENTRY   0xe8 /* 8 bytes */

Definition at line 9 of file biosram.c.

◆ BIOSRAM_CBMEM_TOP

#define BIOSRAM_CBMEM_TOP   0xf0 /* 4 bytes */

Definition at line 10 of file biosram.c.

◆ BIOSRAM_UMA_BASE

#define BIOSRAM_UMA_BASE   0xf8 /* 8 bytes */

Definition at line 12 of file biosram.c.

◆ BIOSRAM_UMA_SIZE

#define BIOSRAM_UMA_SIZE   0xf4 /* 4 bytes */

Definition at line 11 of file biosram.c.

Function Documentation

◆ backup_top_of_low_cacheable()

void backup_top_of_low_cacheable ( uintptr_t  ramtop)

Definition at line 61 of file biosram.c.

References BIOSRAM_CBMEM_TOP, and biosram_write32().

Referenced by amd_init_post(), and platform_AfterInitPost().

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

◆ biosram_read16()

static uint16_t biosram_read16 ( uint8_t  reg)
static

Definition at line 24 of file biosram.c.

References biosram_read8().

Referenced by biosram_read32().

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

◆ biosram_read32()

static uint32_t biosram_read32 ( uint8_t  reg)
static

Definition at line 36 of file biosram.c.

References biosram_read16(), and value.

Referenced by get_ap_entry_ptr(), get_uma_base(), get_uma_size(), and restore_top_of_low_cacheable().

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

◆ biosram_read8()

static uint8_t biosram_read8 ( uint8_t  reg)
static

Definition at line 14 of file biosram.c.

References acpimmio_biosram, and read8().

Referenced by biosram_read16().

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

◆ biosram_write16()

static void biosram_write16 ( uint8_t  reg,
uint16_t  value 
)
static

Definition at line 29 of file biosram.c.

References biosram_write8(), and value.

Referenced by biosram_write32().

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

◆ biosram_write32()

static void biosram_write32 ( uint8_t  reg,
uint32_t  value 
)
static

Definition at line 42 of file biosram.c.

References biosram_write16(), and value.

Referenced by backup_top_of_low_cacheable(), save_uma_base(), save_uma_size(), and set_ap_entry_ptr().

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

◆ biosram_write8()

static void biosram_write8 ( uint8_t  reg,
uint8_t  value 
)
static

Definition at line 19 of file biosram.c.

References acpimmio_biosram, value, and write8().

Referenced by biosram_write16().

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

◆ get_ap_entry_ptr()

void* get_ap_entry_ptr ( void  )

Definition at line 51 of file biosram.c.

References BIOSRAM_AP_ENTRY, and biosram_read32().

Referenced by ap_bootblock_c_entry(), and bootblock_c_entry().

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

◆ get_uma_base()

uint64_t get_uma_base ( void  )

Definition at line 87 of file biosram.c.

References base, biosram_read32(), and BIOSRAM_UMA_BASE.

Referenced by domain_read_resources().

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

◆ get_uma_size()

uint32_t get_uma_size ( void  )

Definition at line 82 of file biosram.c.

References biosram_read32(), and BIOSRAM_UMA_SIZE.

Referenced by domain_read_resources().

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

◆ restore_top_of_low_cacheable()

uintptr_t restore_top_of_low_cacheable ( void  )

Definition at line 66 of file biosram.c.

References BIOSRAM_CBMEM_TOP, and biosram_read32().

Referenced by add_uma_resource_below_tolm(), and cbmem_top_chipset().

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

◆ save_uma_base()

void save_uma_base ( uint64_t  base)

Definition at line 76 of file biosram.c.

References base, BIOSRAM_UMA_BASE, and biosram_write32().

Referenced by amd_init_post().

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

◆ save_uma_size()

void save_uma_size ( uint32_t  size)

Definition at line 71 of file biosram.c.

References BIOSRAM_UMA_SIZE, and biosram_write32().

Referenced by amd_init_post().

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

◆ set_ap_entry_ptr()

void set_ap_entry_ptr ( void entry)

Definition at line 56 of file biosram.c.

References BIOSRAM_AP_ENTRY, and biosram_write32().

Referenced by bsp_agesa_call(), and romstage_main().

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