2016-10-31 15:58:18 +01:00
|
|
|
/** @file
|
|
|
|
Copyright (c) 2016, Linaro, Ltd. All rights reserved.<BR>
|
|
|
|
|
2019-04-04 01:05:13 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2016-10-31 15:58:18 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __NON_DISCOVERABLE_DEVICE_REGISTRATION_LIB_H__
|
|
|
|
#define __NON_DISCOVERABLE_DEVICE_REGISTRATION_LIB_H__
|
|
|
|
|
|
|
|
#include <Protocol/NonDiscoverableDevice.h>
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
NonDiscoverableDeviceTypeAhci,
|
|
|
|
NonDiscoverableDeviceTypeAmba,
|
|
|
|
NonDiscoverableDeviceTypeEhci,
|
|
|
|
NonDiscoverableDeviceTypeNvme,
|
|
|
|
NonDiscoverableDeviceTypeOhci,
|
|
|
|
NonDiscoverableDeviceTypeSdhci,
|
|
|
|
NonDiscoverableDeviceTypeUfs,
|
|
|
|
NonDiscoverableDeviceTypeUhci,
|
|
|
|
NonDiscoverableDeviceTypeXhci,
|
|
|
|
NonDiscoverableDeviceTypeMax,
|
|
|
|
} NON_DISCOVERABLE_DEVICE_TYPE;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Register a non-discoverable MMIO device
|
|
|
|
|
2016-12-19 08:02:24 +01:00
|
|
|
@param[in] Type The type of non-discoverable device
|
2016-10-31 15:58:18 +01:00
|
|
|
@param[in] DmaType Whether the device is DMA coherent
|
|
|
|
@param[in] InitFunc Initialization routine to be invoked when
|
|
|
|
the device is enabled
|
|
|
|
@param[in,out] Handle The handle onto which to install the
|
|
|
|
non-discoverable device protocol.
|
|
|
|
If Handle is NULL or *Handle is NULL, a
|
|
|
|
new handle will be allocated.
|
|
|
|
@param[in] NumMmioResources The number of UINTN base/size pairs that
|
|
|
|
follow, each describing an MMIO region
|
|
|
|
owned by the device
|
2016-12-19 08:02:24 +01:00
|
|
|
@param[in] ... The variable argument list which contains the
|
|
|
|
info about MmioResources.
|
2016-10-31 15:58:18 +01:00
|
|
|
|
|
|
|
@retval EFI_SUCCESS The registration succeeded.
|
|
|
|
@retval Other The registration failed.
|
|
|
|
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
RegisterNonDiscoverableMmioDevice (
|
|
|
|
IN NON_DISCOVERABLE_DEVICE_TYPE Type,
|
|
|
|
IN NON_DISCOVERABLE_DEVICE_DMA_TYPE DmaType,
|
|
|
|
IN NON_DISCOVERABLE_DEVICE_INIT InitFunc,
|
|
|
|
IN OUT EFI_HANDLE *Handle OPTIONAL,
|
|
|
|
IN UINTN NumMmioResources,
|
|
|
|
...
|
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|