summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* com32: replace hard-coded bounce buffer use in com32/libsyslinux-4.00-pre25H. Peter Anvin2010-02-2411-74/+149
| | | | | | Replace hard-coded bounce buffer uses in com32/lib with lmalloc/lfree. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: fix lowmem mallocH. Peter Anvin2010-02-244-3/+6
| | | | | | | | | | | | a) initialize *all* the head nodes b) the lowmem heap needs to be paragraph (16 byte) aligned c) use a dedicated tag value for headnodes. The type code should be removed and replaced with special tag values for head node and free. d) for libcom32 code called from the core, do NOT present a usable bounce buffer; we should only ever use lmalloc/lfree. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: add lzalloc()H. Peter Anvin2010-02-242-0/+12
| | | | | | Add lzalloc(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lmalloc: set errno on failureH. Peter Anvin2010-02-241-1/+6
| | | | | | | The core function can't set the com32 errno, so we need to do it in the wrapper. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: wrapper functions for lowmem allocationsH. Peter Anvin2010-02-244-0/+67
| | | | | | lmalloc(), lfree(), lstrdup() Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move aligned segments earlierH. Peter Anvin2010-02-241-17/+18
| | | | | | | | | Move the aligned segments downward, to provide for the largest possible contiguous lowmem heap. This minimizes the necessary lowmem footprint. (Note: the heap doesn't actually need to be contiguous, but having it not be makes it harder to size.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: use better malloc; add low memory malloc; fix com32 exitH. Peter Anvin2010-02-2317-258/+451
| | | | | | | | | | | | | Use a better malloc for the core. In particular, use the same core that we should eventually be able to use for the entire system in Syslinux 5 -- with module awareness, etc. This code can also accommodate multiple heaps. Set up a separate heap for lowmem; the intent is to use explicit lowmem allocations instead of the static bounce buffer. The lowmem allocation is also exported via the pmapi mechanism, so modules can safely allocate lowmem. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: clean up/fix generation of ipappend stringsH. Peter Anvin2010-02-234-40/+22
| | | | | | | | Clean up and fix the generation of the ipappend strings. In particular, BOOTIF= was generated into a buffer which was too small. Put the buffer definitions in C while we're at it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs/pxe: drop the use of PKTBUF_SEGH. Peter Anvin2010-02-233-34/+28
| | | | | | | | Drop the use of a magic PKTBUF_SEG, and instead just have a high memory buffer for each file, and a single lowmem buffer that we reuse at will. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'pxefix' into pathbasedH. Peter Anvin2010-02-231-0/+4
|\
| * pxe: set the block size in the fs structureH. Peter Anvin2010-02-231-0/+4
| | | | | | | | | | | | | | | | | | | | For better or worse, we use block counts for communicating with the filesystem. It would therefore be rather polite to tell them what block size we expect. This fixes a boot failure with the new loadhigh routine. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add a direct 32-bit APIH. Peter Anvin2010-02-2311-40/+170
| | | | | | | | | | | | Add a direct 32-bit API to some functions; initially read file only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pathbased:btrfs use iget interface and leverage general search routingAlek Du2010-02-232-175/+81
| | | | | | | | | | | | | | | | Now btrfs won't export its own searchdir, it uses the iget and iget_root interface. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core/com32.inc: warn about possible double use of core_xfer_bufH. Peter Anvin2010-02-211-0/+3
|/ | | | | | | core_xfer_buf is still used as bounce buffer by libcom32 code linked into the core. This is likely unsafe -- needs to be fixed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: rewrite loadhigh in CH. Peter Anvin2010-02-212-62/+121
| | | | | | | Rewrite the loadhight function in C, and eliminate double usage of xfer_buf_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: go back to using real_mode_seg as bounce bufferH. Peter Anvin2010-02-211-1/+1
| | | | | | | Go back to using real_mode_seg as bounce buffer; this reserves xfer_buf_seg strictly for the in-core filesystem code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: let xfer_buf_seg, real_mode_seg be assigned by the linkerH. Peter Anvin2010-02-219-22/+50
| | | | | | Use the linker to assign xfer_bug_seg and real_mode_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge remote branch 'origin/master' into pathbasedH. Peter Anvin2010-02-2015-32/+833
|\
| * libpci: merge BIOS read and BIOS writeH. Peter Anvin2010-02-206-25/+13
| | | | | | | | | | | | | | Save a few bytes by merging the very similar BIOS read and BIOS write functions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * i915resolution: use libpci to access PCI config spacesyslinux-3.85-pre13syslinux-3.85H. Peter Anvin2010-02-161-19/+11
| | | | | | | | | | | | | | | | Use libpci to access PCI config space. This *hopefully* will make it less likely that some old machine hangs when failing to set the requested video mode. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * NEWS: document i915resolution merge.syslinux-3.85-pre12H. Peter Anvin2010-02-161-0/+4
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'i915res'H. Peter Anvin2010-02-164-2/+813
| |\
| | * Merge branch 'master' into i915ressyslinux-3.85-pre63H. Peter Anvin2010-02-0848-57/+4003
| | |\
| | * \ Merge branch 'master' into i915ressyslinux-3.85-pre62H. Peter Anvin2010-02-03695-9856/+64396
| | |\ \
| | * \ \ Merge branch 'master' into i915ressyslinux-3.85-pre61H. Peter Anvin2010-01-222-4/+10
| | |\ \ \
| | * | | | vesa: allow arbitrary resolutions on some Intel chipsetsH. Peter Anvin2010-01-224-2/+813
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some code from the tool "915resolution" to allow arbitrary resolutions to be set on some Intel chipsets. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | Makefile: dos/copybs.com now in dosutilH. Peter Anvin2010-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | dosutil: move copybs here, update MakefileH. Peter Anvin2010-02-154-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move copybs to dosutil, change the Makefile to deal with UPX being able to compress (e.g. very small files.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: use vk_append for function 0016h temp storagesyslinux-4.00-pre24H. Peter Anvin2010-02-161-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a) we have to copy the command line tail earlier - the pm_* calls may use xfer_buf_seg in particular. b) use vk_append rather than trackbuf; vk_append should definitely be unused. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: remove stray -DDEBUGH. Peter Anvin2010-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove stray -DDEBUG that should not have been committed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: handle symlinks larger than a single blockH. Peter Anvin2010-02-161-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no law that symlinks has to be a single block only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: a zero block number is actually legitH. Peter Anvin2010-02-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It may not happen in normal operation, but a zero block value is legit and means an all-zero block. For anything which uses the cache, we have dealt with that by always keeping a zero block in the cache. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: drop any 64K limitH. Peter Anvin2010-02-162-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no point in maintaining a 64K limit; this is handled at a lower level in the disk I/O library if appropriate. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | fs: move the disk cache into high memoryH. Peter Anvin2010-02-162-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the disk cache out of the DOS memory area. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: fix confusion between logical and physical block numbersH. Peter Anvin2010-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a minor confusion between logical and physical block numbers in the new iterative bmap implementation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | cache: fix cache initializationH. Peter Anvin2010-02-161-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the cache initialization; in particular make sure dev->cache_head actually gets set. Also, just use a plain division to figure out how many entries we can fit in the cache. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | fs: move cache_init() into fs_init, to handle special needsH. Peter Anvin2010-02-164-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move cache_init() into the fs_init methods, to accommodate special handling, e.g. the all-zero zero block for ext2. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: fix bmap block number breakageH. Peter Anvin2010-02-161-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the handling of block numbers in the bmap loop. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | cache: fix _get_cache_block() return, add lock_cache_block()H. Peter Anvin2010-02-162-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct the return value from _get_cache_block(), and add a method for locking a block permanently in the cache. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | cache: update the metadata cache designH. Peter Anvin2010-02-168-235/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - instead of get_cache_block() returning a descriptor, have get_cache() returning const void *. - have a subfunction to allow getting a block without reading it from disk, and returning the cache descriptor. This will be used in ext2 to pre-seed block 0 with all zero. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: move fs-related C files into fs/H. Peter Anvin2010-02-166-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move filesystem-related C files into the fs/ directory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: remove obsolete assembly strecpy.incH. Peter Anvin2010-02-161-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: remove obsolete assembly cache.incH. Peter Anvin2010-02-161-114/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | fs: use malloc'd mutable pathname bufferssyslinux-4.00-pre23H. Peter Anvin2010-02-161-48/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use malloc'd mutable pathname buffers during pathname walks. This avoids the need for very large static buffers, as well as the need to copy character by character. It also handles the symlink case fairly nicely. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: clean up types in the bmap functionsH. Peter Anvin2010-02-163-124/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to take an explicit fs pointer when we're passing an inode anyway... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | generic_close_file: use put_inode(), not free_inode()H. Peter Anvin2010-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing other than put_inode() should ever really call free_inode()... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | btrfs: use generic_load_configsyslinux-4.00-pre22H. Peter Anvin2010-02-151-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btrfs can use generic_load_config, so use it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | fs: centralize symlink handlingH. Peter Anvin2010-02-153-79/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put all handling of symbolic links into the central pathname walker. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | fs: reference-count inodes, fix generic loadconfigH. Peter Anvin2010-02-1510-110/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reference-count inodes, so we don't leak them all over the place. This also lets us hold onto the root inode from the very beginning. Make the generic loadconfig work again. Significant cleanups to the ext2 filesystem core. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: separate bcopyxx code and data; use linker-generated symbolsH. Peter Anvin2010-02-154-28/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate out bcopyxx code and data, and use linker-generated barrier symbols instead of inline label hacks. This makes it possible to link code into the bcopyxx area if need be. Signed-off-by: H. Peter Anvin <hpa@zytor.com>