diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-21 14:22:14 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-21 14:22:14 +0000 |
commit | 47e1a80bbcd1584d72d6bd8eec10b1c3ae9320af (patch) | |
tree | a934df12d054619ddc6d334b4d6f728fdfdfc631 /MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c | |
parent | 7d9cf3f25e2c8a5c7d7cf3a7325010790fffa09b (diff) | |
download | edk2-platforms-47e1a80bbcd1584d72d6bd8eec10b1c3ae9320af.tar.xz |
Update partition driver to not produce BlockIo if a GPT with OS-specific field (BIT1) set in its partition attributes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9293 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c')
-rw-r--r-- | MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c index 7bcfe69747..68d5830fcb 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c @@ -339,10 +339,12 @@ PartitionInstallGptChildHandles ( for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
if (CompareGuid (&PartEntry[Index].PartitionTypeGUID, &gEfiPartTypeUnusedGuid) ||
PEntryStatus[Index].OutOfRange ||
- PEntryStatus[Index].Overlap
+ PEntryStatus[Index].Overlap ||
+ PEntryStatus[Index].OsSpecific
) {
//
- // Don't use null EFI Partition Entries or Invalid Partition Entries
+ // Don't use null EFI Partition Entries, Invalid Partition Entries or OS specific
+ // partition Entries
//
continue;
}
@@ -652,6 +654,7 @@ PartitionCheckGptEntry ( EFI_LBA EndingLBA;
UINTN Index1;
UINTN Index2;
+ UINT64 Attributes;
DEBUG ((EFI_D_INFO, " start check partition entries\n"));
for (Index1 = 0; Index1 < PartHeader->NumberOfPartitionEntries; Index1++) {
@@ -687,6 +690,14 @@ PartitionCheckGptEntry ( }
}
+
+ Attributes = PartEntry[Index1].Attributes;
+ if ((Attributes & BIT1) != 0) {
+ //
+ // If Bit 1 is set, this indicate that this is an OS specific GUID partition.
+ //
+ PEntryStatus[Index1].OsSpecific = TRUE;
+ }
}
DEBUG ((EFI_D_INFO, " End check partition entries\n"));
|