)\r
{\r
EFI_STATUS Status;\r
- EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol;\r
UINT32 LoaderType;\r
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;\r
ARM_BDS_LINUX_ARGUMENTS* LinuxArguments;\r
- EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath;\r
- EFI_DEVICE_PATH_PROTOCOL* DefaultFdtDevicePath;\r
- UINTN FdtDevicePathSize;\r
UINTN CmdLineSize;\r
UINTN InitrdSize;\r
EFI_DEVICE_PATH* Initrd;\r
} else {\r
Initrd = NULL;\r
}\r
-\r
- // Get the default FDT device path\r
- Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);\r
- ASSERT_EFI_ERROR(Status);\r
- DefaultFdtDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtDevicePath));\r
-\r
- // Get the FDT device path\r
- FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);\r
- Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,\r
- DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);\r
- ASSERT_EFI_ERROR(Status);\r
-\r
- Status = BdsBootLinuxFdt (BootOption->FilePathList,\r
- Initrd, // Initrd\r
- (CHAR8*)(LinuxArguments + 1),\r
- FdtDevicePath);\r
-\r
- FreePool (DefaultFdtDevicePath);\r
- FreePool (FdtDevicePath);\r
+ Status = BdsBootLinuxFdt (\r
+ BootOption->FilePathList,\r
+ Initrd,\r
+ (CHAR8*)(LinuxArguments + 1)\r
+ );\r
}\r
} else {\r
// Connect all the drivers if the EFI Application is not a EFI OS Loader\r
IN UINTN OptionalDataSize\r
)\r
{\r
- EFI_LOAD_OPTION EfiLoadOption;\r
+ EFI_LOAD_OPTION *EfiLoadOption;\r
UINTN EfiLoadOptionSize;\r
UINTN BootDescriptionSize;\r
UINT16 FilePathListLength;\r
\r
// Allocate the memory for the EFI Load Option\r
EfiLoadOptionSize = sizeof(UINT32) + sizeof(UINT16) + BootDescriptionSize + FilePathListLength + OptionalDataSize;\r
- EfiLoadOption = (EFI_LOAD_OPTION)AllocatePool(EfiLoadOptionSize);\r
- EfiLoadOptionPtr = EfiLoadOption;\r
+ EfiLoadOption = (EFI_LOAD_OPTION *)AllocatePool(EfiLoadOptionSize);\r
+ EfiLoadOptionPtr = (UINT8 *)EfiLoadOption;\r
\r
//\r
// Populate the EFI Load Option and BDS Boot Option structures\r