]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h
ArmPlatformPkg: remove ArmPlatformSysConfigLib library class
[mirror_edk2.git] / ArmPlatformPkg / FileSystem / BootMonFs / BootMonFsInternal.h
CommitLineData
94e0955d
OM
1/** @file\r
2*\r
3* Copyright (c) 2012-2014, ARM Limited. All rights reserved.\r
4*\r
5* This program and the accompanying materials\r
6* are licensed and made available under the terms and conditions of the BSD License\r
7* which accompanies this distribution. The full text of the license may be found at\r
8* http://opensource.org/licenses/bsd-license.php\r
9*\r
10* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12*\r
13**/\r
14\r
15#ifndef __BOOTMONFS_INTERNAL_H__\r
16#define __BOOTMONFS_INTERNAL_H__\r
17\r
18#include <PiDxe.h>\r
19#include <Library/UefiLib.h>\r
20#include <Library/DebugLib.h>\r
21#include <Library/BaseMemoryLib.h>\r
22#include <Library/MemoryAllocationLib.h>\r
23\r
24#include <Protocol/BlockIo.h>\r
25#include <Protocol/DiskIo.h>\r
26#include <Protocol/FirmwareVolumeBlock.h>\r
27#include <Protocol/SimpleFileSystem.h>\r
28\r
da5daf36 29#include <Guid/BootMonFsFileInfo.h>\r
94e0955d
OM
30#include <Guid/FileInfo.h>\r
31#include <Guid/FileSystemInfo.h>\r
32#include <Guid/FileSystemVolumeLabelInfo.h>\r
33\r
34#include "BootMonFsHw.h"\r
35\r
36#define BOOTMON_FS_VOLUME_LABEL L"NOR Flash"\r
37\r
38typedef struct _BOOTMON_FS_INSTANCE BOOTMON_FS_INSTANCE;\r
39\r
40typedef struct {\r
41 LIST_ENTRY Link;\r
42 VOID* Buffer;\r
43 UINTN Size;\r
44 UINT64 Offset; // Offset from the start of the file\r
45} BOOTMON_FS_FILE_REGION;\r
46\r
47typedef struct {\r
48 UINT32 Signature;\r
49 LIST_ENTRY Link;\r
50 BOOTMON_FS_INSTANCE *Instance;\r
51\r
79e12331 52 UINTN HwDescAddress;\r
94e0955d
OM
53 HW_IMAGE_DESCRIPTION HwDescription;\r
54\r
55 EFI_FILE_PROTOCOL File;\r
56\r
95204533
RC
57 //\r
58 // The following fields are relevant only if the file is open.\r
59 //\r
60\r
61 EFI_FILE_INFO *Info;\r
94e0955d 62 UINT64 Position;\r
95204533
RC
63 // If the file needs to be flushed then this list contain the memory\r
64 // buffer that creates this file\r
94e0955d
OM
65 LIST_ENTRY RegionToFlushLink;\r
66 UINT64 OpenMode;\r
67} BOOTMON_FS_FILE;\r
68\r
69#define BOOTMON_FS_FILE_SIGNATURE SIGNATURE_32('b', 'o', 't', 'f')\r
70#define BOOTMON_FS_FILE_FROM_FILE_THIS(a) CR (a, BOOTMON_FS_FILE, File, BOOTMON_FS_FILE_SIGNATURE)\r
71#define BOOTMON_FS_FILE_FROM_LINK_THIS(a) CR (a, BOOTMON_FS_FILE, Link, BOOTMON_FS_FILE_SIGNATURE)\r
72\r
73struct _BOOTMON_FS_INSTANCE {\r
74 UINT32 Signature;\r
75 EFI_HANDLE ControllerHandle;\r
76\r
77 LIST_ENTRY Link;\r
78\r
79 EFI_DRIVER_BINDING_PROTOCOL *Binding;\r
80 EFI_DISK_IO_PROTOCOL *DiskIo;\r
81 EFI_BLOCK_IO_PROTOCOL *BlockIo;\r
82 EFI_BLOCK_IO_MEDIA *Media;\r
83 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
84\r
85 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL Fs;\r
86\r
87 EFI_FILE_SYSTEM_INFO FsInfo;\r
88 CHAR16 Label[20];\r
89\r
90 BOOTMON_FS_FILE *RootFile; // All the other files are linked to this root\r
91 BOOLEAN Initialized;\r
92};\r
93\r
94#define BOOTMON_FS_SIGNATURE SIGNATURE_32('b', 'o', 't', 'm')\r
95#define BOOTMON_FS_FROM_FS_THIS(a) CR (a, BOOTMON_FS_INSTANCE, Fs, BOOTMON_FS_SIGNATURE)\r
96#define BOOTMON_FS_FROM_LINK(a) CR (a, BOOTMON_FS_INSTANCE, Link, BOOTMON_FS_SIGNATURE)\r
97\r
98#include "BootMonFsApi.h"\r
99\r
100#endif\r
101\r