bfdrivers
include
platform.h
Go to the documentation of this file.
1
/*
2
* Bareflank Hypervisor
3
*
4
* Copyright (C) 2015 Assured Information Security, Inc.
5
* Author: Rian Quinn <quinnr@ainfosec.com>
6
* Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
*/
22
23
#ifndef PLATFORM_H
24
#define PLATFORM_H
25
26
#include <
types.h
>
27
#include <
vmcall_interface.h
>
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
41
void
*
platform_alloc_rw
(uint64_t len);
42
51
void
*
platform_alloc_rwe
(uint64_t len);
52
62
void
platform_free_rw
(
void
*
addr
, uint64_t len);
63
73
void
platform_free_rwe
(
void
*
addr
, uint64_t len);
74
86
void
*
platform_virt_to_phys
(
void
*
virt
);
87
95
void
platform_memset
(
void
*ptr,
char
value, uint64_t num);
96
104
void
platform_memcpy
(
void
*dst,
const
void
*src, uint64_t num);
105
111
void
platform_start
(
void
);
112
118
void
platform_stop
(
void
);
119
125
int64_t
126
platform_num_cpus
(
void
);
127
136
int64_t
137
platform_set_affinity
(int64_t affinity);
138
149
void
150
platform_restore_affinity
(int64_t affinity);
151
157
void
158
platform_vmcall
(
struct
vmcall_registers_t
*regs);
159
165
void
166
platform_vmcall_event
(
struct
vmcall_registers_t
*regs);
167
168
#ifdef __cplusplus
169
}
170
#endif
171
172
#endif
platform_vmcall_event
void platform_vmcall_event(struct vmcall_registers_t *regs)
Definition:
platform.c:168
vmcall_registers_t
Definition:
vmcall_interface.h:303
types.h
platform_set_affinity
int64_t platform_set_affinity(int64_t affinity)
Definition:
platform.c:163
platform_alloc_rwe
void * platform_alloc_rwe(uint64_t len)
Definition:
platform.c:62
platform_restore_affinity
void platform_restore_affinity(int64_t affinity)
Definition:
platform.c:182
platform_start
void platform_start(void)
Definition:
platform.c:136
platform_memcpy
void platform_memcpy(void *dst, const void *src, uint64_t num)
Definition:
platform.c:127
platform_alloc_rw
void * platform_alloc_rw(uint64_t len)
Definition:
platform.c:43
platform_free_rwe
void platform_free_rwe(void *addr, uint64_t len)
Definition:
platform.c:95
platform_vmcall
void platform_vmcall(struct vmcall_registers_t *regs)
Definition:
platform.c:162
platform_memset
void platform_memset(void *ptr, char value, uint64_t num)
Definition:
platform.c:118
platform_virt_to_phys
void * platform_virt_to_phys(void *virt)
Definition:
platform.c:109
platform_stop
void platform_stop(void)
Definition:
platform.c:144
x64::cpuid::addr_size::addr
constexpr const auto addr
Definition:
cpuid_x64.h:80
vmcall_interface.h
virt
constexpr page_table_x64::integer_pointer virt
Definition:
test_page_table_x64.cpp:29
platform_free_rw
void platform_free_rw(void *addr, uint64_t len)
Definition:
platform.c:81
platform_num_cpus
int64_t platform_num_cpus(void)
Definition:
platform.c:152
Generated on Fri Apr 28 2017 22:11:37 by
1.8.14