2 * linux/include/asm/setup.h
4 * Copyright (C) 1997-1999 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Structure passed to kernel to tell it about the
11 * hardware it's running on. See Documentation/arm/Setup
14 #ifndef __ASMARM_SETUP_H
15 #define __ASMARM_SETUP_H
17 #include <linux/types.h>
19 #define COMMAND_LINE_SIZE 1024
21 /* The list ends with an ATAG_NONE node. */
22 #define ATAG_NONE 0x00000000
29 /* The list must start with an ATAG_CORE node */
30 #define ATAG_CORE 0x54410001
33 __u32 flags
; /* bit 0 = read-only */
38 /* it is allowed to have multiple ATAG_MEM nodes */
39 #define ATAG_MEM 0x54410002
43 __u32 start
; /* physical start address */
46 #define ATAG_MEM64 0x54420002
50 __u64 start
; /* physical start address */
53 /* VGA text type displays */
54 #define ATAG_VIDEOTEXT 0x54410003
56 struct tag_videotext
{
68 /* describes how the ramdisk will be used in kernel */
69 #define ATAG_RAMDISK 0x54410004
72 __u32 flags
; /* bit 0 = load, bit 1 = prompt */
73 __u32 size
; /* decompressed ramdisk size in _kilo_ bytes */
74 __u32 start
; /* starting block of floppy-based RAM disk image */
77 /* describes where the compressed ramdisk image lives (virtual address) */
79 * this one accidentally used virtual addresses - as such,
82 #define ATAG_INITRD 0x54410005
84 /* describes where the compressed ramdisk image lives (physical address) */
85 #define ATAG_INITRD2 0x54420005
88 __u32 start
; /* physical start address */
89 __u32 size
; /* size of compressed ramdisk image in bytes */
92 /* board serial number. "64 bits should be enough for everybody" */
93 #define ATAG_SERIAL 0x54410006
101 #define ATAG_REVISION 0x54410007
103 struct tag_revision
{
107 /* initial values for vesafb-type framebuffers. see struct screen_info
108 * in include/linux/tty.h
110 #define ATAG_VIDEOLFB 0x54410008
112 struct tag_videolfb
{
116 __u16 lfb_linelength
;
129 /* command line: \0 terminated string */
130 #define ATAG_CMDLINE 0x54410009
133 char cmdline
[1]; /* this is the minimum size */
136 /* acorn RiscPC specific information */
137 #define ATAG_ACORN 0x41000101
140 __u32 memc_control_reg
;
146 /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
147 #define ATAG_MEMCLK 0x41000402
154 struct tag_header hdr
;
156 struct tag_core core
;
157 struct tag_mem32 mem
;
158 struct tag_mem64 mem64
;
159 struct tag_videotext videotext
;
160 struct tag_ramdisk ramdisk
;
161 struct tag_initrd initrd
;
162 struct tag_serialnr serialnr
;
163 struct tag_revision revision
;
164 struct tag_videolfb videolfb
;
165 struct tag_cmdline cmdline
;
170 struct tag_acorn acorn
;
175 struct tag_memclk memclk
;
181 int (*parse
)(const struct tag
*);
184 #define tag_member_present(tag,member) \
185 ((unsigned long)(&((struct tag *)0L)->member + 1) \
186 <= (tag)->hdr.size * 4)
188 #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
189 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
191 #define for_each_tag(t,base) \
192 for (t = base; t->hdr.size; t = tag_next(t))
196 #define __tag __used __attribute__((__section__(".taglist.init")))
197 #define __tagtable(tag, fn) \
198 static const struct tagtable __tagtable_##fn __tag = { tag, fn }
201 * Memory map description
203 #ifdef CONFIG_ARCH_EP93XX
212 unsigned int highmem
;
217 struct membank bank
[NR_BANKS
];
220 extern struct meminfo meminfo
;
222 #define for_each_bank(iter,mi) \
223 for (iter = 0; iter < (mi)->nr_banks; iter++)
225 #define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
226 #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
227 #define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)
228 #define bank_phys_start(bank) (bank)->start
229 #define bank_phys_end(bank) ((bank)->start + (bank)->size)
230 #define bank_phys_size(bank) (bank)->size
232 extern int arm_add_memory(phys_addr_t start
, unsigned long size
);
233 extern void early_print(const char *str
, ...);
234 extern void dump_machine_table(void);
236 #endif /* __KERNEL__ */