ReactOS 0.4.16-dev-2613-g9533ad7
hwdisk.c
Go to the documentation of this file.
1/*
2 * FreeLoader
3 *
4 * Copyright (C) 2003, 2004 Eric Kohl
5 * Copyright (C) 2009 Hervé Poussineau
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22#include <freeldr.h>
23
24#include <debug.h>
26
27/*
28 * This is the common code for harddisk for both the PC and the XBOX.
29 */
30
31#define FIRST_BIOS_DISK 0x80
32
33typedef struct tagDISKCONTEXT
34{
42
43/* Data cache for BIOS disks pre-enumeration */
45static CHAR PcDiskIdentifier[32][20];
46
49
50
51/* FUNCTIONS *****************************************************************/
52
53static ARC_STATUS
55{
58 return ESUCCESS;
59}
60
61static ARC_STATUS
63{
65
67
68 /*
69 * The ARC specification mentions that for partitions, StartingAddress and
70 * EndingAddress are the start and end positions of the partition in terms
71 * of byte offsets from the start of the disk.
72 * CurrentAddress is the current offset into (i.e. relative to) the partition.
73 */
74 Information->StartingAddress.QuadPart = Context->SectorOffset * Context->SectorSize;
75 Information->EndingAddress.QuadPart = (Context->SectorOffset + Context->SectorCount) * Context->SectorSize;
76 Information->CurrentAddress.QuadPart = Context->SectorNumber * Context->SectorSize;
77
79
80 return ESUCCESS;
81}
82
83static ARC_STATUS
84DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
85{
88 UCHAR DriveNumber;
89 ULONG DrivePartition, SectorSize;
90 GEOMETRY Geometry;
93
94 if (DiskReadBufferSize == 0)
95 {
96 ERR("DiskOpen(): DiskReadBufferSize is 0, something is wrong.\n");
98 return ENOMEM;
99 }
100
101 if (!DissectArcPath(Path, NULL, &DriveNumber, &DrivePartition))
102 return EINVAL;
103
104 DriveType = DiskGetConfigType(DriveNumber);
105
106 if (!MachDiskGetDriveGeometry(DriveNumber, &Geometry))
107 return EIO;
108 if (Geometry.BytesPerSector == 0)
109 {
110 WARN("MachDiskGetDriveGeometry(0x%x) failed, fall back to hardcoded values\n", DriveNumber);
112 {
113 /* This is a CD-ROM device */
114 Geometry.BytesPerSector = 2048;
115 }
116 else
117 {
118 /* This is either a floppy disk or a hard disk device, but it doesn't
119 * matter which one because they both have 512 bytes per sector */
120 Geometry.BytesPerSector = 512;
121 }
122 }
123 SectorSize = Geometry.BytesPerSector;
124
125 if (DrivePartition != 0xff && DrivePartition != 0)
126 {
127 PARTITION_INFORMATION PartitionEntry;
128 if (!DiskGetPartitionEntry(DriveNumber, SectorSize, DrivePartition, &PartitionEntry))
129 return EIO;
130
133 }
134 else
135 {
136 SectorOffset = 0;
137 SectorCount = Geometry.Sectors;
138 }
139
141 if (!Context)
142 return ENOMEM;
143
144 Context->DriveNumber = DriveNumber;
145 Context->IsFloppy = (DriveType == FloppyDiskPeripheral);
146 Context->SectorSize = SectorSize;
147 Context->SectorOffset = SectorOffset;
148 Context->SectorCount = SectorCount;
149 Context->SectorNumber = 0;
151
152 return ESUCCESS;
153}
154
155static ARC_STATUS
157{
159 UCHAR* Ptr = (UCHAR*)Buffer;
160 ULONG Length, TotalSectors, MaxSectors, ReadSectors;
162 BOOLEAN ret;
163
165
166 TotalSectors = (N + Context->SectorSize - 1) / Context->SectorSize;
167 MaxSectors = DiskReadBufferSize / Context->SectorSize;
168 SectorOffset = Context->SectorOffset + Context->SectorNumber;
169
170 // If MaxSectors is 0, this will lead to infinite loop.
171 // In release builds assertions are disabled, however we also have sanity checks in DiskOpen()
172 ASSERT(MaxSectors > 0);
173
174 ret = TRUE;
175
176 while (TotalSectors)
177 {
178 ReadSectors = TotalSectors;
179 if (ReadSectors > MaxSectors)
180 ReadSectors = MaxSectors;
181
184 ReadSectors,
186 if (!ret)
187 break;
188
189 Length = ReadSectors * Context->SectorSize;
190 if (Length > N)
191 Length = N;
192
194
195 Ptr += Length;
196 N -= Length;
197 SectorOffset += ReadSectors;
198 TotalSectors -= ReadSectors;
199 }
200
202 Context->SectorNumber = SectorOffset - Context->SectorOffset;
203
204 return (ret ? ESUCCESS : EIO);
205}
206
207static ARC_STATUS
209{
211 LARGE_INTEGER NewPosition = *Position;
212
213 switch (SeekMode)
214 {
215 case SeekAbsolute:
216 break;
217 case SeekRelative:
218 NewPosition.QuadPart += (Context->SectorNumber * Context->SectorSize);
219 break;
220 default:
221 ASSERT(FALSE);
222 return EINVAL;
223 }
224
225 if (NewPosition.QuadPart & (Context->SectorSize - 1))
226 return EINVAL;
227
228 /* Convert in number of sectors */
229 NewPosition.QuadPart /= Context->SectorSize;
230
231 /* HACK: CDROMs may have a SectorCount of 0 */
232 if (Context->SectorCount != 0 && NewPosition.QuadPart >= Context->SectorCount)
233 return EINVAL;
234
235 Context->SectorNumber = NewPosition.QuadPart;
236 return ESUCCESS;
237}
238
239static const DEVVTBL DiskVtbl =
240{
241 DiskClose,
243 DiskOpen,
244 DiskRead,
245 DiskSeek,
246};
247
248
249PCHAR
251{
252 return PcDiskIdentifier[DriveNumber - FIRST_BIOS_DISK];
253}
254
255static VOID
257 _In_ UCHAR DriveNumber)
258{
259 static const CHAR Hex[] = "0123456789abcdef";
260
263 ULONG Checksum, Signature;
264 BOOLEAN ValidPartitionTable;
265 CHAR DiskName[64];
266
267 RtlStringCbPrintfA(DiskName, sizeof(DiskName),
268 "multi(0)disk(0)rdisk(%u)",
269 DriveNumber - FIRST_BIOS_DISK);
270
272 Status = DiskInitialize(DriveNumber, DiskName, DiskPeripheral, &DiskVtbl,
273 &Checksum, &Signature, &ValidPartitionTable);
275
276 if (Status != ESUCCESS)
277 {
278 /* The disk failed to be initialized, use a default identifier */
279 RtlStringCbPrintfA(Identifier, 20, "BIOSDISK%u", DriveNumber - FIRST_BIOS_DISK + 1);
280 return;
281 }
282
283 /* Convert checksum and signature to identifier string */
284 Identifier[0] = Hex[(Checksum >> 28) & 0x0F];
285 Identifier[1] = Hex[(Checksum >> 24) & 0x0F];
286 Identifier[2] = Hex[(Checksum >> 20) & 0x0F];
287 Identifier[3] = Hex[(Checksum >> 16) & 0x0F];
288 Identifier[4] = Hex[(Checksum >> 12) & 0x0F];
289 Identifier[5] = Hex[(Checksum >> 8) & 0x0F];
290 Identifier[6] = Hex[(Checksum >> 4) & 0x0F];
291 Identifier[7] = Hex[Checksum & 0x0F];
292 Identifier[8] = '-';
293 Identifier[9] = Hex[(Signature >> 28) & 0x0F];
294 Identifier[10] = Hex[(Signature >> 24) & 0x0F];
295 Identifier[11] = Hex[(Signature >> 20) & 0x0F];
296 Identifier[12] = Hex[(Signature >> 16) & 0x0F];
297 Identifier[13] = Hex[(Signature >> 12) & 0x0F];
298 Identifier[14] = Hex[(Signature >> 8) & 0x0F];
299 Identifier[15] = Hex[(Signature >> 4) & 0x0F];
300 Identifier[16] = Hex[Signature & 0x0F];
301 Identifier[17] = '-';
302 Identifier[18] = (ValidPartitionTable ? 'A' : 'X');
303 Identifier[19] = ANSI_NULL;
304 TRACE("Identifier: %s\n", Identifier);
305}
306
307static UCHAR
309{
310 UCHAR DiskCount, DriveNumber;
311 ULONG i;
312 BOOLEAN Changed;
313
314 *BootDriveReported = FALSE;
315
316 /* Count the number of visible harddisk drives */
318 DiskCount = 0;
319 DriveNumber = FIRST_BIOS_DISK;
320
322
323 /*
324 * There are some really broken BIOSes out there. There are even BIOSes
325 * that happily report success when you ask them to read from non-existent
326 * harddisks. So, we set the buffer to known contents first, then try to
327 * read. If the BIOS reports success but the buffer contents haven't
328 * changed then we fail anyway.
329 */
331 while (MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, DiskReadBuffer))
332 {
333 Changed = FALSE;
334 for (i = 0; !Changed && i < DiskReadBufferSize; i++)
335 {
336 Changed = ((PUCHAR)DiskReadBuffer)[i] != 0xcd;
337 }
338 if (!Changed)
339 {
340 TRACE("BIOS reports success for disk %d (0x%02X) but data didn't change\n",
341 (int)DiskCount, DriveNumber);
342 break;
343 }
344
345 /* Register and cache the BIOS hard disk information for later use */
346 GetHarddiskInformation(DriveNumber);
347
348 /* Check if we have seen the boot drive */
349 if (FrldrBootDrive == DriveNumber)
350 *BootDriveReported = TRUE;
351
352 DiskCount++;
353 DriveNumber++;
355 }
357
358 PcBiosDiskCount = DiskCount;
359 TRACE("BIOS reports %d harddisk%s\n",
360 (int)DiskCount, (DiskCount == 1) ? "" : "s");
361
362 return DiskCount;
363}
364
365static BOOLEAN
367 _In_ BOOLEAN IsPxe,
369{
370 // *DeviceType = DiskGetConfigType(FrldrBootDrive);
371 if (*FrLdrBootPath)
372 return TRUE;
373
374 *DeviceType = 0;
375
376 // FIXME: Do this in some drive recognition procedure!
377 if (IsPxe)
378 {
379 RtlStringCbCopyA(FrLdrBootPath, sizeof(FrLdrBootPath), "net(0)");
381 }
382 else
383 /* 0x49 is our magic ramdisk drive, so try to detect it first */
384 if (FrldrBootDrive == 0x49)
385 {
386 /* This is the ramdisk. See ArmInitializeBootDevices() too... */
387 // RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), "ramdisk(%u)", 0);
388 RtlStringCbCopyA(FrLdrBootPath, sizeof(FrLdrBootPath), "ramdisk(0)");
390 }
391 else if (FrldrBootDrive < FIRST_BIOS_DISK) // (DiskGetConfigType(FrldrBootDrive) == FloppyDiskPeripheral)
392 {
393 /* This is a floppy */
395 "multi(0)disk(0)fdisk(%u)", FrldrBootDrive);
397 }
398 else if (FrldrBootPartition == 0xFF)
399 {
400 /* Boot Partition 0xFF is the magic value that indicates booting from CD-ROM (see isoboot.S) */
401 // TODO: Check if it's really a CD-ROM drive
403 "multi(0)disk(0)cdrom(%u)", FrldrBootDrive - FIRST_BIOS_DISK);
405 }
406 else
407 {
408 /* This is a hard disk, find the boot partition */
409 ULONG BootPartition;
410 if (!DiskGetBootPartitionEntry(FrldrBootDrive, NULL, &BootPartition))
411 {
412 ERR("Failed to get boot partition entry\n");
413 return FALSE;
414 }
415 FrldrBootPartition = BootPartition;
416
418 "multi(0)disk(0)rdisk(%u)partition(%lu)",
421 }
422
423 return TRUE;
424}
425
428{
429 UCHAR DiskCount;
430 BOOLEAN BootDriveReported = FALSE;
432
433 DiskCount = EnumerateHarddisks(&BootDriveReported);
434
435 /* Initialize FrLdrBootPath, the path FreeLoader starts from */
437
438 /* Add it, if it's a floppy or CD-ROM */
439 if ((FrldrBootDrive >= FIRST_BIOS_DISK && !BootDriveReported) ||
441 {
443
446 &DiskVtbl, NULL, NULL, NULL);
448
449 if (Status == ESUCCESS)
450 {
451 DiskCount++; // This is not accounted for in the number of pre-enumerated BIOS drives!
452 TRACE("Additional boot drive detected: 0x%02X\n", FrldrBootDrive);
453 }
454 else
455 {
456 ERR("Additional boot drive 0x%02X failed\n", FrldrBootDrive);
457 }
458 }
459
460 return (DiskCount != 0);
461}
#define N
Definition: crc32.c:57
UINT DriveType
PRTL_UNICODE_STRING_BUFFER Path
unsigned char BOOLEAN
Definition: actypes.h:127
@ Identifier
Definition: asmpp.cpp:95
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
BOOLEAN DissectArcPath(IN PCSTR ArcPath, OUT PCSTR *Path OPTIONAL, OUT PUCHAR DriveNumber, OUT PULONG PartitionNumber)
Definition: arcname.c:25
ARC_STATUS DiskInitialize(_In_ UCHAR DriveNumber, _In_ PCSTR DeviceName, _In_ CONFIGURATION_TYPE DeviceType, _In_ const DEVVTBL *FuncTable, _Out_opt_ PULONG pChecksum, _Out_opt_ PULONG pSignature, _Out_opt_ PBOOLEAN pValidPartitionTable)
Definition: disk.c:78
LONG DiskReportError(_In_ BOOLEAN bShowError)
Definition: disk.c:38
BOOLEAN DiskGetBootPartitionEntry(_In_ UCHAR DriveNumber, _Out_opt_ PPARTITION_INFORMATION PartitionEntry, _Out_ PULONG BootPartition)
Definition: partition.c:123
BOOLEAN DiskGetPartitionEntry(_In_ UCHAR DriveNumber, _In_opt_ ULONG SectorSize, _In_ ULONG PartitionNumber, _Out_ PPARTITION_INFORMATION PartitionEntry)
Definition: partition.c:178
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
PVOID FsGetDeviceSpecific(ULONG FileId)
Definition: fs.c:711
VOID FsSetDeviceSpecific(ULONG FileId, PVOID Specific)
Definition: fs.c:704
#define MachDiskGetDriveGeometry(Drive, Geom)
Definition: machine.h:122
#define MachDiskReadLogicalSectors(Drive, Start, Count, Buf)
Definition: machine.h:120
VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
Definition: heap.c:553
PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: heap.c:545
#define SectorOffset(L)
Definition: cdprocs.h:1622
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define EINVAL
Definition: errno.h:44
#define ENOMEM
Definition: errno.h:35
#define EIO
Definition: errno.h:28
static const WCHAR Signature[]
Definition: parser.c:141
return ret
Definition: mutex.c:146
#define ULONG_PTR
Definition: config.h:101
CCHAR FrLdrBootPath[MAX_PATH]
Definition: freeldr.c:29
BOOLEAN PxeInit(VOID)
Definition: pxe.c:376
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
Status
Definition: gdiplustypes.h:25
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
Definition: glfuncs.h:248
static const DEVVTBL DiskVtbl
Definition: hwdisk.c:239
PVOID DiskReadBuffer
Definition: hwdisk.c:47
static BOOLEAN DiskGetBootPath(_In_ BOOLEAN IsPxe, _Out_ PCONFIGURATION_TYPE DeviceType)
Definition: hwdisk.c:366
struct tagDISKCONTEXT DISKCONTEXT
static ARC_STATUS DiskGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
Definition: hwdisk.c:62
static CHAR PcDiskIdentifier[32][20]
Definition: hwdisk.c:45
static ARC_STATUS DiskRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
Definition: hwdisk.c:156
BOOLEAN PcInitializeBootDevices(VOID)
Definition: hwdisk.c:427
#define FIRST_BIOS_DISK
Definition: hwdisk.c:31
static ARC_STATUS DiskOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
Definition: hwdisk.c:84
static ARC_STATUS DiskSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition: hwdisk.c:208
static VOID GetHarddiskInformation(_In_ UCHAR DriveNumber)
Definition: hwdisk.c:256
PCHAR GetHarddiskIdentifier(UCHAR DriveNumber)
Definition: hwdisk.c:250
static ARC_STATUS DiskClose(ULONG FileId)
Definition: hwdisk.c:54
static UCHAR EnumerateHarddisks(OUT PBOOLEAN BootDriveReported)
Definition: hwdisk.c:308
UCHAR PcBiosDiskCount
Definition: hwdisk.c:44
SIZE_T DiskReadBufferSize
Definition: hwdisk.c:48
DeviceType
Definition: mmdrv.h:42
#define ASSERT(a)
Definition: mode.c:44
#define ULL(a, b)
Definition: format_msg.c:27
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
int Count
Definition: noreturn.cpp:7
#define ANSI_NULL
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
Definition: ntstrsafe.h:1148
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:156
ULONG SectorCount
Definition: part_brfr.c:22
CONFIGURATION_TYPE DiskGetConfigType(_In_ UCHAR DriveNumber)
Definition: pcdisk.c:381
char CHAR
Definition: pedump.c:57
static char Hex[]
Definition: pnpdump.c:50
@ ESUCCESS
Definition: arc.h:32
ULONG ARC_STATUS
Definition: arc.h:4
@ DiskPeripheral
Definition: arc.h:138
@ FloppyDiskPeripheral
Definition: arc.h:139
@ NetworkPeripheral
Definition: arc.h:149
@ CdromController
Definition: arc.h:128
@ SeekRelative
Definition: arc.h:60
@ SeekAbsolute
Definition: arc.h:59
enum _OPENMODE OPENMODE
enum _SEEKMODE SEEKMODE
enum _CONFIGURATION_TYPE CONFIGURATION_TYPE
enum _CONFIGURATION_TYPE * PCONFIGURATION_TYPE
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
_In_ PVOID Context
Definition: storport.h:2269
Definition: disk.h:24
ULONG BytesPerSector
Number of bytes per sector.
Definition: disk.h:28
ULONGLONG Sectors
Total number of disk sectors/LBA blocks.
Definition: disk.h:29
LARGE_INTEGER StartingOffset
Definition: ntdddisk.h:408
LARGE_INTEGER PartitionLength
Definition: ntdddisk.h:409
Definition: fs.h:25
ULONGLONG SectorOffset
Definition: hwdisk.c:38
BOOLEAN IsFloppy
Definition: hwdisk.c:36
UCHAR DriveNumber
Definition: hwdisk.c:35
ULONGLONG SectorCount
Definition: hwdisk.c:39
ULONGLONG SectorNumber
Definition: hwdisk.c:40
ULONG SectorSize
Definition: hwdisk.c:37
static COORD Position
Definition: mouse.c:34
unsigned char UCHAR
Definition: typedefs.h:53
unsigned char * PBOOLEAN
Definition: typedefs.h:53
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
#define TAG_HW_DISK_CONTEXT
Definition: uefidisk.c:16
UCHAR FrldrBootDrive
Definition: uefidisk.c:57
ULONG FrldrBootPartition
Definition: uefidisk.c:58
LONGLONG QuadPart
Definition: typedefs.h:114
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
_In_ ULONG SectorSize
Definition: halfuncs.h:291