summaryrefslogtreecommitdiff
path: root/efi/wrapper.h
Commit message (Collapse)AuthorAgeFilesLines
* efi: Fix PE header field rva_and_sizes_nrSylvain Gault2014-02-141-12/+16
| | | | | | | | | The value of the field rva_and_sizes_nr is used by OVMF to check the consistency of the PE file with respect to the field optional_hdr_sz. It now have the right value. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: Fill out MS-DOS header relocs fieldMatt Fleming2013-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | The relocs field in the MS-DOS header actually indicates the size of the MS-DOS header and needs filling out with a value >= 0x40. See, http://www.ctyme.com/intr/rb-2939.htm#table1594 - "18h WORD offset within header of relocation table 40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable" Incidentally, file(1) checks the value of that field to differentiate MS-DOS executables from PE-COFF files, e.g. file(1) output before: MS-DOS executable file(1) output after: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* EFI boot loader in efi_boot_linux() now supports booting i386 and x86_64 ↵chandramouli narayanan2012-06-251-0/+52
| | | | | | | | | | | | | | | linux kernels. Main x86_64 changes are in a) setting up high part of EFI system table and memmap b) loader signature c) setting up jump vector to hand off to kernel. The EFI wrapper (efi/wraper.[ch]) takes an ELF shared libary and wraps it into PE32. While that's fine for EFI32, for EFI64, it needs to support PE32+ format so that a 64bit loadable module or executable can work under a 64bit capable syslinux.efi. The EFI wrapper is enhanced to support both EFI32 and EFI64 by writing out PE32 or PE32+ header fields as appropriate for the build architecture environment. Remanants of the unused old i386-only files, if any, need to be pruned.
* efi: Add UEFI firmware backendMatt Fleming2011-12-161-0/+112
This commit adds 32-bit support for a Unified Extensible Firmware Interface backend. We use a wrapper program to create an EFI exe with only the minimum number of sections becaues the EFI loader doesn't like certain section sections, such as .gnu.hash, which we require for resolving symbols when ELF modules are loaded. We're currently including a lot more symbols than are necessary in efi/main.c so that the code compiles. Some of them are BIOS specific but I haven't got around to fixing up the core to not reference them directly yet. Signed-off-by: Matt Fleming <matt.fleming@intel.com>