import Unicorn2
This commit is contained in:
@@ -24,13 +24,8 @@
|
||||
#ifndef IOPORT_H
|
||||
#define IOPORT_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "qom/object.h"
|
||||
#include "exec/memory.h"
|
||||
|
||||
typedef uint32_t pio_addr_t;
|
||||
#define FMT_pioaddr PRIx32
|
||||
|
||||
#define MAX_IOPORTS (64 * 1024)
|
||||
#define IOPORTS_MASK (MAX_IOPORTS - 1)
|
||||
|
||||
@@ -45,15 +40,31 @@ typedef struct MemoryRegionPortio {
|
||||
|
||||
#define PORTIO_END_OF_LIST() { }
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
extern const MemoryRegionOps unassigned_io_ops;
|
||||
#endif
|
||||
|
||||
void cpu_outb(struct uc_struct *uc, pio_addr_t addr, uint8_t val);
|
||||
void cpu_outw(struct uc_struct *uc, pio_addr_t addr, uint16_t val);
|
||||
void cpu_outl(struct uc_struct *uc, pio_addr_t addr, uint32_t val);
|
||||
uint8_t cpu_inb(struct uc_struct *uc, pio_addr_t addr);
|
||||
uint16_t cpu_inw(struct uc_struct *uc, pio_addr_t addr);
|
||||
uint32_t cpu_inl(struct uc_struct *uc, pio_addr_t addr);
|
||||
void cpu_outb(struct uc_struct *uc, uint32_t addr, uint8_t val);
|
||||
void cpu_outw(struct uc_struct *uc, uint32_t addr, uint16_t val);
|
||||
void cpu_outl(struct uc_struct *uc, uint32_t addr, uint32_t val);
|
||||
uint8_t cpu_inb(struct uc_struct *uc, uint32_t addr);
|
||||
uint16_t cpu_inw(struct uc_struct *uc, uint32_t addr);
|
||||
uint32_t cpu_inl(struct uc_struct *uc, uint32_t addr);
|
||||
|
||||
typedef struct PortioList {
|
||||
const struct MemoryRegionPortio *ports;
|
||||
struct MemoryRegion *address_space;
|
||||
unsigned nr;
|
||||
struct MemoryRegion **regions;
|
||||
void *opaque;
|
||||
const char *name;
|
||||
} PortioList;
|
||||
|
||||
void portio_list_init(PortioList *piolist,
|
||||
const struct MemoryRegionPortio *callbacks,
|
||||
void *opaque, const char *name);
|
||||
void portio_list_destroy(PortioList *piolist);
|
||||
void portio_list_add(PortioList *piolist,
|
||||
struct MemoryRegion *address_space,
|
||||
uint32_t addr);
|
||||
void portio_list_del(PortioList *piolist);
|
||||
|
||||
#endif /* IOPORT_H */
|
||||
|
||||
Reference in New Issue
Block a user