freebsd-skq/sys/boot/common
Luigi Rizzo ade303f361 As reported in kern/118222, pxeboot in RELENG7 (and presumably
above) exhibits some misbehaviours on machines with AMD64 CPUs,
which at least in some cases I have tracked down to a heap overflow.

It is unclear whether it depends on the CPU or on the pxe bios
itself which may use more memory on AMD machines.

Noticeably a pxeboot compiled from 6.x sources works fine on all
machines I have tried so far, while a pxeboot compiled from 7.x
sources does not.

This patch is a first step in reducing the amount of memory used
while processing the configuration files read by the loader at boot
(some of them are quite large, 1700+ lines), and it does so by:
+ moving a buffer to static memory instead of allocating in the heap;
+ skipping empty lines;
+ reducing the amount of memory used for line descriptors;

Unfortunately there are several changes between 6.x and above,
affecting the compiler, the loader code itself, and libstand,
and it is not so straightforward to
These changes fix the behaviour on one motherboard with a
single-core AMD cpu, but are still not enough e.g on an Asus
M2N-VM (with a dual-core CPU).

I need to investigate the problem a bit more before figuring
out what should be committed to RELENG_7

PR:		kern/118222
2008-11-20 14:57:09 +00:00
..
bcache.c
boot.c
bootstrap.h Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
commands.c
console.c Fix a comparison that broke ``set console=vidconsole'' and even the 2005-07-29 12:47:42 +00:00
dev_net.c Revert r177108 and restore r60506 for sparc64 as long as libstand 2008-09-10 20:53:22 +00:00
dev_net.h
devopen.c Show info about net devices in loader's 'lsdev' command. While there fix style. 2008-09-03 17:41:44 +00:00
help.common Replace a rarely used "depuration" with "debugging". 2006-10-13 20:48:17 +00:00
interp_backslash.c
interp_forth.c
interp_parse.c
interp.c As reported in kern/118222, pxeboot in RELENG7 (and presumably 2008-11-20 14:57:09 +00:00
isapnp.c
isapnp.h
load_elf32_obj.c
load_elf32.c
load_elf64_obj.c
load_elf64.c
load_elf_obj.c Make our ELF64 type definitions match standards. In particular this 2005-12-18 04:52:37 +00:00
load_elf.c Initial support of loader(8) for ARM machines running U-Boot. 2008-10-14 10:11:14 +00:00
load.c
loader.8 Document the per-arch default value of kern.maxbcache. 2007-11-08 11:59:38 +00:00
ls.c
Makefile.inc Initial support of loader(8) for ARM machines running U-Boot. 2008-10-14 10:11:14 +00:00
merge_help.awk Ignore a sub-topic match if it is inside the command description. 2006-09-28 19:06:20 +00:00
misc.c Setting a variable to the same value twice doesn't actually make it 2008-08-04 06:39:52 +00:00
module.c Also boot *.debug if everything else fails. 2007-10-04 18:29:52 +00:00
newvers.sh
panic.c Fix WARNS=2 warnings. 2006-09-29 20:57:38 +00:00
pnp.c Garbage collect the code for auto-loading modules based on ISAPNP IDs, 2007-01-07 22:25:45 +00:00
reloc_elf32.c
reloc_elf64.c
reloc_elf.c Make our ELF64 type definitions match standards. In particular this 2005-12-18 04:52:37 +00:00
ufsread.c Fix the incorrect calculation of a block address within a single indirect 2008-06-07 05:49:24 +00:00