]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c
Removed cross references from PciCf8Lib and PciExpressLib class to PciLib class.
[mirror_edk2.git] / MdePkg / Library / BasePeCoffLib / Ia32 / PeCoffLoaderEx.c
CommitLineData
878ddf1f 1/** @file\r
2 IA-32 Specific relocation fixups.\r
3\r
4 Copyright (c) 2006, Intel Corporation<BR>\r
5 All rights reserved. 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
12\r
13 Module Name: PeCoffLoaderEx.c\r
14\r
15**/\r
16\r
17\r
18\r
19\r
20\r
21/**\r
22 Performs an IA-32 specific relocation fixup.\r
23\r
4ba61e5e 24 @param Reloc Pointer to the relocation record.\r
25 @param Fixup Pointer to the address to fix up.\r
26 @param FixupData Pointer to a buffer to log the fixups.\r
27 @param Adjust The offset to adjust the fixup.\r
878ddf1f 28\r
4ba61e5e 29 @retval EFI_UNSUPPORTED Unsupported now.\r
878ddf1f 30\r
31**/\r
32RETURN_STATUS\r
33PeCoffLoaderRelocateImageEx (\r
34 IN UINT16 *Reloc,\r
35 IN OUT CHAR8 *Fixup,\r
36 IN OUT CHAR8 **FixupData,\r
37 IN UINT64 Adjust\r
38 )\r
39{\r
40 return RETURN_UNSUPPORTED;\r
41}\r
2ce31132 42\r
43/**\r
44 Returns TRUE if the machine type of PE/COFF image is supported. Supported \r
45 does not mean the image can be executed it means the PE/COFF loader supports\r
46 loading and relocating of the image type. It's up to the caller to support\r
47 the entry point. \r
48\r
49 This function implies the basic PE/COFF loader/relocator supports IA32, EBC,\r
50 & X64 images. Calling the entry point in a correct mannor is up to the \r
51 consumer of this library.\r
52\r
53 @param Machine Machine type from the PE Header.\r
54\r
55 @return TRUE if this PE/COFF loader can load the image\r
56\r
57**/\r
58BOOLEAN\r
59PeCoffLoaderImageFormatSupported (\r
60 IN UINT16 Machine\r
61 )\r
62{\r
63 if ((Machine == EFI_IMAGE_MACHINE_IA32) || (Machine == EFI_IMAGE_MACHINE_X64) || \r
64 (Machine == EFI_IMAGE_MACHINE_EBC)) {\r
65 return TRUE; \r
66 }\r
67\r
68 return FALSE;\r
69}\r
70\r
71/**\r
72 Performs an Itanium-based specific re-relocation fixup and is a no-op on other\r
73 instruction sets. This is used to re-relocated the image into the EFI virtual\r
74 space for runtime calls.\r
75\r
76 @param Reloc Pointer to the relocation record.\r
77 @param Fixup Pointer to the address to fix up.\r
78 @param FixupData Pointer to a buffer to log the fixups.\r
79 @param Adjust The offset to adjust the fixup.\r
80\r
81 @return Status code.\r
82\r
83**/\r
84RETURN_STATUS\r
85PeHotRelocateImageEx (\r
86 IN UINT16 *Reloc,\r
87 IN OUT CHAR8 *Fixup,\r
88 IN OUT CHAR8 **FixupData,\r
89 IN UINT64 Adjust\r
90 )\r
91{\r
92 return RETURN_UNSUPPORTED;\r
93}\r
94\r