]> git.proxmox.com Git - mirror_edk2.git/blob - EmulatorPkg/Win/Host/WinHost.h
EmulatorPkg/Win: Add Windows host support
[mirror_edk2.git] / EmulatorPkg / Win / Host / WinHost.h
1 /**@file
2
3 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14 WinHost.h
15
16 Abstract:
17 Include file for Windows Host
18
19 **/
20 #ifndef _HOST_H_
21 #define _HOST_H_
22
23 #include <stdio.h>
24 #include <time.h>
25 #include "WinInclude.h"
26
27 #include <PiPei.h>
28 #include <IndustryStandard/PeImage.h>
29 #include <Ppi/EmuThunk.h>
30 #include <Protocol/EmuThunk.h>
31
32
33 #include <Library/BaseLib.h>
34 #include <Library/PeCoffLib.h>
35 #include <Library/DebugLib.h>
36 #include <Library/MemoryAllocationLib.h>
37 #include <Library/ThunkPpiList.h>
38 #include <Library/ThunkProtocolList.h>
39 #include <Library/PcdLib.h>
40 #include <Library/PrintLib.h>
41 #include <Library/BaseMemoryLib.h>
42 #include <Library/PeiServicesLib.h>
43 #include <Library/PeCoffExtraActionLib.h>
44
45
46 #define TEMPORARY_RAM_SIZE 0x20000
47
48 typedef struct {
49 VOID *Address;
50 UINTN Size;
51 } NT_FD_INFO;
52
53 typedef struct {
54 EFI_PHYSICAL_ADDRESS Memory;
55 UINT64 Size;
56 } NT_SYSTEM_MEMORY;
57
58 RETURN_STATUS
59 EFIAPI
60 SecPeCoffGetEntryPoint (
61 IN VOID *Pe32Data,
62 IN OUT VOID **EntryPoint
63 );
64
65 VOID
66 SecLoadSecCore (
67 IN UINTN TemporaryRam,
68 IN UINTN TemporaryRamSize,
69 IN VOID *BootFirmwareVolumeBase,
70 IN UINTN BootFirmwareVolumeSize,
71 IN VOID *SecCorePe32File
72 )
73 /*++
74
75 Routine Description:
76 This is the service to load the SEC Core from the Firmware Volume
77
78 Arguments:
79 TemporaryRam - Memory to use for SEC.
80 TemporaryRamSize - Size of Memory to use for SEC
81 BootFirmwareVolumeBase - Start of the Boot FV
82 SecCorePe32File - SEC Core PE32
83
84 Returns:
85 Success means control is transfered and thus we should never return
86
87 --*/
88 ;
89
90 EFI_STATUS
91 EFIAPI
92 SecWinNtFdAddress (
93 IN UINTN Index,
94 IN OUT EFI_PHYSICAL_ADDRESS *FdBase,
95 IN OUT UINT64 *FdSize
96 )
97 /*++
98
99 Routine Description:
100
101 TODO: Add function description
102
103 Arguments:
104
105 Index - TODO: add argument description
106 FdBase - TODO: add argument description
107 FdSize - TODO: add argument description
108
109 Returns:
110
111 TODO: add return values
112
113 --*/
114 ;
115
116
117 EFI_STATUS
118 EFIAPI
119 SecImageRead (
120 IN VOID *FileHandle,
121 IN UINTN FileOffset,
122 IN OUT UINTN *ReadSize,
123 OUT VOID *Buffer
124 )
125 /*++
126
127 Routine Description:
128
129 TODO: Add function description
130
131 Arguments:
132
133 FileHandle - TODO: add argument description
134 FileOffset - TODO: add argument description
135 ReadSize - TODO: add argument description
136 Buffer - TODO: add argument description
137
138 Returns:
139
140 TODO: add return values
141
142 --*/
143 ;
144
145 CHAR16 *
146 AsciiToUnicode (
147 IN CHAR8 *Ascii,
148 IN UINTN *StrLen OPTIONAL
149 )
150 /*++
151
152 Routine Description:
153
154 TODO: Add function description
155
156 Arguments:
157
158 Ascii - TODO: add argument description
159 StrLen - TODO: add argument description
160
161 Returns:
162
163 TODO: add return values
164
165 --*/
166 ;
167
168 UINTN
169 CountSeparatorsInString (
170 IN CONST CHAR16 *String,
171 IN CHAR16 Separator
172 )
173 /*++
174
175 Routine Description:
176
177 TODO: Add function description
178
179 Arguments:
180
181 String - TODO: add argument description
182 Separator - TODO: add argument description
183
184 Returns:
185
186 TODO: add return values
187
188 --*/
189 ;
190
191 BOOLEAN
192 EfiSystemMemoryRange (
193 IN VOID *MemoryAddress
194 );
195 VOID
196 SecInitializeThunk (
197 VOID
198 );
199 extern EMU_THUNK_PROTOCOL gEmuThunkProtocol;
200 #endif