]> git.zerfleddert.de Git - linexec-j720/blobdiff - setup.h
no longer use deprecated ATAG_INITRD
[linexec-j720] / setup.h
diff --git a/setup.h b/setup.h
index 1bc06c88164d47c74745bbe036630f63a648d26a..66eb1176b660fffcb5a488a980b5bef5ed528864 100644 (file)
--- a/setup.h
+++ b/setup.h
-/*\r
- *  linux/include/asm/setup.h\r
- *\r
- *  Copyright (C) 1997-1999 Russell King\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License version 2 as\r
- * published by the Free Software Foundation.\r
- *\r
- *  Structure passed to kernel to tell it about the\r
- *  hardware it's running on.  See linux/Documentation/arm/Setup\r
- *  for more info.\r
- *\r
- * NOTE:\r
- *  This file contains two ways to pass information from the boot\r
- *  loader to the kernel. The old struct param_struct is deprecated,\r
- *  but it will be kept in the kernel for 5 years from now\r
- *  (2001). This will allow boot loaders to convert to the new struct\r
- *  tag way.\r
- */\r
-#ifndef __ASMARM_SETUP_H\r
-#define __ASMARM_SETUP_H\r\r
-\r\r
-#define u32    UINT32\r\r
-#define u16    UINT16\r\r
-#define u8     UINT8\r\r
-\r
-\r
-/*#ifndef CONFIG_ACCEPT_GPL\r
-#error This file covered by GPL but CONFIG_ACCEPT_GPL undefined.\r
-#endif*/\r
-\r
-/*\r
- * Usage:\r
- *  - do not go blindly adding fields, add them at the end\r
- *  - when adding fields, don't rely on the address until\r
- *    a patch from me has been released\r
- *  - unused fields should be zero (for future expansion)\r
- *  - this structure is relatively short-lived - only\r
- *    guaranteed to contain useful data in setup_arch()\r
- */\r
-#define COMMAND_LINE_SIZE 1024\r
-\r
-/* This is the old deprecated way to pass parameters to the kernel */\r
-struct param_struct {\r
-    union {\r
-       struct {\r
-           unsigned long page_size;            /*  0 */\r
-           unsigned long nr_pages;             /*  4 */\r
-           unsigned long ramdisk_size;         /*  8 */\r
-           unsigned long flags;                /* 12 */\r
-#define FLAG_READONLY  1\r
-#define FLAG_RDLOAD    4\r
-#define FLAG_RDPROMPT  8\r
-           unsigned long rootdev;              /* 16 */\r
-           unsigned long video_num_cols;       /* 20 */\r
-           unsigned long video_num_rows;       /* 24 */\r
-           unsigned long video_x;              /* 28 */\r
-           unsigned long video_y;              /* 32 */\r
-           unsigned long memc_control_reg;     /* 36 */\r
-           unsigned char sounddefault;         /* 40 */\r
-           unsigned char adfsdrives;           /* 41 */\r
-           unsigned char bytes_per_char_h;     /* 42 */\r
-           unsigned char bytes_per_char_v;     /* 43 */\r
-           unsigned long pages_in_bank[4];     /* 44 */\r
-           unsigned long pages_in_vram;        /* 60 */\r
-           unsigned long initrd_start;         /* 64 */\r
-           unsigned long initrd_size;          /* 68 */\r
-           unsigned long rd_start;             /* 72 */\r
-           unsigned long system_rev;           /* 76 */\r
-           unsigned long system_serial_low;    /* 80 */\r
-           unsigned long system_serial_high;   /* 84 */\r
-           unsigned long mem_fclk_21285;       /* 88 */\r
-       } s;\r
-       char unused[256];\r
-    } u1;\r
-    union {\r
-       char paths[8][128];\r
-       struct {\r
-           unsigned long magic;\r
-           char n[1024 - sizeof(unsigned long)];\r
-       } s;\r
-    } u2;\r
-    char commandline[COMMAND_LINE_SIZE];\r
-};\r
-\r
-\r
-\r
-/*\r
- * The new way of passing information: a list of tagged entries\r
- */\r
-\r
-/* The list ends with an ATAG_NONE node. */\r
-#define ATAG_NONE      0x00000000\r
-\r
-struct tag_header {\r
-       u32 size;\r
-       u32 tag;\r
-};\r
-\r
-/* The list must start with an ATAG_CORE node */\r
-#define ATAG_CORE      0x54410001\r
-\r
-struct tag_core {\r
-       u32 flags;              /* bit 0 = read-only */\r
-       u32 pagesize;\r
-       u32 rootdev;\r
-};\r
-\r
-/* it is allowed to have multiple ATAG_MEM nodes */\r
-#define ATAG_MEM       0x54410002\r
-\r
-struct tag_mem32 {\r
-       u32     size;\r
-       u32     start;  /* physical start address */\r
-};\r
-\r
-/* VGA text type displays */\r
-#define ATAG_VIDEOTEXT 0x54410003\r
-\r
-struct tag_videotext {\r
-       u8              x;\r
-       u8              y;\r
-       u16             video_page;\r
-       u8              video_mode;\r
-       u8              video_cols;\r
-       u16             video_ega_bx;\r
-       u8              video_lines;\r
-       u8              video_isvga;\r
-       u16             video_points;\r
-};\r
-\r
-/* describes how the ramdisk will be used in kernel */\r
-#define ATAG_RAMDISK   0x54410004\r
-\r
-struct tag_ramdisk {\r
-       u32 flags;      /* bit 0 = load, bit 1 = prompt */\r
-       u32 size;       /* decompressed ramdisk size in _kilo_ bytes */\r
-       u32 start;      /* starting block of floppy-based RAM disk image */\r
-};\r
-\r
-/* describes where the compressed ramdisk image lives */\r
-#define ATAG_INITRD    0x54410005\r\r
-\r\r
-#define ATAG_INITRD2   0x54420005\r
-\r
-struct tag_initrd {\r
-       u32 start;      /* physical start address */\r
-       u32 size;       /* size of compressed ramdisk image in bytes */\r
-};\r
-\r
-/* board serial number. "64 bits should be enough for everybody" */\r
-#define ATAG_SERIAL    0x54410006\r
-\r
-struct tag_serialnr {\r
-       u32 low;\r
-       u32 high;\r
-};\r
-\r
-/* board revision */\r
-#define ATAG_REVISION  0x54410007\r
-\r
-struct tag_revision {\r
-       u32 rev;\r
-};\r
-\r
-/* initial values for vesafb-type framebuffers. see struct screen_info\r
- * in include/linux/tty.h\r
- */\r
-#define ATAG_VIDEOLFB  0x54410008\r
-\r
-struct tag_videolfb {\r
-       u16             lfb_width;\r
-       u16             lfb_height;\r
-       u16             lfb_depth;\r
-       u16             lfb_linelength;\r
-       u32             lfb_base;\r
-       u32             lfb_size;\r
-       u8              red_size;\r
-       u8              red_pos;\r
-       u8              green_size;\r
-       u8              green_pos;\r
-       u8              blue_size;\r
-       u8              blue_pos;\r
-       u8              rsvd_size;\r
-       u8              rsvd_pos;\r
-};\r
-\r
-/* command line: \0 terminated string */\r
-#define ATAG_CMDLINE   0x54410009\r
-\r
-struct tag_cmdline {\r
-       char    cmdline[1];     /* this is the minimum size */\r
-};\r
-\r
-/* acorn RiscPC specific information */\r
-#define ATAG_ACORN     0x41000101\r
-\r
-struct tag_acorn {\r
-       u32 memc_control_reg;\r
-       u32 vram_pages;\r
-       u8 sounddefault;\r
-       u8 adfsdrives;\r
-};\r
-\r
-#define ATAG_PTABLE    0x53410001\r
-\r
-/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */\r
-#define ATAG_MEMCLK    0x41000402\r
-\r
-struct tag_memclk {\r
-       u32 fmemclk;\r
-};\r
-\r
-struct tag {\r
-       struct tag_header hdr;\r
-       union {\r
-               struct tag_core         core;\r
-               struct tag_mem32        mem;\r
-               struct tag_videotext    videotext;\r
-               struct tag_ramdisk      ramdisk;\r
-               struct tag_initrd       initrd;\r
-               struct tag_serialnr     serialnr;\r
-               struct tag_revision     revision;\r
-               struct tag_videolfb     videolfb;\r
-               struct tag_cmdline      cmdline;\r
-//                struct tag_ptable       ptable;  \r
-\r
-               /*\r
-                * Acorn specific\r
-                */\r
-               struct tag_acorn        acorn;\r
-\r
-               /*\r
-                * DC21285 specific\r
-                */\r
-               struct tag_memclk       memclk;\r
-           \r
-       } u;\r
-};\r
-\r
-struct tagtable {\r
-       u32 tag;\r
-       int (*parse)(const struct tag *);\r
-};\r
-\r
-#define __tag __attribute__((unused, __section__(".taglist")))\r
-#define __tagtable(tag, fn) \\r
-static struct tagtable __tagtable_##fn __tag = { tag, fn }\r
-\r
-#define tag_member_present(tag,member)                         \\r
-       ((unsigned long)(&((struct tag *)0L)->member + 1)       \\r
-               <= (tag)->hdr.size * 4)\r
-\r
-#define tag_next(t)    ((struct tag *)((u32 *)(t) + (t)->hdr.size))\r
-#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)\r
-\r
-#define for_each_tag(t,base)           \\r
-       for (t = base; t->hdr.size; t = tag_next(t))\r
-\r
-/*\r
- * Memory map description\r
- */\r
-#define NR_BANKS 8\r
-\r
-struct meminfo {\r
-       int nr_banks;\r
-       unsigned long end;\r
-       struct {\r
-               unsigned long start;\r
-               unsigned long size;\r
-               int           node;\r
-       } bank[NR_BANKS];\r
-};\r
-\r
-extern struct meminfo meminfo;\r
-\r
-#endif\r
+/*
+ *  linux/include/asm/setup.h
+ *
+ *  Copyright (C) 1997-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Structure passed to kernel to tell it about the
+ *  hardware it's running on.  See Documentation/arm/Setup
+ *  for more info.
+ */
+#ifndef __ASMARM_SETUP_H
+#define __ASMARM_SETUP_H
+#define u32    UINT32
+#define u16    UINT16
+#define u8     UINT8
+
+#define COMMAND_LINE_SIZE 1024
+
+/* The list ends with an ATAG_NONE node. */
+#define ATAG_NONE      0x00000000
+
+struct tag_header {
+       u32 size;
+       u32 tag;
+};
+
+/* The list must start with an ATAG_CORE node */
+#define ATAG_CORE      0x54410001
+
+struct tag_core {
+       u32 flags;              /* bit 0 = read-only */
+       u32 pagesize;
+       u32 rootdev;
+};
+
+/* it is allowed to have multiple ATAG_MEM nodes */
+#define ATAG_MEM       0x54410002
+
+struct tag_mem32 {
+       u32     size;
+       u32     start;  /* physical start address */
+};
+
+/* VGA text type displays */
+#define ATAG_VIDEOTEXT 0x54410003
+
+struct tag_videotext {
+       u8              x;
+       u8              y;
+       u16             video_page;
+       u8              video_mode;
+       u8              video_cols;
+       u16             video_ega_bx;
+       u8              video_lines;
+       u8              video_isvga;
+       u16             video_points;
+};
+
+/* describes how the ramdisk will be used in kernel */
+#define ATAG_RAMDISK   0x54410004
+
+struct tag_ramdisk {
+       u32 flags;      /* bit 0 = load, bit 1 = prompt */
+       u32 size;       /* decompressed ramdisk size in _kilo_ bytes */
+       u32 start;      /* starting block of floppy-based RAM disk image */
+};
+
+/* describes where the compressed ramdisk image lives (virtual address) */
+/*
+ * this one accidentally used virtual addresses - as such,
+ * it's deprecated.
+ */
+#define ATAG_INITRD    0x54410005
+
+/* describes where the compressed ramdisk image lives (physical address) */
+#define ATAG_INITRD2   0x54420005
+
+struct tag_initrd {
+       u32 start;      /* physical start address */
+       u32 size;       /* size of compressed ramdisk image in bytes */
+};
+
+/* board serial number. "64 bits should be enough for everybody" */
+#define ATAG_SERIAL    0x54410006
+
+struct tag_serialnr {
+       u32 low;
+       u32 high;
+};
+
+/* board revision */
+#define ATAG_REVISION  0x54410007
+
+struct tag_revision {
+       u32 rev;
+};
+
+/* initial values for vesafb-type framebuffers. see struct screen_info
+ * in include/linux/tty.h
+ */
+#define ATAG_VIDEOLFB  0x54410008
+
+struct tag_videolfb {
+       u16             lfb_width;
+       u16             lfb_height;
+       u16             lfb_depth;
+       u16             lfb_linelength;
+       u32             lfb_base;
+       u32             lfb_size;
+       u8              red_size;
+       u8              red_pos;
+       u8              green_size;
+       u8              green_pos;
+       u8              blue_size;
+       u8              blue_pos;
+       u8              rsvd_size;
+       u8              rsvd_pos;
+};
+
+/* command line: \0 terminated string */
+#define ATAG_CMDLINE   0x54410009
+
+struct tag_cmdline {
+       char    cmdline[1];     /* this is the minimum size */
+};
+
+/* acorn RiscPC specific information */
+#define ATAG_ACORN     0x41000101
+
+struct tag_acorn {
+       u32 memc_control_reg;
+       u32 vram_pages;
+       u8 sounddefault;
+       u8 adfsdrives;
+};
+
+/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
+#define ATAG_MEMCLK    0x41000402
+
+struct tag_memclk {
+       u32 fmemclk;
+};
+
+struct tag {
+       struct tag_header hdr;
+       union {
+               struct tag_core         core;
+               struct tag_mem32        mem;
+               struct tag_videotext    videotext;
+               struct tag_ramdisk      ramdisk;
+               struct tag_initrd       initrd;
+               struct tag_serialnr     serialnr;
+               struct tag_revision     revision;
+               struct tag_videolfb     videolfb;
+               struct tag_cmdline      cmdline;
+
+               /*
+                * Acorn specific
+                */
+               struct tag_acorn        acorn;
+
+               /*
+                * DC21285 specific
+                */
+               struct tag_memclk       memclk;
+       } u;
+};
+
+struct tagtable {
+       u32 tag;
+       int (*parse)(const struct tag *);
+};
+
+#define __tag __attribute_used__ __attribute__((__section__(".taglist")))
+#define __tagtable(tag, fn) \
+static struct tagtable __tagtable_##fn __tag = { tag, fn }
+
+#define tag_member_present(tag,member)                         \
+       ((unsigned long)(&((struct tag *)0L)->member + 1)       \
+               <= (tag)->hdr.size * 4)
+
+#define tag_next(t)    ((struct tag *)((u32 *)(t) + (t)->hdr.size))
+#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
+
+#define for_each_tag(t,base)           \
+       for (t = base; t->hdr.size; t = tag_next(t))
+
+/*
+ * Memory map description
+ */
+#ifdef CONFIG_ARCH_LH7A40X
+# define NR_BANKS 16
+#else
+# define NR_BANKS 8
+#endif
+
+struct meminfo {
+       int nr_banks;
+       struct {
+               unsigned long start;
+               unsigned long size;
+               int           node;
+       } bank[NR_BANKS];
+};
+
+/*
+ * Early command line parameters.
+ */
+struct early_params {
+       const char *arg;
+       void (*fn)(char **p);
+};
+
+#define __early_param(name,fn)                                 \
+static struct early_params __early_##fn __attribute_used__     \
+__attribute__((__section__("__early_param"))) = { name, fn }
+
+#endif
Impressum, Datenschutz