]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/BdsLib/BdsInternal.h
af690495768922b68b50c6c1d29491a6d1af51a9
[mirror_edk2.git] / ArmPkg / Library / BdsLib / BdsInternal.h
1 /** @file
2 *
3 * Copyright (c) 2011, 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 __BDS_INTERNAL_H__
16 #define __BDS_INTERNAL_H__
17
18 #include <PiDxe.h>
19 #include <Library/BaseLib.h>
20 #include <Library/BaseMemoryLib.h>
21 #include <Library/UefiBootServicesTableLib.h>
22 #include <Library/UefiLib.h>
23 #include <Library/DevicePathLib.h>
24 #include <Library/MemoryAllocationLib.h>
25 #include <Library/DebugLib.h>
26 #include <Library/BdsLib.h>
27 #include <Library/PerformanceLib.h>
28
29 #include <Guid/FileInfo.h>
30
31 #include <Protocol/DevicePath.h>
32 #include <Protocol/DevicePathFromText.h>
33 #include <Protocol/SimpleFileSystem.h>
34 #include <Protocol/FirmwareVolume2.h>
35 #include <Protocol/LoadFile.h>
36 #include <Protocol/PxeBaseCode.h>
37
38
39 typedef BOOLEAN (*BDS_FILE_LOADER_SUPPORT) (
40 IN EFI_DEVICE_PATH *DevicePath,
41 IN EFI_HANDLE Handle,
42 IN EFI_DEVICE_PATH *RemainingDevicePath
43 );
44
45 typedef EFI_STATUS (*BDS_FILE_LOADER_LOAD_IMAGE) (
46 IN EFI_DEVICE_PATH *DevicePath,
47 IN EFI_HANDLE Handle,
48 IN EFI_DEVICE_PATH *RemainingDevicePath,
49 IN EFI_ALLOCATE_TYPE Type,
50 IN OUT EFI_PHYSICAL_ADDRESS* Image,
51 OUT UINTN *ImageSize
52 );
53
54 typedef struct {
55 BDS_FILE_LOADER_SUPPORT Support;
56 BDS_FILE_LOADER_LOAD_IMAGE LoadImage;
57 } BDS_FILE_LOADER;
58
59 typedef struct _BDS_SYSTEM_MEMORY_RESOURCE {
60 LIST_ENTRY Link; // This attribute must be the first entry of this structure (to avoid pointer computation)
61 EFI_PHYSICAL_ADDRESS PhysicalStart;
62 UINT64 ResourceLength;
63 } BDS_SYSTEM_MEMORY_RESOURCE;
64
65
66 // BdsHelper.c
67 EFI_STATUS
68 ShutdownUefiBootServices (
69 VOID
70 );
71
72 EFI_STATUS
73 GetSystemMemoryResources (
74 LIST_ENTRY *ResourceList
75 );
76
77 VOID
78 PrintPerformance (
79 VOID
80 );
81 EFI_STATUS
82 BdsLoadImage (
83 IN EFI_DEVICE_PATH *DevicePath,
84 IN EFI_ALLOCATE_TYPE Type,
85 IN OUT EFI_PHYSICAL_ADDRESS* Image,
86 OUT UINTN *FileSize
87 );
88
89 #endif