TianoCore EDK2 master
|
#include "PeiCdExpress.h"
Go to the source code of this file.
Variables | |
PEI_CD_EXPRESS_PRIVATE_DATA * | mPrivateData = NULL |
CHAR8 * | mRecoveryFileName |
UINTN | mRecoveryFileNameSize |
Source file for CD recovery PEIM
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PeiCdExpress.c.
EFI_STATUS EFIAPI BlockIoNotifyEntry | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN EFI_PEI_NOTIFY_DESCRIPTOR * | NotifyDescriptor, | ||
IN VOID * | Ppi | ||
) |
BlockIo installation notification function.
This function finds out all the current Block IO PPIs in the system and add them into private data.
PeiServices | Indirect reference to the PEI Services Table. |
NotifyDescriptor | Address of the notification descriptor data structure. |
Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | The function completes successfully. |
Definition at line 129 of file PeiCdExpress.c.
EFI_STATUS EFIAPI CdExpressPeimEntry | ( | IN EFI_PEI_FILE_HANDLE | FileHandle, |
IN CONST EFI_PEI_SERVICES ** | PeiServices | ||
) |
Installs the Device Recovery Module PPI, Initialize BlockIo Ppi installation notification
FileHandle | The file handle of the image. |
PeiServices | General purpose services available to every PEIM. |
EFI_SUCCESS | The function completed successfully. |
EFI_OUT_OF_RESOURCES | There is not enough system memory. |
Definition at line 29 of file PeiCdExpress.c.
EFI_STATUS EFIAPI FindRecoveryCapsules | ( | IN OUT PEI_CD_EXPRESS_PRIVATE_DATA * | PrivateData | ) |
Finds out the recovery capsule in the current volume.
PrivateData | The private data structure that contains recovery module information. |
EFI_SUCCESS | The recovery capsule is successfully found in the volume. |
EFI_NOT_FOUND | The recovery capsule is not found in the volume. |
Definition at line 299 of file PeiCdExpress.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.
[in] | PeiServices | General-purpose services that are available to every PEIM |
[in] | This | Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. |
[out] | NumberRecoveryCapsules | Pointer to a caller-allocated UINTN. On output, *NumberRecoveryCapsules contains the number of recovery capsule images available for retrieval from this PEIM instance. |
EFI_SUCCESS | One or more capsules were discovered. |
EFI_DEVICE_ERROR | A device error occurred. |
EFI_NOT_FOUND | A recovery DXE capsule cannot be found. |
Definition at line 536 of file PeiCdExpress.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.
[in] | PeiServices | General-purpose services that are available to every PEIM |
[in] | This | Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. |
[in] | CapsuleInstance | Specifies for which capsule instance to retrieve the information. This parameter must be between one and the value returned by GetNumberRecoveryCapsules() in NumberRecoveryCapsules. |
[out] | Size | A pointer to a caller-allocated UINTN in which the size of the requested recovery module is returned. |
[out] | CapsuleType | A 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. |
EFI_SUCCESS | One or more capsules were discovered. |
EFI_DEVICE_ERROR | A device error occurred. |
EFI_NOT_FOUND | A recovery DXE capsule cannot be found. |
Definition at line 583 of file PeiCdExpress.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.
[in] | PeiServices | General-purpose services that are available to every PEIM |
[in] | This | Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. |
[in] | CapsuleInstance | Specifies which capsule instance to retrieve. |
[out] | Buffer | Specifies a caller-allocated buffer in which the requested recovery capsule will be returned. |
EFI_SUCCESS | The capsule was loaded correctly. |
EFI_DEVICE_ERROR | A device error occurred. |
EFI_NOT_FOUND | A requested recovery DXE capsule cannot be found. |
Definition at line 638 of file PeiCdExpress.c.
EFI_STATUS EFIAPI RetrieveCapsuleFileFromRoot | ( | IN OUT PEI_CD_EXPRESS_PRIVATE_DATA * | PrivateData, |
IN EFI_PEI_RECOVERY_BLOCK_IO_PPI * | BlockIoPpi, | ||
IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI * | BlockIo2Ppi, | ||
IN UINTN | IndexBlockDevice, | ||
IN UINT32 | Lba | ||
) |
Retrieves the recovery capsule in root directory of the current volume.
PrivateData | The private data structure that contains recovery module information. |
BlockIoPpi | The Block IO PPI used to access the volume. |
BlockIo2Ppi | The Block IO 2 PPI used to access the volume. |
IndexBlockDevice | The index of current block device. |
Lba | The starting logic block address to retrieve capsule. |
EFI_SUCCESS | The recovery capsule is successfully found in the volume. |
EFI_NOT_FOUND | The recovery capsule is not found in the volume. |
Others |
Definition at line 421 of file PeiCdExpress.c.
BOOLEAN StringCmp | ( | IN UINT8 * | Source1, |
IN UINT8 * | Source2, | ||
IN UINTN | Size, | ||
IN BOOLEAN | CaseSensitive | ||
) |
This function compares two ASCII strings in case sensitive/insensitive way.
Source1 | The first string. |
Source2 | The second string. |
Size | The maximum comparison length. |
CaseSensitive | Flag to indicate whether the comparison is case sensitive. |
TRUE | The two strings are the same. |
FALSE | The two string are not the same. |
Definition at line 701 of file PeiCdExpress.c.
EFI_STATUS UpdateBlocksAndVolumes | ( | IN OUT PEI_CD_EXPRESS_PRIVATE_DATA * | PrivateData, |
IN BOOLEAN | BlockIo2 | ||
) |
Finds out all the current Block IO PPIs in the system and add them into private data.
PrivateData | The private data structure that contains recovery module information. |
BlockIo2 | Boolean to show whether using BlockIo2 or BlockIo. |
EFI_SUCCESS | The blocks and volumes are updated successfully. |
Definition at line 154 of file PeiCdExpress.c.
PEI_CD_EXPRESS_PRIVATE_DATA* mPrivateData = NULL |
Definition at line 12 of file PeiCdExpress.c.
CHAR8* mRecoveryFileName |
Definition at line 13 of file PeiCdExpress.c.
UINTN mRecoveryFileNameSize |
Definition at line 14 of file PeiCdExpress.c.