]> git.proxmox.com Git - mirror_edk2.git/blame - EmulatorPkg/Win/Host/WinHost.h
EmulatorPkg: formalize line endings
[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
56502bf1
RN
29#include <Guid/FileInfo.h>\r
30#include <Guid/FileSystemInfo.h>\r
31#include <Guid/FileSystemVolumeLabelInfo.h>\r
3c859dfe
RN
32#include <Ppi/EmuThunk.h>\r
33#include <Protocol/EmuThunk.h>\r
56502bf1 34#include <Protocol/SimpleFileSystem.h>\r
3c859dfe 35\r
8f819697
RN
36#include <Protocol/EmuBlockIo.h>\r
37#include <Protocol/BlockIo.h>\r
3c859dfe
RN
38\r
39#include <Library/BaseLib.h>\r
40#include <Library/PeCoffLib.h>\r
41#include <Library/DebugLib.h>\r
42#include <Library/MemoryAllocationLib.h>\r
43#include <Library/ThunkPpiList.h>\r
44#include <Library/ThunkProtocolList.h>\r
45#include <Library/PcdLib.h>\r
46#include <Library/PrintLib.h>\r
47#include <Library/BaseMemoryLib.h>\r
48#include <Library/PeiServicesLib.h>\r
49#include <Library/PeCoffExtraActionLib.h>\r
50\r
51\r
52#define TEMPORARY_RAM_SIZE 0x20000\r
53\r
54typedef struct {\r
55 VOID *Address;\r
56 UINTN Size;\r
57} NT_FD_INFO;\r
58\r
59typedef struct {\r
60 EFI_PHYSICAL_ADDRESS Memory;\r
61 UINT64 Size;\r
62} NT_SYSTEM_MEMORY;\r
63\r
64RETURN_STATUS\r
65EFIAPI\r
66SecPeCoffGetEntryPoint (\r
67 IN VOID *Pe32Data,\r
68 IN OUT VOID **EntryPoint\r
69);\r
70\r
71VOID\r
72SecLoadSecCore (\r
73 IN UINTN TemporaryRam,\r
74 IN UINTN TemporaryRamSize,\r
75 IN VOID *BootFirmwareVolumeBase,\r
76 IN UINTN BootFirmwareVolumeSize,\r
77 IN VOID *SecCorePe32File\r
78)\r
79/*++\r
80\r
81Routine Description:\r
82 This is the service to load the SEC Core from the Firmware Volume\r
83\r
84Arguments:\r
85 TemporaryRam - Memory to use for SEC.\r
86 TemporaryRamSize - Size of Memory to use for SEC\r
87 BootFirmwareVolumeBase - Start of the Boot FV\r
88 SecCorePe32File - SEC Core PE32\r
89\r
90Returns:\r
91 Success means control is transfered and thus we should never return\r
92\r
93--*/\r
94;\r
95\r
96EFI_STATUS\r
97EFIAPI\r
98SecWinNtFdAddress (\r
99 IN UINTN Index,\r
100 IN OUT EFI_PHYSICAL_ADDRESS *FdBase,\r
101 IN OUT UINT64 *FdSize\r
102 )\r
103/*++\r
104\r
105Routine Description:\r
106\r
107 TODO: Add function description\r
108\r
109Arguments:\r
110\r
111 Index - TODO: add argument description\r
112 FdBase - TODO: add argument description\r
113 FdSize - TODO: add argument description\r
114\r
115Returns:\r
116\r
117 TODO: add return values\r
118\r
119--*/\r
120;\r
121\r
122\r
123EFI_STATUS\r
124EFIAPI\r
125SecImageRead (\r
126 IN VOID *FileHandle,\r
127 IN UINTN FileOffset,\r
128 IN OUT UINTN *ReadSize,\r
129 OUT VOID *Buffer\r
130 )\r
131/*++\r
132\r
133Routine Description:\r
134\r
135 TODO: Add function description\r
136\r
137Arguments:\r
138\r
139 FileHandle - TODO: add argument description\r
140 FileOffset - TODO: add argument description\r
141 ReadSize - TODO: add argument description\r
142 Buffer - TODO: add argument description\r
143\r
144Returns:\r
145\r
146 TODO: add return values\r
147\r
148--*/\r
149;\r
150\r
151CHAR16 *\r
152AsciiToUnicode (\r
153 IN CHAR8 *Ascii,\r
154 IN UINTN *StrLen OPTIONAL\r
155 )\r
156/*++\r
157\r
158Routine Description:\r
159\r
160 TODO: Add function description\r
161\r
162Arguments:\r
163\r
164 Ascii - TODO: add argument description\r
165 StrLen - TODO: add argument description\r
166\r
167Returns:\r
168\r
169 TODO: add return values\r
170\r
171--*/\r
172;\r
173\r
174UINTN\r
175CountSeparatorsInString (\r
176 IN CONST CHAR16 *String,\r
177 IN CHAR16 Separator\r
178 )\r
179/*++\r
180\r
181Routine Description:\r
182\r
183 TODO: Add function description\r
184\r
185Arguments:\r
186\r
187 String - TODO: add argument description\r
188 Separator - TODO: add argument description\r
189\r
190Returns:\r
191\r
192 TODO: add return values\r
193\r
194--*/\r
195;\r
196\r
197BOOLEAN\r
198EfiSystemMemoryRange (\r
199 IN VOID *MemoryAddress\r
200 );\r
201VOID\r
202SecInitializeThunk (\r
203 VOID\r
204);\r
205extern EMU_THUNK_PROTOCOL gEmuThunkProtocol;\r
7a465451 206extern EMU_IO_THUNK_PROTOCOL mWinNtWndThunkIo;\r
56502bf1 207extern EMU_IO_THUNK_PROTOCOL mWinNtFileSystemThunkIo;\r
8f819697 208extern EMU_IO_THUNK_PROTOCOL mWinNtBlockIoThunkIo;\r
79e4f2a5 209#endif\r