H. Peter Anvin [Wed, 20 May 2009 09:15:01 +0000 (02:15 -0700)]
core: LZO compress the PM part of the core
Use LZO to compress the PM part of the core. LZO is not the best
compression algorithm, but it is very fast, and the decompressor is
only 447 bytes long. The LZO code is part of the LZO 2.03 library.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 20 May 2009 04:44:29 +0000 (21:44 -0700)]
core: fill unused space in .text with NOP not zero
Fill unused space in the .text section with NOP, not with zero.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 20 May 2009 02:57:39 +0000 (19:57 -0700)]
upx: try --lzma first, since --ultra-brute doesn't... sigh
You'd think upx --ultra-brute would test everything that is possible,
but not so. --lzma needs to be specified separately.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 20 May 2009 00:03:02 +0000 (17:03 -0700)]
dos: run UPX on the DOS installer binary if we have it
If UPX is installed on the host system, we might as well use it to
compress the DOS installer binary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 23:50:30 +0000 (16:50 -0700)]
dos: add a prototype for calloc()
Add a prototype for calloc() to the DOS installer library.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 23:48:19 +0000 (16:48 -0700)]
Standardize the names SECTOR_SIZE and SECTOR_SHIFT
Use the names SECTOR_SIZE and SECTOR_SHIFT everywhere, instead of an
odd mix of symbols and hard-coded constants.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 23:30:09 +0000 (16:30 -0700)]
FAT: change DOS installer to EXE; additional 32K limit fixes
Additional fixes for the 32K limits in the installers. In the case
of the DOS installer, that means changing it from COM format to EXE
format (since COM format has a 63K hard limit); retain the name
syslinux.com for user compatibility, though (DOS doesn't care what the
extension except for pathname search; if it finds an MZ EXE header it
will use it.)
With the change to EXE means having to handle more than one segment.
Since we don't have a real DOS compiler we have to wing it a bit.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 19:48:11 +0000 (12:48 -0700)]
libinstaller: "nsect" is the size of ldlinux.sys, not the total
"nsect" here is the size of ldlinux.sys, not the total structure;
therefore it should not be decremented. Again, all this should really
be unified.
With this patch the FAT derivatives boot with the current code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 19:41:31 +0000 (12:41 -0700)]
libinstaller: fix definition of bsHeadLen
Correct the definition of bsHeadLen, the size of the region at the
start of the boot sector that should always be copied.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 19:29:11 +0000 (12:29 -0700)]
FAT: update the FAT installers to match the new diskstart.inc
Update the FAT installers to match the new patch area format in
diskstart.inc. Also, update the coding style to match extlinux; this
code should eventually get unified.
This does not resolve the current issues with the DOS installer when
ldlinux.sys exceeds about 48K, at which point the DOS installer needs
to become a segment-aware EXE program.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 01:34:55 +0000 (18:34 -0700)]
pxelinux: revert to a separate stack implementation
Return to using a private stack, except immediately around a pxenv
call. The systems on which this broke has been lost in time, and with
more code in 32-bit space there is a risk of deeper stacks (due to
more mode-switch calls.)
It is still a single configuration variable to flip back to the
unified 16-bit stack, however. If most of the code is in 32-bit mode
and there is small likelihood of several transitions, it might still
be the best option in the end.
Note: the PXE stack is 1.5K in size (and we must account for the
possibility of receiving an interrupt.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 01:24:34 +0000 (18:24 -0700)]
pxelinux: set StackTop == StackBuf
We need StackTop to be <= StackBuf since we use memory immediately
above StackBuf during replace_bootstrap.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 19 May 2009 00:13:08 +0000 (17:13 -0700)]
core: use reserved stack space only for replace_bootstrap
When running replace_bootstrap, our regular stack is still live.
Therefore, (a) make sure we have 44 bytes reserved above the normal
stack, and (b) use those, i.e. StackBuf, not StackTop.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 23:35:49 +0000 (16:35 -0700)]
Merge branch 'master' into core32
H. Peter Anvin [Mon, 18 May 2009 23:29:30 +0000 (16:29 -0700)]
Don't run to comboot API with interrupts off
We have historically run the comboot API with interrupts off due to
concerns about stack overflow. However, this is a really bad idea: we
can easily spend a fair bit of time servicing one of these routines,
especially when doing things like waiting for I/O.
In particular, do_idle should *never* be run with interrupts disabled.
Switch to running with interrupts enabled everywhere unless we have
specific reasons not to do so.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 22:05:20 +0000 (15:05 -0700)]
Merge branch 'master' into core32
H. Peter Anvin [Mon, 18 May 2009 21:57:37 +0000 (14:57 -0700)]
core/conio.inc: when reading the serial port, drop read of IIR
Drop the read of the IIR when reading the serial port. First of all,
we weren't protecting AL so we clobbered the actual data; second of
all, this isn't actually necessary as reading RDR will clear the
interrupt condition per the UART spec.
It's worth noting that enabling interrupts here will do bad things if
the interrupts aren't edge-triggered (since we don't actually have an
interrupt routine to clear the interrupt condition); this also means
bad things will happen if the interrupt line is shared.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 21:34:05 +0000 (14:34 -0700)]
Merge branch 'master' into core32
H. Peter Anvin [Mon, 18 May 2009 21:32:57 +0000 (14:32 -0700)]
Merge branch 'master' into core32
Conflicts:
core/extlinux.asm
core/isolinux.asm
core/ldlinux.asm
core/pxeidle.inc
core/pxelinux.asm
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 21:28:18 +0000 (14:28 -0700)]
core/pxeidle.inc: fix pops with no matching push
In check_for_arp, we dropped the segment register pushes, but we need
to drop the pops, too.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 20:42:19 +0000 (13:42 -0700)]
Try to HLT the processor during idle
Try to HLT the processor during idle. All the events we care about
should have interrupts associated with them, except possibly the
serial console. Try to deal with the serial console by waiting some
time before going into HLT, and giving the user the option of enabling
the serial console interrupt, on the assumption that the BIOS will
simply IRET.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 19:07:23 +0000 (12:07 -0700)]
core: change "Linux needs..." to "Syslinux needs..."
Linux really only needs about 64K or so of low memory these days, but
Syslinux needs more.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 19:02:16 +0000 (12:02 -0700)]
version: set this version to 4.00
Assume that whatever version ends up using the core32 stuff it will be
called 4.00.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 18 May 2009 00:03:43 +0000 (17:03 -0700)]
Move the NASM debugging options to a separate variable
Move the NASM debugging options to a separate Makefile variable,
NASMDEBUG, so they can be overridden if necessary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 23:52:03 +0000 (16:52 -0700)]
core: move common module includes to common.inc
A lot of modules are common to *all* the derivatives (as opposed to
just "most"); move those to common.inc.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 23:41:10 +0000 (16:41 -0700)]
core: move real-mode callback code to callback.inc
The real-mode callbacks are not specific to the comboot API, nor are
they com32-specific anymore. Move them to a separate file, and let
com32.inc be only the items related to comboot files proper.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 23:25:38 +0000 (16:25 -0700)]
core: add .textnr to layout.inc
Add .textnr to layout.inc, so it gets the proper flags.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 20:39:42 +0000 (13:39 -0700)]
core: move 32-bit code out of the .text16 segment
Move all 32-bit code out of the .text16 segment. The code that is
used during the relocation of the .text segment (i.e. anywhere on the
bcopy path) is moved to .textnr (other than the code already in
.bcopyxx) for "no relocate", the rest of the code to .text.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 05:12:41 +0000 (22:12 -0700)]
core: move "-g -F stabs" to NASMOPT
Move -g -F stabs to NASMOPT. Eventually we might need to disable them
for older versions of NASM, since the linker seems to get unhappy
about mixing older NASM stabs with gcc stabs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 02:14:17 +0000 (19:14 -0700)]
Merge branch 'master' into core32
Conflicts:
core/graphics.inc
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 02:07:19 +0000 (19:07 -0700)]
bcopyxx: remove 16-bitisms
Remove a couple of 16-bitisms in the bcopy code, since it is now
running in perfectly ordinary 32-bit mode. In particular,
prefer 32-bit registers to 16-bit registers, and drop "a32" prefixes
(which do nothing.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 17 May 2009 02:02:38 +0000 (19:02 -0700)]
bcopyxx/memmove: fix alignment logic for reverse moves
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>
H. Peter Anvin [Fri, 15 May 2009 23:24:34 +0000 (16:24 -0700)]
Fix clobber of the command line when using F-keys+LSS graphics
Fix a half-entered command line when getting clobbered when pressing
an F key that in turn invokes an LSS graphic. This was used by
duplexing the command line buffer as LSS decompression space.
Allocate a separate buffer, but move the legacy graphic variables to
.bss2 to avoid overflow.
Reported-by: Михаил <from.miha@gmail.com>
Debugged-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 20:34:17 +0000 (13:34 -0700)]
core: make auxseg a piece of address space assigned by the linker
Let the linker assign a place for the auxseg using normal linking
rules. Place it between the main 16-bit and 32-bit code. Eventually
the fontbuf will probably move into the 32-bit bss.
This also avoids the weirdly aligned real_mode_seg.
In the future, expect xfer_buf_seg and real_mode_seg to merge into a
single 16-bit bounce buffer and cache_seg to go away.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 17:43:25 +0000 (10:43 -0700)]
core: add pm_call convenience macro
Add a pm_call convenience macro, instead of using stub routines
everywhere. Stubs would still make sense if we have a routine which
gets invoked from a lot of places, though, since the pm_call expands
to 9 bytes as opposed to 3 bytes per call site plus a 10-byte stub.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 17:33:02 +0000 (10:33 -0700)]
core: make the intcall/farcall/cfarcall routines reentrant
Make the intcall/farcall/cfarcall routines reentrant, by dropping the
use of RealModeEAX and by saving/restoring Com32SysSP on the PM stack.
Furthermore, drop the saving and restoring of EAX, EDX, ECX; trying to
save all registers complicates the code, and those registers will be
assumed clobbered by the caller anyway. Might as well save a little
bit of stack space, too.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 03:17:43 +0000 (20:17 -0700)]
core: make the COMBOOT API available to in-kernel PM code
Make it possible to call the COMBOOT API from in-kernel PM code,
simply by setting up the COMBOOT API earlier and only tearing it down
during final shutdown.
WARNING: the COMBOOT API is quite possibly probably not reentrant; I
haven't checked it...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 02:09:11 +0000 (19:09 -0700)]
core: move core definitions to include/core.h
Create a new include file for core-specific definitions, and put it in
the include directory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 02:01:35 +0000 (19:01 -0700)]
core: rewrite rllpack in C
Rewrite the rllpack implementation in C, as a first step and test
case.
In particular, this illustrates how to access real-mode registers from
protected-mode C.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 01:14:20 +0000 (18:14 -0700)]
core: link with libcom32 and libgcc
Link libcom32 and libgcc into the core. That doesn't mean all the
functionality of libcom32 is usable in the core!!!
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 01:07:30 +0000 (18:07 -0700)]
core/diskstart.inc: break transactions on 64K boundaries
getlinsec doesn't watch for 64K boundaries, so we need to do it
ourselves. Break a loading run if we reach a 64K boundary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 15 May 2009 01:04:25 +0000 (18:04 -0700)]
core/diskstart: handle more than 2^16 dwords
Handle more than 2^16 dwords in the checksumming loop.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 23:50:11 +0000 (16:50 -0700)]
BUGS, TODO: deleted outdated, no longer maintained files
These files are outdated and haven't been updated for years. This
kind of stuff probably would work better on the wiki anyway.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 23:33:37 +0000 (16:33 -0700)]
core: handle more than 32K of code for disk-based derivatives
Handle more than 32K worth of code for disk-based derivatives. We do
this by allowing the sector pointers to overflow past sector 1; this
is OK because we limit a run to be based on only the pointers that we
have read so far.
XXX: This is implemented for EXTLINUX, but breaks SYSLINUX. Need to
update (and unify!) the SYSLINUX installers to cope.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 19:21:46 +0000 (12:21 -0700)]
core: adopt the naming convention core_* for exported symbols
Adopt the naming convention core_* for symbols exported from the core
code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 19:20:36 +0000 (12:20 -0700)]
core: syslinux.ld: explicitly mark .adv and .uibss as NOLOAD
Explicitly mark the .adv and .uibss sections as NOLOAD; this seems to
avoid a linker error for reasons (VMA of these sections colliding with
the LMA of the 32-bit code.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 18:59:46 +0000 (11:59 -0700)]
First cut of doing 32-bit C code in the core
A very preliminary implementation of 32-bit C code in the core. This
currently breaks ADV, because the installer assumes the ADV is the
last two sectors in extlinux.sys -- need to figure out a way to deal
with this hopefully without breaking the migration protocol.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 05:46:25 +0000 (22:46 -0700)]
core: rename .text, .data and .bss to .text16, .data16, .bss16
Rename the .text, .data and .bss sections to .text16, .data16 and
.bss16, in anticipation of being linked with compiler-generated 32-bit
code, which presumably would like to use the standard section names.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 05:05:41 +0000 (22:05 -0700)]
core: zero bss and uibss; fix some section confusions
Set .bss and .uibss as soon as we are fully loaded. This gives us the
more familiar behavior of most normal execution environments. The
.earlybss section is not zeroed; therefore, all variables that are set
before we have the opportunity to zero need to go in this section.
This checkin also fixes some incorrect section directives.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 01:38:46 +0000 (18:38 -0700)]
core: obsolete .bss1 and .bss2
Remove the obsolete .bss1 and .bss2 segments; they represent segment
balancing which is no longer useful. The current balance between
.earlybss, .bss and .uibss seems to be sufficient; if we need more
balancing in the future then we need to start over anyway.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 01:35:35 +0000 (18:35 -0700)]
core: move initial code to a new .init segment; unify .bss+.bss1
Move code used before loading is complete to a new .init segment;
.text is now only the stuff that is used at any time. Move the .bss1
segment down to where .bss and .bss2 already are; it seems to fit
better there now.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 14 May 2009 00:32:29 +0000 (17:32 -0700)]
core: simplify pm_call usage
Simplify the pm_call usage:
- pm_call now saves and restores all registers
callees that want to return values in registers can mess with
the frame on the stack
- the PM function now enters with EAX = EBP = RM stack
(EAX for the use of C code, EBP for assembly)
- the RM stack frame matches com32sys_t
- pmcall.inc defined macros for the stack frame based on EBP
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 13 May 2009 23:20:15 +0000 (16:20 -0700)]
core/pm.inc: shorten the time until we have a valid stack
Cut the time until we have a valid RM stack as much as possible.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 13 May 2009 23:19:16 +0000 (16:19 -0700)]
core/bcopy32.inc: provide correct output esi/edi from bcopy
Make sure the outputs from the bcopy routine are set correctly.
pm_bcopy doesn't do this for us, so we have to do that ourselves.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 13 May 2009 23:18:32 +0000 (16:18 -0700)]
core/com32.inc: fix bits 16/bits 32 confusion
The unification dropped a bunch of bits 16/bits 32 that are needed to
make things work. Add those back where needed.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 13 May 2009 22:29:13 +0000 (15:29 -0700)]
pm_call: only enable interrupts in PM if interrupts on in RM
When executing pm_call, only enable interrupts in PM if we were called
with interrupts enabled in RM.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 13 May 2009 22:22:38 +0000 (15:22 -0700)]
New attempt at unify protected mode entry/exit
Another attempt at unify protected mode entry/exit, based on the
previous bcopyint branch. This should, among other things, give a
"full service" PM environment including BIOS upcalls and interrupt
service to the core-internal code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 5 May 2009 20:56:49 +0000 (13:56 -0700)]
linux.c32: replace the kernel name with BOOT_IMAGE=
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>
H. Peter Anvin [Tue, 5 May 2009 16:50:00 +0000 (09:50 -0700)]
linux.c32: honor the "quiet" flag
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>
H. Peter Anvin [Tue, 5 May 2009 04:56:06 +0000 (21:56 -0700)]
bcopyxx: EDX already points to the GDT; no reason to recompute
We already have the EDX register pointing to the GDT, so recomputing
the address of the GDT is completely pointless. This shaves an
additional few bytes off the bcopyxx safe area (now down to 543 bytes
including the 128-byte stack and the 15-byte alignment slop.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 5 May 2009 04:07:28 +0000 (21:07 -0700)]
load_linux.c: quiet warning
Quiet a (harmless) compiler warning.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 5 May 2009 00:36:54 +0000 (17:36 -0700)]
load_linux.c: consider a zImage kernel to be non-relocatable
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>
H. Peter Anvin [Tue, 5 May 2009 00:34:46 +0000 (17:34 -0700)]
load_linux.c: when relocating, need to update code32_start
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>
H. Peter Anvin [Tue, 5 May 2009 00:25:20 +0000 (17:25 -0700)]
load_linux.c: add missing header file
We need <minmax.h> for min().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 5 May 2009 00:22:27 +0000 (17:22 -0700)]
linux.c32: cap the stack pointer to 0xfff0
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>
H. Peter Anvin [Tue, 5 May 2009 00:17:08 +0000 (17:17 -0700)]
NEWS: document linux.c32 fix.
H. Peter Anvin [Tue, 5 May 2009 00:13:16 +0000 (17:13 -0700)]
shuffler: fix setting up esp in real-mode shuffles
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>
Sebastian Herbszt [Mon, 4 May 2009 21:42:24 +0000 (23:42 +0200)]
poweroff: add copyright notice
Add a copyright notice.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 4 May 2009 21:30:53 +0000 (14:30 -0700)]
Next version will probably be 3.81
H. Peter Anvin [Mon, 4 May 2009 21:12:11 +0000 (14:12 -0700)]
core: remove vestiges of using nasm -f bin
Remove a few things that are specific to NASM's "bin" backend, which
we no longer use. Newer versions of NASM print warning messages which
are unnecessary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 4 May 2009 21:11:41 +0000 (14:11 -0700)]
NEWS: drop plans for a 3.76 release
The aim now is for a 3.80 release instead...
H. Peter Anvin [Mon, 4 May 2009 18:35:55 +0000 (11:35 -0700)]
Document poweroff module.
Sebastian Herbszt [Mon, 4 May 2009 18:05:20 +0000 (20:05 +0200)]
poweroff COMBOOT module
This module is able to power off a system via APM.
It was tested on QEMU, Bochs and VMware.
Possible usage:
TIMEOUT 3000
TOTALTIMEOUT 9000
ONTIMEOUT poweroff.com
- Sebastian
H. Peter Anvin [Mon, 4 May 2009 01:35:46 +0000 (18:35 -0700)]
mboot: handle ELF Multiboot kernel where paddr != vaddr
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>
H. Peter Anvin [Sun, 3 May 2009 22:23:01 +0000 (15:23 -0700)]
shuffler: when looking for temporary memory, it has to be *free!*
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>
H. Peter Anvin [Sun, 3 May 2009 22:07:52 +0000 (15:07 -0700)]
movebits: make the user-space test cases slightly easier
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>
H. Peter Anvin [Sun, 3 May 2009 00:27:03 +0000 (17:27 -0700)]
shuffler: correctly handle one-to-many relationships
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>
H. Peter Anvin [Sun, 3 May 2009 00:26:06 +0000 (17:26 -0700)]
shuffle: align the shuffle safe area
For performance, align the shuffle safe area to a dword boundary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 3 May 2009 00:00:38 +0000 (17:00 -0700)]
syslinux_dump_memmap(): make it easier to spot errors
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>
H. Peter Anvin [Sat, 2 May 2009 23:58:46 +0000 (16:58 -0700)]
syslinux_add_memmap(): fix failures at address zero, more?
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>
H. Peter Anvin [Sat, 2 May 2009 20:55:42 +0000 (13:55 -0700)]
mboot: align the stack to a 16-byte boundary
Align the stack to a 16-byte boundary, just in case...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 2 May 2009 20:52:04 +0000 (13:52 -0700)]
mboot: move setting regs.eax to mboot_run()
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>
H. Peter Anvin [Sat, 2 May 2009 20:47:29 +0000 (13:47 -0700)]
mboot: move map initialization out of map_image()
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>
H. Peter Anvin [Sat, 2 May 2009 19:25:48 +0000 (12:25 -0700)]
ui.inc: when looking for whitespace in kernel names look for <= ' '
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>
Sebastian Herbszt [Sat, 2 May 2009 16:24:10 +0000 (18:24 +0200)]
pxechain: remove unused ipaddrbuf
Remove unused ipaddrbuf.
Sebastian Herbszt [Sat, 2 May 2009 17:07:15 +0000 (19:07 +0200)]
core: make vk_rname default to mangled vk_vname
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.
H. Peter Anvin [Fri, 1 May 2009 18:10:45 +0000 (11:10 -0700)]
gfxboot: increase bss alignment to 4K
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>
H. Peter Anvin [Fri, 1 May 2009 18:07:59 +0000 (11:07 -0700)]
gfxboot: align buffers and move them into bss
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>
H. Peter Anvin [Fri, 1 May 2009 18:02:28 +0000 (11:02 -0700)]
NEWS: document isohybrid fix
Pascal Terjan [Fri, 24 Apr 2009 17:00:05 +0000 (19:00 +0200)]
isohybrid: preserve MBR id in isohybrid
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>
Pascal Terjan [Fri, 24 Apr 2009 16:59:17 +0000 (18:59 +0200)]
isohybrid: support iso images over 2GB
"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>
H. Peter Anvin [Thu, 30 Apr 2009 22:57:44 +0000 (15:57 -0700)]
Document boot-once fix.
H. Peter Anvin [Thu, 30 Apr 2009 22:55:29 +0000 (15:55 -0700)]
ADV: EDD "write with verify" is AL=01h or AL=02h, not AL=80h
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>
H. Peter Anvin [Thu, 30 Apr 2009 21:06:53 +0000 (14:06 -0700)]
cmenu: add .gitignore file
Add .gitignore file for .c files created from .menu files.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 30 Apr 2009 17:04:35 +0000 (10:04 -0700)]
mboot: disable DEBUG
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>
H. Peter Anvin [Thu, 30 Apr 2009 01:49:44 +0000 (18:49 -0700)]
NEWS: update
H. Peter Anvin [Thu, 30 Apr 2009 01:39:06 +0000 (18:39 -0700)]
linux.c32: move handling of mem= and vga= into the library function
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>
H. Peter Anvin [Wed, 29 Apr 2009 22:55:21 +0000 (15:55 -0700)]
core: make localboot another vkernel type
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>
H. Peter Anvin [Wed, 29 Apr 2009 05:03:30 +0000 (22:03 -0700)]
shuffle_pm: remove unused variables and includes
Remove unused variables and #include statements
from syslinux_shuffle_boot_pm().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 29 Apr 2009 05:01:48 +0000 (22:01 -0700)]
memscan: use the contents of the ebda_seg, not the pointer itself
Use the contents of the ebda_seg variable, not the address...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>