+ EFI_STATUS Status;\r
+ CHAR16 StrStartingAddress[BOOT_DEVICE_ADDRESS_MAX];\r
+ CHAR16 StrEndingAddress[BOOT_DEVICE_ADDRESS_MAX];\r
+ MEMMAP_DEVICE_PATH* EndingDevicePath;\r
+ EFI_DEVICE_PATH* DevicePath;\r
+\r
+ DevicePath = DuplicateDevicePath (OldDevicePath);\r
+ EndingDevicePath = (MEMMAP_DEVICE_PATH*)GetLastDevicePathNode (DevicePath);\r
+\r
+ Print(L"Starting Address of the %s: ", FileName);\r
+ UnicodeSPrint (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX, L"0x%X", (UINTN)EndingDevicePath->StartingAddress);\r
+ Status = EditHIInputStr (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX);\r
+ if (EFI_ERROR(Status)) {\r
+ return EFI_ABORTED;\r
+ }\r
+\r
+ Print(L"Ending Address of the %s: ", FileName);\r
+ UnicodeSPrint (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX, L"0x%X", (UINTN)EndingDevicePath->EndingAddress);\r
+ Status = EditHIInputStr (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX);\r
+ if (EFI_ERROR(Status)) {\r
+ return EFI_ABORTED;\r
+ }\r
+\r
+ EndingDevicePath->StartingAddress = StrHexToUint64 (StrStartingAddress);\r
+ EndingDevicePath->EndingAddress = StrHexToUint64 (StrEndingAddress);\r
+\r
+ if (BootType != NULL || Attributes != NULL) {\r
+ Status = BootDeviceGetType (NULL, BootType, Attributes);\r
+ }\r
+\r
+ if (EFI_ERROR(Status)) {\r
+ FreePool(DevicePath);\r
+ } else {\r
+ *NewDevicePath = DevicePath;\r
+ }\r
+\r
+ return Status;\r