platform/upstream/syslinux.git
12 years agoefi: Zero e_hdr_pe32p before use
Matt Fleming [Mon, 16 Jul 2012 19:03:43 +0000 (20:03 +0100)]
efi: Zero e_hdr_pe32p before use

We were erroneously zero'ing e_hdr when we should have been zero'ing
e_hdr_pe32p.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoThis is the first cut checkin for GOP supporting the menu subsystem.
chandramouli narayanan [Fri, 13 Jul 2012 17:43:32 +0000 (10:43 -0700)]
This is the first cut checkin for GOP supporting the menu subsystem.
For the initial cut, all of vesa code is dropped into vesa/efi with
code buildable for EFI with a build option. There is VESA only code
that is in the efi subdirectory as well that should go away eventually.
Other files not dependent on EFI or not relevant to EFI need to be
removed as well (e.g. i915resolution.c).

The crux of the code is in initvesa.c and screencpy.c. The GOP
initialization code sets up a matching graphics mode for the caller's
resolution needs. The VESA data structure is populated and mapped to
the EFI implementation as much as possible with some EFI extensions.
Since there is no way to query EFI for font, raw font data for
cp865_8x16 is added.

The code should build. Initial issues with testing the code are:
GOP mode on qemu-x86_64 does not match 640x480 and secondly
querying for the mode info on qemu fails. However, a simple program
querying GOP modes on efi64 platform works ok though. Testing the
resulting syslinux.efi on an efi64 platform does not seem to print output
other than in efi_main() routine . I suspect that it may be due to loading
failure or file system initialization. The issue does not show up on
qemu. In summary, there are issues on qemu and an efi64 platform that
need to be resolved.

12 years agoefi_getchar() should wait for the event before reading keystroke.
chandramouli narayanan [Fri, 13 Jul 2012 17:34:42 +0000 (10:34 -0700)]
efi_getchar() should wait for the event before reading keystroke.
On an efi64 platform, it didn't work without wait. It needs further
debugging to ascertain the fix.

12 years agoConsole input initiated by com32 modules and sample programs hang on both i386 and...
chandramouli narayanan [Mon, 25 Jun 2012 19:51:08 +0000 (12:51 -0700)]
Console input initiated by com32 modules and sample programs hang on both i386 and x86_64.
The issue is traced to the implementation of get_key() underlying firmware.
For stdin file descriptor, the console read finally resolves to __rawcon_read()
implemented in com32/lib/sys/rawcon_read.c. This file is firmware-dependent and
currently has only BIOS-specific code As a temporary fix, in EFI,
__rawcon_read() is implemented using getchar(). The implementation of
getchar() in EFI is guided by the firmware structure that points to efi_getchar().
With this temporary fix, com32 command modules that wait on console input work.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoArchicture-dependent get_cpuid in sysdump/cpuid is fixed.
chandramouli narayanan [Mon, 25 Jun 2012 19:50:11 +0000 (12:50 -0700)]
Archicture-dependent get_cpuid in sysdump/cpuid is fixed.

In the following sample programs zzjson.c, advdump.c, entrydump.c, hello.c, resolv.c,
serialinfo.c in com32/samples, the following code call hangs the program:
openconsole(&dev_null_r, &dev_stdcon_w);

The following fix works:
openconsole(&dev_rawcon_r, &dev_ansiserial_w);

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoThe assembler directive in memdump/code16.h is fixed for x86_64 build.
chandramouli narayanan [Mon, 25 Jun 2012 19:48:34 +0000 (12:48 -0700)]
The assembler directive in memdump/code16.h is fixed for x86_64 build.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoThis patch implements architecture-dependent code in memdisk to support for i386...
chandramouli narayanan [Mon, 25 Jun 2012 19:47:24 +0000 (12:47 -0700)]
This patch implements architecture-dependent code in memdisk to support for i386 and x86_64.
The memcpy, memset and memmove routines originated from klibc.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoThe make files have undergone changes to support both i386 and x86_64 platforms.
chandramouli narayanan [Mon, 25 Jun 2012 19:45:26 +0000 (12:45 -0700)]
The make files have undergone changes to support both i386 and x86_64 platforms.
Pertinent changes are sprinkled through *.mk and Makefile in the syslinux tree.

Build architecture is specified at the command line via ARCH macro. This is to enable whether
one is building for the native platform or cross-building for a different architecture. Currently,
the only supported architectures via ARCH macro are i386 and x86_64.

There are some modules (e.g. memdump) that don't build under the EFI environment. To go forward
with efi boot support, a separate EFI_BUILD=1 macro has been added and is required to be
specified while building. This is a temporary solution for the current build environment.

example build:

On a x86_64 platform, the following cross-builds syslinux for i386
To build for i386: make EFI_BUILD=1 ARCH=i386

On a x86_64 platform, the following builds syslinux for x86_64
To build natively: make EFI_BUILD=1

Changes specific to GCC and LD options:

Architecture specific flags and include/search directories are set up for GCC and LD commands.
Internally, GCC options such as stack-boundary, PIC and machine architecture are set up
based on ARCH macro. While stack-boundary=2 is fine for i386, it does not work for x86_64
and so it is left to the default value. Using -fPIE with gcc does not work with ld on x86_64,
but -fPIC works fine. Similarly, target and elf options are set up for linking
as approrpriate for architecture.

Assumption about gnu-efi install path:

