include/temu-c/Memory/Memory.h File Reference

#include "temu-c/Support/Objsys.h"
#include <stdint.h>

Include dependency graph for Memory.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  temu_MemTransaction
struct  temu_MemAccessIface
struct  temu_MemoryIface
struct  temu_MemoryMapIface

Enumerations

enum  temu_MemoryKind { teMK_RAM, teMK_ROM, teMK_MMIO }
enum  temu_MemoryAttr {
  teMA_Break = 1, teMA_WatchRead = 1 << 1, teMA_WatchWrite = 1 << 2, teMA_Upset = 1 << 3,
  teMA_Faulty = 1 << 4, teMA_User1 = 1 << 5, teMA_User2 = 1 << 6, teMA_User3 = 1 << 7
}
 Memory attribute enumeration. More...

Functions

 OBJSYS_OBJ_TYPE (temu_MemAccess)
 OBJSYS_OBJ_TYPE (temu_Memory)
 OBJSYS_OBJ_TYPE (temu_MemoryMap)
void temu_mapMemorySpace (void *Obj, uint64_t Addr, uint64_t Len, void *MemObj)
void temu_setMemAttr (void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr)
void temu_clearMemAttr (void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr)


Enumeration Type Documentation

Memory attribute enumeration.

The emulator provides 5 standard attributes, and 3 user defined ones. The attributes are set in the memory space (not the memory models), so it is possible to set a watch point on memory mapped devices. When an attribute is set on a page, that page will get a shadow attribute page (same size as the page), enabling attributes to be set on a per byte level.

Attributes are only checked on the address being accessed, the transaction size is not taken into account.

Enumerator:
teMA_Break  Breakpoint set.
teMA_WatchRead  Read watchpoint set.
teMA_WatchWrite  Write watchpoint set.
teMA_Upset  Single event upset.
teMA_Faulty  Multiple event upset / uncorrectable.
teMA_User1  User definable.
teMA_User2  User definable.
teMA_User3  User definable.

Definition at line 119 of file Memory.h.

Enumerator:
teMK_RAM 
teMK_ROM 
teMK_MMIO 

Definition at line 12 of file Memory.h.


Function Documentation

OBJSYS_OBJ_TYPE ( temu_MemoryMap   ) 

OBJSYS_OBJ_TYPE ( temu_Memory   ) 

OBJSYS_OBJ_TYPE ( temu_MemAccess   ) 

void temu_clearMemAttr ( void *  Obj,
uint64_t  Addr,
uint64_t  Len,
temu_MemoryAttr  Attr 
)

Clear attribute on memory space location

Parameters:
Obj The memory space object
Addr Physical address where to map the device
Len Length in bytes of area where the attribute should be set.
Attr The attribute to clear.

void temu_mapMemorySpace ( void *  Obj,
uint64_t  Addr,
uint64_t  Len,
void *  MemObj 
)

Map memory object into address space

Parameters:
Obj The memory space object
Addr Physical address where to map the device
Len Length in bytes of area where the object is mapped.
MemObj The memory object. This object must correspond to the MemAccessIface

void temu_setMemAttr ( void *  Obj,
uint64_t  Addr,
uint64_t  Len,
temu_MemoryAttr  Attr 
)

Set attribute on memory space location

Parameters:
Obj The memory space object
Addr Physical address where to map the device
Len Length in bytes of area where the attribute should be set.
Attr The attribute to set.


Generated on Wed May 27 11:02:19 2015 for T-EMU by  doxygen 1.5.6