/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* linux/include/asm/setup.h3*4* Copyright (C) 1997-1999 Russell King5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License version 2 as8* published by the Free Software Foundation.9*10* Structure passed to kernel to tell it about the11* hardware it's running on. See Documentation/arch/arm/setup.rst12* for more info.13*/14#ifndef _UAPI__ASMARM_SETUP_H15#define _UAPI__ASMARM_SETUP_H1617#include <linux/types.h>1819#define COMMAND_LINE_SIZE 10242021/* The list ends with an ATAG_NONE node. */22#define ATAG_NONE 0x000000002324struct tag_header {25__u32 size;26__u32 tag;27};2829/* The list must start with an ATAG_CORE node */30#define ATAG_CORE 0x544100013132struct tag_core {33__u32 flags; /* bit 0 = read-only */34__u32 pagesize;35__u32 rootdev;36};3738/* it is allowed to have multiple ATAG_MEM nodes */39#define ATAG_MEM 0x544100024041struct tag_mem32 {42__u32 size;43__u32 start; /* physical start address */44};4546/* VGA text type displays */47#define ATAG_VIDEOTEXT 0x544100034849struct tag_videotext {50__u8 x;51__u8 y;52__u16 video_page;53__u8 video_mode;54__u8 video_cols;55__u16 video_ega_bx;56__u8 video_lines;57__u8 video_isvga;58__u16 video_points;59};6061/* describes how the ramdisk will be used in kernel */62#define ATAG_RAMDISK 0x544100046364struct tag_ramdisk {65__u32 flags; /* bit 0 = load, bit 1 = prompt */66__u32 size; /* decompressed ramdisk size in _kilo_ bytes */67__u32 start; /* starting block of floppy-based RAM disk image */68};6970/* describes where the compressed ramdisk image lives (virtual address) */71/*72* this one accidentally used virtual addresses - as such,73* it's deprecated.74*/75#define ATAG_INITRD 0x544100057677/* describes where the compressed ramdisk image lives (physical address) */78#define ATAG_INITRD2 0x544200057980struct tag_initrd {81__u32 start; /* physical start address */82__u32 size; /* size of compressed ramdisk image in bytes */83};8485/* board serial number. "64 bits should be enough for everybody" */86#define ATAG_SERIAL 0x544100068788struct tag_serialnr {89__u32 low;90__u32 high;91};9293/* board revision */94#define ATAG_REVISION 0x544100079596struct tag_revision {97__u32 rev;98};99100/* initial values for vesafb-type framebuffers. see struct screen_info101* in include/linux/tty.h102*/103#define ATAG_VIDEOLFB 0x54410008104105struct tag_videolfb {106__u16 lfb_width;107__u16 lfb_height;108__u16 lfb_depth;109__u16 lfb_linelength;110__u32 lfb_base;111__u32 lfb_size;112__u8 red_size;113__u8 red_pos;114__u8 green_size;115__u8 green_pos;116__u8 blue_size;117__u8 blue_pos;118__u8 rsvd_size;119__u8 rsvd_pos;120};121122/* command line: \0 terminated string */123#define ATAG_CMDLINE 0x54410009124125struct tag_cmdline {126char cmdline[1]; /* this is the minimum size */127};128129/* acorn RiscPC specific information */130#define ATAG_ACORN 0x41000101131132struct tag_acorn {133__u32 memc_control_reg;134__u32 vram_pages;135__u8 sounddefault;136__u8 adfsdrives;137};138139/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */140#define ATAG_MEMCLK 0x41000402141142struct tag_memclk {143__u32 fmemclk;144};145146struct tag {147struct tag_header hdr;148union {149struct tag_core core;150struct tag_mem32 mem;151struct tag_videotext videotext;152struct tag_ramdisk ramdisk;153struct tag_initrd initrd;154struct tag_serialnr serialnr;155struct tag_revision revision;156struct tag_videolfb videolfb;157struct tag_cmdline cmdline;158159/*160* Acorn specific161*/162struct tag_acorn acorn;163164/*165* DC21285 specific166*/167struct tag_memclk memclk;168} u;169};170171struct tagtable {172__u32 tag;173int (*parse)(const struct tag *);174};175176#define tag_member_present(tag,member) \177((unsigned long)(&((struct tag *)0L)->member + 1) \178<= (tag)->hdr.size * 4)179180#define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))181#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)182183#define for_each_tag(t,base) \184for (t = base; t->hdr.size; t = tag_next(t))185186187#endif /* _UAPI__ASMARM_SETUP_H */188189190