Use the command to load and start a ARM Executable File from mass storage. This is basically just an ELF file. The program is copied to memory and the Entrypoint is called. Control is not expected to return back to the Shell. This has only been tested on AArch64 with a limited set of AXF binaries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16247 6f19259b-4bc3-4df7-8a09-765794883524
67 lines
2.1 KiB
C
67 lines
2.1 KiB
C
/** @file
|
|
*
|
|
* Copyright (c) 2014, ARM Ltd. All rights reserved.
|
|
*
|
|
* This program and the accompanying materials are licensed and made available
|
|
* under the terms and conditions of the BSD License which accompanies this
|
|
* distribution. The full text of the license may be found at
|
|
* http://opensource.org/licenses/bsd-license.php
|
|
*
|
|
* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
*
|
|
**/
|
|
|
|
#ifndef __BOOTMONFS_LOADER_H__
|
|
#define __BOOTMONFS_LOADER_H__
|
|
|
|
/**
|
|
Check that loading the file is supported.
|
|
|
|
Not all information is checked, only the properties that matters to us in
|
|
our simplified loader.
|
|
|
|
BootMonFS file properties is not in a file header but in the file-system
|
|
metadata, so we need to pass a handle to the file to allow access to the
|
|
information.
|
|
|
|
@param[in] FileHandle Handle of the file to check.
|
|
|
|
@retval EFI_SUCCESS on success.
|
|
@retval EFI_INVALID_PARAMETER if the header is invalid.
|
|
@retval EFI_UNSUPPORTED if the file type/platform is not supported.
|
|
**/
|
|
EFI_STATUS
|
|
BootMonFsCheckFile (
|
|
IN CONST EFI_FILE_HANDLE FileHandle
|
|
);
|
|
|
|
/**
|
|
Load a binary file from BootMonFS.
|
|
|
|
@param[in] FileHandle Handle of the file to load.
|
|
|
|
@param[in] FileData Address of the file data in memory.
|
|
|
|
@param[out] EntryPoint Will be filled with the ELF entry point address.
|
|
|
|
@param[out] ImageSize Will be filled with the file size in memory. This
|
|
will effectively be equal to the sum of the load
|
|
region sizes.
|
|
|
|
This function assumes the file is valid and supported as checked with
|
|
BootMonFsCheckFile().
|
|
|
|
@retval EFI_SUCCESS on success.
|
|
@retval EFI_INVALID_PARAMETER if the file is invalid.
|
|
**/
|
|
EFI_STATUS
|
|
BootMonFsLoadFile (
|
|
IN CONST EFI_FILE_HANDLE FileHandle,
|
|
IN CONST VOID *FileData,
|
|
OUT VOID **EntryPoint,
|
|
OUT LIST_ENTRY *LoadList
|
|
);
|
|
|
|
#endif // __BOOTMONFS_LOADER_H__
|