• Home
  • Raw
  • Download

Lines Matching refs:EFI

2 	Building EFI Applications Using the GNU Toolchain
18 EFI applications for IA-64,x86 and x86_64 using the GNU toolchain and the EFI
25 * Part 1: Developing EFI Applications
30 To develop x86 and x86_64 EFI applications, the following tools are needed:
36 - A version of "objcopy" that supports EFI applications. To
37 check if your version includes EFI support, issue the
44 binutils-2.17.50.0.14 supports Intel64 EFI.
47 "objdump" that supports EFI applications as well. This
48 allows inspect and disassemble EFI binaries.
50 To develop IA-64 EFI applications, the following tools are needed:
56 - A version of "objcopy" that supports EFI applications. To
57 check if your version includes EFI support, issue the
66 "objdump" that supports EFI applications as well. This
67 allows inspect and disassemble EFI binaries.
72 This EFI development environment contains the following
75 inc: This directory contains the EFI-related include files. The
76 files are taken from Intel's EFI source distribution, except
80 lib: This directory contains the source code for Intel's EFI library.
81 Again, the files are taken from Intel's EFI source
86 binaries to EFI binaries. Various runtime code bits, such as
91 apps: This directory contains a few simple EFI test apps.
96 README file before EFI applications can be built. Specifically, you
109 To build the sample EFI applications provided in subdirectory "apps",
112 gnuefi/libgnuefi.a first and then all the EFI applications such as a
118 Just copy the EFI application (e.g., apps/t6.efi) to the EFI
119 filesystem, boot EFI, and then select "Invoke EFI application" to run
125 ** Writing Your Own EFI Application
127 Suppose you have your own EFI application in a file called
128 "apps/myefiapp.c". To get this application built by the GNU EFI build
131 directory. This should result in EFI application apps/myefiapp.efi,
134 The GNU EFI build environment allows to write EFI applications as
135 described in Intel's EFI documentation, except for two differences:
137 - The EFI application's entry point is always called "efi_main". The
148 - Calls to EFI services should be made via uefi_call_wrapper(). This
154 WARNING: This part contains all the gory detail of how the GNU EFI
159 The basic idea behind the GNU EFI build environment is to use the GNU
161 to an EFI binary. EFI binaries are really just PE32+ binaries. PE
170 than 4GB of address space). EFI binaries are plain PE32+ binaries
172 There are two flavors of EFI binaries: "applications" and "drivers"
174 present, the GNU EFI build environment supports the building of EFI
194 (4KB for EFI), whereas ELF allows sections at arbitrary
197 (2) EFI binaries should be relocatable.
199 Since EFI binaries are executed in physical mode, EFI cannot
201 address. EFI does _try_ to load a binary at it's preferred
206 (3) On IA-64, the EFI entry point needs to point to a function
209 (4) The EFI specification assumes that wide characters use UNICODE
218 In the following sections, we address how the GNU EFI build
225 sections, the GNU EFI build environment uses the special linker script
249 EFI binaries execute in physical mode, differences in page
253 that the EFI loader appears to be unable to handle sections
263 that the _entire_ EFI binary can be addressed using the signed
274 of EFI being able to load the binary without requiring relocation.
283 building the EFI binary. Particularly noteworthy are the dynamic
285 be _wrong_ to include these sections in the EFI binary because it
287 the EFI loader and once by the self-relocator; see below for a
290 retained in the EFI binary (see apps/Makefile).
302 The approach to building relocatable binaries in the GNU EFI build
311 (c) convert the resulting image to an EFI binary
319 right after EFI has handed off control to the EFI binary at symbol
327 through it, applying each relocation one by one. Since the EFI
334 the EFI binary. Another complication is that this relocation requires
339 space, it causes the EFI binary to fail with error code 5
343 function descriptors required by an EFI application is to run the
348 assuming "example" is the name of the desired EFI application.
351 ** (3) Creating the Function Descriptor for the IA-64 EFI Binaries
368 to be relocated _before_ EFI hands control over to the EFI binary.
372 the EFI loader to relocate the function descriptor before handing over
373 control to the EFI binary (again, see the PECOFF spec mentioned above