* Fri Aug 06 2021 Miroslav Rezanina <mrezanin@redhat.com> - 20210527gite1999b264f1f-5
- edk2-MdeModulePkg-PartitionDxe-Ignore-PMBR-BootIndicator-.patch [bz#1988760] - Resolves: bz#1988760 (edk2 does not ignore PMBR protective record BootIndicator as required by UEFI spec)
This commit is contained in:
parent
448ede0a1a
commit
c76fe5d199
@ -0,0 +1,74 @@
|
||||
From e02e989ebff6caef4efbb91bc34b242a3bbed9d7 Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <ngompa@fedoraproject.org>
|
||||
Date: Mon, 5 Jul 2021 05:36:03 -0400
|
||||
Subject: [PATCH] MdeModulePkg/PartitionDxe: Ignore PMBR BootIndicator per UEFI
|
||||
spec
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-MergeRequest: 6: MdeModulePkg/PartitionDxe: Ignore PMBR BootIndicator per UEFI spec [RHEL-9, c9s]
|
||||
RH-Commit: [1/1] b06df986d8e0cd0dab6e4234801c330b4d26e7db
|
||||
RH-Bugzilla: 1988760
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Per UEFI Spec 2.8 (UEFI_Spec_2_8_final.pdf, page 114)
|
||||
5.2.3 Protective MBR
|
||||
Table 20. Protective MBR Partition Record protecting the entire disk
|
||||
|
||||
The description for BootIndicator states the following:
|
||||
|
||||
> Set to 0x00 to indicate a non-bootable partition. If set to any
|
||||
> value other than 0x00 the behavior of this flag on non-UEFI
|
||||
> systems is undefined. Must be ignored by UEFI implementations.
|
||||
|
||||
Unfortunately, we have been incorrectly assuming that the
|
||||
BootIndicator value must be 0x00, which leads to problems
|
||||
when the 'pmbr_boot' flag is set on a disk containing a GPT
|
||||
(such as with GNU parted). When the flag is set, the value
|
||||
changes to 0x01, causing this check to fail and the system
|
||||
is rendered unbootable despite it being valid from the
|
||||
perspective of the UEFI spec.
|
||||
|
||||
To resolve this, we drop the check for the BootIndicator
|
||||
so that we stop caring about the value set there, which
|
||||
restores the capability to boot such disks.
|
||||
|
||||
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3474
|
||||
|
||||
Cc: Chris Murphy <chrismurphy@fedoraproject.org>
|
||||
Cc: David Duncan <davdunc@amazon.com>
|
||||
Cc: Lazlo Ersek <lersek@redhat.com>
|
||||
Cc: Hao A Wu <hao.a.wu@intel.com>
|
||||
Cc: Ray Ni <ray.ni@intel.com>
|
||||
Cc: Zhichao Gao <zhichao.gao@intel.com>
|
||||
|
||||
Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
|
||||
Message-Id: <20210705093603.575707-1-ngompa@fedoraproject.org>
|
||||
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
|
||||
(cherry picked from commit b3db0cb1f8d163f22b769c205c6347376a315dcd)
|
||||
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
|
||||
index aefb2d6ecb..efaff5e080 100644
|
||||
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
|
||||
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
|
||||
@@ -264,8 +264,7 @@ PartitionInstallGptChildHandles (
|
||||
// Verify that the Protective MBR is valid
|
||||
//
|
||||
for (Index = 0; Index < MAX_MBR_PARTITIONS; Index++) {
|
||||
- if (ProtectiveMbr->Partition[Index].BootIndicator == 0x00 &&
|
||||
- ProtectiveMbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION &&
|
||||
+ if (ProtectiveMbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION &&
|
||||
UNPACK_UINT32 (ProtectiveMbr->Partition[Index].StartingLBA) == 1
|
||||
) {
|
||||
break;
|
||||
--
|
||||
2.27.0
|
||||
|
@ -24,7 +24,7 @@ ExclusiveArch: x86_64 aarch64
|
||||
|
||||
Name: edk2
|
||||
Version: %{GITDATE}git%{GITCOMMIT}
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: UEFI firmware for 64-bit virtual machines
|
||||
License: BSD-2-Clause-Patent and OpenSSL and MIT
|
||||
URL: http://www.tianocore.org
|
||||
@ -124,6 +124,8 @@ Patch54: edk2-OvmfPkg-Remove-LinuxInitrdDynamicShellCommand-RHEL-o.patch
|
||||
Patch55: edk2-ArmVirtPkg-Remove-LinuxInitrdDynamicShellCommand-RHE.patch
|
||||
# For bz#1967747 - edk2: review features and drivers shipped in RHEL
|
||||
Patch56: edk2-OvmfPkg-Remove-Xen-Drivers-RHEL-only.patch
|
||||
# For bz#1988760 - edk2 does not ignore PMBR protective record BootIndicator as required by UEFI spec
|
||||
Patch57: edk2-MdeModulePkg-PartitionDxe-Ignore-PMBR-BootIndicator-.patch
|
||||
|
||||
|
||||
# python3-devel and libuuid-devel are required for building tools.
|
||||
@ -561,6 +563,11 @@ KERNEL_IMG=$(rpm -q -l $KERNEL_PKG | egrep '^/lib/modules/[^/]+/vmlinuz$')
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 06 2021 Miroslav Rezanina <mrezanin@redhat.com> - 20210527gite1999b264f1f-5
|
||||
- edk2-MdeModulePkg-PartitionDxe-Ignore-PMBR-BootIndicator-.patch [bz#1988760]
|
||||
- Resolves: bz#1988760
|
||||
(edk2 does not ignore PMBR protective record BootIndicator as required by UEFI spec)
|
||||
|
||||
* Fri Jul 30 2021 Miroslav Rezanina <mrezanin@redhat.com> - 20210527gite1999b264f1f-4
|
||||
- edk2-spec-remove-Group-and-defattr.patch [bz#1983789]
|
||||
- edk2-spec-Add-BuildRequires-make.patch [bz#1983789]
|
||||
|
Loading…
Reference in New Issue
Block a user