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 <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
80 lines
2.3 KiB
INI
80 lines
2.3 KiB
INI
## @file
|
|
# Platform BDS customizations library.
|
|
#
|
|
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
|
# This program and the accompanying materials
|
|
# 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
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
#
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = PlatformBootManagerLib
|
|
FILE_GUID = FB65006C-AC9F-4992-AD80-184B2BDBBD83
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
|
#
|
|
|
|
[Sources]
|
|
BdsPlatform.c
|
|
PlatformData.c
|
|
QemuKernel.c
|
|
BdsPlatform.h
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
MemoryAllocationLib
|
|
UefiBootServicesTableLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
PcdLib
|
|
UefiBootManagerLib
|
|
BootLogoLib
|
|
DevicePathLib
|
|
PciLib
|
|
NvVarsFileLib
|
|
QemuFwCfgLib
|
|
LoadLinuxLib
|
|
QemuBootOrderLib
|
|
UefiLib
|
|
|
|
[Pcd]
|
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
|
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
|
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
|
|
|
|
[Pcd.IA32, Pcd.X64]
|
|
gEfiMdePkgTokenSpaceGuid.PcdFSBClock
|
|
|
|
[Protocols]
|
|
gEfiDecompressProtocolGuid
|
|
gEfiPciRootBridgeIoProtocolGuid
|
|
gEfiS3SaveStateProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
|
|
gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
|
|
gEfiLoadedImageProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
|
|
|
|
[Guids]
|
|
gEfiXenInfoGuid
|
|
gEfiEndOfDxeEventGroupGuid
|
|
gRootBridgesConnectedEventGroupGuid
|