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