2021-05-01 10:05:21 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
|
|
|
|
#ifndef HV_H
|
|
|
|
#define HV_H
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2021-05-04 06:38:17 +00:00
|
|
|
/* VM */
|
|
|
|
void hv_pt_init(void);
|
2021-05-01 10:05:21 +00:00
|
|
|
int hv_map(u64 from, u64 to, u64 size, u64 incr);
|
|
|
|
int hv_unmap(u64 from, u64 size);
|
|
|
|
int hv_map_hw(u64 from, u64 to, u64 size);
|
|
|
|
int hv_map_sw(u64 from, u64 to, u64 size);
|
|
|
|
int hv_map_hook(u64 from, void *hook, u64 size);
|
2021-05-04 18:27:19 +00:00
|
|
|
u64 hv_translate(u64 addr, bool s1only, bool w);
|
2021-05-04 06:38:17 +00:00
|
|
|
|
|
|
|
/* HV main */
|
|
|
|
void hv_init(void);
|
2021-05-01 10:05:21 +00:00
|
|
|
void hv_start(void *entry, u64 regs[4]);
|
|
|
|
|
|
|
|
#endif
|