Hello community, here is the log from the commit of package ovmf for openSUSE:Factory checked in at 2016-06-07 23:47:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ovmf (Old) and /work/SRC/openSUSE:Factory/.ovmf.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ovmf" Changes: -------- --- /work/SRC/openSUSE:Factory/ovmf/ovmf.changes 2016-05-25 21:28:43.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ovmf.new/ovmf.changes 2016-06-07 23:47:28.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Jun 3 03:08:39 UTC 2016 - [email protected] + +- Add ovmf-bsc982193-dont-restore-readonly-var.patch and + ovmf-bsc982193-connect-xen-drivers.patch to fix the file-based + NvVars restoring. (bsc#982193) + +------------------------------------------------------------------- New: ---- ovmf-bsc982193-connect-xen-drivers.patch ovmf-bsc982193-dont-restore-readonly-var.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ovmf.spec ++++++ --- /var/tmp/diff_new_pack.WKqNRP/_old 2016-06-07 23:47:29.000000000 +0200 +++ /var/tmp/diff_new_pack.WKqNRP/_new 2016-06-07 23:47:29.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ovmf # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + # needssslcertforbuild %undefine _build_create_debug @@ -51,11 +52,13 @@ Patch5: %{name}-dxe-10mb.patch Patch6: %{name}-bsc976253-postpone-shell.patch Patch7: %{name}-bsc980635-fix-http-crash.patch +Patch8: %{name}-bsc982193-dont-restore-readonly-var.patch +Patch9: %{name}-bsc982193-connect-xen-drivers.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: libuuid-devel BuildRequires: fdupes BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: libuuid-devel BuildRequires: python %ifnarch aarch64 %arm BuildRequires: iasl @@ -170,6 +173,8 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 # Intel has special patches for openssl pushd CryptoPkg/Library/OpensslLib/openssl-%{openssl_version} patch -p1 -i ../EDKII_openssl-%{openssl_version}.patch ++++++ ovmf-bsc982193-connect-xen-drivers.patch ++++++ >From da2369d21d2e57a0de8fa7ae954812122c87326e Mon Sep 17 00:00:00 2001 From: Gary Lin <[email protected]> Date: Wed, 1 Jun 2016 18:26:20 +0800 Subject: [PATCH] OvmfPkg/PlatformBootManagerLib: Connect the Xen drivers before loading NvVars When OVMF tried to load the file-based NvVars, it checked all the PCI instances and connected the drivers to the mass storage device. However, Xen registered its PCI device with a special class id (0xFF80), so ConnectRecursivelyIfPciMassStorage() couldn't recognize it and skipped the driver connecting for Xen PCI devices. In the end, the Xen block device wasn't initialized until EfiBootManagerConnectAll() was called, and it's already too late to load NvVars. This commit connects the Xen drivers in ConnectRecursivelyIfPciMassStorage() so that Xen can use the file-based NvVars. v3: * Introduce XenDetected() to cache the result of Xen detection instead of relying on PcdPciDisableBusEnumeration. v2: * Cosmetic changes Cc: Jordan Justen <[email protected]> Cc: Laszlo Ersek <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <[email protected]> Reviewed-by: Jordan Justen <[email protected]> --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 41 ++++++++++++++++++++-- .../PlatformBootManagerLib.inf | 1 + 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index befcc57..912c5ed 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -13,6 +13,7 @@ **/ #include "BdsPlatform.h" +#include <Guid/XenInfo.h> #include <Guid/RootBridgesConnectedEventGroup.h> @@ -1037,6 +1038,37 @@ PciAcpiInitialization ( IoOr16 ((PciRead32 (Pmba) & ~BIT0) + 4, BIT0); } +/** + This function detects if OVMF is running on Xen. + +**/ +STATIC +BOOLEAN +XenDetected ( + VOID + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + STATIC INTN FoundHob = -1; + + if (FoundHob == 0) { + return FALSE; + } else if (FoundHob == 1) { + return TRUE; + } + + // + // See if a XenInfo HOB is available + // + GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); + if (GuidHob == NULL) { + FoundHob = 0; + return FALSE; + } + + FoundHob = 1; + return TRUE; +} EFI_STATUS EFIAPI @@ -1050,7 +1082,11 @@ ConnectRecursivelyIfPciMassStorage ( EFI_DEVICE_PATH_PROTOCOL *DevicePath; CHAR16 *DevPathStr; - if (IS_CLASS1 (PciHeader, PCI_CLASS_MASS_STORAGE)) { + // + // Recognize PCI Mass Storage, and Xen PCI devices + // + if (IS_CLASS1 (PciHeader, PCI_CLASS_MASS_STORAGE) || + (XenDetected() && IS_CLASS2 (PciHeader, 0xFF, 0x80))) { DevicePath = NULL; Status = gBS->HandleProtocol ( Handle, @@ -1068,7 +1104,8 @@ ConnectRecursivelyIfPciMassStorage ( if (DevPathStr != NULL) { DEBUG(( EFI_D_INFO, - "Found Mass Storage device: %s\n", + "Found %s device: %s\n", + IS_CLASS1 (PciHeader, PCI_CLASS_MASS_STORAGE) ? L"Mass Storage" : L"Xen", DevPathStr )); FreePool(DevPathStr); diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 5fcee3c..ffa1288 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -74,5 +74,6 @@ [Protocols] gEfiLoadedImageProtocolGuid # PROTOCOL SOMETIMES_PRODUCED [Guids] + gEfiXenInfoGuid gEfiEndOfDxeEventGroupGuid gRootBridgesConnectedEventGroupGuid -- 2.8.3 ++++++ ovmf-bsc982193-dont-restore-readonly-var.patch ++++++ ++++ 1864 lines (skipped)
