ia64/xen-unstable

changeset 10128:ebfa1046a81f

Add include/asm-x86_64/e820.h to sparse tree

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian.Campbell@xensource.com
date Mon May 22 09:21:58 2006 +0100 (2006-05-22)
parents 49bb240a05ee
children 810ad61870e8
files linux-2.6-xen-sparse/include/asm-x86_64/e820.h
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/e820.h	Mon May 22 09:21:58 2006 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +/*
     1.5 + * structures and definitions for the int 15, ax=e820 memory map
     1.6 + * scheme.
     1.7 + *
     1.8 + * In a nutshell, setup.S populates a scratch table in the
     1.9 + * empty_zero_block that contains a list of usable address/size
    1.10 + * duples.  setup.c, this information is transferred into the e820map,
    1.11 + * and in init.c/numa.c, that new information is used to mark pages
    1.12 + * reserved or not.
    1.13 + */
    1.14 +#ifndef __E820_HEADER
    1.15 +#define __E820_HEADER
    1.16 +
    1.17 +#include <linux/mmzone.h>
    1.18 +
    1.19 +#define E820MAP	0x2d0		/* our map */
    1.20 +#define E820MAX	128		/* number of entries in E820MAP */
    1.21 +#define E820NR	0x1e8		/* # entries in E820MAP */
    1.22 +
    1.23 +#define E820_RAM	1
    1.24 +#define E820_RESERVED	2
    1.25 +#define E820_ACPI	3 /* usable as RAM once ACPI tables have been read */
    1.26 +#define E820_NVS	4
    1.27 +
    1.28 +#define HIGH_MEMORY	(1024*1024)
    1.29 +
    1.30 +#define LOWMEMSIZE()	(0x9f000)
    1.31 +
    1.32 +#ifndef __ASSEMBLY__
    1.33 +struct e820entry {
    1.34 +	u64 addr;	/* start of memory segment */
    1.35 +	u64 size;	/* size of memory segment */
    1.36 +	u32 type;	/* type of memory segment */
    1.37 +} __attribute__((packed));
    1.38 +
    1.39 +struct e820map {
    1.40 +    int nr_map;
    1.41 +	struct e820entry map[E820MAX];
    1.42 +};
    1.43 +
    1.44 +extern unsigned long find_e820_area(unsigned long start, unsigned long end, 
    1.45 +				    unsigned size);
    1.46 +extern void add_memory_region(unsigned long start, unsigned long size, 
    1.47 +			      int type);
    1.48 +extern void setup_memory_region(void);
    1.49 +extern void contig_e820_setup(void); 
    1.50 +extern unsigned long e820_end_of_ram(void);
    1.51 +extern void e820_reserve_resources(void);
    1.52 +extern void e820_print_map(char *who);
    1.53 +extern int e820_mapped(unsigned long start, unsigned long end, unsigned type);
    1.54 +
    1.55 +extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end);
    1.56 +extern void e820_setup_gap(void);
    1.57 +extern unsigned long e820_hole_size(unsigned long start_pfn,
    1.58 +				    unsigned long end_pfn);
    1.59 +
    1.60 +extern void __init parse_memopt(char *p, char **end);
    1.61 +extern void __init parse_memmapopt(char *p, char **end);
    1.62 +
    1.63 +extern struct e820map e820;
    1.64 +#endif/*!__ASSEMBLY__*/
    1.65 +
    1.66 +#endif/*__E820_HEADER*/