Install the gPciPlatformProtocol to scan for Option ROMs. For every device we probe the Option ROM and provide a pointer to the activated BAR if found. It's safe to assume that all ROM bars have been enumerated, reserved in the bridge resources and are disabled by default. This is made a mandatory bootloader requirement in the next commit. Enabling them and leaving them enabled will do no harm. This can easily be tested on qemu, where it will start finding Option ROMs for VGA and network cards. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com> Cc: Patrick Rudolph <patrick.rudolph@9elements.com> Cc: Christian Walter <christian.walter@9elements.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com>
47 lines
1.1 KiB
INI
47 lines
1.1 KiB
INI
## @file
|
|
# This driver produces gEfiPciPlatform protocol to load PCI Option ROMs
|
|
#
|
|
# Copyright (c) 2020, 9elements Agency GmbH
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = PciPlatformDxe
|
|
FILE_GUID = 86D58F7B-6E7C-401F-BDD4-E32E6D582AAD
|
|
MODULE_TYPE = UEFI_DRIVER
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = InstallPciPlatformProtocol
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources.common]
|
|
PciPlatformDxe.h
|
|
PciPlatformDxe.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
[LibraryClasses]
|
|
UefiDriverEntryPoint
|
|
UefiBootServicesTableLib
|
|
DxeServicesTableLib
|
|
DebugLib
|
|
MemoryAllocationLib
|
|
BaseMemoryLib
|
|
DevicePathLib
|
|
UefiLib
|
|
HobLib
|
|
|
|
[Protocols]
|
|
gEfiPciPlatformProtocolGuid ## PRODUCES
|
|
gEfiPciIoProtocolGuid ## COMSUMES
|