]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/PlatformBootManagerLib: Connect the Xen drivers before loading NvVars
authorGary Lin <glin@suse.com>
Wed, 1 Jun 2016 10:26:20 +0000 (18:26 +0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 2 Jun 2016 20:34:28 +0000 (13:34 -0700)
commitda2369d21d2e57a0de8fa7ae954812122c87326e
tree1044125e6dbdbdd0ef79f131907956fa438491cf
parent05bf4747dd8e412d10fccbe35346aa2597b4167b
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 <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>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf