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
This commit is contained in:
oliviermartin 2011-11-01 23:44:05 +00:00
parent 22a262c8ee
commit c0658bd6b8
2 changed files with 10 additions and 10 deletions

View File

@ -486,7 +486,7 @@ UpdateFdtPath (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINTN FdtDevicePathSize;
BDS_SUPPORTED_DEVICE *SupportedBootDevice; BDS_SUPPORTED_DEVICE *SupportedBootDevice;
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode; EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode;
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath; EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;
@ -498,8 +498,7 @@ UpdateFdtPath (
} }
// Create the specific device path node // Create the specific device path node
Print(L"File path of the FDT blob: "); Status = SupportedBootDevice->Support->CreateDevicePathNode (L"FDT blob", &FdtDevicePathNode, NULL, NULL);
Status = SupportedBootDevice->Support->CreateDevicePathNode (SupportedBootDevice, &FdtDevicePathNode, NULL, NULL);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
Status = EFI_ABORTED; Status = EFI_ABORTED;
goto EXIT; goto EXIT;
@ -508,10 +507,11 @@ UpdateFdtPath (
if (FdtDevicePathNode != NULL) { if (FdtDevicePathNode != NULL) {
// Append the Device Path node to the select device path // Append the Device Path node to the select device path
FdtDevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNode); 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); ASSERT_EFI_ERROR(Status);
} else { } 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); ASSERT_EFI_ERROR(Status);
} }

View File

@ -75,7 +75,7 @@ BootOptionStart (
// Get the FDT device path // Get the FDT device path
FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath); FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);
Status = GetEnvironmentVariable ((CHAR16 *)L"FDT", DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath); Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);
ASSERT_EFI_ERROR(Status); ASSERT_EFI_ERROR(Status);
Status = BdsBootLinuxFdt (BootOption->FilePathList, Status = BdsBootLinuxFdt (BootOption->FilePathList,