| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | *	Just a place holder. We don't want to have to test x86 before | 
|  | 3 | *	we include stuff | 
|  | 4 | */ | 
|  | 5 |  | 
|  | 6 | #ifndef _i386_SETUP_H | 
|  | 7 | #define _i386_SETUP_H | 
|  | 8 |  | 
| Alon Bar-Lev | 7bf9f97 | 2007-02-12 00:54:27 -0800 | [diff] [blame] | 9 | #define COMMAND_LINE_SIZE 2048 | 
| Adrian Bunk | 7d1362c | 2006-12-06 20:40:38 -0800 | [diff] [blame] | 10 |  | 
| David Woodhouse | f01f0f0 | 2006-09-12 20:36:05 -0700 | [diff] [blame] | 11 | #ifdef __KERNEL__ | 
| Dave Hansen | 22a9835 | 2006-03-27 01:16:04 -0800 | [diff] [blame] | 12 | #include <linux/pfn.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 |  | 
|  | 14 | /* | 
|  | 15 | * Reserved space for vmalloc and iomap - defined in asm/page.h | 
|  | 16 | */ | 
|  | 17 | #define MAXMEM_PFN	PFN_DOWN(MAXMEM) | 
|  | 18 | #define MAX_NONPAE_PFN	(1 << 20) | 
|  | 19 |  | 
| Venkatesh Pallipadi | f9ba705 | 2005-05-01 08:58:51 -0700 | [diff] [blame] | 20 | #define PARAM_SIZE 4096 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 |  | 
|  | 22 | #define OLD_CL_MAGIC_ADDR	0x90020 | 
|  | 23 | #define OLD_CL_MAGIC		0xA33F | 
|  | 24 | #define OLD_CL_BASE_ADDR	0x90000 | 
|  | 25 | #define OLD_CL_OFFSET		0x90022 | 
|  | 26 | #define NEW_CL_POINTER		0x228	/* Relative to real mode data */ | 
|  | 27 |  | 
|  | 28 | #ifndef __ASSEMBLY__ | 
| H. Peter Anvin | 48c7ae6 | 2007-07-11 12:18:35 -0700 | [diff] [blame] | 29 |  | 
|  | 30 | #include <asm/bootparam.h> | 
|  | 31 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | /* | 
|  | 33 | * This is set up by the setup-routine at boot-time | 
|  | 34 | */ | 
| H. Peter Anvin | 48c7ae6 | 2007-07-11 12:18:35 -0700 | [diff] [blame] | 35 | extern struct boot_params boot_params; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 |  | 
| H. Peter Anvin | 48c7ae6 | 2007-07-11 12:18:35 -0700 | [diff] [blame] | 37 | #define PARAM	((char *)&boot_params) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | #define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) | 
|  | 39 | #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) | 
|  | 40 | #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) | 
|  | 41 | #define E820_MAP_NR (*(char*) (PARAM+E820NR)) | 
|  | 42 | #define E820_MAP    ((struct e820entry *) (PARAM+E820MAP)) | 
|  | 43 | #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) | 
|  | 44 | #define IST_INFO   (*(struct ist_info *) (PARAM+0x60)) | 
| H. Peter Anvin | 48c7ae6 | 2007-07-11 12:18:35 -0700 | [diff] [blame] | 45 | #define SYS_DESC_TABLE (*(struct sys_desc_table *)(PARAM+0xa0)) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) | 
|  | 47 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) | 
|  | 48 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) | 
| Matt Tolentino | 7ae65fd | 2005-09-03 15:56:27 -0700 | [diff] [blame] | 49 | #define EFI_MEMMAP ((void *) *((unsigned long *)(PARAM+0x1d0))) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4))) | 
|  | 51 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) | 
|  | 52 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) | 
|  | 53 | #define VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA)) | 
|  | 54 | #define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC)) | 
|  | 55 | #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF)) | 
|  | 56 | #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210)) | 
|  | 57 | #define KERNEL_START (*(unsigned long *) (PARAM+0x214)) | 
|  | 58 | #define INITRD_START (*(unsigned long *) (PARAM+0x218)) | 
|  | 59 | #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c)) | 
|  | 60 | #define EDID_INFO   (*(struct edid_info *) (PARAM+0x140)) | 
|  | 61 | #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR)) | 
|  | 62 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) | 
|  | 63 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) | 
|  | 64 | #define EDD_BUF     ((struct edd_info *) (PARAM+EDDBUF)) | 
|  | 65 |  | 
| Jeremy Fitzhardinge | e75eac3 | 2006-06-25 05:46:50 -0700 | [diff] [blame] | 66 | /* | 
|  | 67 | * Do NOT EVER look at the BIOS memory size location. | 
|  | 68 | * It does not work on many machines. | 
|  | 69 | */ | 
|  | 70 | #define LOWMEMSIZE()	(0x9f000) | 
|  | 71 |  | 
|  | 72 | struct e820entry; | 
|  | 73 |  | 
|  | 74 | char * __init machine_specific_memory_setup(void); | 
| Rusty Russell | d3561b7 | 2006-12-07 02:14:07 +0100 | [diff] [blame] | 75 | char *memory_setup(void); | 
| Jeremy Fitzhardinge | e75eac3 | 2006-06-25 05:46:50 -0700 | [diff] [blame] | 76 |  | 
|  | 77 | int __init copy_e820_map(struct e820entry * biosmap, int nr_map); | 
|  | 78 | int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map); | 
|  | 79 | void __init add_memory_region(unsigned long long start, | 
|  | 80 | unsigned long long size, int type); | 
|  | 81 |  | 
| Rusty Russell | 40d22c1 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 82 | extern unsigned long init_pg_tables_end; | 
|  | 83 |  | 
| Jeremy Fitzhardinge | 6996d3b | 2007-07-17 18:37:03 -0700 | [diff] [blame] | 84 | #ifndef CONFIG_PARAVIRT | 
|  | 85 | #define paravirt_post_allocator_init()	do {} while (0) | 
|  | 86 | #endif | 
|  | 87 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | #endif /* __ASSEMBLY__ */ | 
|  | 89 |  | 
| Adrian Bunk | 7d1362c | 2006-12-06 20:40:38 -0800 | [diff] [blame] | 90 | #endif  /*  __KERNEL__  */ | 
|  | 91 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | #endif /* _i386_SETUP_H */ |