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