参考: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. spoolight on oracle 配置

    spoolight seting 1ORACLE_HOME=D:\oracle\product\11.2.0\client_1set SQLPATH=D:\oracle\product\11.2.0\ ...

  2. 第十九章 排查和调试Web程序 之 防止和排查运行时问题

    1. 概述 常见的几种运行时问题包括 错误数据.慢于预期的响应.未知行为 或者 未处理的异常. Visual Studio 提供了 排查.跟踪 和 日志 等工具 来帮助排查系统的问题.有些情况还需要插 ...

  3. 关于 SQL Server Reporting Services 匿名登录的解决方案

    每次访问报表都需要windows验证,这样的报表给客户确实很说不过去. SSRS 可以匿名登录的设定步骤: 环境: 开发工具:SQL Server Business Intelligence Deve ...

  4. 实例——省市区三级联动 & 还可以输入字符统计

    1 省市区三级联动 html代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8" ...

  5. jsoup爬虫,项目实战,欢迎收看

    import com.mongodb.BasicDBObject import com.mongodb.DBCollection import org.jsoup.Jsoup import org.j ...

  6. 动态加载sd卡或者手机内置存储卡的so库

    package com.wsc.utils; import android.content.Context; import com.wsc.common.Entrance; import com.ws ...

  7. 本号讯 | 人工智能手表为帕金森患者带来书写希望;微软翻译发布可实时翻译幻灯片的Presentation Translator

    7 月 12 日,微软成立微软研究院人工智能中心(Microsoft Research AI).这是一个隶属于微软研究体系内的科研和孵化中心,将聚焦于解决最复杂的人工智能挑战. 这支由科学家和工程师组 ...

  8. SharePoint Online 缺少“将站点另存为模板”

    之前文章行给出在SharePoint 2010 .SharePoint 2013 中将站点保存模板选项的文章.其实同样的问题出现在Microsoft Office 365的一部分SharePoint ...

  9. Python+selenium之获取请求信息

    basicConfig()所捕获的log信息.不过其开启的debug模式只能捕获到客户端像服务器发送的post()请求,而无法获取服务器所返回的应答信息. from random import ran ...

  10. COGS 1215. [Tyvj Aug11] 冗余电网

    ★   输入文件:ugrid.in   输出文件:ugrid.out   简单对比时间限制:1 s   内存限制:128 MB TYVJ八月月赛提高组第2题 测试点数目:5 测试点分值:20 --内存 ...