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