3 * Copyright (c) 2014, ARM Ltd. All rights reserved.
5 * This program and the accompanying materials are licensed and made available
6 * under the terms and conditions of the BSD License which accompanies this
7 * distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __BOOTMONFS_LOADER_H__
16 #define __BOOTMONFS_LOADER_H__
19 Check that loading the file is supported.
21 Not all information is checked, only the properties that matters to us in
22 our simplified loader.
24 BootMonFS file properties is not in a file header but in the file-system
25 metadata, so we need to pass a handle to the file to allow access to the
28 @param[in] FileHandle Handle of the file to check.
30 @retval EFI_SUCCESS on success.
31 @retval EFI_INVALID_PARAMETER if the header is invalid.
32 @retval EFI_UNSUPPORTED if the file type/platform is not supported.
36 IN CONST EFI_FILE_HANDLE FileHandle
40 Load a binary file from BootMonFS.
42 @param[in] FileHandle Handle of the file to load.
44 @param[in] FileData Address of the file data in memory.
46 @param[out] EntryPoint Will be filled with the ELF entry point address.
48 @param[out] ImageSize Will be filled with the file size in memory. This
49 will effectively be equal to the sum of the load
52 This function assumes the file is valid and supported as checked with
55 @retval EFI_SUCCESS on success.
56 @retval EFI_INVALID_PARAMETER if the file is invalid.
60 IN CONST EFI_FILE_HANDLE FileHandle
,
61 IN CONST VOID
*FileData
,
62 OUT VOID
**EntryPoint
,
63 OUT LIST_ENTRY
*LoadList
66 #endif // __BOOTMONFS_LOADER_H__