Home | History | Annotate | Download | only in Library
      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]      Type                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   @param[in]  ...                     The variable argument list which contains the
     47                                       info about MmioResources.
     48 
     49   @retval EFI_SUCCESS                 The registration succeeded.
     50   @retval Other                       The registration failed.
     51 
     52 **/
     53 EFI_STATUS
     54 EFIAPI
     55 RegisterNonDiscoverableMmioDevice (
     56   IN      NON_DISCOVERABLE_DEVICE_TYPE      Type,
     57   IN      NON_DISCOVERABLE_DEVICE_DMA_TYPE  DmaType,
     58   IN      NON_DISCOVERABLE_DEVICE_INIT      InitFunc,
     59   IN OUT  EFI_HANDLE                        *Handle OPTIONAL,
     60   IN      UINTN                             NumMmioResources,
     61   ...
     62   );
     63 
     64 #endif
     65