Big physical area patch
=======================

This is a patch against Linux 2.6.xx for the `bigphysarea' memory
allocation routines. This code allows you to reserve a large portion
of contiguous physical memory at boot time which can be
allocated/deallocated by kernel drivers.

This sort of hack is necessary for devices such as RAM-less video
framegrabbers which need a big chunk of contiguous physical RAM,
larger than whatever get_free_pages or kmalloc can provide. Also, this
memory is safe to remap_page_range() into user space, e.g., for
mmap().

To install:
	Patch your kernel with `bigphysarea.patch' in this directory
		cd /usr/src/linux
		patch -p1 < <path>/bigphysarea.patch
	Rebuild your kernel (after enabling the bigphysarea in the kernels .config)

To use:
	Use the boot option
		bigphysarea=<number of pages>
	e.g. by adding a line
	append="bigphysarea=1024"
	to your /etc/lilo.conf to specify the number of pages to
	reserve. If you don't use this option then no pages will
	be reserved. Usage can be monitored through the proc
	filesystem, just type 'cat /proc/bigphysarea'

To test:
	Use the module.c to create a test module.
	It allocates memory inside the bigphysarea and modifies the
	contents of that allocated memory.
	After unloading the module the memory is given back to the
	bigphysarea pool.
	this test module can be build with the attached Makefile

This code is based on code from M. Welsh (mdw@cs.cornell.edu).
Extended by Roger Butenuth (butenuth@uni-paderborn.de), October 1997 
Extended for linux-2.1.121 till 2.4.0 (June 2000) by Pauline Middelink <middelink@polyware.nl> 
Extended for linux-2.6.9 (November 2004) by Nick Martin <nim@mit.edu> 
Extended for linux-2.6.11 (June 2005) by Remy Bohmer <remy.bohmer@gmail.com> 
Extended for linux-2.6.18 and added x86_64 architecture (Sept 2006) by Remy Bohmer <remy.bohmer@gmail.com> 