Since the EFI build supports both EFI32 and EFI64, the following assumptions
are made with regard to the installed location of gnu-efi on the build platform.
1. gnu-efi-ia32: assumed installed in /usr/local
[ EFI-32 include files in /usr/local/include/efi and gnu-efi library in /usr/local/lib/ ]
2. gnu-efi-x86_64: assumed installed in /usr
[ EFI-64 include files in /usr/include/efi and gnu-efi library in /usr/lib64/ ]

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoThis is a giant patch that splits the linker scripts for libraries, modules and execu...
chandramouli narayanan [Mon, 25 Jun 2012 19:43:03 +0000 (12:43 -0700)]
This is a giant patch that splits the linker scripts for libraries, modules and executables into
the architecture-dependent scripts to facilitate building syslinux modules/executables
for i386 and x86_64 environments. The x86_64 linker scripts are derived from the earlier i386
counterparts.

Subdirectories i386 and x86_64 hold the respective linker scripts mentioned below.
com32/lib/sylinux.ld
com32/lib/elf.ld
core/syslinux.ld
efi/syslinux.ld
mbr/mbr.ld
memdisk/memdisk.ld

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoThe ELF module load and the utility library routines fully support lookup, resolution...
chandramouli narayanan [Mon, 25 Jun 2012 19:40:02 +0000 (12:40 -0700)]
The ELF module load and the utility library routines fully support lookup, resolution and relocation
of symbols for both ELF32 and ELF64 environments. With this, syslinux.efi built for i386 and x86_64
can load the respective native command modules dynamically. The architecture dependent files
are split into respective subdirectories (com32/lib/sys/module/i386 & com32/lib/sys/module/x86_64)
for the build environment to pick.

Files changed for commit:
com32/include/sys/elfcommon.h
com32/include/sys/module.h and its i386/ x86_64/ specific files
com32/lib/sys/module/i386/common.[ch] and its counterpart in x86_64
com32/lib/sys/module/i386/elfutils.h and its counterpart in x86_64
com32/lib/sys/module/i386/elf_module.c and its counterpart in x86_64
com32/lib/sys/module/i386/shallow_module.c and its counterpart in x86_64

The implementation of com32/elflink/load_env32.c now takes care of both i386 and x86_64 to set up
elf module system.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoEFI boot loader in efi_boot_linux() now supports booting i386 and x86_64 linux kernels.
chandramouli narayanan [Mon, 25 Jun 2012 19:37:31 +0000 (12:37 -0700)]
EFI boot loader in efi_boot_linux() now supports booting i386 and x86_64 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.

12 years agoArchitecture dependency in LZO data compression library in subdirectory core/lzo/
chandramouli narayanan [Mon, 25 Jun 2012 19:36:11 +0000 (12:36 -0700)]
Architecture dependency in LZO data compression library in subdirectory core/lzo/
is taken care to be able to build fo i386 for x86_64.

The implementation of eflags() in call16.c supported only 32bit, but now includes x86_64
as well. com32 lib build depends on it.

The file comboot.inc needed alignment specification for the variable ConfigName
in order to keep the linker happy. It's not clear why this would be needed for EFI.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoThis patch implements the setjmp/longjmp, memcpy, memmove, memset and mempcpy functions
chandramouli narayanan [Mon, 25 Jun 2012 19:34:46 +0000 (12:34 -0700)]
This patch implements the setjmp/longjmp, memcpy, memmove, memset and mempcpy functions
as appropriate for the architecture. The code came from klibc. com32/lib has
i386 and x86_64 sub directories implementing the code.

The code in com32/lib/libgcc/__muldi3.S essentially has fixes for building x86_64.

The file x86_init_fpu.c is split into the respective architecture specific files and
reside under com32/lib/sys/i386 and com32/lib/sys/x86_64.

The file com32/lib/sys/farcall.c has fixes for architecture-specific code. The com32 lib
dependends on it.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoPatches here support 32bit and 64bit environment.
chandramouli narayanan [Mon, 25 Jun 2012 19:32:17 +0000 (12:32 -0700)]
Patches here support 32bit and 64bit environment.

Move the standard definitions of constants, variously-sized ints,limits into
respective architecture specific files. com32/include/bitsize holds the standard
header files that in turn include bitsize32 or bitsize64 based on the architecture.
The makefiles should build pick the right ones based on architecture.

Files com32/include/sys/cpu.h, com32/include/sys/bitops.h now have
architecture specific files underneath to define relevant macros definitions.

com32/include/setjmp.h has architecture specific counterparts underneath.

ssize_t in dos/stdlib.h is appropriately defined based on architecture to be able
to support building for 32bit and 64bit environments.

Remanants of the unused old i386-only files, if any, need to be pruned.

12 years agoansi: Improve EFI console support
Chandramouli Narayanan [Fri, 16 Mar 2012 18:53:51 +0000 (18:53 +0000)]
ansi: Improve EFI console support

This commit fixes a number of bugs when displaying text on the console
under EFI, such as not clearing the screen when we've reached the last
row, and writing one character on each line.

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoefi: Turn off debugging support by default
Chandramouli Narayanan [Wed, 14 Mar 2012 10:26:46 +0000 (10:26 +0000)]
efi: Turn off debugging support by default

There's no need to print debug messages unless the user actually needs
to debug something. Also, delete the useless "foo!" message and
convert an unconditional Print into a debug message.

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Fix assorted compiler warnings
Matt Fleming [Wed, 28 Mar 2012 13:09:22 +0000 (14:09 +0100)]
firmware: Fix assorted compiler warnings

This commit makes the build a little quieter by fixing the following
warnings,

firmware.h:39:43: warning: ‘struct initramfs’ declared inside parameter list

main.c:714:2: warning: implicit declaration of function ‘fs_init’

core/mem/free.c:79:5: warning: implicit declaration of function ‘FreePool’
core/mem/malloc.c:73:5: warning: implicit declaration of function ‘AllocatePool’

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware, diskio: Create struct disk_private
Matt Fleming [Wed, 28 Mar 2012 12:57:54 +0000 (13:57 +0100)]
firmware, diskio: Create struct disk_private

We need a way of passing firmware-specific information to the disk I/O
subsystem. Split the BIOS code into diskio_bios.c so that we don't
include any disk BIOS symbols in the EFI executable. This way, the
code in core/fs/diskio.c is firmware independent.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore, efi: Return new pointer in realloc()
Chandramouli Narayanan [Fri, 24 Feb 2012 13:19:56 +0000 (13:19 +0000)]
core, efi: Return new pointer in realloc()

Instead of returning the pointer to the newly allocated memory,
relloc() currently returns garbage. Return the correct pointer.

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoMerge branch 'linux-boot' into for-hpa/elflink/firmware
Matt Fleming [Thu, 2 Feb 2012 16:24:48 +0000 (16:24 +0000)]
Merge branch 'linux-boot' into for-hpa/elflink/firmware

12 years agoefi: Delete efi/wrapper in spotless make target
Matt Fleming [Mon, 30 Jan 2012 14:47:23 +0000 (14:47 +0000)]
efi: Delete efi/wrapper in spotless make target

Previously there was no make target that would delete the wrapper
application, so add it to the 'spotless' target.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Add EFI linux boot support
Matt Fleming [Fri, 27 Jan 2012 21:35:02 +0000 (21:35 +0000)]
firmware: Add EFI linux boot support

Add .boot_linux to 'struct firmware', we do quite a lot of things
differently for BIOS and EFI. For EFI we don't need the movelist code
because we have little control over the memory map, and so can't
guarantee we can place code/data at specific addresses.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoldlinux: Handle multiple arguments to initrd=
Matt Fleming [Wed, 1 Feb 2012 14:14:55 +0000 (14:14 +0000)]
ldlinux: Handle multiple arguments to initrd=

The linux COM32 module handles a comma-separated list of initrd files
to load but the ldlinux code does not. Copy the code from the COM32
module so kernels can be loaded with multiple initrds.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocom32: Move initramfs_size() into header file
Matt Fleming [Wed, 1 Feb 2012 11:47:37 +0000 (11:47 +0000)]
com32: Move initramfs_size() into header file

Both the EFI and BIOS firmwares need to calculate the size of
initramfs, so move this helper function into a common header file.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agolinux: Move linux_header definition to header
Matt Fleming [Mon, 30 Jan 2012 10:17:26 +0000 (10:17 +0000)]
linux: Move linux_header definition to header

We're gonna need to include the 'struct linux_header' definition in
both the BIOS .boot_linux implementation the EFI one so move the
definition into a central header file.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoefi: Add Auxiliary Data Vector support
Chandramouli Narayanan [Thu, 2 Feb 2012 15:19:17 +0000 (15:19 +0000)]
efi: Add Auxiliary Data Vector support

Including deleting some ADV code that found its way into core/elflink.

Also, move the __syslinux_adv_ptr and __syslinux_adv_size symbols out
of ldlinux.c32 and into the core. Normally we don't want to move
symbols into the core (as it increases the size), but we do in this
case because the values for these symbols are firmware dependent.

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoefi: Actually return a character in efi_getchar()
Chandramouli Narayanan [Thu, 26 Jan 2012 19:58:59 +0000 (19:58 +0000)]
efi: Actually return a character in efi_getchar()

Since efi_getchar() goes to the trouble of reading a character from
user input it should return it to the caller. Previously we were
returning garbage.

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Remove unused argument to init()
Chandramouli Narayanan [Thu, 26 Jan 2012 19:54:54 +0000 (19:54 +0000)]
core: Remove unused argument to init()

The com32sys_t * argument to init() isn't actually used and the efi
implementation doesn't even have it in its prototype. Just delete it.

Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Add .ipappend_strings function pointer
Matt Fleming [Fri, 20 Jan 2012 14:04:14 +0000 (14:04 +0000)]
firmware: Add .ipappend_strings function pointer

We need a firmware-independent way of getting the ipappend strings so
add a function pointer to 'struct firmware'. The BIOS backend uses the
old __intcall() method whereas the EFI backend accesses 'IPAppends'
and 'numIPAppends' directly. Note that the EFI backend currently
always returns 0 for 'numIPAppends' because it does not support PXE.

Also, while I'm here I fixed the types of 'numIPAppends' and
'IPAppends' for EFI. For some reason the data types were the wrong way
around.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Move firmware code into core/bios.c
Matt Fleming [Thu, 26 Jan 2012 12:57:11 +0000 (12:57 +0000)]
firmware: Move firmware code into core/bios.c

The EFI application really shouldn't be including code for the BIOS
firmware implementation, so move it to core/bios.c and explicitly
ignore core/bios.o when building the EFI application.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocom32: Remove __constructor tag from __syslinux_get_shuffer_size()
Matt Fleming [Thu, 2 Feb 2012 15:52:05 +0000 (15:52 +0000)]
com32: Remove __constructor tag from __syslinux_get_shuffer_size()

Any functions with a __constructor tag are exected by both firmware
backends. But shuffling isn't used on EFI because we have so little
control over the memory map. So call __syslinux_get_shuffer_size()
only when needed.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Add .get_serial_console_info
Matt Fleming [Fri, 20 Jan 2012 15:35:49 +0000 (15:35 +0000)]
firmware: Add .get_serial_console_info

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Add .get_config_file_name
Matt Fleming [Fri, 20 Jan 2012 15:33:29 +0000 (15:33 +0000)]
firmware: Add .get_config_file_name

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agofirmware: Don't include disk.h
Matt Fleming [Fri, 20 Jan 2012 13:44:53 +0000 (13:44 +0000)]
firmware: Don't include disk.h

disk.h is a core/ header file and should only be included by code that
requires it because not all code has core/include/ in its -I path
(which can result in a compilation failure).

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocom32: Delete duplicate ipappend.c
Matt Fleming [Fri, 20 Jan 2012 12:47:48 +0000 (12:47 +0000)]
com32: Delete duplicate ipappend.c

ipappend.c is already part of ldlinux and so we don't need the
duplicate copy in com32/lib/syslinux. This file should have been
deleted when com32/elflink/ldlinux/ipappend.c was created.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoldlinux: Initialise 'p' before using it.
Matt Fleming [Thu, 15 Dec 2011 20:47:00 +0000 (20:47 +0000)]
ldlinux: Initialise 'p' before using it.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoelflink: Don't statically initialise core_module.base_addr
Matt Fleming [Thu, 15 Dec 2011 18:01:25 +0000 (18:01 +0000)]
elflink: Don't statically initialise core_module.base_addr

The EFI firmware loader might place syslinux.efi anywhere in RAM, we
can't assume that base addr of core_module is 0x0 to initialise it at
runtime with the correct value.

Also, using __dynsym_len doesn't seem to work properly with
syslinux.efi so calculate the length at runtime.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocom32: Add firmware backend support to ansicon
Matt Fleming [Thu, 15 Dec 2011 15:36:02 +0000 (15:36 +0000)]
com32: Add firmware backend support to ansicon

The way in which I/O is done is firmware backend-specific. Jump
through some layers of indirection so that things can be implemented
differently for BIOS and EFI.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoEFI: Implement malloc with {Allocate/Free}Pool()
Matt Fleming [Wed, 14 Dec 2011 22:01:56 +0000 (22:01 +0000)]
EFI: Implement malloc with {Allocate/Free}Pool()

We actually need to AllocatePool() the memory we want, otherwise the
firmware can use it behind our backs. Since EFI firmware doesn't
provide an interface for allocating memory at a specific address if
the requested size isn't a multiple of PAGE_SIZE, use the pool
functions.

12 years agoefi: Disk I/O support
Matt Fleming [Tue, 6 Dec 2011 15:49:41 +0000 (15:49 +0000)]
efi: Disk I/O support

Implement .disk_init() for the EFI firmware backend.

12 years agodisk: Add .disk_init() to firmware struct
Matt Fleming [Thu, 8 Dec 2011 14:34:57 +0000 (14:34 +0000)]
disk: Add .disk_init() to firmware struct

Each firmware has its own method of initialising a disk so allow each
firmware backend to implement a separate disk_init() function.

Make all the assembly callers of fs_init() jump through pm_fs_init(),
which allows us to restrict the com32sys_t arguments to only those
callers that really need it, e.g. the .asm files.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Rebuild core objects for EFI
Matt Fleming [Tue, 6 Dec 2011 15:45:51 +0000 (15:45 +0000)]
core: Rebuild core objects for EFI

We compile core/ with different CFLAGS when building for EFI. So do a
make clean once we've built the binary targets (BTARGET) but before we
build the EFI executable.

12 years agoefi: Add UEFI firmware backend
Matt Fleming [Fri, 2 Dec 2011 18:02:09 +0000 (18:02 +0000)]
efi: Add UEFI firmware backend

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>
12 years agocore: Do not use -mregparm
Matt Fleming [Thu, 15 Dec 2011 11:06:56 +0000 (11:06 +0000)]
core: Do not use -mregparm

When trying to integrate the old com32 code with EFI, EFI doesn't use
mregparm. Using mregparm leads to incompatibilities with most 3rd
party code anyway and it only results in a minimal space-saving at
runtime. Pass all parameters on the stack by default.

12 years agoMove the list of MINLIBOBJS to mk/lib.mk so that we can include it in
Matt Fleming [Tue, 6 Dec 2011 15:45:14 +0000 (15:45 +0000)]
Move the list of MINLIBOBJS to mk/lib.mk so that we can include it in
efi/Makefile.

12 years agocom32: Provide a language standard version
Matt Fleming [Fri, 2 Dec 2011 17:55:02 +0000 (17:55 +0000)]
com32: Provide a language standard version

Provide a C language standard version to show that we support C99.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Add firmware backend support
Matt Fleming [Thu, 10 Nov 2011 10:23:27 +0000 (10:23 +0000)]
core: Add firmware backend support

In an upcoming patch series we're going to need to abstract the
firmware operations because they will be provided by both BIOS and
EFI.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoRevert "core: remove redundant zalloc() definition"
H. Peter Anvin [Thu, 15 Dec 2011 18:47:41 +0000 (10:47 -0800)]
Revert "core: remove redundant zalloc() definition"

This reverts commit 46b993449264a2332427a165b4c77e400a053178.

Build failure was due to a non-clean tree.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
12 years agocore: remove redundant zalloc() definition
H. Peter Anvin [Wed, 14 Dec 2011 22:00:21 +0000 (14:00 -0800)]
core: remove redundant zalloc() definition

Remove a redundant definition of zalloc() which causes a compile
failure.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
12 years agoldlinux: Accept commands from the serial console
Matt Fleming [Fri, 25 Nov 2011 16:22:44 +0000 (16:22 +0000)]
ldlinux: Accept commands from the serial console

To mimic the old (pre-elflink) command-line interface behaviour let's
use getchar() instead of reading from stdin. This way, if the user
types a command on the serial console it will actually be executed.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoldlinux: Add eprintf() to print to VGA and serial
Matt Fleming [Fri, 25 Nov 2011 15:54:48 +0000 (15:54 +0000)]
ldlinux: Add eprintf() to print to VGA and serial

printf() is used heavily in the ldlinux code but that only displays
things on the VGA console, not on serial. Introduce eprintf(), which
gives us the benefit of format strings but will also print to both VGA
and serial.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoldlinux: Don't return previous command if user pressenter enter
Matt Fleming [Fri, 25 Nov 2011 15:36:55 +0000 (15:36 +0000)]
ldlinux: Don't return previous command if user pressenter enter

If the user presses enter at the command prompt then simply print the
command prompt again on a newline - don't re-execute the previous
command.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoelflink: Include '\n' when printing error messages
Matt Fleming [Fri, 25 Nov 2011 15:09:11 +0000 (15:09 +0000)]
elflink: Include '\n' when printing error messages

We need to print a newline character at the end of our error messages
otherwise the syslinux command prompt may overwrite them, making them
impossible to see.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agoldlinux: Make tab-completion output same as pre-elflink
Matt Fleming [Wed, 9 Nov 2011 13:19:54 +0000 (13:19 +0000)]
ldlinux: Make tab-completion output same as pre-elflink

To maintain compatability with the old pre-elflink command line code,
the list of potential labels should all be printed on one line, not
one per line.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Split core console code into separate libs
Matt Fleming [Fri, 4 Nov 2011 15:02:14 +0000 (15:02 +0000)]
core: Split core console code into separate libs

When the console code was written in asm ldlinux.asm, isolinux.asm and
pxelinux.asm simply included the correct console I/O files (rawcon.inc
and plaincon.inc) but now that these files are implemented in C we
need another way to link against the correct functions.

Create separate libraries for linking ldlinux, isolinux and pxelinux
against.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agopxelinux: Call load_env32()
Matt Fleming [Fri, 4 Nov 2011 14:25:20 +0000 (14:25 +0000)]
pxelinux: Call load_env32()

Execute the elflink environment.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Delete code that is duplicated in ldlinux
Matt Fleming [Tue, 24 May 2011 09:45:51 +0000 (10:45 +0100)]
core: Delete code that is duplicated in ldlinux

Lots of code that used to be implemented in the core is now
implemented in ldlinux, but code from core was never deleted. Purge
this code.

Also, move all com32 loading to ldlinux since we need to be able to do
various command line things (which are no longer available in the
core).

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Reimplement writestr in C
Matt Fleming [Wed, 19 Oct 2011 09:02:42 +0000 (10:02 +0100)]
core: Reimplement writestr in C

Implement writestr in C instead of asm and move writestr.inc into
modules/ because it's required by modules/ver.asm.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
12 years agocore: Reimplement lots asm code in C
Matt Fleming [Tue, 18 Oct 2011 12:13:06 +0000 (13:13 +0100)]
core: Reimplement lots asm code in C

There is an awful lot of code currently implemented in assembly when
it could just as easily be implemented in C. Having it in C makes it
much easier to share code between the BIOS and forthcoming EFI
firmware backend. The following code fragments have been rewritten,

  - timer initialisation
  - adjust_screen()
  - check_esapes() and mem_init()
  - conio.inc
  - plaincon.inc
  - cleanup.inc
  - serirq.inc
  - font.inc
  - graphics
  - writehex

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
13 years agocom32: Add unhexchar
Matt Fleming [Wed, 18 May 2011 14:55:21 +0000 (15:55 +0100)]
com32: Add unhexchar

Add a C implementation of unhexchar() for use in C code. This
implementation should be an exact duplicate of the old asm version.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoMerge remote-tracking branch 'mfleming/for-hpa/elflink/ldlinux' into elflink
H. Peter Anvin [Thu, 28 Jul 2011 21:02:58 +0000 (14:02 -0700)]
Merge remote-tracking branch 'mfleming/for-hpa/elflink/ldlinux' into elflink

13 years agopxelinux: open_file() returns a non-negative handle
Matt Fleming [Tue, 12 Jul 2011 15:21:37 +0000 (16:21 +0100)]
pxelinux: open_file() returns a non-negative handle

The usage of open_file() is wrong in core/fs/pxe/pxe.c. Any
non-negative return value indicates success, not just a return value
of zero.

This bug was introduced in commit ba4fefa9b52b "core: change
load_config() to open_config()". The bug causes pxelinux to fail to
open configuration files.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agopxelinux: open_file() returns a non-negative handle
Matt Fleming [Tue, 12 Jul 2011 15:12:48 +0000 (16:12 +0100)]
pxelinux: open_file() returns a non-negative handle

The usage of open_file() is wrong in core/fs/pxe/pxe.c. Any
non-negative return value indicates success, not just a return value
of zero.

This bug was introduced in commit ba4fefa9b52b "core: change
load_config() to open_config()". The bug causes pxelinux to fail to
open configuration files.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agocore: Fix ldlinux.c32 failing to load when not installed in "/"
Matt Fleming [Tue, 12 Jul 2011 10:52:05 +0000 (11:52 +0100)]
core: Fix ldlinux.c32 failing to load when not installed in "/"

Currently, if syslinux is installed in a directory other than "/" we
will fail to load ldlinux.c32.

Because we know where we were installed the simplest fix is to chdir()
to the installation directory before attempting to load
ldlinux.c32. This requires us to add "." to PATH so that we look in
the current working directory when loading ELF modules.

Changing to the install directory needs to handled differently for
different file systems, which is the reason behind the new file system
operation, .chdir_start(). Disk-based Syslinux variants should use
generic_chdir_start() to chdir() to CurrentDirName, which is the
installation path. By using this new fs operation, we can load
ldlinux.c32 when we expand the "."  in PATH, without having to search
the entire filesystem for it. However, iso9660 file systems still
require us to search some directories because it has no notion of an
installation directory.

Previously, changing into the install directory was handled when
opening the config file, but because the config file parser is now
part of the ldlinux.c32 ELF module, it needs to be done much earlier.

Reported-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoMerge branch 'DT_NEEDED-module-deps' into for-hpa/elflink/ldlinux
Matt Fleming [Tue, 7 Jun 2011 19:12:36 +0000 (20:12 +0100)]
Merge branch 'DT_NEEDED-module-deps' into for-hpa/elflink/ldlinux

13 years agoMerge branch 'PATH-based-search' into for-hpa/elflink/ldlinux
Matt Fleming [Tue, 7 Jun 2011 19:12:17 +0000 (20:12 +0100)]
Merge branch 'PATH-based-search' into for-hpa/elflink/ldlinux

Conflicts:
com32/elflink/ldlinux/readconfig.c

13 years agoMerge branch 'fs-config' into for-hpa/elflink/ldlinux
Matt Fleming [Tue, 7 Jun 2011 19:10:59 +0000 (20:10 +0100)]
Merge branch 'fs-config' into for-hpa/elflink/ldlinux

Conflicts:
com32/elflink/ldlinux/readconfig.c

13 years agoMerge branch 'pxelinux' into for-hpa/elflink/ldlinux
Matt Fleming [Tue, 7 Jun 2011 19:06:01 +0000 (20:06 +0100)]
Merge branch 'pxelinux' into for-hpa/elflink/ldlinux

Conflicts:
core/pxelinux.asm

13 years agoldlinux: Support "kbdmap"
Matt Fleming [Fri, 27 May 2011 16:57:32 +0000 (17:57 +0100)]
ldlinux: Support "kbdmap"

Add support to the ldlinux config file parser for the "kbdmap"
directive.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Support "font"
Matt Fleming [Fri, 27 May 2011 16:57:05 +0000 (17:57 +0100)]
ldlinux: Support "font"

Add support for parsing the "font" config directive to ldlinux.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Parse "display" in config files
Matt Fleming [Fri, 27 May 2011 16:49:39 +0000 (17:49 +0100)]
ldlinux: Parse "display" in config files

Teach ldlinux to parse the "display" directive.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Add support for parsing "serial" config directive
Matt Fleming [Fri, 27 May 2011 16:10:32 +0000 (17:10 +0100)]
ldlinux: Add support for parsing "serial" config directive

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Use DT_NEEDED for module dependencies
Matt Fleming [Mon, 6 Jun 2011 13:12:45 +0000 (14:12 +0100)]
ldlinux: Use DT_NEEDED for module dependencies

The ELF file format uses DT_NEEDED entries in the dynamic section to
name any shared library dependencies. Instead of rolling our own
dependency logic via the modules.dep file and elf_gen_dep.sh script
use the DT_NEEDED entries.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Use open_config() to open config files
Matt Fleming [Mon, 6 Jun 2011 21:45:33 +0000 (22:45 +0100)]
ldlinux: Use open_config() to open config files

Instead of duplicating the logic for finding config files on different
filesystems in both ldlinux/readconfig.c and core/fs/* use the
open_config() wrapper that calls into the fs-specific open_config().

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agocore: Return a file descriptor from open_config()
Matt Fleming [Mon, 6 Jun 2011 21:17:03 +0000 (22:17 +0100)]
core: Return a file descriptor from open_config()

Wrap open_config() the same way that open() wraps open_file(). The
only user of open_config() requires access to a file descriptor so it
makes sense to return a file descriptor.

The file handle implementation is a historic piece of code and this
patch tries to hide it as they will likely be removed at a future
point in time. Furthermore, the file handle code is very core-specific
and should not be exposed to any callers of open_config().

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agocore: open_file() returns a non-negative handle id
Matt Fleming [Mon, 6 Jun 2011 17:19:02 +0000 (18:19 +0100)]
core: open_file() returns a non-negative handle id

We currently only take the success path if open_file() returns 0 but
open_file() returns a handle ID which is a non-negative number.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: PATH-based module lookup
Matt Fleming [Mon, 6 Jun 2011 10:09:42 +0000 (11:09 +0100)]
ldlinux: PATH-based module lookup

Add support for specifying directories to search when loading
modules. A new config directive, "PATH", instructs the module loading
code to search the directories listed in a colon-separated list when
loading a module.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agocore: change load_config() to open_config()
H. Peter Anvin [Sat, 28 May 2011 00:45:59 +0000 (17:45 -0700)]
core: change load_config() to open_config()

Change load_config() to open_config(), which is a method that works
just like open_file().  This we can use to get the original
configuration file.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agocore: fix warnings in core/mem/init.c
H. Peter Anvin [Sat, 28 May 2011 00:45:22 +0000 (17:45 -0700)]
core: fix warnings in core/mem/init.c

Fix warnings (that block -Werror) in core/mem/init.c

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agocore.h: add a few include files needed pretty much everywhere
H. Peter Anvin [Sat, 28 May 2011 00:44:48 +0000 (17:44 -0700)]
core.h: add a few include files needed pretty much everywhere

Some include files we might as well centralize...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agocore: Load the 32-bit environment at startup
Matt Fleming [Fri, 27 May 2011 16:09:27 +0000 (17:09 +0100)]
core: Load the 32-bit environment at startup

Do the same as the other Syslinux variants and initialise the 32-bit
environment when we boot.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Add support for parsing pxeretry option
Matt Fleming [Wed, 25 May 2011 22:29:05 +0000 (23:29 +0100)]
ldlinux: Add support for parsing pxeretry option

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Initialise ipappend strings
Matt Fleming [Wed, 25 May 2011 19:26:23 +0000 (20:26 +0100)]
ldlinux: Initialise ipappend strings

Previouly __syslinux_get_ipappend_strings() was called as a
__constructor. However, as constructors are executed before we load
any ELF modules we need to explicitly call this function to initialise
the ipappend string.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Fix "prompt" config option parsing
Matt Fleming [Wed, 25 May 2011 14:35:53 +0000 (15:35 +0100)]
ldlinux: Fix "prompt" config option parsing

Previously, we were looking for the value of the prompt option 8
characters after the first 'p', clearly since "prompt" is only 6
characters we should be searching after the sixth character.

I noticed this bug when specifying "prompt 1" in my config file and
Syslinux still tried to boot the default kernel.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Remove __constructor attribute
Matt Fleming [Wed, 25 May 2011 07:45:37 +0000 (08:45 +0100)]
ldlinux: Remove __constructor attribute

The __constructor tag only makes sense in the core as the constructor
functions are executed from load_env32(), before any modules have been
loaded. Therefore, applying __constructor to code inside ldlinux is
pointless as unless the functions are called explicitly, they will
never be executed.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Add support for Auxillary Data Vector
Matt Fleming [Wed, 25 May 2011 07:39:47 +0000 (08:39 +0100)]
ldlinux: Add support for Auxillary Data Vector

Move all the code for the ADV into ldlinux so that it doesn't have any
dependencies on other modules.

We also need a way to initialize the ADV from ldlinux, so add another
vector to the comboot API.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Add localboot support
Matt Fleming [Tue, 24 May 2011 10:54:10 +0000 (11:54 +0100)]
ldlinux: Add localboot support

Add a few tweaks to enable ldlinux to localboot a hard disk. Most of
the support was already there, there were just a few bug fixes in
execute().

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoldlinux: Search in isolinux/ directory for config files
Matt Fleming [Tue, 24 May 2011 10:37:49 +0000 (11:37 +0100)]
ldlinux: Search in isolinux/ directory for config files

If we're running from an ISO image we should be looking in the
isolinux/ directory for isolinux.cfg, not in the top-level directory.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agohdt: libmenu.a no longer exists
Matt Fleming [Fri, 29 Apr 2011 10:20:11 +0000 (11:20 +0100)]
hdt: libmenu.a no longer exists

Don't link against libmenu.a, it no longer exists as it was removed in
commit 74518b8b691c ("elflink: Make ELF the default object format").

This fixes the following build error,

make[2]: *** No rule to make target `../cmenu/libmenu/libmenu.a', needed by `hdt.c32'.  Stop.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoload_env32 should not include menu.h
H. Peter Anvin [Wed, 27 Apr 2011 21:27:35 +0000 (14:27 -0700)]
load_env32 should not include menu.h

Remove stay #include that does not resolve.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agoelf_gen_dep.sh: Prioritise symbols exported by core
Matt Fleming [Fri, 15 Apr 2011 20:35:48 +0000 (21:35 +0100)]
elf_gen_dep.sh: Prioritise symbols exported by core

It's possible for multiple modules to export the same symbol. We
always favour the symbols exported from core/ because this means that
modules will have less runtime dependencies.

For example, some symbols required by ldlinux.c32 are exported by both
core/ and libmenu.c32. Because we don't want ldlinux.c32 to have any
dependencies, we need to make sure we resolve to the symbol exported
by core/.

Note that now the order in which we extract global symbols from ELF
files in elf_gen_dep.sh is important, because this dictates our order
of preference and hence core/isolinux.elf and core/pxelinux.elf need
to come first.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoelf_gen_dep.sh: Don't calculate dependencies for whitespace symbols
Matt Fleming [Fri, 15 Apr 2011 20:27:37 +0000 (21:27 +0100)]
elf_gen_dep.sh: Don't calculate dependencies for whitespace symbols

Don't try to resolve dependencies for a symbol whose name is purely
made up of whitespace.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoelflink: Don't require every module to have init/exit functions
Matt Fleming [Fri, 15 Apr 2011 20:10:55 +0000 (21:10 +0100)]
elflink: Don't require every module to have init/exit functions

Don't complain or refuse to load a module if it doesn't contain an
init or exit function, as many of the init/exit functions are in fact
empty.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoelflink: Don't compile in debug output by default
Matt Fleming [Fri, 15 Apr 2011 20:03:51 +0000 (21:03 +0100)]
elflink: Don't compile in debug output by default

Turn off ELF_DEBUG, we really don't need to see the "[ELF] MODULE
UNLOADED" message everytime we finish executing an ELF module.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoelflink: ldlinux should not have any dependencies
Matt Fleming [Tue, 26 Apr 2011 09:02:13 +0000 (10:02 +0100)]
elflink: ldlinux should not have any dependencies

ldlinux currently requires the get_key() symbol, which means it has a
dependency on libutil_com.c32. ldlinux.c32 really should be a
standalone module so let's move get_key.c into ldlinux/.

However, moving get_key.c creates a new problem - native linux
applications such as com32/samples/keytest.c require the get_key()
symbol which is currently exported by libutil_lnx.a. To fix this, we
create a new native linux library that exports any required symbols
from ldlinux. With this change we need to update com32/Makefile so
that we build com32/elfink/ldlinux before com32/samples, and seeing as
ldlinux now has no dependencies, we may as well move it to the front
of $SUBDIRS.

Also, update elf_gen_dep.sh to skip ldlinux.c32 and not search for
dependencies for any of its unresolved symbols. This way, if anyone
inadvertently introduces a dependency that cannot be resolved by the
core, ldlinux.c32 will fail to load at runtime (which guarantees that
the newly introduced dependency won't go unnoticed).

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoexit.c: Truncate exit status to uint8_t
Matt Fleming [Fri, 15 Apr 2011 10:48:37 +0000 (11:48 +0100)]
exit.c: Truncate exit status to uint8_t

The valid range for an exit status is 0 - 255, so we need to truncate
the value passed to _exit().

I noticed this when a module was doing _exit(-1), and ended up calling

longjmp(.., 0xffffffff + 1)

which meant that setjmp() in spawn_load() returned 0. Obviously, we
wanted the setjmp() to return 256 (0xff + 1), because the code in
spawn_load() handles the return value like so,

ret_val = setjmp(module->u.x.process_exit);

if (ret_val)
ret_val--;              /* Valid range is 0-255 */
else if (!module->main_func)
ret_val = -1;
else
exit((module->main_func)(argc, argv)); /* Actually run! */

There actually is code in spawn_load() to properly truncate 'ret_val',
but it is applied too late. The truncation needs to happen when we
pass the exit status to longjmp().

Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoelflink: Make ELF the default object format
Matt Fleming [Tue, 26 Apr 2011 08:59:53 +0000 (09:59 +0100)]
elflink: Make ELF the default object format

com32/elflink/modules was originally created to house ELF modules and
keep them separate from the COM32 modules as the elflink branch was
being developed. However, this has inadvertently created a maintenance
nightmare because code was copied from elsewhere in the tree into
com32/elflink/modules, resulting in duplication. Bug fixes have been
going into the original code but have not been merged onto the elflink
branch, leaving the duplicate code in com32/elflink/modules buggy.

So let's delete this directory. There really is no reason to keep ELF
and COM32 modules separate because there's no reason to need both
COM32 and ELF modules to coexist. ELF is a far superior object file
format and all modules are not emitted as ELF objects.

Now that we're outputting ELF modules we can use dynamic memory
instead of the cs_bounce bounce buffer.

This commit requires a certain amount of shuffling for some
files. quicksort.c isn't a module and belongs as part of the util
library. cli.h belongs in com32/include so that other modules can make
use of the cli code in ldlinux.c32.

All libraries are now ELF shared libraries which are only loaded to
fixup unresolved symbols for executable modules and renamed from *.a
to *.c32. This reduces the runtime memory footprint because libraries
are only loaded when needed and because every executable no longer
gets its own copy of code/data (as it would if linking with a static
library). Also, remove MINLIBOBJS from libcom32.c32 because it is
already part of libcom32min.a and we don't want to have any duplicate
symbols between the core (which links with libcom32min.a) and
libcom32.c32.

Welcome to the New World Order of ELF modules!

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agoelflink: Delete core-elf.h
Matt Fleming [Wed, 13 Apr 2011 23:59:12 +0000 (00:59 +0100)]
elflink: Delete core-elf.h

This header file really just duplicates code that is available in
other header files. It has no reason to exist.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agocom32: Move menu.h
Matt Fleming [Wed, 13 Apr 2011 23:52:23 +0000 (00:52 +0100)]
com32: Move menu.h

menu.h is required by the menu code in com32/menu and also by
ldlinux. So move it to a more neutral place.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
13 years agocom32: We only need one refstr.h
Matt Fleming [Wed, 13 Apr 2011 23:50:08 +0000 (00:50 +0100)]
com32: We only need one refstr.h

Delete the duplicate refstr.h and move the remaining copy into
com32/include so that it can be included by both ldlinux and the menu
code.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>