coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mem.c File Reference
#include <types.h>
#include "debug.h"
#include "device.h"
#include "x86emu/x86emu.h"
#include "biosemu.h"
#include "mem.h"
#include "compat/time.h"
#include <device/resource.h>
Include dependency graph for mem.c:

Go to the source code of this file.

Functions

static void DEBUG_CHECK_VMEM_READ (u32 _addr, u32 _rval)
 
static void DEBUG_CHECK_VMEM_WRITE (u32 _addr, u32 _val)
 
static void update_time (u32 cur_val)
 
u8 my_rdb (u32 addr)
 
u16 my_rdw (u32 addr)
 
u32 my_rdl (u32 addr)
 
void my_wrb (u32 addr, u8 val)
 
void my_wrw (u32 addr, u16 val)
 
void my_wrl (u32 addr, u32 val)
 

Function Documentation

◆ DEBUG_CHECK_VMEM_READ()

static void DEBUG_CHECK_VMEM_READ ( u32  _addr,
u32  _rval 
)
inlinestatic

Definition at line 187 of file mem.c.

Referenced by my_rdb(), my_rdl(), and my_rdw().

Here is the caller graph for this function:

◆ DEBUG_CHECK_VMEM_WRITE()

static void DEBUG_CHECK_VMEM_WRITE ( u32  _addr,
u32  _val 
)
inlinestatic

Definition at line 188 of file mem.c.

Referenced by my_wrb(), my_wrl(), and my_wrw().

Here is the caller graph for this function:

◆ my_rdb()

u8 my_rdb ( u32  addr)

Definition at line 217 of file mem.c.

References addr, biosemu_dev_translate_address(), clr_ci(), DEBUG_CHECK_VMEM_READ(), DEBUG_PRINTF, DEBUG_PRINTF_MEM, HALT_SYS, IORESOURCE_MEM, M, and set_ci().

Referenced by handleInt10(), my_rdl(), and my_rdw().

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

◆ my_rdl()

u32 my_rdl ( u32  addr)

Definition at line 300 of file mem.c.

References addr, biosemu_dev_translate_address(), clr_ci(), DEBUG_CHECK_VMEM_READ(), DEBUG_PRINTF, DEBUG_PRINTF_MEM, HALT_SYS, in32le(), IORESOURCE_MEM, M, my_rdb(), set_ci(), and update_time().

Referenced by handleInterrupt(), and setupInt().

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

◆ my_rdw()

u16 my_rdw ( u32  addr)

Definition at line 249 of file mem.c.

References addr, biosemu_dev_translate_address(), clr_ci(), DEBUG_CHECK_VMEM_READ(), DEBUG_PRINTF, DEBUG_PRINTF_MEM, HALT_SYS, in16le(), IORESOURCE_MEM, M, my_rdb(), and set_ci().

Referenced by handleInt10(), and setupInt().

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

◆ my_wrb()

void my_wrb ( u32  addr,
u8  val 
)

Definition at line 363 of file mem.c.

References addr, biosemu_dev_translate_address(), clr_ci(), DEBUG_CHECK_VMEM_WRITE(), DEBUG_PRINTF, DEBUG_PRINTF_MEM, HALT_SYS, IORESOURCE_MEM, M, set_ci(), and val.

Referenced by biosemu(), handleInt10(), my_wrl(), my_wrw(), and update_time().

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

◆ my_wrl()

void my_wrl ( u32  addr,
u32  val 
)

Definition at line 433 of file mem.c.

References addr, biosemu_dev_translate_address(), clr_ci(), DEBUG_CHECK_VMEM_WRITE(), DEBUG_PRINTF, DEBUG_PRINTF_MEM, HALT_SYS, IORESOURCE_MEM, M, my_wrb(), out32le(), set_ci(), and val.

Referenced by biosemu(), and update_time().

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

◆ my_wrw()

void my_wrw ( u32  addr,
u16  val 
)

Definition at line 388 of file mem.c.

References addr, biosemu_dev_translate_address(), clr_ci(), DEBUG_CHECK_VMEM_WRITE(), DEBUG_PRINTF, DEBUG_PRINTF_MEM, HALT_SYS, IORESOURCE_MEM, M, my_wrb(), out16le(), set_ci(), and val.

Referenced by biosemu(), and handleInt10().

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

◆ update_time()

static void update_time ( u32  cur_val)
static

Definition at line 196 of file mem.c.

References get_time(), my_wrb(), my_wrl(), and tb_freq.

Referenced by my_rdl().

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