| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
All the *.elf files depend on com32.ld, so make that explicit.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
libutil would set the autocr flag on the serial console, which really
never was any point -- we already do \n -> \r\n conversion explicitly
in the serial code. This was always very annoying to deal with if the
menu was interrupted.
Furthermore, drop completely unnecessary
initialization/deinitialization routines that completely duplicated
other code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop all support for ACPI 3 E820 extended memory attributes. There
are BIOSes in the field that report completely bogus information here,
resulting in no memory at all being detected (we then fall back to
E801 detection, but that is problematic in its own ways.)
There is strong reasons to believe at this point that the extended
memory attributes are not usable in their current form, so drop them
and revert back to simple 20-byte support, including for MEMDISK
spoofing.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Remove a clobber of drivename and partition, after we have spent time
computing what the should have been...
Reported-by: Luciano Miguel Ferreira Rocha <strange@nsk.no-ip.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
For debugging reasons it's important to know if we have no flags at
all or if we get flags = 1. Print [-] in the case of no flags at all.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
The alignment logic for reverse moves is reversed, because the initial
edi, and therefore edx, points to the last byte, not to one byte
beyond the end. Therefore, in the fully aligned case it will end in
11 binary, not in 00 binary as for the forward case.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
The BOOT_IMAGE= argument is generated by replacing the kernel name in
the argument array. As a result, we shouldn't advance argp. Move the
code around slightly, to make it more obvious that that is what is
happening.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Honor the "quiet" flag for linux.c32, since some distros have odd
notions about these things.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Quiet a (harmless) compiler warning.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
It's pretty safe to say there has never been a working relocatable
Linux zImage kernel, and the semantics for them are iffy at best.
Consider zImage kernels to be non-relocatable.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
The normal value for code32_start is based on the kernel load address
(in fact, it usually *is* the kernel load address); accordingly, it
needs to be updated if the kernel is relocated.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
We need <minmax.h> for min().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Linux itself is fine with sp = 0 for a 64K segment, but perhaps other
things aren't. Just to be safe, set the stack pointer to 64K-16
bytes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
The value of esp set in real-mode shuffles was wrong. This
unfortunately broke linux.c32 :(
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
The way Grub handles ELF Multiboot kernels where paddr != vaddr is to
load at the paddr, but to also adjust the entry point (e_entry) so
that the previous vaddr becomes a paddr. Since the Multiboot spec is
pretty much "Grub wins", follow this behavior.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
free_area() ended up looking for any area of memory, not necessarily a
*free* area of memory. This had predictably disastrous consequences.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Make it a bit easier to write user-space test cases; use fgets+sscanf
so comment lines end up getting ignored.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One-to-many relationships, in which one chunk of a file is used in
more than one place, tends to naturally show up in decoding certain
fileformats, including (but not limited to) Microsoft SDI. Make the
shuffler library handle those cases correctly, and remove a
special-purpose hack in sdi.c.
This is based on the observation that all one-to-many relationships
can be treated as a one-to-one shuffle followed by
destination-to-destination copies; i.e. one copy is (arbitrarily)
assigned the "master copy" status, and all aliases are then copied
from the master copy when the master copy is already in its final
place. All other copies can then be simply ignored for the duration
of the shuffle, just as zero-memory is.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
For performance, align the shuffle safe area to a dword boundary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Instead of stopping the memmap dump on SMT_END, stop it only on a null
pointer. That way we can see if we have any bogus entries with
SMT_END.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
syslinux_add_memmap() would fail miserably and corrupt the list if an
entry was added at address zero. Quite possibly other addresses would
have similar problems. Furthermore, we did an extra "optimization
pass" which should never have been necessary if the algorithm had been
correct in the first place.
This should hopefully fix ALL those bugs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Align the stack to a 16-byte boundary, just in case...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
The setting of regs.eax in map_image() doesn't really make any sense;
move it to mboot_run() instead.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
The amap/mmap initialization were buried randomly inside map_image(),
which at the very least makes the code needlessly hard to read.
Furthermore, it is at least possible that we may want to be able to
map multiple images in the future.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Add .gitignore file for .c files created from .menu files.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Disable DEBUG in mboot.c32, which was accidentally enabled in a
previous commit.
Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Move the handling of mem= and vga= into syslinux_boot_linux(), so that
the user of that function doesn't need to worry about it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Remove unused variables and #include statements
from syslinux_shuffle_boot_pm().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Use the contents of the ebda_seg variable, not the address...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Silence warning of unused argc.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Grub includes the kernel and module filenames in the command lines it
passes, so match that behavior and don't strip them off.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Add the unified dependency generation to com32/lib and com32/cmenu.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Make the dependency generation more common; have a general pattern in
MCONFIG, and use it in rules (not in CFLAGS).
For NASM source, in order to stay compatible with old versions of
NASM, run NASM twice; newer versions of NASM is capable of generating
dependencies simultaneously like gcc can, but that would break
compatibility with older distros.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Actually (try to) handle the case of finding the DOS memory amount.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Reformat the mboot header files slightly, use <inttypes.h> types, and
add header inclusion guards.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
| |
Better handling of failed mapping; correct copyright notice.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Reimplement the Solaris DHCP information passing hack.
Add a spec-compliant mode for the "a.out kludge". The spec is pretty
clear that the bit should override the ELF header (after all,
otherwise there wouldn't be any need for the bit), but Grub
disagrees. We default to Grub-compliant mode, as Solaris seems to set
the bit even though it's an ELF kernel, but add the option to enable
spec-compliant mode, as apparently some versions of FreeBSD need it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Fix module command lines (it was overwriting the main kernel command
line); a few minor layout tweaks. In particular, we require the
section header to be page-aligned, but not the subsequent sections.
With this, I can get Xen to boot.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
When walking the argument list we need to skip --- markers.
Grub, and the old mboot.c32, seem to transparently decompress all
files, not just the main one, so do the same.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
When we actually finished mapping the image, return 0 and don't bail.
Add error messages to most failure cases.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Generate the dependency files by default. They should perhaps even
move into the actual rule lines.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Set up a stack for the Multiboot OS even though it is not required by
spec.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
First attempt at rewriting the mboot module to use the Syslinux
shuffle APIs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Define macros for common constructs to clean up the rm trampoline
generator.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
For extra paranoia's sake, set up SS:ESP immediately after the
real-mode switch, and then set all the segment registers.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
| |
Impact: making build working again
A forgoten conflict
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into mainline
Conflicts:
com32/hdt/hdt-cli-pci.c
com32/hdt/hdt-cli-vesa.c
com32/hdt/hdt-common.c
com32/hdt/hdt-menu-dmi.c
|
| | |
| |
| |
| | |
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| |
| |
| |
| |
| | |
Fix format string warnings spit by the compiler.
- Sebastian
|