EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions | Variables

FatPkg/FatPei/FatLiteApi.c File Reference

#include "FatLitePeim.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI BlockIoNotifyEntry (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
EFI_STATUS UpdateBlocksAndVolumes (IN OUT PEI_FAT_PRIVATE_DATA *PrivateData)
EFI_STATUS EFIAPI FatPeimEntry (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
EFI_STATUS EFIAPI GetNumberRecoveryCapsules (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This, OUT UINTN *NumberRecoveryCapsules)
EFI_STATUS EFIAPI GetRecoveryCapsuleInfo (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This, IN UINTN CapsuleInstance, OUT UINTN *Size, OUT EFI_GUID *CapsuleType)
EFI_STATUS EFIAPI LoadRecoveryCapsule (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This, IN UINTN CapsuleInstance, OUT VOID *Buffer)
EFI_STATUS FindRecoveryFile (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN VolumeIndex, IN CHAR16 *FileName, OUT PEI_FILE_HANDLE *Handle)

Variables

PEI_FAT_PRIVATE_DATAmPrivateData = NULL

Detailed Description

FAT recovery PEIM entry point, Ppi Functions and FAT Api functions.

Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the Software License Agreement which accompanies this distribution.

Definition in file FatLiteApi.c.


Function Documentation

EFI_STATUS EFIAPI BlockIoNotifyEntry ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor,
IN VOID *  Ppi 
)

BlockIo installation nofication function. Find out all the current BlockIO PPIs in the system and add them into private data. Assume there is

Parameters:
PeiServicesGeneral purpose services available to every PEIM.
NotifyDescriptorThe typedef structure of the notification descriptor. Not used in this function.
PpiThe typedef structure of the PPI descriptor. Not used in this function.
Return values:
EFI_SUCCESSThe function completed successfully.

BlockIo installation notification function. Find out all the current BlockIO PPIs in the system and add them into private data. Assume there is

Parameters:
PeiServicesGeneral purpose services available to every PEIM.
NotifyDescriptorThe typedef structure of the notification descriptor. Not used in this function.
PpiThe typedef structure of the PPI descriptor. Not used in this function.
Return values:
EFI_SUCCESSThe function completed successfully.

Definition at line 177 of file FatLiteApi.c.

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

Installs the Device Recovery Module PPI, Initialize BlockIo Ppi installation notification

Parameters:
FileHandleHandle of the file being invoked. Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().
PeiServicesDescribes the list of possible PEI Services.
Return values:
EFI_SUCCESSThe entry point was executed successfully.
EFI_OUT_OF_RESOURCESThere is no enough memory to complete the operations.

Definition at line 205 of file FatLiteApi.c.

EFI_STATUS FindRecoveryFile ( IN PEI_FAT_PRIVATE_DATA PrivateData,
IN UINTN  VolumeIndex,
IN CHAR16 FileName,
OUT PEI_FILE_HANDLE Handle 
)

Finds the recovery file on a FAT volume. This function finds the the recovery file named FileName on a specified FAT volume and returns its FileHandle pointer.

Parameters:
PrivateDataGlobal memory map for accessing global variables.
VolumeIndexThe index of the volume.
FileNameThe recovery file name to find.
HandleThe output file handle.
Return values:
EFI_DEVICE_ERRORSome error occured when operating the FAT volume.
EFI_NOT_FOUNDThe recovery file was not found.
EFI_SUCCESSThe recovery file was successfully found on the FAT volume.

Definition at line 554 of file FatLiteApi.c.

EFI_STATUS EFIAPI GetNumberRecoveryCapsules ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI This,
OUT UINTN NumberRecoveryCapsules 
)

Returns the number of DXE capsules residing on the device.

This function searches for DXE capsules from the associated device and returns the number and maximum size in bytes of the capsules discovered. Entry 1 is assumed to be the highest load priority and entry N is assumed to be the lowest priority.

Parameters:
[in]PeiServicesGeneral-purpose services that are available to every PEIM
[in]ThisIndicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
[out]NumberRecoveryCapsulesPointer to a caller-allocated UINTN. On output, *NumberRecoveryCapsules contains the number of recovery capsule images available for retrieval from this PEIM instance.
Return values:
EFI_SUCCESSOne or more capsules were discovered.
EFI_DEVICE_ERRORA device error occurred.
EFI_NOT_FOUNDA recovery DXE capsule cannot be found.

Definition at line 303 of file FatLiteApi.c.

EFI_STATUS EFIAPI GetRecoveryCapsuleInfo ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI This,
IN UINTN  CapsuleInstance,
OUT UINTN Size,
OUT EFI_GUID CapsuleType 
)

Returns the size and type of the requested recovery capsule.

This function gets the size and type of the capsule specified by CapsuleInstance.

Parameters:
[in]PeiServicesGeneral-purpose services that are available to every PEIM
[in]ThisIndicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
[in]CapsuleInstanceSpecifies for which capsule instance to retrieve the information. This parameter must be between one and the value returned by GetNumberRecoveryCapsules() in NumberRecoveryCapsules.
[out]SizeA pointer to a caller-allocated UINTN in which the size of the requested recovery module is returned.
[out]CapsuleTypeA pointer to a caller-allocated EFI_GUID in which the type of the requested recovery capsule is returned. The semantic meaning of the value returned is defined by the implementation.
Return values:
EFI_SUCCESSOne or more capsules were discovered.
EFI_DEVICE_ERRORA device error occurred.
EFI_NOT_FOUNDA recovery DXE capsule cannot be found.

Definition at line 367 of file FatLiteApi.c.

EFI_STATUS EFIAPI LoadRecoveryCapsule ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI This,
IN UINTN  CapsuleInstance,
OUT VOID *  Buffer 
)

Loads a DXE capsule from some media into memory.

This function, by whatever mechanism, retrieves a DXE capsule from some device and loads it into memory. Note that the published interface is device neutral.

Parameters:
[in]PeiServicesGeneral-purpose services that are available to every PEIM
[in]ThisIndicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
[in]CapsuleInstanceSpecifies which capsule instance to retrieve.
[out]BufferSpecifies a caller-allocated buffer in which the requested recovery capsule will be returned.
Return values:
EFI_SUCCESSThe capsule was loaded correctly.
EFI_DEVICE_ERRORA device error occurred.
EFI_NOT_FOUNDA requested recovery DXE capsule cannot be found.

Definition at line 477 of file FatLiteApi.c.

EFI_STATUS UpdateBlocksAndVolumes ( IN OUT PEI_FAT_PRIVATE_DATA PrivateData)

Discover all the block I/O devices to find the FAT volume.

Parameters:
PrivateDataGlobal memory map for accessing global variables.
Return values:
EFI_SUCCESSThe function completed successfully.

Definition at line 49 of file FatLiteApi.c.


Variable Documentation

Definition at line 14 of file FatLiteApi.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines