\r
EFI_STATUS\r
BdsFileSystemLoadImage (\r
- IN EFI_DEVICE_PATH *DevicePath,\r
+ IN OUT EFI_DEVICE_PATH **DevicePath,\r
IN EFI_HANDLE Handle,\r
IN EFI_DEVICE_PATH *RemainingDevicePath,\r
IN EFI_ALLOCATE_TYPE Type,\r
\r
EFI_STATUS\r
BdsMemoryMapLoadImage (\r
- IN EFI_DEVICE_PATH *DevicePath,\r
- IN EFI_HANDLE Handle,\r
- IN EFI_DEVICE_PATH *RemainingDevicePath,\r
+ IN OUT EFI_DEVICE_PATH **DevicePath,\r
+ IN EFI_HANDLE Handle,\r
+ IN EFI_DEVICE_PATH *RemainingDevicePath,\r
IN EFI_ALLOCATE_TYPE Type,\r
IN OUT EFI_PHYSICAL_ADDRESS* Image,\r
OUT UINTN *ImageSize\r
if (IS_DEVICE_PATH_NODE (RemainingDevicePath, HARDWARE_DEVICE_PATH, HW_MEMMAP_DP)) {\r
MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)RemainingDevicePath;\r
} else {\r
- ASSERT (IS_DEVICE_PATH_NODE (DevicePath, HARDWARE_DEVICE_PATH, HW_MEMMAP_DP));\r
- MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)DevicePath;\r
+ ASSERT (IS_DEVICE_PATH_NODE (*DevicePath, HARDWARE_DEVICE_PATH, HW_MEMMAP_DP));\r
+ MemMapPathDevicePath = (MEMMAP_DEVICE_PATH*)*DevicePath;\r
}\r
\r
Size = MemMapPathDevicePath->EndingAddress - MemMapPathDevicePath->StartingAddress;\r
\r
EFI_STATUS\r
BdsFirmwareVolumeLoadImage (\r
- IN EFI_DEVICE_PATH *DevicePath,\r
- IN EFI_HANDLE Handle,\r
- IN EFI_DEVICE_PATH *RemainingDevicePath,\r
+ IN OUT EFI_DEVICE_PATH **DevicePath,\r
+ IN EFI_HANDLE Handle,\r
+ IN EFI_DEVICE_PATH *RemainingDevicePath,\r
IN EFI_ALLOCATE_TYPE Type,\r
IN OUT EFI_PHYSICAL_ADDRESS* Image,\r
OUT UINTN *ImageSize\r
\r
EFI_STATUS\r
BdsPxeLoadImage (\r
- IN EFI_DEVICE_PATH* DevicePath,\r
- IN EFI_HANDLE Handle,\r
- IN EFI_DEVICE_PATH* RemainingDevicePath,\r
- IN EFI_ALLOCATE_TYPE Type,\r
- IN OUT EFI_PHYSICAL_ADDRESS *Image,\r
- OUT UINTN *ImageSize\r
+ IN OUT EFI_DEVICE_PATH **DevicePath,\r
+ IN EFI_HANDLE Handle,\r
+ IN EFI_DEVICE_PATH *RemainingDevicePath,\r
+ IN EFI_ALLOCATE_TYPE Type,\r
+ IN OUT EFI_PHYSICAL_ADDRESS* Image,\r
+ OUT UINTN *ImageSize\r
)\r
{\r
EFI_STATUS Status;\r
return Status;\r
}\r
\r
- Status = LoadFileProtocol->LoadFile (LoadFileProtocol, DevicePath, TRUE, &BufferSize, NULL);\r
+ Status = LoadFileProtocol->LoadFile (LoadFileProtocol, *DevicePath, TRUE, &BufferSize, NULL);\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
Status = gBS->AllocatePages (Type, EfiBootServicesCode, EFI_SIZE_TO_PAGES(BufferSize), Image);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
\r
- Status = LoadFileProtocol->LoadFile (LoadFileProtocol, DevicePath, TRUE, &BufferSize, (VOID*)(UINTN)(*Image));\r
+ Status = LoadFileProtocol->LoadFile (LoadFileProtocol, *DevicePath, TRUE, &BufferSize, (VOID*)(UINTN)(*Image));\r
if (!EFI_ERROR (Status) && (ImageSize != NULL)) {\r
*ImageSize = BufferSize;\r
}\r
**/\r
EFI_STATUS\r
BdsTftpLoadImage (\r
- IN EFI_DEVICE_PATH* DevicePath,\r
- IN EFI_HANDLE ControllerHandle,\r
- IN EFI_DEVICE_PATH* RemainingDevicePath,\r
- IN EFI_ALLOCATE_TYPE Type,\r
- IN OUT EFI_PHYSICAL_ADDRESS *Image,\r
- OUT UINTN *ImageSize\r
+ IN OUT EFI_DEVICE_PATH **DevicePath,\r
+ IN EFI_HANDLE ControllerHandle,\r
+ IN EFI_DEVICE_PATH *RemainingDevicePath,\r
+ IN EFI_ALLOCATE_TYPE Type,\r
+ IN OUT EFI_PHYSICAL_ADDRESS *Image,\r
+ OUT UINTN *ImageSize\r
)\r
{\r
EFI_STATUS Status;\r
FileLoader = FileLoaders;\r
while (FileLoader->Support != NULL) {\r
if (FileLoader->Support (*DevicePath, Handle, RemainingDevicePath)) {\r
- return FileLoader->LoadImage (*DevicePath, Handle, RemainingDevicePath, Type, Image, FileSize);\r
+ return FileLoader->LoadImage (DevicePath, Handle, RemainingDevicePath, Type, Image, FileSize);\r
}\r
FileLoader++;\r
}\r
/** @file\r
*\r
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2015, ARM Limited. All rights reserved.\r
*\r
* This program and the accompanying materials\r
* are licensed and made available under the terms and conditions of the BSD License\r
\r
#include <Uefi.h>\r
\r
+/**\r
+ * Check if the file loader can support this device path.\r
+ *\r
+ * @param DevicePath EFI Device Path of the image to load.\r
+ * This device path generally comes from the boot entry (ie: Boot####).\r
+ * @param Handle Handle of the driver supporting the device path\r
+ * @param RemainingDevicePath Part of the EFI Device Path that has not been resolved during\r
+ * the Device Path discovery\r
+ */\r
typedef BOOLEAN (*BDS_FILE_LOADER_SUPPORT) (\r
IN EFI_DEVICE_PATH *DevicePath,\r
IN EFI_HANDLE Handle,\r
IN EFI_DEVICE_PATH *RemainingDevicePath\r
);\r
\r
+/**\r
+ * Function to load an image from a given Device Path for a\r
+ * specific support (FileSystem, TFTP, PXE, ...)\r
+ *\r
+ * @param DevicePath EFI Device Path of the image to load.\r
+ * This device path generally comes from the boot entry (ie: Boot####).\r
+ * This path is also defined as 'OUT' as there are some device paths that\r
+ * might not be completed such as EFI path for removable device. In these\r
+ * cases, it is expected the loader to add \EFI\BOOT\BOOT(ARM|AA64).EFI\r
+ * @param Handle Handle of the driver supporting the device path\r
+ * @param RemainingDevicePath Part of the EFI Device Path that has not been resolved during\r
+ * the Device Path discovery\r
+ * @param Type Define where the image should be loaded (see EFI_ALLOCATE_TYPE definition)\r
+ * @param Image Base Address of the image has been loaded\r
+ * @param ImageSize Size of the image that has been loaded\r
+ */\r
typedef EFI_STATUS (*BDS_FILE_LOADER_LOAD_IMAGE) (\r
- IN EFI_DEVICE_PATH *DevicePath,\r
+ IN OUT EFI_DEVICE_PATH **DevicePath,\r
IN EFI_HANDLE Handle,\r
IN EFI_DEVICE_PATH *RemainingDevicePath,\r
IN EFI_ALLOCATE_TYPE Type,\r