]>
Commit | Line | Data |
---|---|---|
1e57a462 | 1 | /** @file\r |
2 | *\r | |
3 | * Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r | |
1e57a462 | 4 | *\r |
3402aac7 RC |
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 | |
1e57a462 | 12 | *\r |
13 | **/\r | |
14 | \r | |
15 | #ifndef __BDS_INTERNAL_H__\r | |
16 | #define __BDS_INTERNAL_H__\r | |
17 | \r | |
18 | #include <PiDxe.h>\r | |
19 | #include <Library/ArmLib.h>\r | |
20 | #include <Library/BaseLib.h>\r | |
21 | #include <Library/BaseMemoryLib.h>\r | |
22 | #include <Library/HobLib.h>\r | |
23 | #include <Library/UefiBootServicesTableLib.h>\r | |
24 | #include <Library/UefiLib.h>\r | |
25 | #include <Library/DevicePathLib.h>\r | |
26 | #include <Library/MemoryAllocationLib.h>\r | |
27 | #include <Library/DebugLib.h>\r | |
28 | #include <Library/BdsLib.h>\r | |
29 | #include <Library/PcdLib.h>\r | |
30 | #include <Library/PerformanceLib.h>\r | |
31 | #include <Library/PrintLib.h>\r | |
32 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
33 | \r | |
34 | #include <Guid/ArmMpCoreInfo.h>\r | |
35 | #include <Guid/GlobalVariable.h>\r | |
36 | #include <Guid/FileInfo.h>\r | |
37 | \r | |
38 | #include <Protocol/DevicePath.h>\r | |
39 | #include <Protocol/DevicePathFromText.h>\r | |
40 | #include <Protocol/SimpleFileSystem.h>\r | |
41 | #include <Protocol/FirmwareVolume2.h>\r | |
42 | #include <Protocol/LoadFile.h>\r | |
43 | #include <Protocol/PxeBaseCode.h>\r | |
44 | \r | |
45 | #include <Uefi.h>\r | |
46 | \r | |
47 | typedef BOOLEAN (*BDS_FILE_LOADER_SUPPORT) (\r | |
48 | IN EFI_DEVICE_PATH *DevicePath,\r | |
49 | IN EFI_HANDLE Handle,\r | |
50 | IN EFI_DEVICE_PATH *RemainingDevicePath\r | |
51 | );\r | |
52 | \r | |
53 | typedef EFI_STATUS (*BDS_FILE_LOADER_LOAD_IMAGE) (\r | |
54 | IN EFI_DEVICE_PATH *DevicePath,\r | |
55 | IN EFI_HANDLE Handle,\r | |
56 | IN EFI_DEVICE_PATH *RemainingDevicePath,\r | |
57 | IN EFI_ALLOCATE_TYPE Type,\r | |
58 | IN OUT EFI_PHYSICAL_ADDRESS* Image,\r | |
59 | OUT UINTN *ImageSize\r | |
60 | );\r | |
61 | \r | |
62 | typedef struct {\r | |
63 | BDS_FILE_LOADER_SUPPORT Support;\r | |
64 | BDS_FILE_LOADER_LOAD_IMAGE LoadImage;\r | |
65 | } BDS_FILE_LOADER;\r | |
66 | \r | |
67 | typedef struct _BDS_SYSTEM_MEMORY_RESOURCE {\r | |
68 | LIST_ENTRY Link; // This attribute must be the first entry of this structure (to avoid pointer computation)\r | |
69 | EFI_PHYSICAL_ADDRESS PhysicalStart;\r | |
70 | UINT64 ResourceLength;\r | |
71 | } BDS_SYSTEM_MEMORY_RESOURCE;\r | |
72 | \r | |
73 | \r | |
74 | // BdsHelper.c\r | |
75 | EFI_STATUS\r | |
76 | ShutdownUefiBootServices (\r | |
77 | VOID\r | |
78 | );\r | |
79 | \r | |
80 | EFI_STATUS\r | |
81 | GetSystemMemoryResources (\r | |
82 | LIST_ENTRY *ResourceList\r | |
83 | );\r | |
84 | \r | |
85 | VOID\r | |
86 | PrintPerformance (\r | |
87 | VOID\r | |
88 | );\r | |
89 | \r | |
90 | EFI_STATUS\r | |
91 | BdsLoadImage (\r | |
92 | IN EFI_DEVICE_PATH *DevicePath,\r | |
93 | IN EFI_ALLOCATE_TYPE Type,\r | |
94 | IN OUT EFI_PHYSICAL_ADDRESS* Image,\r | |
95 | OUT UINTN *FileSize\r | |
96 | );\r | |
97 | \r | |
98 | #endif\r |