OpenCore  1.0.6
OpenCore Bootloader
Loading...
Searching...
No Matches
Data.c
Go to the documentation of this file.
1
9#include "NTFS.h"
10#include "Helper.h"
11
12UINT64 mUnitSize;
13
14STATIC
15UINT64
17 IN OUT RUNLIST *Runlist,
18 IN UINT64 Vcn
19 )
20{
21 EFI_STATUS Status;
22 UINT64 Delta;
23
24 ASSERT (Runlist != NULL);
25
26 if (Vcn >= Runlist->NextVcn) {
27 Status = ReadRunListElement (Runlist);
28 if (EFI_ERROR (Status)) {
29 return (UINT64)(-1);
30 }
31
32 return Runlist->CurrentLcn;
33 }
34
35 Delta = Vcn - Runlist->CurrentVcn;
36
37 return Runlist->IsSparse ? 0 : (Runlist->CurrentLcn + Delta);
38}
39
40STATIC
41EFI_STATUS
43 IN RUNLIST *Runlist,
44 IN UINT64 Offset,
45 IN UINTN Length,
46 OUT UINT8 *Dest
47 )
48{
49 EFI_STATUS Status;
50 UINT64 Index;
51 UINT64 ClustersTotal;
52 UINT64 Cluster;
53 UINT64 OffsetInsideCluster;
54 UINTN Size;
55 UINTN ClusterSize;
56
57 ASSERT (Runlist != NULL);
58 ASSERT (Dest != NULL);
59
60 ClusterSize = Runlist->Unit.FileSystem->ClusterSize;
61 OffsetInsideCluster = Offset & (ClusterSize - 1U);
62 Size = ClusterSize;
63 ClustersTotal = DivU64x64Remainder (Length + Offset + ClusterSize - 1U, ClusterSize, NULL);
64
65 for (Index = Runlist->TargetVcn; Index < ClustersTotal; ++Index) {
66 Cluster = GetLcn (Runlist, Index);
67 if (Cluster == (UINT64)(-1)) {
68 return EFI_DEVICE_ERROR;
69 }
70
71 Cluster *= ClusterSize;
72
73 if (Index == (ClustersTotal - 1U)) {
74 Size = (UINTN)((Length + Offset) & (ClusterSize - 1U));
75
76 if (Size == 0) {
77 Size = ClusterSize;
78 }
79
80 if (Index != Runlist->TargetVcn) {
81 OffsetInsideCluster = 0;
82 }
83 }
84
85 if (Index == Runlist->TargetVcn) {
86 Size -= (UINTN)OffsetInsideCluster;
87 }
88
89 if ((Index != Runlist->TargetVcn) && (Index != (ClustersTotal - 1U))) {
90 Size = ClusterSize;
91 OffsetInsideCluster = 0;
92 }
93
94 if (Cluster != 0) {
95 Status = DiskRead (
96 Runlist->Unit.FileSystem,
97 Cluster + OffsetInsideCluster,
98 Size,
99 Dest
100 );
101 if (EFI_ERROR (Status)) {
102 return Status;
103 }
104 } else {
105 SetMem (Dest, Size, 0);
106 }
107
108 Dest += Size;
109 }
110
111 return EFI_SUCCESS;
112}
113
114EFI_STATUS
115EFIAPI
117 IN EFI_FS *FileSystem,
118 IN UINT64 Offset,
119 IN UINTN Size,
120 IN OUT VOID *Buffer
121 )
122{
123 EFI_STATUS Status;
124 EFI_BLOCK_IO_MEDIA *Media;
125
126 ASSERT (FileSystem != NULL);
127 ASSERT (FileSystem->DiskIo != NULL);
128 ASSERT (FileSystem->BlockIo != NULL);
129
130 Media = FileSystem->BlockIo->Media;
131
132 Status = FileSystem->DiskIo->ReadDisk (
133 FileSystem->DiskIo,
134 Media->MediaId,
135 Offset,
136 Size,
137 Buffer
138 );
139 if (EFI_ERROR (Status)) {
140 DEBUG ((DEBUG_INFO, "NTFS: Could not read disk at address %Lx\n", Offset));
141 }
142
143 return Status;
144}
145
146EFI_STATUS
147EFIAPI
149 IN EFI_NTFS_FILE *File,
150 OUT UINT8 *Buffer,
151 IN UINT64 RecordNumber
152 )
153{
154 EFI_STATUS Status;
155 UINTN FileRecordSize;
156
157 ASSERT (File != NULL);
158 ASSERT (Buffer != NULL);
159
160 FileRecordSize = File->FileSystem->FileRecordSize;
161
162 Status = ReadAttr (
163 &File->MftFile.Attr,
164 Buffer,
165 RecordNumber * FileRecordSize,
166 FileRecordSize
167 );
168 if (EFI_ERROR (Status)) {
169 DEBUG ((DEBUG_INFO, "NTFS: Could not read MFT Record 0x%Lx\n", RecordNumber));
170 FreeAttr (&File->MftFile.Attr);
171 return Status;
172 }
173
174 return Fixup (
175 Buffer,
176 FileRecordSize,
177 SIGNATURE_32 ('F', 'I', 'L', 'E'),
178 File->FileSystem->SectorSize
179 );
180}
181
182EFI_STATUS
183EFIAPI
185 IN NTFS_ATTR *Attr,
186 OUT UINT8 *Dest,
187 IN UINT64 Offset,
188 IN UINTN Length
189 )
190{
191 EFI_STATUS Status;
192 UINT8 *Current;
193 UINT32 Type;
194 UINT8 *AttrStart;
195 UINT64 Vcn;
196 ATTR_LIST_RECORD *Record;
197 ATTR_HEADER_RES *Res;
198 UINTN ClusterSize;
199
200 ASSERT (Attr != NULL);
201 ASSERT (Dest != NULL);
202
203 Current = Attr->Current;
204 if (Current == NULL) {
205 DEBUG ((DEBUG_INFO, "NTFS: Internal error! Incorrect initialization of attribute iterator\n"));
206 return EFI_VOLUME_CORRUPTED;
207 }
208
209 Attr->Next = Attr->Current;
210 ClusterSize = Attr->BaseMftRecord->File->FileSystem->ClusterSize;
211
212 if ((Attr->Flags & NTFS_AF_ALST) != 0) {
213 if (Attr->Last < (Attr->Next + sizeof (ATTR_LIST_RECORD))) {
214 DEBUG ((DEBUG_INFO, "NTFS: $ATTRIBUTE_LIST does not contain even a single record.\n"));
215 return EFI_VOLUME_CORRUPTED;
216 }
217
218 Record = (ATTR_LIST_RECORD *)Attr->Next;
219 Type = Record->Type;
220
221 Vcn = DivU64x64Remainder (Offset, ClusterSize, NULL);
222 if (COMPRESSION_BLOCK >= ClusterSize) {
223 Vcn &= ~0xFULL;
224 }
225
226 Record = (ATTR_LIST_RECORD *)((UINT8 *)Record + Record->RecordLength);
227 while (((UINT8 *)Record + sizeof (ATTR_LIST_RECORD)) <= Attr->Last) {
228 if (Record->Type != Type) {
229 break;
230 }
231
232 if (Record->StartingVCN > Vcn) {
233 break;
234 }
235
236 if (Record->RecordLength == 0) {
237 return EFI_VOLUME_CORRUPTED;
238 }
239
240 Attr->Next = (UINT8 *)Record;
241 Record = (ATTR_LIST_RECORD *)((UINT8 *)Record + Record->RecordLength);
242 }
243 } else {
244 Res = (ATTR_HEADER_RES *)Attr->Next;
245 Type = Res->Type;
246 }
247
248 AttrStart = FindAttr (Attr, Type);
249 if (AttrStart != NULL) {
250 Status = ReadData (Attr, AttrStart, Dest, Offset, Length);
251 } else {
252 DEBUG ((DEBUG_INFO, "NTFS: Attribute not found\n"));
253 Status = EFI_VOLUME_CORRUPTED;
254 }
255
256 Attr->Current = Current;
257
258 return Status;
259}
260
261EFI_STATUS
262EFIAPI
264 IN NTFS_ATTR *Attr,
265 IN UINT8 *AttrStart,
266 OUT UINT8 *Dest,
267 IN UINT64 Offset,
268 IN UINTN Length
269 )
270{
271 EFI_STATUS Status;
272 RUNLIST *Runlist;
273 ATTR_HEADER_NONRES *NonRes;
274 ATTR_HEADER_RES *Res;
275 UINT64 Sector0;
276 UINT64 Sector1;
277 UINT64 OffsetInsideCluster;
278 UINT64 BufferSize;
279 UINTN FileRecordSize;
280 UINTN SectorSize;
281 UINTN ClusterSize;
282
283 if (Length == 0) {
284 return EFI_SUCCESS;
285 }
286
287 FileRecordSize = Attr->BaseMftRecord->File->FileSystem->FileRecordSize;
288 SectorSize = Attr->BaseMftRecord->File->FileSystem->SectorSize;
289 ClusterSize = Attr->BaseMftRecord->File->FileSystem->ClusterSize;
290 BufferSize = FileRecordSize - (Attr->Current - Attr->BaseMftRecord->FileRecord);
291 //
292 // Resident Attribute
293 //
294 if (BufferSize < sizeof (ATTR_HEADER_RES)) {
295 DEBUG ((DEBUG_INFO, "NTFS: (ReadData #1) Attribute is corrupted.\n"));
296 return EFI_VOLUME_CORRUPTED;
297 }
298
299 Res = (ATTR_HEADER_RES *)AttrStart;
300
301 if (Res->NonResFlag == 0) {
302 if ((Offset + Length) > Res->InfoLength) {
303 DEBUG ((DEBUG_INFO, "NTFS: Read out of range\n"));
304 return EFI_VOLUME_CORRUPTED;
305 }
306
307 if (BufferSize < (Res->InfoOffset + Offset + Length)) {
308 DEBUG ((DEBUG_INFO, "NTFS: Read out of buffer.\n"));
309 return EFI_VOLUME_CORRUPTED;
310 }
311
312 CopyMem (Dest, (UINT8 *)Res + Res->InfoOffset + Offset, Length);
313
314 return EFI_SUCCESS;
315 }
316
317 //
318 // Non-Resident Attribute
319 //
320 if (BufferSize < sizeof (ATTR_HEADER_NONRES)) {
321 DEBUG ((DEBUG_INFO, "NTFS: (ReadData #2) Attribute is corrupted.\n"));
322 return EFI_VOLUME_CORRUPTED;
323 }
324
325 NonRes = (ATTR_HEADER_NONRES *)AttrStart;
326
327 Runlist = (RUNLIST *)AllocateZeroPool (sizeof (RUNLIST));
328 if (Runlist == NULL) {
329 return EFI_OUT_OF_RESOURCES;
330 }
331
332 Runlist->Attr = Attr;
333 Runlist->Unit.FileSystem = Attr->BaseMftRecord->File->FileSystem;
334
335 if ( (NonRes->DataRunsOffset > BufferSize)
336 || (NonRes->DataRunsOffset > NonRes->RealSize)
337 || (NonRes->RealSize > NonRes->AllocatedSize))
338 {
339 DEBUG ((DEBUG_INFO, "NTFS: Non-Resident Attribute is corrupted.\n"));
340 FreePool (Runlist);
341 return EFI_VOLUME_CORRUPTED;
342 }
343
344 Runlist->NextDataRun = (UINT8 *)NonRes + NonRes->DataRunsOffset;
345 Runlist->NextVcn = NonRes->StartingVCN;
346 Runlist->CurrentLcn = 0;
347
348 Runlist->TargetVcn = NonRes->StartingVCN + DivU64x64Remainder (Offset, ClusterSize, NULL);
349 if (Runlist->TargetVcn < NonRes->StartingVCN) {
350 DEBUG ((DEBUG_INFO, "NTFS: Overflow: StartingVCN is too large.\n"));
351 FreePool (Runlist);
352 return EFI_VOLUME_CORRUPTED;
353 }
354
355 if ((Offset + Length) > NonRes->RealSize) {
356 DEBUG ((DEBUG_INFO, "NTFS: Read out of range\n"));
357 FreePool (Runlist);
358 return EFI_VOLUME_CORRUPTED;
359 }
360
361 if ( ((NonRes->Flags & FLAG_COMPRESSED) != 0)
362 && ((Attr->Flags & NTFS_AF_GPOS) == 0)
363 && (NonRes->Type == AT_DATA))
364 {
365 if (NonRes->CompressionUnitSize != 4U) {
366 DEBUG ((DEBUG_INFO, "NTFS: Invalid copmression unit size.\n"));
367 FreePool (Runlist);
368 return EFI_VOLUME_CORRUPTED;
369 }
370
371 mUnitSize = LShiftU64 (1ULL, NonRes->CompressionUnitSize);
372
373 Status = Decompress (Runlist, Offset, Length, Dest);
374
375 FreePool (Runlist);
376 return Status;
377 }
378
379 while (Runlist->NextVcn <= Runlist->TargetVcn) {
380 Status = ReadRunListElement (Runlist);
381 if (EFI_ERROR (Status)) {
382 FreePool (Runlist);
383 return EFI_VOLUME_CORRUPTED;
384 }
385 }
386
387 if (Attr->Flags & NTFS_AF_GPOS) {
388 OffsetInsideCluster = Offset & (ClusterSize - 1U);
389
390 Sector0 = DivU64x64Remainder (
391 (Runlist->TargetVcn - Runlist->CurrentVcn + Runlist->CurrentLcn) * ClusterSize + OffsetInsideCluster,
392 SectorSize,
393 NULL
394 );
395
396 Sector1 = Sector0 + 1U;
397 if (Sector1 == DivU64x64Remainder (
398 (Runlist->NextVcn - Runlist->CurrentVcn + Runlist->CurrentLcn) * ClusterSize,
399 SectorSize,
400 NULL
401 ))
402 {
403 Status = ReadRunListElement (Runlist);
404 if (EFI_ERROR (Status)) {
405 FreePool (Runlist);
406 return EFI_VOLUME_CORRUPTED;
407 }
408
409 Sector1 = DivU64x64Remainder (
410 Runlist->CurrentLcn * ClusterSize,
411 SectorSize,
412 NULL
413 );
414 }
415
416 WriteUnaligned32 ((UINT32 *)Dest, (UINT32)Sector0);
417 WriteUnaligned32 ((UINT32 *)(Dest + 4U), (UINT32)Sector1);
418
419 FreePool (Runlist);
420 return EFI_SUCCESS;
421 }
422
423 Status = ReadClusters (
424 Runlist,
425 Offset,
426 Length,
427 Dest
428 );
429
430 FreePool (Runlist);
431 return Status;
432}
433
434STATIC
435UINT64
437 IN CONST UINT8 *Run,
438 IN UINT8 FieldSize,
439 IN BOOLEAN Signed
440 )
441{
442 UINT64 Value;
443
444 ASSERT (Run != NULL);
445
446 Value = 0;
447 //
448 // Offset to the starting LCN of the previous element is a signed value.
449 // So we must check the most significant bit.
450 //
451 if (Signed && (FieldSize != 0) && ((Run[FieldSize - 1U] & 0x80U) != 0)) {
452 Value = (UINT64)(-1);
453 }
454
455 CopyMem (&Value, Run, FieldSize);
456
457 return Value;
458}
459
471EFI_STATUS
472EFIAPI
474 IN OUT RUNLIST *Runlist
475 )
476{
477 UINT8 LengthSize;
478 UINT8 OffsetSize;
479 UINT64 OffsetLcn;
480 UINT8 *Run;
481 ATTR_HEADER_NONRES *Attr;
482 UINT64 BufferSize;
483 UINTN FileRecordSize;
484
485 ASSERT (Runlist != NULL);
486
487 Run = Runlist->NextDataRun;
488 FileRecordSize = Runlist->Attr->BaseMftRecord->File->FileSystem->FileRecordSize;
489 BufferSize = FileRecordSize - (Run - Runlist->Attr->BaseMftRecord->FileRecord);
490
491retry:
492 if (BufferSize == 0) {
493 DEBUG ((DEBUG_INFO, "NTFS: (ReadRunListElement #1) Runlist is corrupted.\n"));
494 return EFI_VOLUME_CORRUPTED;
495 }
496
497 LengthSize = *Run & 0xFU;
498 OffsetSize = (*Run >> 4U) & 0xFU;
499 ++Run;
500 --BufferSize;
501
502 if ( (LengthSize > 8U)
503 || (OffsetSize > 8U)
504 || ((LengthSize == 0) && (OffsetSize != 0)))
505 {
506 DEBUG ((DEBUG_INFO, "NTFS: (ReadRunListElement #2) Runlist is corrupted.\n"));
507 return EFI_VOLUME_CORRUPTED;
508 }
509
510 //
511 // End of Runlist: LengthSize == 0, OffsetSize == 0
512 //
513 if ((LengthSize == 0) && (OffsetSize == 0)) {
514 if ( (Runlist->Attr != NULL)
515 && ((Runlist->Attr->Flags & NTFS_AF_ALST) != 0))
516 {
517 Attr = (ATTR_HEADER_NONRES *)Runlist->Attr->Current;
518 Attr = (ATTR_HEADER_NONRES *)FindAttr (Runlist->Attr, Attr->Type);
519 if (Attr != NULL) {
520 if (Attr->NonResFlag == 0) {
521 DEBUG ((DEBUG_INFO, "NTFS: $DATA should be non-resident\n"));
522 return EFI_VOLUME_CORRUPTED;
523 }
524
525 Run = (UINT8 *)Attr + Attr->DataRunsOffset;
526 Runlist->CurrentLcn = 0;
527 BufferSize = FileRecordSize - Attr->DataRunsOffset;
528 goto retry;
529 }
530 }
531
532 DEBUG ((DEBUG_INFO, "NTFS: Run list overflown\n"));
533 return EFI_VOLUME_CORRUPTED;
534 }
535
536 Runlist->CurrentVcn = Runlist->NextVcn;
537
538 if (BufferSize < LengthSize) {
539 DEBUG ((DEBUG_INFO, "NTFS: (ReadRunListElement #3) Runlist is corrupted.\n"));
540 return EFI_VOLUME_CORRUPTED;
541 }
542
543 Runlist->NextVcn += ReadField (Run, LengthSize, FALSE);
544 if (Runlist->NextVcn <= Runlist->CurrentVcn) {
545 DEBUG ((DEBUG_INFO, "NTFS: (ReadRunListElement #3.1) Runlist is corrupted.\n"));
546 return EFI_VOLUME_CORRUPTED;
547 }
548
549 Run += LengthSize;
550 BufferSize -= LengthSize;
551
552 if (BufferSize < OffsetSize) {
553 DEBUG ((DEBUG_INFO, "NTFS: (ReadRunListElement #4) Runlist is corrupted.\n"));
554 return EFI_VOLUME_CORRUPTED;
555 }
556
557 OffsetLcn = ReadField (Run, OffsetSize, TRUE);
558 Runlist->CurrentLcn += OffsetLcn;
559
560 Run += OffsetSize;
561 BufferSize -= OffsetSize;
562 Runlist->NextDataRun = Run;
563
564 Runlist->IsSparse = (OffsetLcn == 0);
565
566 return EFI_SUCCESS;
567}
568
569CHAR16 *
571 IN NTFS_FILE *File
572 )
573{
574 EFI_STATUS Status;
575 SYMLINK Symlink;
576 CHAR16 *Substitute;
577 CHAR16 *Letter;
578 UINT64 Offset;
579
580 ASSERT (File != NULL);
581
582 File->FileRecord = AllocateZeroPool (File->File->FileSystem->FileRecordSize);
583 if (File->FileRecord == NULL) {
584 return NULL;
585 }
586
587 Status = ReadMftRecord (File->File, File->FileRecord, File->Inode);
588 if (EFI_ERROR (Status)) {
589 return NULL;
590 }
591
592 if (LocateAttr (&File->Attr, File, AT_SYMLINK) == NULL) {
593 DEBUG ((DEBUG_INFO, "NTFS: no $SYMLINK in MFT 0x%Lx\n", File->Inode));
594 return NULL;
595 }
596
597 Status = ReadAttr (&File->Attr, (UINT8 *)&Symlink, 0, sizeof (Symlink));
598 if (EFI_ERROR (Status)) {
599 FreeAttr (&File->Attr);
600 return NULL;
601 }
602
603 switch (Symlink.Type) {
605 Offset = sizeof (Symlink) + 4U + (UINT64)Symlink.SubstituteOffset;
606 break;
608 Offset = sizeof (Symlink) + (UINT64)Symlink.SubstituteOffset;
609 break;
610 default:
611 DEBUG ((DEBUG_INFO, "NTFS: Symlink type invalid (%x)\n", Symlink.Type));
612 return NULL;
613 }
614
615 Substitute = AllocateZeroPool (Symlink.SubstituteLength + sizeof (CHAR16));
616 if (Substitute == NULL) {
617 return NULL;
618 }
619
620 Status = ReadAttr (&File->Attr, (UINT8 *)Substitute, Offset, Symlink.SubstituteLength);
621 if (EFI_ERROR (Status)) {
622 FreeAttr (&File->Attr);
623 FreePool (Substitute);
624 return NULL;
625 }
626
627 for (Letter = Substitute; *Letter != L'\0'; ++Letter) {
628 if (*Letter == L'\\') {
629 *Letter = L'/';
630 }
631 }
632
633 return Substitute;
634}
UINT64 Length
EFI_STATUS Decompress(IN RUNLIST *Runlist, IN UINT64 Offset, IN UINTN Length, OUT UINT8 *Dest)
STATIC UINT64 GetLcn(IN OUT RUNLIST *Runlist, IN UINT64 Vcn)
Definition Data.c:16
EFI_STATUS EFIAPI ReadAttr(IN NTFS_ATTR *Attr, OUT UINT8 *Dest, IN UINT64 Offset, IN UINTN Length)
Definition Data.c:184
EFI_STATUS EFIAPI ReadData(IN NTFS_ATTR *Attr, IN UINT8 *AttrStart, OUT UINT8 *Dest, IN UINT64 Offset, IN UINTN Length)
Definition Data.c:263
EFI_STATUS EFIAPI DiskRead(IN EFI_FS *FileSystem, IN UINT64 Offset, IN UINTN Size, IN OUT VOID *Buffer)
Definition Data.c:116
EFI_STATUS EFIAPI ReadMftRecord(IN EFI_NTFS_FILE *File, OUT UINT8 *Buffer, IN UINT64 RecordNumber)
Definition Data.c:148
STATIC UINT64 ReadField(IN CONST UINT8 *Run, IN UINT8 FieldSize, IN BOOLEAN Signed)
Definition Data.c:436
CHAR16 * ReadSymlink(IN NTFS_FILE *File)
Definition Data.c:570
UINT64 mUnitSize
Definition Data.c:12
STATIC EFI_STATUS ReadClusters(IN RUNLIST *Runlist, IN UINT64 Offset, IN UINTN Length, OUT UINT8 *Dest)
Definition Data.c:42
EFI_STATUS EFIAPI ReadRunListElement(IN OUT RUNLIST *Runlist)
Definition Data.c:473
UINT8 * LocateAttr(IN NTFS_ATTR *Attr, IN NTFS_FILE *Mft, IN UINT32 Type)
Definition Disc.c:347
VOID FreeAttr(IN NTFS_ATTR *Attr)
Definition Disc.c:799
UINT8 * FindAttr(IN NTFS_ATTR *Attr, IN UINT32 Type)
Definition Disc.c:400
EFI_STATUS EFIAPI Fixup(IN UINT8 *Buffer, IN UINT64 Length, IN UINT32 Magic, IN UINTN SectorSize)
Definition Disc.c:242
#define S_SYMLINK
Definition Driver.h:22
@ NTFS_AF_ALST
Definition Driver.h:170
@ NTFS_AF_GPOS
Definition Driver.h:172
@ AT_SYMLINK
Definition Driver.h:125
@ AT_DATA
Definition Driver.h:121
#define S_FILENAME
Definition Driver.h:21
@ IS_MICROSOFT
Definition Driver.h:223
@ IS_ALIAS
Definition Driver.h:221
#define COMPRESSION_BLOCK
Definition Driver.h:14
@ FLAG_COMPRESSED
Definition Driver.h:179
DMG_SIZE_DEVICE_PATH Size
OC_TYPING_BUFFER_ENTRY Buffer[OC_TYPING_BUFFER_SIZE]
Definition OcTypingLib.h:42
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
UINT64 EFIAPI DivU64x64Remainder(IN UINT64 Dividend, IN UINT64 Divisor, OUT UINT64 *Remainder OPTIONAL)
Definition UserMath.c:59
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition UserMath.c:76
#define ASSERT(x)
Definition coder.h:55
UINT16 DataRunsOffset
Definition Driver.h:339
UINT64 AllocatedSize
Definition Driver.h:342
UINT16 CompressionUnitSize
Definition Driver.h:340
UINT64 StartingVCN
Definition Driver.h:337
UINT16 InfoOffset
Definition Driver.h:300
UINT32 InfoLength
Definition Driver.h:299
UINT32 Type
Definition Driver.h:292
UINT8 NonResFlag
Definition Driver.h:294
UINT16 RecordLength
Definition Driver.h:365
UINT64 StartingVCN
Definition Driver.h:368
EFI_FS * FileSystem
Definition Driver.h:675
UINT64 CurrentVcn
Definition Driver.h:689
UINT64 CurrentLcn
Definition Driver.h:690
COMPRESSED Unit
Definition Driver.h:694
NTFS_ATTR * Attr
Definition Driver.h:693
UINT64 TargetVcn
Definition Driver.h:688
UINT64 NextVcn
Definition Driver.h:691
UINT8 * NextDataRun
Definition Driver.h:692
UINT16 SubstituteOffset
Definition Driver.h:600
UINT16 SubstituteLength
Definition Driver.h:601
UINT32 Type
Definition Driver.h:597