]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/PeCoffLoaderEx.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / X64 / PeCoffLoaderEx.c
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 PeCoffLoaderEx.c\r
16\r
17Abstract:\r
18\r
19 x64 Specific relocation fixups\r
20\r
21Revision History\r
22\r
23--*/\r
24\r
25#include "TianoCommon.h"\r
26#include "EfiImage.h"\r
27\r
28EFI_STATUS\r
29PeCoffLoaderRelocateImageEx (\r
30 IN UINT16 *Reloc,\r
31 IN OUT CHAR8 *Fixup, \r
32 IN OUT CHAR8 **FixupData,\r
33 IN UINT64 Adjust\r
34 )\r
35/*++\r
36\r
37Routine Description:\r
38 Performs an x64 specific relocation fixup\r
39\r
40Arguments:\r
41 Reloc - Pointer to the relocation record\r
42 Fixup - Pointer to the address to fix up\r
43 FixupData - Pointer to a buffer to log the fixups\r
44 Adjust - The offset to adjust the fixup\r
45\r
46Returns:\r
47 EFI_UNSUPPORTED - relocate unsupported\r
48\r
49--*/\r
50{\r
51 return EFI_UNSUPPORTED;\r
52}\r
53\r
54BOOLEAN\r
55PeCoffLoaderImageFormatSupported (\r
56 IN UINT16 Machine\r
57 )\r
58/*++\r
59Routine Description:\r
60\r
61 Returns TRUE if the machine type of PE/COFF image is supported. Supported \r
62 does not mean the image can be executed it means the PE/COFF loader supports\r
63 loading and relocating of the image type. It's up to the caller to support\r
64 the entry point. \r
65\r
66 This function implies the basic PE/COFF loader/relocator supports IA32, EBC,\r
67 & X64 images. Calling the entry point in a correct mannor is up to the \r
68 consumer of this library.\r
69\r
70Arguments:\r
71\r
72 Machine - Machine type from the PE Header.\r
73\r
74Returns:\r
75\r
76 TRUE - if this PE/COFF loader can load the image\r
77 FALSE - if this PE/COFF loader cannot load the image\r
78\r
79--*/\r
80{\r
81 if ((Machine == EFI_IMAGE_MACHINE_IA32) || (Machine == EFI_IMAGE_MACHINE_X64) || \r
82 (Machine == EFI_IMAGE_MACHINE_EBC)) {\r
83 return TRUE; \r
84 }\r
85\r
86 return FALSE;\r
87}\r