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 _UAPI__ASMARM_SETUP_H
15 #define _UAPI__ASMARM_SETUP_H
17 #include <linux/types.h>
18 #include <mach/dfo_boot.h>
19 #include <mach/mt_devinfo.h>
21 #define COMMAND_LINE_SIZE 1024
23 /* The list ends with an ATAG_NONE node. */
24 #define ATAG_NONE 0x00000000
31 /* The list must start with an ATAG_CORE node */
32 #define ATAG_CORE 0x54410001
35 __u32 flags
; /* bit 0 = read-only */
40 /* it is allowed to have multiple ATAG_MEM nodes */
41 #define ATAG_MEM 0x54410002
45 __u32 start
; /* physical start address */
48 /* it is allowed to have multiple ATAG_MEM nodes */
49 #define ATAG_MEM64 0x54420002
53 __u64 start
; /* physical start address */
56 /* VGA text type displays */
57 #define ATAG_VIDEOTEXT 0x54410003
59 struct tag_videotext
{
71 /* describes how the ramdisk will be used in kernel */
72 #define ATAG_RAMDISK 0x54410004
75 __u32 flags
; /* bit 0 = load, bit 1 = prompt */
76 __u32 size
; /* decompressed ramdisk size in _kilo_ bytes */
77 __u32 start
; /* starting block of floppy-based RAM disk image */
80 /* describes where the compressed ramdisk image lives (virtual address) */
82 * this one accidentally used virtual addresses - as such,
85 #define ATAG_INITRD 0x54410005
87 /* describes where the compressed ramdisk image lives (physical address) */
88 #define ATAG_INITRD2 0x54420005
91 __u32 start
; /* physical start address */
92 __u32 size
; /* size of compressed ramdisk image in bytes */
95 /* board serial number. "64 bits should be enough for everybody" */
96 #define ATAG_SERIAL 0x54410006
104 #define ATAG_REVISION 0x54410007
106 struct tag_revision
{
110 /* initial values for vesafb-type framebuffers. see struct screen_info
111 * in include/linux/tty.h
113 #define ATAG_VIDEOLFB 0x54410008
115 struct tag_videolfb
{
119 __u16 lfb_linelength
;
132 /* command line: \0 terminated string */
133 #define ATAG_CMDLINE 0x54410009
136 char cmdline
[1]; /* this is the minimum size */
139 /* acorn RiscPC specific information */
140 #define ATAG_ACORN 0x41000101
143 __u32 memc_control_reg
;
149 /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
150 #define ATAG_MEMCLK 0x41000402
156 /* boot information */
157 #define ATAG_BOOT 0x41000802
163 /*META com port information*/
164 #define ATAG_META_COM 0x41000803
166 struct tag_meta_com
{
167 u32 meta_com_type
; /* identify meta via uart or usb */
168 u32 meta_com_id
; /* multiple meta need to know com port id */
173 #define ATAG_MDINFO_DATA 0x41000806
174 struct tag_mdinfo_data
{
178 #define ATAG_TEE_DATA 0x41000808
180 /* general memory descriptor */
186 /* mblock is used by CPU */
190 u32 rank
; /* rank the mblock belongs to */
200 mem_desc_t rank_info
[4];
204 struct tag_header hdr
;
206 struct tag_core core
;
207 struct tag_mem32 mem
;
208 struct tag_mem64 mem64
;
209 struct tag_videotext videotext
;
210 struct tag_ramdisk ramdisk
;
211 struct tag_initrd initrd
;
212 struct tag_serialnr serialnr
;
213 struct tag_revision revision
;
214 struct tag_videolfb videolfb
;
215 struct tag_cmdline cmdline
;
220 struct tag_acorn acorn
;
225 struct tag_memclk memclk
;
226 struct tag_boot boot
;
227 struct tag_meta_com meta_com
;
228 struct tag_devinfo_data devinfo_data
;
229 tag_dfo_boot dfo_data
;
230 struct tag_mdinfo_data mdinfo_data
;
231 mem_desc_t tee_reserved_mem
;
234 struct tag_pt_info tag_pt_info
;
236 #ifdef NAND_ABTC_ATAG
237 struct tag_nand_number tag_nand_number
;
238 flashdev_info_t gen_FlashTable_p
;
246 int (*parse
)(const struct tag
*);
249 #define tag_member_present(tag,member) \
250 ((unsigned long)(&((struct tag *)0L)->member + 1) \
251 <= (tag)->hdr.size * 4)
253 #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
254 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
256 #define for_each_tag(t,base) \
257 for (t = base; t->hdr.size; t = tag_next(t))
260 #endif /* _UAPI__ASMARM_SETUP_H */