1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * linux/include/asm/setup.h
5 * Copyright (C) 1997-1999 Russell King
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Structure passed to kernel to tell it about the
12 * hardware it's running on. See Documentation/arm/setup.rst
15 #ifndef _UAPI__ASMARM_SETUP_H
16 #define _UAPI__ASMARM_SETUP_H
18 #include <linux/types.h>
20 #define COMMAND_LINE_SIZE 1024
22 /* The list ends with an ATAG_NONE node. */
23 #define ATAG_NONE 0x00000000
30 /* The list must start with an ATAG_CORE node */
31 #define ATAG_CORE 0x54410001
34 __u32 flags
; /* bit 0 = read-only */
39 /* it is allowed to have multiple ATAG_MEM nodes */
40 #define ATAG_MEM 0x54410002
44 __u32 start
; /* physical start address */
47 /* VGA text type displays */
48 #define ATAG_VIDEOTEXT 0x54410003
50 struct tag_videotext
{
62 /* describes how the ramdisk will be used in kernel */
63 #define ATAG_RAMDISK 0x54410004
66 __u32 flags
; /* bit 0 = load, bit 1 = prompt */
67 __u32 size
; /* decompressed ramdisk size in _kilo_ bytes */
68 __u32 start
; /* starting block of floppy-based RAM disk image */
71 /* describes where the compressed ramdisk image lives (virtual address) */
73 * this one accidentally used virtual addresses - as such,
76 #define ATAG_INITRD 0x54410005
78 /* describes where the compressed ramdisk image lives (physical address) */
79 #define ATAG_INITRD2 0x54420005
82 __u32 start
; /* physical start address */
83 __u32 size
; /* size of compressed ramdisk image in bytes */
86 /* board serial number. "64 bits should be enough for everybody" */
87 #define ATAG_SERIAL 0x54410006
95 #define ATAG_REVISION 0x54410007
101 /* initial values for vesafb-type framebuffers. see struct screen_info
102 * in include/linux/tty.h
104 #define ATAG_VIDEOLFB 0x54410008
106 struct tag_videolfb
{
110 __u16 lfb_linelength
;
123 /* command line: \0 terminated string */
124 #define ATAG_CMDLINE 0x54410009
127 char cmdline
[1]; /* this is the minimum size */
130 /* acorn RiscPC specific information */
131 #define ATAG_ACORN 0x41000101
134 __u32 memc_control_reg
;
140 /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
141 #define ATAG_MEMCLK 0x41000402
148 struct tag_header hdr
;
150 struct tag_core core
;
151 struct tag_mem32 mem
;
152 struct tag_videotext videotext
;
153 struct tag_ramdisk ramdisk
;
154 struct tag_initrd initrd
;
155 struct tag_serialnr serialnr
;
156 struct tag_revision revision
;
157 struct tag_videolfb videolfb
;
158 struct tag_cmdline cmdline
;
163 struct tag_acorn acorn
;
168 struct tag_memclk memclk
;
174 int (*parse
)(const struct tag
*);
177 #define tag_member_present(tag,member) \
178 ((unsigned long)(&((struct tag *)0L)->member + 1) \
179 <= (tag)->hdr.size * 4)
181 #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
182 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
184 #define for_each_tag(t,base) \
185 for (t = base; t->hdr.size; t = tag_next(t))
188 #endif /* _UAPI__ASMARM_SETUP_H */