File: bootinfo.h

package info (click to toggle)
linux-2.6.24 2.6.24-6~etchnhalf.9etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 317,768 kB
  • ctags: 974,658
  • sloc: ansic: 5,384,710; asm: 212,187; makefile: 14,202; perl: 7,066; cpp: 3,159; python: 2,833; yacc: 2,629; sh: 2,526; lex: 1,511; lisp: 218; awk: 96; pascal: 41
file content (46 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Non-machine dependent bootinfo structure.  Basic idea
 * borrowed from the m68k.
 *
 * Copyright (C) 1999 Cort Dougan <cort@ppc.kernel.org>
 */

#ifdef __KERNEL__
#ifndef _PPC_BOOTINFO_H
#define _PPC_BOOTINFO_H

#include <asm/page.h>

struct bi_record {
	unsigned long tag;		/* tag ID */
	unsigned long size;		/* size of record (in bytes) */
	unsigned long data[0];		/* data */
};

#define BI_FIRST		0x1010  /* first record - marker */
#define BI_LAST			0x1011	/* last record - marker */
#define BI_CMD_LINE		0x1012
#define BI_BOOTLOADER_ID	0x1013
#define BI_INITRD		0x1014
#define BI_SYSMAP		0x1015
#define BI_MACHTYPE		0x1016
#define BI_MEMSIZE		0x1017
#define BI_BOARD_INFO		0x1018

extern struct bi_record *find_bootinfo(void);
extern void bootinfo_init(struct bi_record *rec);
extern void bootinfo_append(unsigned long tag, unsigned long size, void * data);
extern void parse_bootinfo(struct bi_record *rec);
extern unsigned long boot_mem_size;

static inline struct bi_record *
bootinfo_addr(unsigned long offset)
{

	return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1,
					  (1 << 20));
}


#endif /* _PPC_BOOTINFO_H */
#endif /* __KERNEL__ */