import Unicorn2
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
/* By Dang Hoang Vu <dang.hvu -at- gmail.com>, 2015 */
|
||||
/* Modified for Unicorn Engine by Chen Huitao<chenhuitao@hfmrit.com>, 2020 */
|
||||
|
||||
#ifndef UC_QEMU_H
|
||||
#define UC_QEMU_H
|
||||
@ -13,25 +14,23 @@ struct uc_struct;
|
||||
#include "exec/memory.h"
|
||||
|
||||
#include "qemu/thread.h"
|
||||
#include "include/qom/cpu.h"
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
#include "vl.h"
|
||||
|
||||
// This two struct is originally from qemu/include/exec/cpu-all.h
|
||||
// This struct is originally from qemu/include/exec/ramblock.h
|
||||
// Temporarily moved here since there is circular inclusion.
|
||||
typedef struct RAMBlock {
|
||||
struct RAMBlock {
|
||||
struct MemoryRegion *mr;
|
||||
uint8_t *host;
|
||||
ram_addr_t offset;
|
||||
ram_addr_t length;
|
||||
ram_addr_t used_length;
|
||||
ram_addr_t max_length;
|
||||
uint32_t flags;
|
||||
char idstr[256];
|
||||
/* Reads can take either the iothread or the ramlist lock.
|
||||
* Writes must take both locks.
|
||||
*/
|
||||
QTAILQ_ENTRY(RAMBlock) next;
|
||||
int fd;
|
||||
} RAMBlock;
|
||||
/* RCU-enabled, writes protected by the ramlist lock */
|
||||
QLIST_ENTRY(RAMBlock) next;
|
||||
size_t page_size;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
MemoryRegion *mr;
|
||||
@ -40,12 +39,10 @@ typedef struct {
|
||||
hwaddr len;
|
||||
} BounceBuffer;
|
||||
|
||||
// This struct is originally from qemu/include/exec/ramlist.h
|
||||
typedef struct RAMList {
|
||||
/* Protected by the iothread lock. */
|
||||
unsigned long *dirty_memory[DIRTY_MEMORY_NUM];
|
||||
RAMBlock *mru_block;
|
||||
QTAILQ_HEAD(, RAMBlock) blocks;
|
||||
uint32_t version;
|
||||
QLIST_HEAD(, RAMBlock) blocks;
|
||||
} RAMList;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user