MdeModulePkg: introduce helper library to register non-discoverable devices

Non-discoverable devices need to be registered explicitly by the platform.
Introduce a helper library that takes care of this.

This implementation currently only supports registering devices that are
covered by one or more MMIO resources. The underlying protocol allows for
more flexibility than that, but this is currently sufficient for the use
cases that we know about.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
This commit is contained in:
Ard Biesheuvel
2016-10-31 14:58:18 +00:00
parent 9598cdc292
commit 1652dc2158
5 changed files with 318 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
# @file
# Copyright (c) 2016, Linaro, Ltd. 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 = 0x00010019
BASE_NAME = NonDiscoverableDeviceRegistrationLib
FILE_GUID = 8802ae41-8184-49cb-8aec-62627cd7ceb4
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = NonDiscoverableDeviceRegistrationLib
[Sources]
NonDiscoverableDeviceRegistrationLib.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
BaseMemoryLib
DebugLib
DevicePathLib
UefiBootServicesTableLib
[Protocols]
gEdkiiNonDiscoverableDeviceProtocolGuid
[Guids]
gEdkiiNonDiscoverableAhciDeviceGuid
gEdkiiNonDiscoverableAmbaDeviceGuid
gEdkiiNonDiscoverableEhciDeviceGuid
gEdkiiNonDiscoverableNvmeDeviceGuid
gEdkiiNonDiscoverableOhciDeviceGuid
gEdkiiNonDiscoverableSdhciDeviceGuid
gEdkiiNonDiscoverableUfsDeviceGuid
gEdkiiNonDiscoverableUhciDeviceGuid
gEdkiiNonDiscoverableXhciDeviceGuid