summaryrefslogtreecommitdiff
path: root/com32/lib/syslinux/movebits.c
Commit message (Collapse)AuthorAgeFilesLines
* com32: make syslinux_dump_*() pure debugging functionsH. Peter Anvin2011-06-271-16/+10
| | | | | | | | Make the syslinux_dump_*() functions pure debugging functions; that is the way that they are used anyway, and this way they log to the same place as dprintf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Use <dprintf.h> instead of an ad hoc definitionH. Peter Anvin2011-06-271-15/+1
| | | | | | | Instead of using ad hoc definitions of dprintf, dprintf2, vdprintf and vdprintf2, use <dprintf.h> everywhere possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/syslinux/movebits.cH. Peter Anvin2009-05-291-510/+511
| | | | | | | | | Automatically reformat com32/lib/syslinux/movebits.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* shuffler: when looking for temporary memory, it has to be *free!*syslinux-3.80-pre8H. Peter Anvin2009-05-031-0/+2
| | | | | | | 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>
* movebits: make the user-space test cases slightly easierH. Peter Anvin2009-05-031-9/+12
| | | | | | | 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>
* shuffler: correctly handle one-to-many relationshipssyslinux-3.80-pre7H. Peter Anvin2009-05-021-18/+130
| | | | | | | | | | | | | | | | | | 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>
* movebits: rewrite significant chunks of the algorithmsyslinux-3.63-pre5H. Peter Anvin2008-04-091-166/+246
| | | | | | | | | Rewrite the algorithm to prefer entries which can be directly moved into their target slots; this should reduce the number of descriptors in most cases (although not necessarily *all* cases.) Try to clean up the code some while we're at it... the code is confusing enough as it is.
* movebits: use the memmap data structure for the freelistH. Peter Anvin2008-04-081-152/+80
| | | | | | Use the syslinux_memmap data structure for the free memory list. This means we get range coalescing; this sometimes generates lists that are vastly shorter than without range coalescing.
* movebits: handle the case of an upward overlap move with obstaclesH. Peter Anvin2008-04-081-115/+187
| | | | | Handle the case of an upward move when there is something in the way. This happens when loading an SDI image.
* Handle arbitrary numbers of shuffle descriptorsH. Peter Anvin2008-02-111-5/+30
| | | | | Allocate high memory out of the way to hold the shuffle descriptors, and generate continuation descriptors as needed.
* Update copyright yearH. Peter Anvin2008-01-101-1/+1
|
* Stealth whitespace cleanup (automated)H. Peter Anvin2007-03-141-2/+2
|
* Finish the shuffle and boot interface, and add an ELF loading module.H. Peter Anvin2007-03-141-10/+89
| | | | | | The shuffle and boot interface, including the library support, should now work as advertised. Add an ELF-loading module as a demo, and it's probably useful for someone, too.
* Wrapper infrastructure for "shuffle and boot"H. Peter Anvin2007-03-121-0/+408
Initial checkin of a wrapper infrastructure for the "shuffle and boot" interface, both real and protected mode. This code automatically will figure out the necessary sequence of moves, taking into account swaps and overlaps as necessary.