TEMU  4.4
The Terma Emulator
Memory.h
Go to the documentation of this file.
1 //===-- temu-c/Memory.h - Memory Helpers ------------------------*- C++ -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2015-2016
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_SUPPORT_MEMORY
10 #define TEMU_SUPPORT_MEMORY
11 
12 #include "temu-c/Support/Attributes.h"
13 #include "temu-c/Support/Objsys.h"
14 #include <stdint.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 typedef enum temu_MemoryKind {
21  teMK_RAM = 0, //!< Model is a RAM
22  teMK_ROM = 1, //!< Model is a ROM
23  teMK_MMIO = 2, //!< Alias for `teMK_IO`
24  teMK_IO = 2, //!< Model is a normal IO device
25  teMK_MemSpace = 4, //!< Model is a memory space
26  teMK_Last = 4, //!< DO NOT USE
27 } temu_MemoryKind;
28 
29 //! Memory attribute enumeration
30 
31 //! The emulator provides 5 standard attributes, and 3 user defined
32 //! ones. The attributes are set in the memory space (not the memory
33 //! models), so it is possible to set a watch point on memory mapped
34 //! devices. When an attribute is set on a page, that page will get a
35 //! shadow attribute page (same size as the page), enabling attributes
36 //! to be set on a per byte level.
37 //!
38 //! Attributes are only checked on the address being accessed, the
39 //! transaction size is not taken into account.
40 typedef enum temu_MemoryAttr {
41  teMA_Break = 1, //!< Breakpoint set
42  teMA_WatchRead = 1 << 1, //!< Read watchpoint set
43  teMA_WatchWrite = 1 << 2, //!< Write watchpoint set
44  teMA_Upset = 1 << 3, //!< Single event upset
45  teMA_Faulty = 1 << 4, //!< Multiple event upset / uncorrectable
46  teMA_User1 = 1 << 5, //!< User definable
47  teMA_User2 = 1 << 6, //!< User definable
48  teMA_User3 = 1 << 7, //!< User definable
49 } temu_MemoryAttr;
50 typedef uint8_t temu_MemoryAttrs;
51 typedef struct temu_MemAccessIface temu_MemAccessIface;
52 
53 typedef enum temu_MemoryStat {
62 } temu_MemoryStat;
63 
64 // Private interface, this is not stable yet
65 typedef struct temu_MemorySpaceIface {
66  //! Map device (using the default MemAccessIface interface)
67  int (*mapDevice)(void *Obj, uint64_t Addr, uint64_t Len, temu_Object_ *Device,
68  uint32_t Flags);
69  //! Set attribute bit
70  void (*setAttr)(void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr);
71  //! Clear attribute bit
72  void (*clearAttr)(void *Obj, uint64_t Addr, uint64_t Len,
73  temu_MemoryAttr Attr);
74  //! Get attributes for address
75  temu_MemoryAttrs (*getAttrs)(void *Obj, uint64_t Addr);
76 
77  //! Map device with named interface
78  int (*mapDeviceWithNamedIface)(void *Obj, uint64_t Addr, uint64_t Len,
79  temu_Object_ *Device, const char *IfaceName,
80  uint32_t Flags);
81 
82  //! Unmap devices in range
83  int (*unmapRange)(void *Obj, uint64_t Addr, uint64_t Len);
84 
85  //! Map device with interface pointer
86  int (*mapDeviceWithIface)(void *Obj, uint64_t Addr, uint64_t Len,
87  temu_Object_ *Device, temu_MemAccessIface *Iface,
88  uint32_t Flags);
89 
90  uint64_t (*getStat)(void *Obj, temu_MemoryStat Stat);
91 } temu_MemorySpaceIface;
92 
93 TEMU_IFACE_REFERENCE_TYPE(temu_MemorySpace);
94 #define TEMU_MEMORY_SPACE_IFACE_TYPE "temu::MemorySpaceIface"
95 
96 // Private interface, do not use directly
97 #define TEMU_PDC_PSEUDO_UNKNOWN_INSTR 0
98 #define TEMU_PDC_PSEUDO_EOP 1
99 #define TEMU_PDC_PSEUDO_TRAMPOLINE 2
100 #define TEMU_PDC_PSEUDO_POST_DS_0 3
101 #define TEMU_PDC_PSEUDO_POST_DS_1 4
102 #define TEMU_PDC_PSEUDO_ATTRIB_CHECK 5
103 #define TEMU_PDC_PSEUDO_PROFILE 6
104 #define TEMU_PDC_PSEUDO_PRE_TRAMPOLINE 7
105 #define TEMU_PDC_PSEUDO_IDLE 8
106 #define TEMU_PDC_PSEUDO_SKIP 9
107 #define TEMU_PDC_PSEUDO_CALL 10
108 #define TEMU_PDC_PSEUDO_CALL_AND_SKIP 11
109 #define TEMU_PDC_PSEUDO_MULTIPAGE 12
110 #define TEMU_PDC_PSEUDO_OP_COUNT 13
111 
112 typedef struct {
113  uint32_t Instruction;
114  uint32_t Operands;
115 } temu_IRInstruction;
116 
117 typedef struct {
118  temu_IRInstruction Inst;
119  uint64_t ExtParam;
120 } temu_ExtIRInstruction;
121 
122 // temu_PDCIface is internal and unstable.
123 typedef struct {
124  void *(*getPDCForCpu)(void *Obj, int Cpu, uint64_t Addr);
125  void (*allocPDCForCpu)(void *Obj, int Cpu,uint64_t Addr);
126  void (*disposePDCForCpu)(void *Obj, int Cpu,uint64_t Addr);
127  void (*writePDCForCpu)(void *Obj, int Cpu,uint64_t Addr, void *Inst);
128  void (*clearPDCForCpu)(void *Obj, int Cpu,uint64_t Addr);
129  void (*setPseudoOpHandlerForCpu)(void *Obj, int Cpu,unsigned Opcode, uintptr_t Handler);
130  void (*installTrampolineForCpu)(void *Obj, int Cpu,uint64_t Addr,
131  void (*TrampHandler)(void *));
132  void (*installProfileForCpu)(void *Obj, int Cpu,uint64_t Addr);
133  void (*removeProfileForCpu)(void *Obj, int Cpu,uint64_t Addr);
134 
135  void (*installIdleForCpu)(void *Obj, int Cpu,uint64_t Addr, uint32_t Param);
136  void (*removeIdleForCpu)(void *Obj, int Cpu,uint64_t Addr);
137 
138  void (*setBTForCpu)(void *Obj, int Cpu, uint64_t Addr, void *BTP);
139 
140  temu_ExtIRInstruction *(*allocPDCChainForCpu)(void *Obj, int Cpu, uint64_t Addr);
141  void (*releasePDCChainForCpu)(void *Obj, int Cpu, uint64_t Addr);
142 
143  uint64_t (*irToPAForCpu)(void *obj, int Cpu, uint64_t addr);
144 
145  void (*installSkipForCpu)(void *Obj, int Cpu, uint64_t Addr, unsigned Steps);
146  void (*removeSkipForCpu)(void *Obj, int Cpu, uint64_t Addr);
147 
148  void (*installCallForCpu)(void *Obj, int Cpu, uint64_t Addr, unsigned FuncID);
149  void (*removeCallForCpu)(void *Obj, int Cpu, uint64_t Addr);
150 } temu_PDCIface;
151 TEMU_IFACE_REFERENCE_TYPE(temu_PDC);
152 #define TEMU_PDC_IFACE_TYPE "PDCIface"
153 
154 /*!
155  * Read block of data via memory block transfer interfaces
156  * \param mem Pointer to memory space object
157  * \param buff The buffer to which the memory should be stored
158  * \param addr The address of the memory block to be read
159  * \param size The size to be read
160  * \param swap setting this to 0 indicates reading a byte array, 1 a
161  * uint16 array, 2 a uint32 array and 3 a uint64 array
162  *
163  * \result Negative on failures. Other values indicate success. The
164  * convention is to return the number of bytes read which should be
165  * == size.
166  */
168  uint32_t size, int swap);
169 
170 /*!
171  * Write block of data via memory block transfer interfaces
172  * \param mem Pointer to memory space object
173  * \param buff The buffer to which the memory should be stored
174  * \param addr The address, at which the write should be done
175  * \param size The size to be read
176  * \param swap Negative on failures. Other values indicate success.
177  *
178  * \result Negative on failure. Other values indicate success. The
179  * convention is to return the number of bytes written, which should
180  * be == size.
181  */
183  uint32_t size, int swap);
184 
185 
186 /*!
187  * Read block of data via large memory transactions.
188  * \param obj Memory space object
189  * \param addr Physical address inside memory space
190  * \param buff Data buffer
191  * \param unitSize Log size of transaction unit size (0 = u8, 1 = u16, 2 = u32, 3 = u64)
192  * \param size Number of units to transfer
193  * \param flags Memory transaction flags (e.g. TEMU_MT_LITTLE_ENDIAN)
194  * \result Negative on failures. Other values indicate success.
195  */
196 
198  unsigned unitSize, uint32_t size,
199  unsigned flags);
200 
201 /*!
202  * Write block of data via large memory transactions.
203  * \param obj Memory space object
204  * \param addr Physical address inside memory space
205  * \param buff Data buffer
206  * \param unitSize Log size of transaction unit size (0 = u8, 1 = u16, 2 = u32, 3 = u64)
207  * \param size Number of units to transfer
208  * \param flags Memory transaction flags (e.g. TEMU_MT_LITTLE_ENDIAN)
209  * \result Negative on failures. Other values indicate success.
210  */
212  const uint8_t *buff, unsigned unitSize,
213  uint32_t size, unsigned flags);
214 
215 /*!
216  * temu_memoryMap Maps an object into a memory space. The object must have an
217  * interface named MemAccessIface, of the type defined as
218  * TEMU_MEM_ACCESS_IFACE_TYPE
219  * \param Obj is the memory space object
220  * \param Addr the physical address
221  * \param Len the length in bytes
222  * \param MemObj is the object that is mapped into the memory space
223  * it needs to be of a class that follows the rules above
224  * \param Flags are flags that are copied into the
225  * memory transaction object's flag field when a transaction
226  * reaches an object
227  * \result Zero on success
228  */
230  void *MemObj, uint32_t Flags);
231 
232 /*!
233  * temu_memoryMapNamedIface Maps an object into a memory space using the named
234  * memory access interface. The interface named by IfaceName must be of the type
235  * TEMU_MEM_ACCESS_IFACE_TYPE
236  * \param Obj is the memory space object
237  * \param Addr the physical address \param Len the length in bytes
238  * \param MemObj is the object that is mapped into the memory space it needs to
239  * be of a class that follows the rules above
240  * \param IfaceName Name of the memory access interface
241  * \param Flags are flags that are copied into the memory transaction object's
242  * flag field when a transaction reaches an object
243  * \result Zero on success
244  */
246  void *MemObj, const char *IfaceName,
247  uint32_t Flags);
248 
250  void *MemObj, const char *IfaceName,
251  unsigned Idx, uint32_t Flags);
252 
253 /*!
254  * Sets an attribute on the given memory range
255  * \param Obj Memory space object
256  * \param Addr Physical address of start
257  * \param Len Length of memory range
258  * \param Attr Attribute to set
259  */
262 
263 /*!
264  * Clears an attribute on the given memory range
265  * \param Obj Memory space object
266  * \param Addr Physical address of start
267  * \param Len Length of memory range
268  * \param Attr Attribute to clear
269  */
272 
273 /*!
274  * Get memory attributes for address
275  * \param Obj Memory space
276  * \param Addr Physical addres
277  * \result Memory attributes for the address
278  */
279 TEMU_API temu_MemoryAttrs temu_memoryGetAttrs(void *Obj, uint64_t Addr);
280 
281 /*!
282  * Issue a big endian memory read transaction (without initiator)
283  * \param Obj Memory space
284  * \param Addr Physical address
285  * \param Word 16 bit word that is read
286  * \result 0 on success, other values imply failure and will not
287  * update the word.
288  */
290 /*!
291  * Issue a little endian memory read transaction (without initiator)
292  * \param Obj Memory space
293  * \param Addr Physical address
294  * \param Word 16 bit word that is read
295  * \result 0 on success, other values imply failure and will not
296  * update the word.
297  */
299 
300 /*!
301  * Issue a big endian memory read transaction (without initiator)
302  * \param Obj Memory space
303  * \param Addr Physical address
304  * \param Word 32 bit word that is read
305  * \result 0 on success, other values imply failure and will not
306  * update the word.
307  */
309 /*!
310  * Issue a little endian memory read transaction (without initiator)
311  * \param Obj Memory space
312  * \param Addr Physical address
313  * \param Word 32 bit word that is read
314  * \result 0 on success, other values imply failure and will not
315  * update the word.
316  */
318 
319 /*!
320  * Issue a big endian memory write transaction (without initiator)
321  * \param Obj Memory space
322  * \param Addr Physical address
323  * \param Word 32 bit word to write
324  * \result 0 on success
325  */
327 
328 /*!
329  * Issue a little endian memory write transaction (without initiator)
330  * \param Obj Memory space
331  * \param Addr Physical address
332  * \param Word 32 bit word to write
333  * \result 0 on success
334  */
336 
337 /*!
338  * Normalise a value for writes where only 32 bit transactions are
339  * supported by the device model, but the target is allowed to write
340  * non-32 bit quantity. The function mixes the old register value with
341  * the new one based on the size and offset parameter. The problem
342  * exists because the memory access interface has a value entry, which
343  * always ends up in the lower bits, so if we write to the higher bits
344  * in in a 32 bit register, then by just forwarding the the value as
345  * is to the write handler, will result in a write of the lower bits and
346  * a clear of the upper bits (for a store unsigned).
347  *
348  * Thus a normalisation is needed where we mix the written word with the old
349  * bits. So for transaction size of 16, and an offset of 16, the resulting
350  * word is (old & 0x0000ffff) | (new << 16)
351  *
352  * \param OldVal Old regiseter value.
353  * \param NewVal Content in memory transaction (new value).
354  * \param Sz Size in log number of bytes
355  * \param Off Offset in bytes within the 32 bit word of the transaction.
356  */
357 TEMU_API uint32_t temu_normaliseWrite32(uint32_t OldVal, uint32_t NewVal,
358  int Sz, int Off);
359 
360 /*!
361  * Normalise a value for reads where only 32 bit transactions are
362  * supported by the device model, but the target is allowed to read
363  * non-32 bit quantities.
364  *
365  * Given a 32 bit register value, the function extracts the bits from it
366  * that was actually requested.
367  *
368  * \param Value Register value
369  * \param Sz Size in log number of bytes (0, 1, or 2)
370  * \param Off Offset in bytes within the 32 bit word of the transaction (0-3)
371  */
372 TEMU_API uint32_t temu_normaliseRead32(uint32_t Value, int Sz, int Off);
373 
374 /*!
375  * Normalise a value for reads where only 16 bit transactions are
376  * supported by the device model, but the target is allowed to read
377  * non-16 bit quantities.
378  *
379  * Given a 32 bit register value, the function extracts the bits from it
380  * that was actually requested.
381  *
382  * \param Value Register value
383  * \param Sz Size in log number of bytes (0 or 1)
384  * \param Off Offset in bytes within the 32 bit word of the transaction (0 or 2)
385  */
386 TEMU_API uint16_t temu_normaliseRead16(uint16_t Value, int Sz, int Off);
387 
388 /*!
389  * Normalise a value for writes where only 16 bit transactions are
390  * supported by the device model, but the target is allowed to write
391  * non-16 bit quantity. The function mixes the old register value with
392  * the new one based on the size and offset parameter. The problem
393  * exists because the memory access interface has a value entry, which
394  * always ends up in the lower bits, so if we write to the higher bits
395  * in in a 16 bit register, then by just forwarding the the value as
396  * is to the write handler, will result in a write of the lower bits and
397  * a clear of the upper bits (for a store unsigned).
398  *
399  * Thus a normalisation is neded where we mix the written word with the old
400  * bits. So for transaction size of 8, and an offset of8, the resulting
401  * word is (old & 0x00ff) | (new << 8)
402  *
403  * \param OldVal Old regiseter value.
404  * \param NewVal Content in memory transaction (new value).
405  * \param Sz Size in log number of bytes
406  * \param Off Offset in bytes within the 16 bit word of the transaction.
407  */
408 
409 TEMU_API uint16_t temu_normaliseWrite16(uint16_t OldVal, uint16_t NewVal,
410  int Sz, int Off);
411 
412 /*!
413  * Install trampoline function in PDC cache
414  * \param Obj Memory space
415  * \param Addr Physical address
416  * \param Tramp Trampoline function, takes CPU pointer as first argument.
417  * \result 0 on success
418  */
420  void (*Tramp)(void *));
421 TEMU_API uint64_t temu_irToPhys(void *obj, uintptr_t ir);
422 TEMU_API uint64_t temu_irToPhysForCpu(void *obj, int cpu, uintptr_t ir);
423 
424 #ifdef __cplusplus
425 }
426 #endif
427 
428 #endif /* ! TEMU_SUPPORT_MEMORY */
temu_PDCIface::setBTForCpu
void(* setBTForCpu)(void *Obj, int Cpu, uint64_t Addr, void *BTP)
Definition: Memory.h:138
temu_MemoryAttr
temu_MemoryAttr
Memory attribute enumeration.
Definition: Memory.h:40
temu_memoryClearAttr
TEMU_API void temu_memoryClearAttr(void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr)
temu_MemAccessIface
struct temu_MemAccessIface temu_MemAccessIface
Definition: Memory.h:51
temu_memoryRead
TEMU_API int temu_memoryRead(void *mem, uint8_t *buff, uint64_t addr, uint32_t size, int swap)
temu_memoryReadData
TEMU_API int temu_memoryReadData(void *obj, uint64_t addr, uint8_t *buff, unsigned unitSize, uint32_t size, unsigned flags)
temu_PDCIface::installCallForCpu
void(* installCallForCpu)(void *Obj, int Cpu, uint64_t Addr, unsigned FuncID)
Definition: Memory.h:148
temu_memorySetAttr
TEMU_API void temu_memorySetAttr(void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr)
temu_memoryReadPhys32Little
TEMU_API int temu_memoryReadPhys32Little(void *Obj, uint64_t Addr, uint32_t *Word)
teMA_User2
@ teMA_User2
User definable.
Definition: Memory.h:47
temu_memoryWriteData
TEMU_API int temu_memoryWriteData(void *obj, uint64_t addr, const uint8_t *buff, unsigned unitSize, uint32_t size, unsigned flags)
temu_ExtIRInstruction::ExtParam
uint64_t ExtParam
Definition: Memory.h:119
temu_ExtIRInstruction::Inst
temu_IRInstruction Inst
Definition: Memory.h:118
teMA_Upset
@ teMA_Upset
Single event upset.
Definition: Memory.h:44
temu_MemorySpaceIface::clearAttr
void(* clearAttr)(void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr)
Clear attribute bit.
Definition: Memory.h:72
temu_memoryMapNamedIface
TEMU_API int temu_memoryMapNamedIface(void *Obj, uint64_t Addr, uint64_t Len, void *MemObj, const char *IfaceName, uint32_t Flags)
teMS_IOWriteTime
@ teMS_IOWriteTime
Definition: Memory.h:60
temu_memoryInstallTrampoline
TEMU_API int temu_memoryInstallTrampoline(void *Obj, uint64_t Addr, void(*Tramp)(void *))
temu_PDCIface::removeIdleForCpu
void(* removeIdleForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:136
temu_PDCIface::disposePDCForCpu
void(* disposePDCForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:126
teMS_CodeWrites
@ teMS_CodeWrites
Definition: Memory.h:57
temu_MemorySpaceIface::unmapRange
int(* unmapRange)(void *Obj, uint64_t Addr, uint64_t Len)
Unmap devices in range.
Definition: Memory.h:83
temu_PDCIface::removeSkipForCpu
void(* removeSkipForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:146
temu_MemoryStat
temu_MemoryStat
Definition: Memory.h:53
temu_PDCIface::clearPDCForCpu
void(* clearPDCForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:128
teMK_IO
@ teMK_IO
Model is a normal IO device.
Definition: Memory.h:24
teMA_User3
@ teMA_User3
User definable.
Definition: Memory.h:48
temu_PDCIface::removeCallForCpu
void(* removeCallForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:149
temu_PDCIface::installTrampolineForCpu
void(* installTrampolineForCpu)(void *Obj, int Cpu, uint64_t Addr, void(*TrampHandler)(void *))
Definition: Memory.h:130
teMK_Last
@ teMK_Last
DO NOT USE.
Definition: Memory.h:26
teMS_IOReads
@ teMS_IOReads
Definition: Memory.h:54
teMA_Faulty
@ teMA_Faulty
Multiple event upset / uncorrectable.
Definition: Memory.h:45
temu_memoryWritePhys32
TEMU_API int temu_memoryWritePhys32(void *Obj, uint64_t Addr, uint32_t Word)
temu_MemorySpaceIface::setAttr
void(* setAttr)(void *Obj, uint64_t Addr, uint64_t Len, temu_MemoryAttr Attr)
Set attribute bit.
Definition: Memory.h:70
temu_PDCIface::installProfileForCpu
void(* installProfileForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:132
temu_PDCIface::allocPDCForCpu
void(* allocPDCForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:125
teMS_SelfModifyingCodeWrites
@ teMS_SelfModifyingCodeWrites
Definition: Memory.h:56
temu_MemoryAttrs
uint8_t temu_MemoryAttrs
Definition: Memory.h:50
temu_memoryMap
TEMU_API int temu_memoryMap(void *Obj, uint64_t Addr, uint64_t Len, void *MemObj, uint32_t Flags)
teMK_MemSpace
@ teMK_MemSpace
Model is a memory space.
Definition: Memory.h:25
temu_PDCIface::setPseudoOpHandlerForCpu
void(* setPseudoOpHandlerForCpu)(void *Obj, int Cpu, unsigned Opcode, uintptr_t Handler)
Definition: Memory.h:129
teMS_LockTime
@ teMS_LockTime
Definition: Memory.h:61
temu_PDCIface::writePDCForCpu
void(* writePDCForCpu)(void *Obj, int Cpu, uint64_t Addr, void *Inst)
Definition: Memory.h:127
teMA_WatchRead
@ teMA_WatchRead
Read watchpoint set.
Definition: Memory.h:42
temu_MemorySpaceIface::mapDeviceWithNamedIface
int(* mapDeviceWithNamedIface)(void *Obj, uint64_t Addr, uint64_t Len, temu_Object_ *Device, const char *IfaceName, uint32_t Flags)
Map device with named interface.
Definition: Memory.h:78
temu_memoryWritePhys32Little
TEMU_API int temu_memoryWritePhys32Little(void *Obj, uint64_t Addr, uint32_t Word)
teMA_User1
@ teMA_User1
User definable.
Definition: Memory.h:46
teMK_ROM
@ teMK_ROM
Model is a ROM.
Definition: Memory.h:22
teMK_MMIO
@ teMK_MMIO
Alias for teMK_IO
Definition: Memory.h:23
teMK_RAM
@ teMK_RAM
Model is a RAM.
Definition: Memory.h:21
temu_IRInstruction::Instruction
uint32_t Instruction
Definition: Memory.h:113
teMS_IOWrites
@ teMS_IOWrites
Definition: Memory.h:55
temu_memoryReadPhys32
TEMU_API int temu_memoryReadPhys32(void *Obj, uint64_t Addr, uint32_t *Word)
temu_memoryMapNamedIface2
TEMU_API int temu_memoryMapNamedIface2(void *Obj, uint64_t Addr, uint64_t Len, void *MemObj, const char *IfaceName, unsigned Idx, uint32_t Flags)
teMA_WatchWrite
@ teMA_WatchWrite
Write watchpoint set.
Definition: Memory.h:43
temu_PDCIface::installIdleForCpu
void(* installIdleForCpu)(void *Obj, int Cpu, uint64_t Addr, uint32_t Param)
Definition: Memory.h:135
teMS_IOReadTime
@ teMS_IOReadTime
Definition: Memory.h:59
temu_PDCIface::removeProfileForCpu
void(* removeProfileForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:133
temu_MemoryKind
temu_MemoryKind
Definition: Memory.h:20
temu_PDCIface::getPDCForCpu
void *(* getPDCForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:124
temu_memoryReadPhys16
TEMU_API int temu_memoryReadPhys16(void *Obj, uint64_t Addr, uint16_t *Word)
temu_memoryWrite
TEMU_API int temu_memoryWrite(void *mem, uint64_t addr, uint8_t *buff, uint32_t size, int swap)
temu_PDCIface::releasePDCChainForCpu
void(* releasePDCChainForCpu)(void *Obj, int Cpu, uint64_t Addr)
Definition: Memory.h:141
temu_MemorySpaceIface::mapDeviceWithIface
int(* mapDeviceWithIface)(void *Obj, uint64_t Addr, uint64_t Len, temu_Object_ *Device, temu_MemAccessIface *Iface, uint32_t Flags)
Map device with interface pointer.
Definition: Memory.h:86
temu_PDCIface::installSkipForCpu
void(* installSkipForCpu)(void *Obj, int Cpu, uint64_t Addr, unsigned Steps)
Definition: Memory.h:145
temu_MemorySpaceIface::mapDevice
int(* mapDevice)(void *Obj, uint64_t Addr, uint64_t Len, temu_Object_ *Device, uint32_t Flags)
Map device (using the default MemAccessIface interface)
Definition: Memory.h:67
teMS_LocksTaken
@ teMS_LocksTaken
Definition: Memory.h:58
teMA_Break
@ teMA_Break
Breakpoint set.
Definition: Memory.h:41
temu_MemorySpaceIface
Definition: Memory.h:65
temu_IRInstruction::Operands
uint32_t Operands
Definition: Memory.h:114
temu_memoryReadPhys16Little
TEMU_API int temu_memoryReadPhys16Little(void *Obj, uint64_t Addr, uint16_t *Word)