mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
7d9cf3f25e
commit
47e1a80bbc
|
@ -339,10 +339,12 @@ PartitionInstallGptChildHandles (
|
||||||
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
|
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
|
||||||
if (CompareGuid (&PartEntry[Index].PartitionTypeGUID, &gEfiPartTypeUnusedGuid) ||
|
if (CompareGuid (&PartEntry[Index].PartitionTypeGUID, &gEfiPartTypeUnusedGuid) ||
|
||||||
PEntryStatus[Index].OutOfRange ||
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -652,6 +654,7 @@ PartitionCheckGptEntry (
|
||||||
EFI_LBA EndingLBA;
|
EFI_LBA EndingLBA;
|
||||||
UINTN Index1;
|
UINTN Index1;
|
||||||
UINTN Index2;
|
UINTN Index2;
|
||||||
|
UINT64 Attributes;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, " start check partition entries\n"));
|
DEBUG ((EFI_D_INFO, " start check partition entries\n"));
|
||||||
for (Index1 = 0; Index1 < PartHeader->NumberOfPartitionEntries; Index1++) {
|
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"));
|
DEBUG ((EFI_D_INFO, " End check partition entries\n"));
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
of the raw block devices media. Currently "El Torito CD-ROM", Legacy
|
of the raw block devices media. Currently "El Torito CD-ROM", Legacy
|
||||||
MBR, and GPT partition schemes are supported.
|
MBR, and GPT partition schemes are supported.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
Copyright (c) 2006 - 2009, Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -92,6 +92,7 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gPartitionComponentName2;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
BOOLEAN OutOfRange;
|
BOOLEAN OutOfRange;
|
||||||
BOOLEAN Overlap;
|
BOOLEAN Overlap;
|
||||||
|
BOOLEAN OsSpecific;
|
||||||
} EFI_PARTITION_ENTRY_STATUS;
|
} EFI_PARTITION_ENTRY_STATUS;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue