#include <freeldr.h>
#include <debug.h>
Go to the source code of this file.
|
| DBG_DEFAULT_CHANNEL (FILESYSTEM) |
|
static PPXE | FindPxeStructure (VOID) |
|
static PPXE | GetPxeStructure (VOID) |
|
PXENV_EXIT __cdecl | PxeCallApi (UINT16 Segment, UINT16 Offset, UINT16 Service, VOID *Parameter) |
|
BOOLEAN | CallPxe (UINT16 Service, PVOID Parameter) |
|
static ARC_STATUS | PxeClose (ULONG FileId) |
|
static ARC_STATUS | PxeGetFileInformation (ULONG FileId, FILEINFORMATION *Information) |
|
static ARC_STATUS | PxeOpen (CHAR *Path, OPENMODE OpenMode, ULONG *FileId) |
|
static ARC_STATUS | PxeRead (ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count) |
|
static ARC_STATUS | PxeSeek (ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode) |
|
const DEVVTBL * | PxeMount (ULONG DeviceId) |
|
static ARC_STATUS | PxeDiskClose (ULONG FileId) |
|
static ARC_STATUS | PxeDiskGetFileInformation (ULONG FileId, FILEINFORMATION *Information) |
|
static ARC_STATUS | PxeDiskOpen (CHAR *Path, OPENMODE OpenMode, ULONG *FileId) |
|
static ARC_STATUS | PxeDiskRead (ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count) |
|
static ARC_STATUS | PxeDiskSeek (ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode) |
|
static BOOLEAN | GetCachedInfo (VOID) |
|
BOOLEAN | PxeInit (VOID) |
|
◆ NO_FILE
Definition at line 26 of file pxe.c.
◆ TAG_PXE_FILE
Definition at line 25 of file pxe.c.
◆ CallPxe()
Definition at line 85 of file pxe.c.
86{
89
91 if (!pxe)
93
95 {
96
99 }
100
103 {
104 ERR(
"PxeCall(0x%x, %p) failed with exit=%d status=0x%x\n",
107 }
109 {
110 ERR(
"PxeCall(0x%x, %p) succeeded, but returned error status 0x%x\n",
113 }
115}
#define PXENV_EXIT_SUCCESS
#define PXENV_STATUS_SUCCESS
#define KeStallExecutionProcessor(MicroSeconds)
PXENV_EXIT __cdecl PxeCallApi(UINT16 Segment, UINT16 Offset, UINT16 Service, VOID *Parameter)
static PPXE GetPxeStructure(VOID)
_Inout_opt_ PVOID Parameter
Referenced by GetCachedInfo(), PxeClose(), PxeOpen(), PxeRead(), and PxeSeek().
◆ DBG_DEFAULT_CHANNEL()
DBG_DEFAULT_CHANNEL |
( |
FILESYSTEM |
| ) |
|
◆ FindPxeStructure()
Definition at line 38 of file pxe.c.
39{
43
44
47 {
49
50
52 continue;
53
54
55 if (
Ptr->StructLength !=
sizeof(
PXE))
56 continue;
57
58
59 Checksum = 0;
60 for (
i = 0;
i <
Ptr->StructLength;
i++)
62 if (Checksum != 0)
63 continue;
64
65 TRACE(
"!PXE structure found at %p\n",
Ptr);
67 }
68
70}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by GetPxeStructure().
◆ GetCachedInfo()
Definition at line 327 of file pxe.c.
328{
332
335
339 if (
Data.BufferSize < 36)
344}
#define PXENV_PACKET_TYPE_CACHED_REPLY
#define PXENV_GET_CACHED_INFO
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
BOOLEAN CallPxe(UINT16 Service, PVOID Parameter)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
Referenced by PxeInit().
◆ GetPxeStructure()
Definition at line 72 of file pxe.c.
73{
76 if (!bPxeSearched)
77 {
80 }
81 return pPxe;
82}
static PPXE FindPxeStructure(VOID)
Referenced by CallPxe(), PxeInit(), and PxeMount().
◆ PxeCallApi()
◆ PxeClose()
◆ PxeDiskClose()
◆ PxeDiskGetFileInformation()
◆ PxeDiskOpen()
◆ PxeDiskRead()
◆ PxeDiskSeek()
◆ PxeGetFileInformation()
Definition at line 132 of file pxe.c.
133{
136
140
141 TRACE(
"PxeGetFileInformation(%lu) -> FileSize = %lu, FilePointer = 0x%lx\n",
143
145}
static ULONG _FilePosition
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
◆ PxeInit()
Definition at line 346 of file pxe.c.
347{
350
351
355
356
358 {
361 }
362
364}
VOID FsRegisterDevice(CHAR *Prefix, const DEVVTBL *FuncTable)
static const DEVVTBL PxeDiskVtbl
static BOOLEAN GetCachedInfo(VOID)
Referenced by PcInitializeBootDevices().
◆ PxeMount()
Definition at line 282 of file pxe.c.
283{
287}
static const DEVVTBL PxeVtbl
Referenced by ArcOpen().
◆ PxeOpen()
Definition at line 147 of file pxe.c.
148{
152
157
158
160
161
162 for (
i = 0;
i < PathLen;
i++)
163 {
166 else
168 }
169
170
172
177 {
178 ERR(
"Failed to get '%s' size\n",
Path);
180 }
181
184
189
192
195
198}
PRTL_UNICODE_STRING_BUFFER Path
ACPI_SIZE strlen(const char *String)
#define PXENV_TFTP_GET_FSIZE
static ULONG _CachedLength
static ULONG _PacketPosition
static CHAR _OpenFileName[128]
static UCHAR _Packet[1024]
Referenced by PxeSeek().
◆ PxeRead()
Definition at line 200 of file pxe.c.
201{
204
206
209
213
214
216 {
219 else
227 break;
228
233 }
234
236}
◆ PxeSeek()
Definition at line 238 of file pxe.c.
239{
241
244
247
249 {
250
255 }
256
260
261
263 {
268 }
269
272}
static ARC_STATUS PxeOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
static ARC_STATUS PxeClose(ULONG FileId)
◆ _CachedLength
◆ _FilePosition
◆ _FileSize
◆ _OpenFile
◆ _OpenFileName
◆ _Packet
◆ _PacketPosition
ULONG _PacketPosition = 0 |
|
static |
◆ _ServerIP
◆ PxeDiskVtbl
Initial value:= {
}
static ARC_STATUS PxeDiskOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
static ARC_STATUS PxeDiskRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
static ARC_STATUS PxeDiskSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
static ARC_STATUS PxeDiskClose(ULONG FileId)
static ARC_STATUS PxeDiskGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
Definition at line 319 of file pxe.c.
Referenced by PxeInit().
◆ PxeVtbl
Initial value:= {
}
static ARC_STATUS PxeRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
static ARC_STATUS PxeGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
static ARC_STATUS PxeSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition at line 274 of file pxe.c.
Referenced by PxeMount().