summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds/BootMenu.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-01 23:44:05 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-01 23:44:05 +0000
commitc0658bd6b811479b2b502a6dd07839911f0c0bd1 (patch)
treeae943fb7600330e6bd137ee90d9c72b13718f3c3 /ArmPlatformPkg/Bds/BootMenu.c
parent22a262c8eeace5e5e7e3e812a0b30ac49ea5b811 (diff)
downloadedk2-platforms-c0658bd6b811479b2b502a6dd07839911f0c0bd1.tar.xz
ArmPlatformPkg/Bds: Fix the Boot Manager option to set the FDT device path
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12642 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootMenu.c')
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 315fc953f5..8202f9991c 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -485,11 +485,11 @@ UpdateFdtPath (
IN LIST_ENTRY *BootOptionsList
)
{
- EFI_STATUS Status;
-
- BDS_SUPPORTED_DEVICE *SupportedBootDevice;
- EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode;
- EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;
+ EFI_STATUS Status;
+ UINTN FdtDevicePathSize;
+ BDS_SUPPORTED_DEVICE *SupportedBootDevice;
+ EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode;
+ EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;
Status = SelectBootDevice (&SupportedBootDevice);
if (EFI_ERROR(Status)) {
@@ -498,8 +498,7 @@ UpdateFdtPath (
}
// Create the specific device path node
- Print(L"File path of the FDT blob: ");
- Status = SupportedBootDevice->Support->CreateDevicePathNode (SupportedBootDevice, &FdtDevicePathNode, NULL, NULL);
+ Status = SupportedBootDevice->Support->CreateDevicePathNode (L"FDT blob", &FdtDevicePathNode, NULL, NULL);
if (EFI_ERROR(Status)) {
Status = EFI_ABORTED;
goto EXIT;
@@ -508,10 +507,11 @@ UpdateFdtPath (
if (FdtDevicePathNode != NULL) {
// Append the Device Path node to the select device path
FdtDevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNode);
- Status = gRT->SetVariable ((CHAR16*)L"FDT", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 4, &FdtDevicePath);
+ FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);
+ Status = gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), FdtDevicePathSize, FdtDevicePath);
ASSERT_EFI_ERROR(Status);
} else {
- gRT->SetVariable ((CHAR16*)L"FDT", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);
+ gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);
ASSERT_EFI_ERROR(Status);
}