IN LIST_ENTRY *BootOptionsList\r
)\r
{\r
- EFI_STATUS Status;\r
-\r
- BDS_SUPPORTED_DEVICE *SupportedBootDevice;\r
- EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode;\r
- EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;\r
+ EFI_STATUS Status;\r
+ UINTN FdtDevicePathSize;\r
+ BDS_SUPPORTED_DEVICE *SupportedBootDevice;\r
+ EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode;\r
+ EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;\r
\r
Status = SelectBootDevice (&SupportedBootDevice);\r
if (EFI_ERROR(Status)) {\r
}\r
\r
// Create the specific device path node\r
- Print(L"File path of the FDT blob: ");\r
- Status = SupportedBootDevice->Support->CreateDevicePathNode (SupportedBootDevice, &FdtDevicePathNode, NULL, NULL);\r
+ Status = SupportedBootDevice->Support->CreateDevicePathNode (L"FDT blob", &FdtDevicePathNode, NULL, NULL);\r
if (EFI_ERROR(Status)) {\r
Status = EFI_ABORTED;\r
goto EXIT;\r
if (FdtDevicePathNode != NULL) {\r
// Append the Device Path node to the select device path\r
FdtDevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNode);\r
- Status = gRT->SetVariable ((CHAR16*)L"FDT", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 4, &FdtDevicePath);\r
+ FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);\r
+ Status = gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), FdtDevicePathSize, FdtDevicePath);\r
ASSERT_EFI_ERROR(Status);\r
} else {\r
- gRT->SetVariable ((CHAR16*)L"FDT", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);\r
+ gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);\r
ASSERT_EFI_ERROR(Status);\r
}\r
\r