| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
Our somewhat generous definition of whitespace is less than or equal
to 32 (' '); we do not include 127 and 255 which are printable
characters in the PC codepages (in the latter case, NBSP.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
| |
Remove unused ipaddrbuf.
|
| |
|
|
|
|
|
| |
Change pc_label in parseconfig.inc to default vk_rname to mangled
vk_vname. Also change spaces to tabs. This gives a usable error
message in the case where the user selects a label without any kernel
information.
|
| |
|
|
|
|
|
|
| |
Increase the bss alignment (and therefore the alignment of buffers) to
4K rather than 512 bytes -- this in anticipation of future hard disks
with 4K sectors. This only changes the actual bss location by 1.5K.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
Align I/O buffers to a multiple of 512 bytes, as required by the
Syslinux ABI. Furthermore, move them from data to bss, so that they
don't occupy space in the image file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Sebastian Herbszt <herbszt@gmx.de>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
When running isohybrid again it's nice to preserve the MBR id
There was some partial code to support setting the id using non
existing to_int, but no way to use it.
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
"use integer" limits integers to 2^31-1 on 32 bits, which makes
imgsize to be -1 on DVD images
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The "write with verify" functionality in EDD is AL=01h or AL=02h
depending on EDD version, not AL=80h. Since it is apparently
version-dependent, don't even try to do it; furthermore, some BIOSes
are known to reject a write with this feature requested no matter
what. At some point we may want to explicitly read back to verify.
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>
|
| |
|
|
|
|
|
|
|
| |
Change "localboot" to be another vkernel type. It still needs some
special treatment (because it doesn't take a filename), but overall
this makes it a lot cleaner than what it was before. It should also
avoid the problem of empty labels (e.g. menu quit) doing weird things.
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>
|
| |
|
|
|
|
| |
We no longer need "make depend" for anything.
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>
|
| |
|
|
|
|
|
|
|
| |
Fix missing -M from NASM dependency generation calls; adopt the
uniform stanza "-M -DDEPEND" even for sites that were already correct.
Also, use ">" not ">>" for obvious reasons...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Unify dependency generation and move common rules into
MCONFIG.embedded.
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>
|
| |
|
|
|
|
|
|
| |
The messing around with partial pointers for rllpack/rllunpack turned
out to be a source of bugs. Instead, have all the values be 32 bits
wide, and require the callers to pass them accordingly.
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>
|
| |
|
|
|
|
|
|
|
|
| |
Clear the flags register while we still have a stack to do so.
This makes the state in the target OS more predictable. It's worth
noting that none of the instructions we use in either the PM or RM
trampolines change the flags, either (except the IF setting in the RM
trampoline, but that is intentional.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Align the relocated bcopyxx code to a 16-byte boundary. There are
CPUs which have errata relating to GDTs which are not 16-byte aligned.
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>
|
| | |
|
| |\
| |
| |
| |
| | |
Conflicts:
version
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|