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