]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/NonDiscoverableDeviceRegistrationLib.h
MdeModulePkg: introduce helper library to register non-discoverable devices
[mirror_edk2.git] / MdeModulePkg / Include / Library / NonDiscoverableDeviceRegistrationLib.h
1 /** @file
2 Copyright (c) 2016, Linaro, Ltd. All rights reserved.<BR>
3
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 **/
13
14 #ifndef __NON_DISCOVERABLE_DEVICE_REGISTRATION_LIB_H__
15 #define __NON_DISCOVERABLE_DEVICE_REGISTRATION_LIB_H__
16
17 #include <Protocol/NonDiscoverableDevice.h>
18
19 typedef enum {
20 NonDiscoverableDeviceTypeAhci,
21 NonDiscoverableDeviceTypeAmba,
22 NonDiscoverableDeviceTypeEhci,
23 NonDiscoverableDeviceTypeNvme,
24 NonDiscoverableDeviceTypeOhci,
25 NonDiscoverableDeviceTypeSdhci,
26 NonDiscoverableDeviceTypeUfs,
27 NonDiscoverableDeviceTypeUhci,
28 NonDiscoverableDeviceTypeXhci,
29 NonDiscoverableDeviceTypeMax,
30 } NON_DISCOVERABLE_DEVICE_TYPE;
31
32 /**
33 Register a non-discoverable MMIO device
34
35 @param[in] DeviceType The type of non-discoverable device
36 @param[in] DmaType Whether the device is DMA coherent
37 @param[in] InitFunc Initialization routine to be invoked when
38 the device is enabled
39 @param[in,out] Handle The handle onto which to install the
40 non-discoverable device protocol.
41 If Handle is NULL or *Handle is NULL, a
42 new handle will be allocated.
43 @param[in] NumMmioResources The number of UINTN base/size pairs that
44 follow, each describing an MMIO region
45 owned by the device
46
47 @retval EFI_SUCCESS The registration succeeded.
48 @retval Other The registration failed.
49
50 **/
51 EFI_STATUS
52 EFIAPI
53 RegisterNonDiscoverableMmioDevice (
54 IN NON_DISCOVERABLE_DEVICE_TYPE Type,
55 IN NON_DISCOVERABLE_DEVICE_DMA_TYPE DmaType,
56 IN NON_DISCOVERABLE_DEVICE_INIT InitFunc,
57 IN OUT EFI_HANDLE *Handle OPTIONAL,
58 IN UINTN NumMmioResources,
59 ...
60 );
61
62 #endif