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

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI GetSdMmcHcMmioBar (IN EDKII_SD_MMC_HOST_CONTROLLER_PPI *This, IN UINT8 ControllerId, IN OUT UINTN **MmioBar, OUT UINT8 *BarNum)
 
EFI_STATUS EFIAPI InitializeSdMmcHcPeim (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
 

Variables

EDKII_SD_MMC_HOST_CONTROLLER_PPI mSdMmcHostControllerPpi = { GetSdMmcHcMmioBar }
 
EFI_PEI_PPI_DESCRIPTOR mPpiList
 

Detailed Description

SdMmcPciHcPei driver is used to provide platform-dependent info, mainly SD/MMC host controller MMIO base, to upper layer SD/MMC drivers.

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

Definition in file SdMmcPciHcPei.c.

Function Documentation

◆ GetSdMmcHcMmioBar()

EFI_STATUS EFIAPI GetSdMmcHcMmioBar ( IN EDKII_SD_MMC_HOST_CONTROLLER_PPI This,
IN UINT8  ControllerId,
IN OUT UINTN **  MmioBar,
OUT UINT8 *  BarNum 
)

Get the MMIO base address of SD/MMC host controller.

Parameters
[in]ThisThe protocol instance pointer.
[in]ControllerIdThe ID of the SD/MMC host controller.
[in,out]MmioBarThe pointer to store the array of available SD/MMC host controller slot MMIO base addresses. The entry number of the array is specified by BarNum.
[out]BarNumThe pointer to store the supported bar number.
Return values
EFI_SUCCESSThe operation succeeds.
EFI_INVALID_PARAMETERThe parameters are invalid.

Definition at line 36 of file SdMmcPciHcPei.c.

◆ InitializeSdMmcHcPeim()

EFI_STATUS EFIAPI InitializeSdMmcHcPeim ( 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 expose this in S3 boot path, because it is only for recovery.

Install SdMmc Host Controller PPI

Definition at line 72 of file SdMmcPciHcPei.c.

Variable Documentation

◆ mPpiList

Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEdkiiPeiSdMmcHostControllerPpiGuid,
&mSdMmcHostControllerPpi
}

Definition at line 14 of file SdMmcPciHcPei.c.

◆ mSdMmcHostControllerPpi

EDKII_SD_MMC_HOST_CONTROLLER_PPI mSdMmcHostControllerPpi = { GetSdMmcHcMmioBar }

Definition at line 12 of file SdMmcPciHcPei.c.