TianoCore EDK2 master
Loading...
Searching...
No Matches
WinHost.h
Go to the documentation of this file.
1
16#ifndef _HOST_H_
17#define _HOST_H_
18
19#include <stdio.h>
20#include <time.h>
21#include "WinInclude.h"
22
23#include <PiPei.h>
25#include <Guid/FileInfo.h>
26#include <Guid/FileSystemInfo.h>
28#include <Ppi/EmuThunk.h>
29#include <Ppi/Reset2.h>
30#include <Protocol/EmuThunk.h>
32
33#include <Protocol/EmuBlockIo.h>
34#include <Protocol/BlockIo.h>
35#include <Protocol/EmuSnp.h>
36
37#include <Library/BaseLib.h>
38#include <Library/PeCoffLib.h>
39#include <Library/DebugLib.h>
43#include <Library/PcdLib.h>
44#include <Library/PrintLib.h>
48#include <Library/NetLib.h>
49
50#define TEMPORARY_RAM_SIZE 0x20000
51
52typedef struct {
53 VOID *Address;
54 UINTN Size;
56
57typedef struct {
59 UINT64 Size;
61
62RETURN_STATUS
63EFIAPI
64SecPeCoffGetEntryPoint (
65 IN VOID *Pe32Data,
66 IN OUT VOID **EntryPoint
67 );
68
69VOID
70SecLoadSecCore (
71 IN UINTN TemporaryRam,
72 IN UINTN TemporaryRamSize,
73 IN VOID *BootFirmwareVolumeBase,
74 IN UINTN BootFirmwareVolumeSize,
75 IN VOID *SecCorePe32File
76 )
77
78/*++
79
80Routine Description:
81 This is the service to load the SEC Core from the Firmware Volume
82
83Arguments:
84 TemporaryRam - Memory to use for SEC.
85 TemporaryRamSize - Size of Memory to use for SEC
86 BootFirmwareVolumeBase - Start of the Boot FV
87 SecCorePe32File - SEC Core PE32
88
89Returns:
90 Success means control is transferred and thus we should never return
91
92--*/
93;
94
96EFIAPI
97SecWinNtFdAddress (
98 IN UINTN Index,
100 IN OUT UINT64 *FdSize
101 )
102
103/*++
104
105Routine Description:
106
107 TODO: Add function description
108
109Arguments:
110
111 Index - TODO: add argument description
112 FdBase - TODO: add argument description
113 FdSize - TODO: add argument description
114
115Returns:
116
117 TODO: add return values
118
119--*/
120;
121
123EFIAPI
124SecImageRead (
125 IN VOID *FileHandle,
126 IN UINTN FileOffset,
127 IN OUT UINTN *ReadSize,
128 OUT VOID *Buffer
129 )
130
131/*++
132
133Routine Description:
134
135 TODO: Add function description
136
137Arguments:
138
139 FileHandle - TODO: add argument description
140 FileOffset - TODO: add argument description
141 ReadSize - TODO: add argument description
142 Buffer - TODO: add argument description
143
144Returns:
145
146 TODO: add return values
147
148--*/
149;
150
151CHAR16 *
152AsciiToUnicode (
153 IN CHAR8 *Ascii,
154 IN UINTN *StrLen OPTIONAL
155 )
156
157/*++
158
159Routine Description:
160
161 TODO: Add function description
162
163Arguments:
164
165 Ascii - TODO: add argument description
166 StrLen - TODO: add argument description
167
168Returns:
169
170 TODO: add return values
171
172--*/
173;
174
175UINTN
176CountSeparatorsInString (
177 IN CONST CHAR16 *String,
178 IN CHAR16 Separator
179 )
180
181/*++
182
183Routine Description:
184
185 TODO: Add function description
186
187Arguments:
188
189 String - TODO: add argument description
190 Separator - TODO: add argument description
191
192Returns:
193
194 TODO: add return values
195
196--*/
197;
198
199BOOLEAN
200EfiSystemMemoryRange (
201 IN VOID *MemoryAddress
202 );
203
204VOID
205SecInitializeThunk (
206 VOID
207 );
208
209extern EMU_THUNK_PROTOCOL gEmuThunkProtocol;
210extern EMU_IO_THUNK_PROTOCOL mWinNtWndThunkIo;
211extern EMU_IO_THUNK_PROTOCOL mWinNtFileSystemThunkIo;
212extern EMU_IO_THUNK_PROTOCOL mWinNtBlockIoThunkIo;
213extern EMU_IO_THUNK_PROTOCOL mWinNtSnpThunkIo;
214
215#endif
UINT64 UINTN
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
Definition: String.c:30
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29