From 40d0673c2e3db10e47fd0742bf484c3d0aea2efe Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Wed, 15 Nov 2017 16:20:55 +0000 Subject: Platform/ARM: import BootMonFs and ArmShellCmdRunAxf from EDK2 BootMonFs and ArmShellCmdRunAxf are only used on development boards manufactured by ARM itself, so let's keep it under Platform/ARM where it belongs. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/ARM/Include/Guid/BootMonFsFileInfo.h | 47 ++++++++++++++++++++++ Platform/ARM/Include/Library/ArmShellCmdLib.h | 57 +++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 Platform/ARM/Include/Guid/BootMonFsFileInfo.h create mode 100644 Platform/ARM/Include/Library/ArmShellCmdLib.h (limited to 'Platform/ARM/Include') diff --git a/Platform/ARM/Include/Guid/BootMonFsFileInfo.h b/Platform/ARM/Include/Guid/BootMonFsFileInfo.h new file mode 100644 index 0000000000..c4d805c14f --- /dev/null +++ b/Platform/ARM/Include/Guid/BootMonFsFileInfo.h @@ -0,0 +1,47 @@ +/** @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 __BOOTMON_FS_FILE_INFO_H__ +#define __BOOTMON_FS_FILE_INFO_H__ + +#define BOOTMON_FS_FILE_INFO_ID \ + { \ + 0x41e26b9c, 0xada6, 0x45b3, {0x80, 0x8e, 0x23, 0x57, 0xa3, 0x5b, 0x60, 0xd6 } \ + } + +// From BootMonFS header file +#define BOOTMONFS_IMAGE_DESCRIPTION_REGION_MAX 4 + +typedef struct { + // The size of the structure. + UINT64 Size; + + // Subset of properties stored in the file meta-data. + UINT32 EntryPoint; + UINT32 RegionCount; + struct { + UINT32 LoadAddress; + UINT32 Size; + UINT32 Offset; + UINT32 Checksum; + } Region[BOOTMONFS_IMAGE_DESCRIPTION_REGION_MAX]; + +} BOOTMON_FS_FILE_INFO; + +#define SIZE_OF_BOOTMON_FS_FILE_INFO \ + OFFSET_OF (BOOTMON_FS_FILE_INFO, Region[BOOTMONFS_IMAGE_DESCRIPTION_REGION_MAX - 1].Checksum) + +extern EFI_GUID gArmBootMonFsFileInfoGuid; + +#endif // __BOOTMON_FS_FILE_INFO_H__ diff --git a/Platform/ARM/Include/Library/ArmShellCmdLib.h b/Platform/ARM/Include/Library/ArmShellCmdLib.h new file mode 100644 index 0000000000..eb31cd4053 --- /dev/null +++ b/Platform/ARM/Include/Library/ArmShellCmdLib.h @@ -0,0 +1,57 @@ +/** @file +* +* Definitions for the Dynamic Shell command library +* +* Copyright (C) 2014, ARM Ltd +* +* 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 _ARM_SHELL_CMD_LIB_H_ +#define _ARM_SHELL_CMD_LIB_H_ + +/** + + Initialize and Install EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL for RunAxf command. + + @param[in] ImageHandle Handle the protocol should be attached to. + + @retval EFI_SUCCESS The command has been installed successfully. + + @retval EFI_UNSUPPORTED Help for the command failed to initialise. + + @return Status code returned by InstallProtocolInterface + Boot Service function. + +**/ +EFI_STATUS +ShellDynCmdRunAxfInstall ( + IN EFI_HANDLE ImageHandle + ); + +/** + + Uninstall the RunAxf Command + + @param[in] ImageHandle Handle of the device where the protocol should have + been installed. + + @retval EFI_SUCCESS The device has been un-initialized successfully. + + @return Status code returned by UninstallProtocolInterface + Boot Service function. + +**/ +EFI_STATUS +ShellDynCmdRunAxfUninstall ( + IN EFI_HANDLE ImageHandle + ); + +#endif // _ARM_SHELL_CMD_LIB_H_ -- cgit v1.2.3