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