-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmmio_man.h
41 lines (37 loc) · 904 Bytes
/
mmio_man.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include "inc/ioooctls.h"
#include <stdint.h>
#include <capstone/capstone.h>
#include "vmm/inc/iostructs.h"
//enum {
// IOTYPE_PIO,
// IOTYPE_MMIO,
//};
//struct ioport_request {
// uint32_t port:16;
// uint32_t direction:8;
// uint32_t size:8;
// uint32_t data;
// uint32_t count;
//};
//
//struct mmio_request {
// uint64_t phys_addr;
// //uint8_t data[8];
// uint64_t data;
// uint32_t len;
// uint8_t is_write;
//} __attribute__((__packed__));
//
//struct io_request {
// uint8_t type;
// union {
// struct ioport_request ioport;
// struct mmio_request mmio;
// };
//};
int handle_mmio(ooo_state_t *state, void *guest_mem);
int get_capstone_mode(int ooo_mode);
int apply_mmio(ooo_state_t *state, void *bytes, int capstone_mode);
int get_reg_offset(x86_reg cs_reg);
int debug_step(ooo_state_t *state, void *guest_mem);