/** @file\r
FAT recovery PEIM entry point, Ppi Functions and FAT Api functions.\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
\r
-This program and the accompanying materials are licensed and made available\r
-under the terms and conditions of the BSD License which accompanies this\r
-distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
PEI_FAT_PRIVATE_DATA *mPrivateData = NULL;\r
\r
/**\r
- BlockIo installation nofication function. Find out all the current BlockIO\r
+ BlockIo installation notification function. Find out all the current BlockIO\r
PPIs in the system and add them into private data. Assume there is\r
\r
- @param PeiServices General purpose services available to every \r
- PEIM. \r
- @param NotifyDescriptor The typedef structure of the notification \r
- descriptor. Not used in this function. \r
- @param Ppi The typedef structure of the PPI descriptor. \r
- Not used in this function. \r
+ @param PeiServices General purpose services available to every\r
+ PEIM.\r
+ @param NotifyDescriptor The typedef structure of the notification\r
+ descriptor. Not used in this function.\r
+ @param Ppi The typedef structure of the PPI descriptor.\r
+ Not used in this function.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
\r
/**\r
Discover all the block I/O devices to find the FAT volume.\r
\r
- @param PrivateData Global memory map for accessing global \r
- variables. \r
+ @param PrivateData Global memory map for accessing global\r
+ variables.\r
@param BlockIo2 Boolean to show whether using BlockIo2 or BlockIo\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
BlockIo installation notification function. Find out all the current BlockIO\r
PPIs in the system and add them into private data. Assume there is\r
\r
- @param PeiServices General purpose services available to every \r
- PEIM. \r
- @param NotifyDescriptor The typedef structure of the notification \r
- descriptor. Not used in this function. \r
- @param Ppi The typedef structure of the PPI descriptor. \r
- Not used in this function. \r
+ @param PeiServices General purpose services available to every\r
+ PEIM.\r
+ @param NotifyDescriptor The typedef structure of the notification\r
+ descriptor. Not used in this function.\r
+ @param Ppi The typedef structure of the PPI descriptor.\r
+ Not used in this function.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
\r
Installs the Device Recovery Module PPI, Initialize BlockIo Ppi\r
installation notification\r
\r
- @param FileHandle Handle of the file being invoked. Type \r
- EFI_PEI_FILE_HANDLE is defined in \r
- FfsFindNextFile(). \r
- @param PeiServices Describes the list of possible PEI Services. \r
+ @param FileHandle Handle of the file being invoked. Type\r
+ EFI_PEI_FILE_HANDLE is defined in\r
+ FfsFindNextFile().\r
+ @param PeiServices Describes the list of possible PEI Services.\r
\r
- @retval EFI_SUCCESS The entry point was executed successfully. \r
- @retval EFI_OUT_OF_RESOURCES There is no enough memory to complete the \r
+ @retval EFI_SUCCESS The entry point was executed successfully.\r
+ @retval EFI_OUT_OF_RESOURCES There is no enough memory to complete the\r
operations.\r
\r
**/\r
\r
Status = PeiServicesAllocatePages (\r
EfiBootServicesCode,\r
- (sizeof (PEI_FAT_PRIVATE_DATA) - 1) / PEI_FAT_MEMMORY_PAGE_SIZE + 1,\r
+ (sizeof (PEI_FAT_PRIVATE_DATA) - 1) / PEI_FAT_MEMORY_PAGE_SIZE + 1,\r
&Address\r
);\r
if (EFI_ERROR (Status)) {\r
Returns the number of DXE capsules residing on the device.\r
\r
This function searches for DXE capsules from the associated device and returns\r
- the number and maximum size in bytes of the capsules discovered. Entry 1 is \r
- assumed to be the highest load priority and entry N is assumed to be the lowest \r
+ the number and maximum size in bytes of the capsules discovered. Entry 1 is\r
+ assumed to be the highest load priority and entry N is assumed to be the lowest\r
priority.\r
\r
- @param[in] PeiServices General-purpose services that are available \r
+ @param[in] PeiServices General-purpose services that are available\r
to every PEIM\r
@param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
instance.\r
- @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On \r
- output, *NumberRecoveryCapsules contains \r
- the number of recovery capsule images \r
- available for retrieval from this PEIM \r
+ @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On\r
+ output, *NumberRecoveryCapsules contains\r
+ the number of recovery capsule images\r
+ available for retrieval from this PEIM\r
instance.\r
\r
@retval EFI_SUCCESS One or more capsules were discovered.\r
This function gets the size and type of the capsule specified by CapsuleInstance.\r
\r
@param[in] PeiServices General-purpose services that are available to every PEIM\r
- @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI \r
+ @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
instance.\r
- @param[in] CapsuleInstance Specifies for which capsule instance to retrieve \r
- the information. This parameter must be between \r
- one and the value returned by GetNumberRecoveryCapsules() \r
+ @param[in] CapsuleInstance Specifies for which capsule instance to retrieve\r
+ the information. This parameter must be between\r
+ one and the value returned by GetNumberRecoveryCapsules()\r
in NumberRecoveryCapsules.\r
- @param[out] Size A pointer to a caller-allocated UINTN in which \r
- the size of the requested recovery module is \r
+ @param[out] Size A pointer to a caller-allocated UINTN in which\r
+ the size of the requested recovery module is\r
returned.\r
- @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which \r
- the type of the requested recovery capsule is \r
- returned. The semantic meaning of the value \r
+ @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which\r
+ the type of the requested recovery capsule is\r
+ returned. The semantic meaning of the value\r
returned is defined by the implementation.\r
\r
@retval EFI_SUCCESS One or more capsules were discovered.\r
return Status;\r
}\r
\r
- if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {\r
- CapsuleInstance = CapsuleInstance + 1;\r
- }\r
-\r
if ((CapsuleInstance == 0) || (CapsuleInstance > NumberRecoveryCapsules)) {\r
return EFI_NOT_FOUND;\r
}\r
CopyGuid (CapsuleType, &gRecoveryOnFatUsbDiskGuid);\r
break;\r
\r
+ case MSG_NVME_NAMESPACE_DP:\r
+ CopyGuid (CapsuleType, &gRecoveryOnFatNvmeDiskGuid);\r
+ break;\r
+\r
default:\r
break;\r
}\r
This function, by whatever mechanism, retrieves a DXE capsule from some device\r
and loads it into memory. Note that the published interface is device neutral.\r
\r
- @param[in] PeiServices General-purpose services that are available \r
+ @param[in] PeiServices General-purpose services that are available\r
to every PEIM\r
@param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
instance.\r
@param[in] CapsuleInstance Specifies which capsule instance to retrieve.\r
- @param[out] Buffer Specifies a caller-allocated buffer in which \r
+ @param[out] Buffer Specifies a caller-allocated buffer in which\r
the requested recovery capsule will be returned.\r
\r
@retval EFI_SUCCESS The capsule was loaded correctly.\r
return Status;\r
}\r
\r
- if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {\r
- CapsuleInstance = CapsuleInstance + 1;\r
- }\r
-\r
if ((CapsuleInstance == 0) || (CapsuleInstance > NumberRecoveryCapsules)) {\r
return EFI_NOT_FOUND;\r
}\r
\r
/**\r
Finds the recovery file on a FAT volume.\r
- This function finds the the recovery file named FileName on a specified FAT volume and returns\r
+ This function finds the recovery file named FileName on a specified FAT volume and returns\r
its FileHandle pointer.\r
\r
- @param PrivateData Global memory map for accessing global \r
- variables. \r
- @param VolumeIndex The index of the volume. \r
- @param FileName The recovery file name to find. \r
- @param Handle The output file handle. \r
+ @param PrivateData Global memory map for accessing global\r
+ variables.\r
+ @param VolumeIndex The index of the volume.\r
+ @param FileName The recovery file name to find.\r
+ @param Handle The output file handle.\r
\r
- @retval EFI_DEVICE_ERROR Some error occured when operating the FAT \r
- volume. \r
- @retval EFI_NOT_FOUND The recovery file was not found. \r
- @retval EFI_SUCCESS The recovery file was successfully found on the \r
+ @retval EFI_DEVICE_ERROR Some error occurred when operating the FAT\r
+ volume.\r
+ @retval EFI_NOT_FOUND The recovery file was not found.\r
+ @retval EFI_SUCCESS The recovery file was successfully found on the\r
FAT volume.\r
\r
**/\r