参考:atags--__vet_atags标签

      arch/arm/include/asm/setup.h

 /*
* 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 #include <linux/types.h> #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[]; /* 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_member_present(tag,member) \
((unsigned long)(&((struct tag *)0L)->member + ) \
<= (tag)->hdr.size * ) #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)) #ifdef __KERNEL__ #define __tag __used __attribute__((__section__(".taglist.init")))
#define __tagtable(tag, fn) \
static struct tagtable __tagtable_##fn __tag = { tag, fn } /*
* Memory map description
*/
#ifdef CONFIG_ARCH_LH7A40X
# define NR_BANKS
#else
# define NR_BANKS
#endif struct membank {
unsigned long start;
unsigned long size;
int node;
}; struct meminfo {
int nr_banks;
struct membank bank[NR_BANKS];
}; extern struct meminfo meminfo; #define for_each_nodebank(iter,mi,no) \
for (iter = ; iter < (mi)->nr_banks; iter++) \
if ((mi)->bank[iter].node == no) #define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
#define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
#define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)
#define bank_phys_start(bank) (bank)->start
#define bank_phys_end(bank) ((bank)->start + (bank)->size)
#define bank_phys_size(bank) (bank)->size /*
* 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 __used \
__attribute__((__section__(".early_param.init"))) = { name, fn } #endif /* __KERNEL__ */ #endif

setup.h

__vet_atags的更多相关文章

  1. 第4天--linux内核学习

    驱动使用方式1.编译到内核中 * make uImage进入到系统后mknod /dev/led c 500 0 创建设备节点 2.编译为模块 M make module进入到系统后 mknod /d ...

  2. linux内核启动以及文件系统的加载过程

    Linux 内核启动及文件系统加载过程 当u-boot 开始执行 bootcmd 命令,就进入 Linux 内核启动阶段.普通 Linux 内核的启动过程也可以分为两个阶段.本文以项目中使用的 lin ...

  3. ARM Linux启动代码分析

    前言 在学习.分析之前首先要弄明白一个问题:为什么要分析启动代码? 因为启动代码绝大部分都是用汇编语言写的,对于没学过或者不熟悉汇编语言的同学确实有一定难度,但是如果你想真正深入地学习Linux,那么 ...

  4. linux内核调试指南

    linux内核调试指南 一些前言 作者前言 知识从哪里来 为什么撰写本文档 为什么需要汇编级调试 ***第一部分:基础知识*** 总纲:内核世界的陷阱 源码阅读的陷阱 代码调试的陷阱 原理理解的陷阱 ...

  5. arm linux kernel 从入口到start_kernel 的代码分析

    参考资料: <ARM体系结构与编程> <嵌入式Linux应用开发完全手册> Linux_Memory_Address_Mapping http://www.chinaunix. ...

  6. mkimage工具 加载地址和入口地址 内核启动分析

    第三章第二节 mkimage工具制作Linux内核的压缩镜像文件,需要使用到mkimage工具.mkimage这个工具位于u-boot-2013. 04中的tools目录下,它可以用来制作不压缩或者压 ...

  7. andriod and linux kernel启动流程

    虽然这里的Arm Linux kernel前面加上了Android,但实际上还是和普遍Arm linux kernel启动的过程一样的,这里只是结合一下Android的Makefile,讲一下boot ...

  8. Linux内核启动及根文件系统载入过程

    上接博文<u-boot之u-boot-2009.11启动过程分析> Linux内核启动及文件系统载入过程 当u-boot開始运行bootcmd命令,就进入Linux内核启动阶段.与u-bo ...

  9. 【linux】U-BOOT与linux kernel通信: struct tag

      欢迎转载,转载时需保留作者信息. 邮箱:tangzhongp@163.com 博客园地址:http://www.cnblogs.com/embedded-tzp Csdn博客地址:http://b ...

随机推荐

  1. Net Core微服务

    Net Core微服务 http://www.cnblogs.com/qhbm/category/1235971.html 开发工具:VS2017 .Net Core 2.1 什么是微服务? 单体结构 ...

  2. 爬虫(GET)——handler处理器和自定义opener

    工具:python3 解释:urlopen()不支持代理.cookie等其他的http/https高级功能,所以需要handler处理器创建特定功能的处理器对象,urllib.request.buli ...

  3. mysql 驱动问题

    转 : https://blog.csdn.net/bloodycuckoo/article/details/51175339 转 : https://blog.csdn.net/u010746431 ...

  4. python 5 条件判断

    条件判断 计算机之所以能做很多自动化的任务,因为它可以自己做条件判断. 比如,输入用户年龄,根据年龄打印不同的内容,在Python程序中,用if语句实现: age = 20 if age >= ...

  5. 1.7hashmap并发成环

    https://mp.weixin.qq.com/s?__biz=MzIxMjE5MTE1Nw==&mid=2653192000&idx=1&sn=118cee6d1c67e7 ...

  6. JDBC和分包

    JDBC(Java Data Base Connectivity,java数据库连接) JDBC是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编写 ...

  7. Struts功能详解 ——ActionServlet

    ActionServlet类是Struts框架的内置核心控制器组件,它继承了javax.servlet.http.HttpServlet类.Struts的启动通常从 加载ActionServlet开始 ...

  8. Python+selenium之fixtures

    fixtures即可以表示测试用例的开始和结束,也可以表示测试类和测试模块的开始和结束. import unittest def setUpModule(): print("test mod ...

  9. Java 文件操作-RandomAccessFile

    1. RandomAccessFile     Java提供了一个可以对文件随机访问的操作,访问包括读和写操作.该类名为RandomAccessFile.该类的读写是基于指针的操作. 1)文件访问模式 ...

  10. HDU 4284 Travel (Folyd预处理+dfs暴搜)

    题意:给你一些N个点,M条边,走每条边要花费金钱,然后给出其中必须访问的点,在这些点可以打工,但是需要先拿到证书,只可以打一次,也可以选择不打工之直接经过它.一个人从1号点出发,给出初始金钱,问你能不 ...