//\r
// Get the next device path\r
//\r
- CurrentDevicePath = EfiNextDevicePathNode (RemainingDevicePath);\r
- if (EfiIsDevicePathEnd (CurrentDevicePath)) {\r
+ CurrentDevicePath = NextDevicePathNode (RemainingDevicePath);\r
+ if (IsDevicePathEnd (CurrentDevicePath)) {\r
return EFI_SUCCESS;\r
}\r
\r
//\r
// Get the remaining device path for this PCI device, if it is a PCI device\r
//\r
- while (!EfiIsDevicePathEnd (CurrentDevicePath)) {\r
+ while (!IsDevicePathEnd (CurrentDevicePath)) {\r
\r
Node.DevPath = CurrentDevicePath;\r
\r
if ((Node.DevPath->Type != HARDWARE_DEVICE_PATH) ||\r
((Node.DevPath->SubType != HW_PCI_DP) &&\r
(DevicePathNodeLength (Node.DevPath) != sizeof (PCI_DEVICE_PATH)))) {\r
- CurrentDevicePath = EfiNextDevicePathNode (CurrentDevicePath);\r
+ CurrentDevicePath = NextDevicePathNode (CurrentDevicePath);\r
continue;\r
}\r
\r
//\r
// Check if it is not PCI device path\r
//\r
- if (EfiIsDevicePathEnd (CurrentDevicePath)) {\r
+ if (IsDevicePathEnd (CurrentDevicePath)) {\r
return EFI_NOT_FOUND;\r
}\r
\r
Node.DevPath = CurrentDevicePath;\r
Temp = NULL;\r
\r
- while (!EfiIsDevicePathEnd (CurrentDevicePath)) {\r
+ while (!IsDevicePathEnd (CurrentDevicePath)) {\r
\r
CurrentLink = RootBridge->ChildList.ForwardLink;\r
Node.DevPath = CurrentDevicePath;\r
\r
}\r
\r
- CurrentDevicePath = EfiNextDevicePathNode (CurrentDevicePath);\r
+ CurrentDevicePath = NextDevicePathNode (CurrentDevicePath);\r
}\r
\r
if (MisMatch) {\r
\r
- CurrentDevicePath = EfiNextDevicePathNode (CurrentDevicePath);\r
+ CurrentDevicePath = NextDevicePathNode (CurrentDevicePath);\r
\r
- if (EfiIsDevicePathEnd (CurrentDevicePath)) {\r
+ if (IsDevicePathEnd (CurrentDevicePath)) {\r
*PciAddress = EFI_PCI_ADDRESS (RootBridge->BusNumber, Node.Pci->Device, Node.Pci->Function, 0);\r
return EFI_SUCCESS;\r
}\r
SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf\r
S3Lib|IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf\r
RecoveryLib|IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf\r
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
\r
[LibraryClasses.common.PEIM]\r
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
}\r
\r
\r
-/**\r
- Computes and returns the size, in bytes, of a device path.\r
-\r
- @param DevicePath A pointer to a device path.\r
-\r
- @return The size, in bytes, of DevicePath.\r
-\r
-**/\r
-UINTN\r
-InternalReportStatusCodeDevicePathSize (\r
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- CONST EFI_DEVICE_PATH_PROTOCOL *Start;\r
-\r
- //\r
- // Search for the end of the device path structure\r
- //\r
- Start = DevicePath;\r
- while (!EfiIsDevicePathEnd (DevicePath)) {\r
- DevicePath = EfiNextDevicePathNode (DevicePath);\r
- }\r
-\r
- //\r
- // Subtract the start node from the end node and add in the size of the end node\r
- //\r
- return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath);\r
-}\r
-\r
-\r
/**\r
Converts a status code to an 8-bit POST code value.\r
\r
)\r
{\r
ASSERT (DevicePath != NULL);\r
- return ReportStatusCodeWithExtendedData (\r
- Type,\r
- Value,\r
- (VOID *)DevicePath,\r
- InternalReportStatusCodeDevicePathSize (DevicePath)\r
- );\r
+ \r
+ //\r
+ // this function can *not* be implemented for BASE library.\r
+ //\r
+ ASSERT (FALSE);\r
+ return EFI_UNSUPPORTED;\r
}\r
\r
\r
UefiBootServicesTableLib\r
DebugLib\r
UefiRuntimeServicesTableLib\r
-\r
+ DevicePathLib\r
\r
[Guids]\r
gEfiStatusCodeSpecificDataGuid # ALWAYS_CONSUMED\r
// Search for the end of the device path structure\r
//\r
Start = DevicePath;\r
- while (!EfiIsDevicePathEnd (DevicePath)) {\r
- DevicePath = EfiNextDevicePathNode (DevicePath);\r
+ while (!IsDevicePathEnd (DevicePath)) {\r
+ DevicePath = NextDevicePathNode (DevicePath);\r
}\r
\r
//\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/PcdLib.h>\r
#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/DevicePathLib.h>\r
\r
#include <Guid/StatusCodeDataTypeId.h>\r
#include <Protocol/StatusCode.h>\r
// Search for the end of the device path structure\r
//\r
Start = DevicePath;\r
- while (!EfiIsDevicePathEnd (DevicePath)) {\r
- DevicePath = EfiNextDevicePathNode (DevicePath);\r
+ while (!IsDevicePathEnd (DevicePath)) {\r
+ DevicePath = NextDevicePathNode (DevicePath);\r
}\r
\r
//\r
#include <Library/PcdLib.h>\r
#include <Library/UefiRuntimeServicesTableLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/DevicePathLib.h>\r
\r
#include <Guid/StatusCodeDataTypeId.h>\r
#include <Protocol/StatusCode.h>\r