VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxGenericBdsLib/InternalBdsLib.h@ 48674

Last change on this file since 48674 was 48674, checked in by vboxsync, 12 years ago

EFI: Export newly imported tinaocore UEFI sources to OSE.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1/* $Id: InternalBdsLib.h 48674 2013-09-25 08:26:15Z vboxsync $ */
2/** @file
3 * InternalBdsLib.h - BDS library definition, include the file and data structure
4 */
5
6/*
7 * Copyright (C) 2010 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27/*
28
29This code is based on:
30
31Copyright (c) 2004 - 2009, Intel Corporation. <BR>
32All rights reserved. This program and the accompanying materials
33are licensed and made available under the terms and conditions of the BSD License
34which accompanies this distribution. The full text of the license may be found at
35http://opensource.org/licenses/bsd-license.php
36
37THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
38WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
39
40*/
41
42#ifndef _INTERNAL_BDS_LIB_H_
43#define _INTERNAL_BDS_LIB_H_
44
45#include <FrameworkDxe.h>
46
47#include <IndustryStandard/Pci.h>
48#include <IndustryStandard/PeImage.h>
49
50#include <Protocol/BlockIo.h>
51#include <Protocol/LoadedImage.h>
52#include <Protocol/Cpu.h>
53#include <Protocol/SimpleFileSystem.h>
54#include <Protocol/DebugPort.h>
55#include <Protocol/DevicePath.h>
56#include <Protocol/SimpleTextIn.h>
57#include <Protocol/LegacyBios.h>
58#include <Protocol/SimpleTextOut.h>
59#include <Protocol/SimpleNetwork.h>
60#include <Protocol/DevicePathToText.h>
61#include <Protocol/FirmwareVolume2.h>
62#include <Protocol/PciIo.h>
63#include <Protocol/AcpiS3Save.h>
64#include <Protocol/OEMBadging.h>
65#include <Protocol/GraphicsOutput.h>
66#include <Protocol/UgaDraw.h>
67#include <Protocol/HiiFont.h>
68#include <Protocol/HiiImage.h>
69#include <Protocol/Security.h>
70
71#include <Guid/MemoryTypeInformation.h>
72#include <Guid/FileInfo.h>
73#include <Guid/GlobalVariable.h>
74#include <Guid/PcAnsi.h>
75#include <Guid/Performance.h>
76
77#include <Library/PrintLib.h>
78#include <Library/DebugLib.h>
79#include <Library/BaseMemoryLib.h>
80#include <Library/UefiBootServicesTableLib.h>
81#include <Library/UefiLib.h>
82#include <Library/MemoryAllocationLib.h>
83#include <Library/DxeServicesTableLib.h>
84#include <Library/UefiRuntimeServicesTableLib.h>
85#include <Library/HobLib.h>
86#include <Library/BaseLib.h>
87#include <Library/DevicePathLib.h>
88#include <Library/PerformanceLib.h>
89#include <Library/PcdLib.h>
90#include <Library/PeCoffGetEntryPointLib.h>
91#include <Library/GenericBdsLib.h>
92#include <Library/TimerLib.h>
93#include <Library/PcdLib.h>
94#include <Library/DxeServicesLib.h>
95
96#if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)
97 #if defined (MDE_CPU_EBC)
98 //
99 // Uefi specification only defines the default boot file name for IA32, X64
100 // and IPF processor, so need define boot file name for EBC architecture here.
101 //
102 #define EFI_REMOVABLE_MEDIA_FILE_NAME L"\\EFI\\BOOT\\BOOTEBC.EFI"
103 #else
104 #error "Can not determine the default boot file name for unknown processor type!"
105 #endif
106#endif
107
108/**
109
110 Allocates a block of memory and writes performance data of booting into it.
111 OS can processing these record.
112
113**/
114VOID
115WriteBootToOsPerformanceData (
116 VOID
117 );
118
119/**
120 Get the headers (dos, image, optional header) from an image
121
122 @param Device SimpleFileSystem device handle
123 @param FileName File name for the image
124 @param DosHeader Pointer to dos header
125 @param Hdr The buffer in which to return the PE32, PE32+, or TE header.
126
127 @retval EFI_SUCCESS Successfully get the machine type.
128 @retval EFI_NOT_FOUND The file is not found.
129 @retval EFI_LOAD_ERROR File is not a valid image file.
130
131**/
132EFI_STATUS
133EFIAPI
134BdsLibGetImageHeader (
135 IN EFI_HANDLE Device,
136 IN CHAR16 *FileName,
137 OUT EFI_IMAGE_DOS_HEADER *DosHeader,
138 OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr,
139 IN OUT CHAR16 **NewFileName
140 );
141
142#endif // _BDS_LIB_H_
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette