| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
Merge git://github.com/Celelibi/syslinux.git branch 'fix/efi/cleanup'
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
The assignment looks suspicious but is actually legit since it is
protected by the type check.
Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
The function efi_get_MAC was given a pointer to array instead of a
simple pointer, generating a warning with gcc.
Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
|
|/
|
|
|
|
|
| |
PCs without keyboards may hang as they might return a status other than
EFI_NOT_READY.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
|
| |
If LibLocateHandle() returns success and either 0 handles or we find no
matching handles, treat it the same.
Originally-By: Patrick Masotta <masottaus@yahoo.com>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
| |
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
|
| |
Extracts a MAC address from a device path
Originally-By: Patrick Masotta <masottaus@yahoo.com>
[gene.cumm@gmail.com: Respace]
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
| |
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
| |
This clause closes the protocol before creating the child
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store and reuse handle found with EFI_LOADED_IMAGE_PROTOCOL for
EFI_PXE_BASE_CODE_PROTOCOL and EFI_UDP4_SERVICE_BINDING_PROTOCOL
This caused machines with multiple NICs to not reliably attach to the
correct NIC handle.
gnu-efi LoadedImageProtocol PxeBaseCodeProtocol Udp4ServiceBindingProtocol
Reported-By: Holger Baust <holger.baust@freenet.ag>
Reported-By: Michael Glasgow <glasgow@beer.net>
Reported-By: Da Shi Cao <dscao999@gmail.com>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 415d571 ("adv: Remove double defintion") introduced a regression
for the EFI boot loader. The commit is correct, but should have tagged
the __syslinux_adv_ptr and __syslinux_adv_size data objects in the EFI
core as __export.
This change is required because symbols in the EFI code are not global
by default, and so, when ldlinux.{e32,e64} tries to bind to the adv
symbols it fails.
The following demonstrates the ELF symbol changes,
Before:
659: 0000000000034f40 8 OBJECT LOCAL DEFAULT 16 __syslinux_adv_ptr
After:
957: 0000000000036fe0 8 OBJECT GLOBAL DEFAULT 16 __syslinux_adv_ptr
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the last bits of the comapi interfaces completely. This does
not install stub handlers for the INT 20-3Fh handlers, as we don't
support loading old COMBOOT/COM32/COM32R images anymore.
We could put those back if we really need them.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|/
|
|
|
|
|
|
|
| |
Actually get the shuffler size sanely. At least for now, we are BIOS
only, so stub out the functions on EFI (they shouldn't even be
compiled for EFI; this stuff should be moved into some kind of
BIOS-only directory.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It could happen on 32 bits architecture that the memory size really allocated
could be less than required. On 64 bits, allocate_pages may be called
more times than needed.
This closes bug #39.
Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
| |
Version string appeared to be a temporary generic string; complete out in the
standard fashion
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Booting the next device is in fact fairly trivial under EFI. We simply
need to return control to the firmware with an error code that indicates
we couldn't execute our OS loader properly.
Unlike under BIOS, we don't take any notice of any integer arguments
passed to LOCALBOOT for EFI, since there is no variation for "boot next
entry".
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
By registering memory scanners at runtime we can support multiple memory
scanner functions, which helps us to isolate them and keep things
modular, only registering them for specific platform/derivative
combinations. This is preparation for adding a memory scanner that is
specific to PXELINUX on bios and understands when the memory region
occupied by the PXE stack can be reused.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
Otherwise the kernel may print "invisible" characters on the serial
console, because it doesn't reset the output device's character
attributes.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EFI handover protocol expects us to have setup the following fields,
o hdr.code32_start
o hdr.cmd_line_ptr
o hdr.ramdisk_image (if applicable)
o hdr.ramdisk_size (if applicable)
Which means we need to call handle_ramdisks() before handover_boot().
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
We haven't loaded ldlinux.* at this point so we can't rely on the
console code being in a useful state. Use the EFI-specific Print()
instead.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\
| |
| |
| |
| | |
Conflicts:
efi/efi.h
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Linux kernel doesn't use ANSI attributes when writing to the serial
console, so make sure we restore the default attributes that were set
when we were initially executed by the firmware. Failure to do so can
result in 'invisible' characters being written to the console.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| | |
We can defer all modifications of ->screen_info to setup_screen().
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There have been various bugs as a result of having multiple variables
for the linux_header struct. Move the header validation to another
function so that we don't have to keep track of two copies.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
We're updating the cmd_line_ptr field of the wrong linux_header, so the
command line isn't being passed to the kernel.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It's super confusing having 'bp' and '_bp'. Move the allocation of our
boot_params much earlier so that we only need one variable to track a
boot params structure.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
efi_main() is pretty large and could definitely be made clearer by
moving various chunks into their own functions.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The handover protocol is the preferred method of booting kernels on EFI
because it allows workarounds for various firmware bugs to be contained
in one place and applied irrespective of the chosen bootloader. Use it
if available, but ensure that we fallback to the legacy boot method.
Also, update the linux_header structure with recent changes made in the
kernel source.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't absolutely need a kernel to be built with CONFIG_RELOCATABLE=y
in order to boot it. We can try and place the kernel image as its
preferred address, and if that fails and the image isn't relocatable,
then we can bail.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The default scheme for booting Linux kernels should be to switch to
32-bit protected mode and jump to the start of the kernel image. The
kernel has always had the know-how to switch 64-bit capable CPUs into
64-bit mode if necessary. By using this scheme, we can transparently
boot either 32-bit or 64-bit kernels.
This change necessitated moving kernel_jump() to a .S file for both i386
and x86-64. Writing inline assembly is fun for about 5 minutes, but then
becomes monstrously tedious.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
This fixes a valid compiler warning on 64-bit about "cast from pointer
to integer of different size".
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
We only ever use ->set_mode() to transition into text mode, so rename it
to something more suitable and drop the unused 'mode' argument.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Various bits of Syslinux use the filesystem type of the derivative info
structure to figure out how we were booted. Update this for SYSLINUX and
PXELINUX.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|/
|
|
|
|
|
| |
syslinux-5.11-pre3
Conflicts:
core/Makefile
|
|
|
|
|
|
|
| |
I missed some symbols previously that are required to be exported when
loading vesamenu.c32.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
We need to provide a __bcopyxx_len symbol for EFI because it's
referenced in generic code in libcom32.c32. Without this change,
libcom32.c32 will fail to load under EFI.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
efi/main.c: In function ‘find_addr’:
efi/main.c:527:9: warning: unused variable ‘addr’ [-Wunused-variable]
efi/main.c:524:13: warning: unused variable ‘status’ [-Wunused-variable]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC is rightly complaining that we aren't returning a value from
sem_down() like we should be,
efi/main.c: In function ‘sem_down’:
efi/main.c:174:1: warning: control reaches end of non-void function [-Wreturn-type]
It doesn't really matter what value we return because the return value
is only used in core/thread which EFI doesn't need.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
To get rid of the following GCC warning,
efi/main.c:1237:2: warning: implicit declaration of function ‘load_env32’ [-Wimplicit-function-declaration]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
e.g.
efi/main.c:997:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi/main.c:999:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
GCC is complaining,
efi/main.c:534:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
and address the following compiler warning,
efi/main.c:263:2: warning: initialization from incompatible pointer type [enabled by default]
efi/main.c:263:2: warning: (near initialization for ‘efi_ops.erase’) [enabled by default]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to include thread.h because struct semaphore is never
actually used in the EFI code.
Fixes,
efi/main.c:171:26: warning: ‘struct semaphore’ declared inside parameter list [enabled by default]
efi/main.c:171:26: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
| |
It's no longer referenced anywhere as everything has now moved to
*sysappend*.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only ever pass uint8_t * to get_cursor(), so update the prototypes
and fix the following compiler warnings,
In function ‘__ansicon_open’:
com32/lib/sys/ansicon_write.c:93:6: warning: passing argument 1 of ‘firmware->o_ops->get_cursor’ from incompatible pointer type [enabled by default]
com32/lib/sys/ansicon_write.c:93:6: note: expected ‘int *’ but argument is of type ‘uint8_t *’
com32/lib/sys/ansicon_write.c:93:6: warning: passing argument 2 of ‘firmware->o_ops->get_cursor’ from incompatible pointer type [enabled by default]
com32/lib/sys/ansicon_write.c:93:6: note: expected ‘int *’ but argument is of type ‘uint8_t *’
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
| |
Reduce the default visibility of objects in efi/ as was done for BIOS in
commit e4b3ce2dd82c ("Symbol export whitelist").
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, there are still some references in generic code to
symbols that only make sense under BIOS. Use the __weak tag to allow
building for EFI without having to declare these symbols. Accessing
these __weak symbols under EFI will generate an error at runtime,
indicating to the user that they're executing a BIOS code path.
The long-term solution is to move these BIOS-specific symbols into
core/bios.c or somewhere equally BIOS-centric so that these symbols are
no longer global.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
commit fe283b78c973 ("efi: Add network support") made the assumption
that we were always booting via PXE and therefore wanted to register
pxe_fs_ops with fs_init(). Obviously we need to lookup which file system
syslinux.efi was loaded from at runtime and register the correct ops
vector.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|