TianoCore EDK2 master
Loading...
Searching...
No Matches
UfsPciHcPei.c File Reference
#include "UfsPciHcPei.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI GetUfsHcMmioBar (IN EDKII_UFS_HOST_CONTROLLER_PPI *This, IN UINT8 ControllerId, OUT UINTN *MmioBar)
 
EFI_STATUS EFIAPI InitializeUfsHcPeim (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
 

Variables

EDKII_UFS_HOST_CONTROLLER_PPI mUfsHostControllerPpi = { GetUfsHcMmioBar }
 
EFI_PEI_PPI_DESCRIPTOR mPpiList
 

Detailed Description

UfsPciHcPei driver is used to provide platform-dependent info, mainly UFS host controller MMIO base, to upper layer UFS drivers.

Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UfsPciHcPei.c.

Function Documentation

◆ GetUfsHcMmioBar()

EFI_STATUS EFIAPI GetUfsHcMmioBar ( IN EDKII_UFS_HOST_CONTROLLER_PPI This,
IN UINT8  ControllerId,
OUT UINTN MmioBar 
)

Get the MMIO base address of UFS host controller.

Parameters
[in]ThisThe protocol instance pointer.
[in]ControllerIdThe ID of the UFS host controller.
[out]MmioBarPointer to the UFS host controller MMIO base address.
Return values
EFI_SUCCESSThe operation succeeds.
EFI_INVALID_PARAMETERThe parameters are invalid.

Definition at line 33 of file UfsPciHcPei.c.

◆ InitializeUfsHcPeim()

EFI_STATUS EFIAPI InitializeUfsHcPeim ( IN EFI_PEI_FILE_HANDLE  FileHandle,
IN CONST EFI_PEI_SERVICES **  PeiServices 
)

The user code starts with this function.

Parameters
FileHandleHandle of the file being invoked.
PeiServicesDescribes the list of possible PEI Services.
Return values
EFI_SUCCESSThe driver is successfully initialized.
OthersCan't initialize the driver.

We do not export this in S3 boot path, because it is only for recovery.

Install Ufs Host Controller PPI

Definition at line 68 of file UfsPciHcPei.c.

Variable Documentation

◆ mPpiList

Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEdkiiPeiUfsHostControllerPpiGuid,
&mUfsHostControllerPpi
}

Definition at line 14 of file UfsPciHcPei.c.

◆ mUfsHostControllerPpi

EDKII_UFS_HOST_CONTROLLER_PPI mUfsHostControllerPpi = { GetUfsHcMmioBar }

Definition at line 12 of file UfsPciHcPei.c.