__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的更多相关文章
- 第4天--linux内核学习
驱动使用方式1.编译到内核中 * make uImage进入到系统后mknod /dev/led c 500 0 创建设备节点 2.编译为模块 M make module进入到系统后 mknod /d ...
- linux内核启动以及文件系统的加载过程
Linux 内核启动及文件系统加载过程 当u-boot 开始执行 bootcmd 命令,就进入 Linux 内核启动阶段.普通 Linux 内核的启动过程也可以分为两个阶段.本文以项目中使用的 lin ...
- ARM Linux启动代码分析
前言 在学习.分析之前首先要弄明白一个问题:为什么要分析启动代码? 因为启动代码绝大部分都是用汇编语言写的,对于没学过或者不熟悉汇编语言的同学确实有一定难度,但是如果你想真正深入地学习Linux,那么 ...
- linux内核调试指南
linux内核调试指南 一些前言 作者前言 知识从哪里来 为什么撰写本文档 为什么需要汇编级调试 ***第一部分:基础知识*** 总纲:内核世界的陷阱 源码阅读的陷阱 代码调试的陷阱 原理理解的陷阱 ...
- arm linux kernel 从入口到start_kernel 的代码分析
参考资料: <ARM体系结构与编程> <嵌入式Linux应用开发完全手册> Linux_Memory_Address_Mapping http://www.chinaunix. ...
- mkimage工具 加载地址和入口地址 内核启动分析
第三章第二节 mkimage工具制作Linux内核的压缩镜像文件,需要使用到mkimage工具.mkimage这个工具位于u-boot-2013. 04中的tools目录下,它可以用来制作不压缩或者压 ...
- andriod and linux kernel启动流程
虽然这里的Arm Linux kernel前面加上了Android,但实际上还是和普遍Arm linux kernel启动的过程一样的,这里只是结合一下Android的Makefile,讲一下boot ...
- Linux内核启动及根文件系统载入过程
上接博文<u-boot之u-boot-2009.11启动过程分析> Linux内核启动及文件系统载入过程 当u-boot開始运行bootcmd命令,就进入Linux内核启动阶段.与u-bo ...
- 【linux】U-BOOT与linux kernel通信: struct tag
欢迎转载,转载时需保留作者信息. 邮箱:tangzhongp@163.com 博客园地址:http://www.cnblogs.com/embedded-tzp Csdn博客地址:http://b ...
随机推荐
- input密码自动填充
自动填充样式修改 input: -webkit - autofill, input: -webkit - autofill: hover, input: -webkit - autofill: foc ...
- ASP.NET Core性能测试
ASP.NET Core性能测试 应用性能直接影响到托管服务的成本,因此公司在开发应用时需要格外注意应用所使用的Web框架,初创公司尤其如此.此外,糟糕的应用性能也会影响到用户体验,甚至会因此受到相关 ...
- 软件模拟I2C时输入与输出切换
一 为达到类似C51的操作需要添加以下位带操作:#include "stm32f10x_gpio.h"#include "stm32f10x_conf.h" / ...
- arcgis python 保存当前窗口图形为jpg
1,第一步打开arcgis 将图形加载进去 第二步,将要保存的图形调到合适的比例尺,然后点击下面按钮 第三步,将写好的python 语句放到里面去: import arcpy mxd = arcpy. ...
- 部署WebService服务碰到的一个小问题
在部署WebService服务到IIS上之后,发现一直无法在浏览器访问到编写的asmx文件,一直提示404或403错误.提示当前访问的文件时脚本文件. 1.首先检查了在IIS上部署WebService ...
- 【转】说说Runnable与Callable
说说Runnable与Callable Callable接口: Runnable接口: 相同点: 两者都是接口:(废话) 两者都可用来编写多线程程序: 两者都需要调用Thread.start( ...
- java初探之初始化
首先明确,变量初始化是在任何方法(包括构造器)被调用之前进行的. 1.实例变量的初始化 实例变量只有当它所属的类实例化后才会存在,构造器被执行就意味着对象就被创建. 1.1.指定初始化. class ...
- 【虚拟机-部署】通过 Powershell 来调整 ARM 模式下虚拟机的尺寸
需求描述 在部署完 ARM 模式的虚拟机以后,可以通过 PowerShell 命令来调整虚拟机的尺寸,以下是通过 PowerShell 命令来调整 ARM 模式的虚拟机尺寸. Note 本文只限于 A ...
- 在Office 365 添加就地保留用户邮箱
基于客户需求,要求将用户批量添加到Office 365中的现有就地保留.如您所了解的,我们可以通过Exchange在线图形用户GUI界面完成,也可以通过PowerShell完成. 要将用户批量添加到O ...
- nodeis 避免回调引起的栈溢出 Maximum call stack size exceeded
//如果这样写,会发生栈溢出 var i = 1; function isEven() { console.log(i++); // return isEven(); retu ...