-
Notifications
You must be signed in to change notification settings - Fork 4
/
HvLoaderEfi.h
101 lines (78 loc) · 2.09 KB
/
HvLoaderEfi.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/** @file
Definitions used by an external hypervisor loader that is to be loaded
by HvLoader.efi.
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
**/
#ifndef __HVLOADER_EFI_H__
#define __HVLOADER_EFI_H__
//
// -------------------------------------------------------------------- Defines
//
//
// HVL interface version
//
#define HVL_VERSION 0x00000100
//
// HVL loaded image flags
//
#define HVL_FLAG_ENV_EFI 0x00000001
#define HVL_FLAG_ENV_OS 0x00000002
//
// ---------------------------------------------------------------------- Types
//
//
// Loaded image information
//
typedef struct {
//
// Interface version.
//
UINT32 Version;
//
// Size of this struct.
//
UINT32 Size;
//
// Loaded image flags
//
UINT32 Flags;
//
// Loaded image based address.
//
EFI_PHYSICAL_ADDRESS ImageAddress;
//
// Loaded image size.
//
UINT64 ImageSize;
//
// Loaded image page count.
//
UINTN ImagePages;
//
// Loaded image memory type.
//
EFI_MEMORY_TYPE ImageMemoryType;
//
// Loaded image entry point.
//
EFI_PHYSICAL_ADDRESS EntryPoint;
} HVL_LOADED_IMAGE_INFO;
/**
This is the external hypervisor loader image entry point.
@param[in] ImageHandle The firmware allocated handle for the primary
EFI loader.
@param[in] SystemTable A pointer to the EFI System Table.
@param[in] HvLoaderImageInfo A pointer to the loaded hypervisor loader
image information.
@retval EFI_SUCCESS The operation completed successfully.
@retval Others An unexpected error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *HV_LOADER_IMAGE_ENTRY_POINT) (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable,
IN HVL_LOADED_IMAGE_INFO *HvLoaderImageInfo
);
#endif // !__HVLOADER_EFI_H__