| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * Non-machine dependent bootinfo structure.  Basic idea | 
|  | 3 | * borrowed from the m68k. | 
|  | 4 | * | 
|  | 5 | * Copyright (C) 1999 Cort Dougan <cort@ppc.kernel.org> | 
|  | 6 | */ | 
|  | 7 |  | 
|  | 8 | #ifdef __KERNEL__ | 
|  | 9 | #ifndef _PPC_BOOTINFO_H | 
|  | 10 | #define _PPC_BOOTINFO_H | 
|  | 11 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <asm/page.h> | 
|  | 13 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | struct bi_record { | 
|  | 15 | unsigned long tag;		/* tag ID */ | 
|  | 16 | unsigned long size;		/* size of record (in bytes) */ | 
|  | 17 | unsigned long data[0];		/* data */ | 
|  | 18 | }; | 
|  | 19 |  | 
|  | 20 | #define BI_FIRST		0x1010  /* first record - marker */ | 
|  | 21 | #define BI_LAST			0x1011	/* last record - marker */ | 
|  | 22 | #define BI_CMD_LINE		0x1012 | 
|  | 23 | #define BI_BOOTLOADER_ID	0x1013 | 
|  | 24 | #define BI_INITRD		0x1014 | 
|  | 25 | #define BI_SYSMAP		0x1015 | 
|  | 26 | #define BI_MACHTYPE		0x1016 | 
|  | 27 | #define BI_MEMSIZE		0x1017 | 
|  | 28 | #define BI_BOARD_INFO		0x1018 | 
|  | 29 |  | 
|  | 30 | extern struct bi_record *find_bootinfo(void); | 
|  | 31 | extern void bootinfo_init(struct bi_record *rec); | 
|  | 32 | extern void bootinfo_append(unsigned long tag, unsigned long size, void * data); | 
|  | 33 | extern void parse_bootinfo(struct bi_record *rec); | 
|  | 34 | extern unsigned long boot_mem_size; | 
|  | 35 |  | 
|  | 36 | static inline struct bi_record * | 
|  | 37 | bootinfo_addr(unsigned long offset) | 
|  | 38 | { | 
|  | 39 |  | 
|  | 40 | return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1, | 
|  | 41 | (1 << 20)); | 
|  | 42 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 |  | 
|  | 44 |  | 
|  | 45 | #endif /* _PPC_BOOTINFO_H */ | 
|  | 46 | #endif /* __KERNEL__ */ |