OSAPI  0.29
Open System API
machine_type_vm.h
1 // *****************************************************************************************
2 //
3 // File description:
4 //
5 // Author: Joao Costa
6 // Purpose: Type declarations for a Virtual Machine
7 //
8 // *****************************************************************************************
9 
10 #ifndef OSAPI_MACHINE_CPU_TYPE_VM_H_
11 #define OSAPI_MACHINE_CPU_TYPE_VM_H_
12 
13 // *****************************************************************************************
14 //
15 // Section: Import headers
16 //
17 // *****************************************************************************************
18 
19 // Standard C headers
20 #include <stdbool.h>
21 #include <stdint.h>
22 
23 // General OSAPI headers
24 
25 // Import own elements
26 #include "machine/machine_platform.h"
27 
28 
29 // *****************************************************************************************
30 //
31 // Section: Import machine enums
32 //
33 // *****************************************************************************************
34 
35 #define osapi_machine_hypervisor_X(a, b, c, d) a b,
36 
37 enum osapi_machine_hypervisor_E {
38  #include "machine/cpu/mappings/table_hypervisor.h"
39 };
40 
41 #undef osapi_machine_hypervisor_X
42 
43 
44 // *****************************************************************************************
45 //
46 // Section: Declarations
47 //
48 // *****************************************************************************************
49 
52 {
53  int id;
54  const char * vendor;
55  const char * signature;
56 };
57 
59 
62 {
63  bool supported;
64  bool available;
66 };
67 
68 
70 typedef struct osapi_machine_vm_s t_vm;
71 
72 
73 
74 
75 
76 
77 
78 #endif /* OSAPI_MACHINE_CPU_TYPE_VM_H_ */
osapi_machine_vm_s
Virtual Machine description.
Definition: machine_type_vm.h:61
osapi_machine_hypervisor_s
Hypervisor description type.
Definition: machine_type_vm.h:51
osapi_machine_vm_s::supported
bool supported
Is virtualization supported.
Definition: machine_type_vm.h:63
osapi_machine_vm_s::hypervisor
t_hypervisor hypervisor
Hypervisor information.
Definition: machine_type_vm.h:65
osapi_machine_vm_s::available
bool available
Is SW currently running inside VM.
Definition: machine_type_vm.h:64
osapi_machine_hypervisor_s::signature
const char * signature
Vendor signature.
Definition: machine_type_vm.h:55
osapi_machine_hypervisor_s::id
int id
Enum for the Vendor.
Definition: machine_type_vm.h:53
osapi_machine_hypervisor_s::vendor
const char * vendor
Vendor name.
Definition: machine_type_vm.h:54