]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsHw.h
ArmPlatformPkg/BootMonFs: Added support for the NorFlash File System of the ARM Devel...
[mirror_edk2.git] / ArmPlatformPkg / FileSystem / BootMonFs / BootMonFsHw.h
1 /** @file
2 *
3 * Copyright (c) 2012-2014, ARM Limited. All rights reserved.
4 *
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
9 *
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 *
13 **/
14
15 #ifndef __BOOTMON_FS_HW_H__
16 #define __BOOTMON_FS_HW_H__
17
18 #define MAX_NAME_LENGTH 32
19
20 #define HW_IMAGE_FOOTER_SIGNATURE_1 0x464C5348
21 #define HW_IMAGE_FOOTER_SIGNATURE_2 0x464F4F54
22 #define HW_IMAGE_FOOTER_VERSION 1
23 #define HW_IMAGE_FOOTER_OFFSET 92
24
25 typedef struct {
26 CHAR8 Filename[MAX_NAME_LENGTH];
27 UINT32 Offset;
28 UINT32 Version;
29 UINT32 FooterSignature1;
30 UINT32 FooterSignature2;
31 } HW_IMAGE_FOOTER;
32
33 #define HW_IMAGE_DESCRIPTION_REGION_MAX 4
34
35 // This structure is located at the end of a block when a file is present
36 typedef struct {
37 UINT32 EntryPoint;
38 UINT32 Attributes;
39 UINT32 RegionCount;
40 struct {
41 UINT32 LoadAddress;
42 UINT32 Size;
43 UINT32 Offset;
44 UINT32 Checksum;
45 } Region[HW_IMAGE_DESCRIPTION_REGION_MAX];
46 UINT32 BlockStart;
47 UINT32 BlockEnd;
48 UINT32 FooterChecksum;
49
50 HW_IMAGE_FOOTER Footer;
51 } HW_IMAGE_DESCRIPTION;
52
53 #endif