kernel-fxtec-pro1x/arch/x86/xen
Jeremy Fitzhardinge 93dbda7cbc x86: add brk allocation for very, very early allocations
Impact: new interface

Add a brk()-like allocator which effectively extends the bss in order
to allow very early code to do dynamic allocations.  This is better than
using statically allocated arrays for data in subsystems which may never
get used.

The space for brk allocations is in the bss ELF segment, so that the
space is mapped properly by the code which maps the kernel, and so
that bootloaders keep the space free rather than putting a ramdisk or
something into it.

The bss itself, delimited by __bss_stop, ends before the brk area
(__brk_base to __brk_limit).  The kernel text, data and bss is reserved
up to __bss_stop.

Any brk-allocated data is reserved separately just before the kernel
pagetable is built, as that code allocates from unreserved spaces
in the e820 map, potentially allocating from any unused brk memory.
Ultimately any unused memory in the brk area is used in the general
kernel memory pool.

Initially the brk space is set to 1MB, which is probably much larger
than any user needs (the largest current user is i386 head_32.S's code
to build the pagetables to map the kernel, which can get fairly large
with a big kernel image and no PSE support).  So long as the system
has sufficient memory for the bootloader to reserve the kernel+1MB brk,
there are no bad effects resulting from an over-large brk.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-03-14 15:37:14 -07:00
..
debugfs.c xen: add debugfs support 2008-08-21 13:52:58 +02:00
debugfs.h xen: add debugfs support 2008-08-21 13:52:58 +02:00
enlighten.c Merge branch 'x86/core' into core/percpu 2009-03-04 02:29:19 +01:00
grant-table.c xen: make grant table arch portable 2008-04-24 23:57:32 +02:00
irq.c xen: use our own eventchannel->irq path 2009-02-09 12:17:30 +01:00
Kconfig x86: remove the Voyager 32-bit subarch 2009-02-23 00:54:01 +01:00
Makefile xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
mmu.c x86: add brk allocation for very, very early allocations 2009-03-14 15:37:14 -07:00
mmu.h xen: move remaining mmu-related stuff into mmu.c 2009-01-30 14:51:14 -08:00
multicalls.c x86, xen: do multicall callbacks with interrupts disabled 2009-02-16 08:56:41 +01:00
multicalls.h Merge commit 'v2.6.29-rc4' into core/percpu 2009-02-09 14:58:11 +01:00
setup.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
smp.c xen: deal with virtually mapped percpu data 2009-03-02 12:58:19 +01:00
spinlock.c genirq: revert dynarray 2008-10-16 16:53:15 +02:00
suspend.c x86, xen: fix hardirq.h merge fallout 2009-01-23 11:09:15 +01:00
time.c Merge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2009-01-03 11:56:24 -08:00
vdso.h i386: move xen 2007-10-11 11:16:51 +02:00
xen-asm.h xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
xen-asm.S x86: style cleanups for xen assemblies 2009-02-05 20:25:41 +01:00
xen-asm_32.S x86: style cleanups for xen assemblies 2009-02-05 20:25:41 +01:00
xen-asm_64.S x86: style cleanups for xen assemblies 2009-02-05 20:25:41 +01:00
xen-head.S x86: use _types.h headers in asm where available 2009-02-13 11:35:01 -08:00
xen-ops.h xen: setup percpu data pointers 2009-02-04 16:59:02 -08:00