uboot 移植之gd_t,bd_t

2024-01-21 19:18
文章标签 uboot 移植 bd gd

本文主要是介绍uboot 移植之gd_t,bd_t,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

gd_t定义在uboot/include/asm-arm/global_data.h
/** (C) Copyright 2002* Wolfgang Denk, DENX Software Engineering, wd@denx.de.** See file CREDITS for list of people who contributed to this* project.** This program is free software; you can redistribute it and/or* modify it under the terms of the GNU General Public License as* published by the Free Software Foundation; either version 2 of* the License, or (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston,* MA 02111-1307 USA*/#ifndef	__ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
/** The following data structure is placed in some memory wich is* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or* some locked parts of the data cache) to allow for a minimum set of* global variables during system initialization (until we have set* up the memory controller so that we can use RAM).** Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)*/typedef	struct	global_data {bd_t		*bd;unsigned long	flags;unsigned long	baudrate;unsigned long	have_console;	/* serial_init() was called */unsigned long	env_addr;	/* Address  of Environment struct */unsigned long	env_valid;	/* Checksum of Environment valid? */unsigned long	fb_base;	/* base address of frame buffer */
#ifdef CONFIG_VFDunsigned char	vfd_type;	/* display type */
#endif
#if 0unsigned long	cpu_clk;	/* CPU clock in Hz!		*/unsigned long	bus_clk;phys_size_t	ram_size;	/* RAM size */unsigned long	reset_status;	/* reset status register at boot */
#endifvoid		**jt;		/* jump table */
} gd_t;/** Global Data Flags*/
#define	GD_FLG_RELOC	0x00001		/* Code was relocated to RAM		*/
#define	GD_FLG_DEVINIT	0x00002		/* Devices have been initialized	*/
#define	GD_FLG_SILENT	0x00004		/* Silent mode				*/
#define	GD_FLG_POSTFAIL	0x00008		/* Critical POST test failed		*/
#define	GD_FLG_POSTSTOP	0x00010		/* POST seqeunce aborted		*/
#define	GD_FLG_LOGINIT	0x00020		/* Log Buffer has been initialized	*/
#define GD_FLG_DISABLE_CONSOLE	0x00040		/* Disable console (in & out)	 */#define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r8")//#endif /* __ASM_GBL_DATA_H */

bd_t定义在uboot/include/asm-arm/u-boot.h
/** (C) Copyright 2002* Sysgo Real-Time Solutions, GmbH <www.elinos.com>* Marius Groeger <mgroeger@sysgo.de>** (C) Copyright 2002* Sysgo Real-Time Solutions, GmbH <www.elinos.com>* Alex Zuepke <azu@sysgo.de>** See file CREDITS for list of people who contributed to this* project.** This program is free software; you can redistribute it and/or* modify it under the terms of the GNU General Public License as* published by the Free Software Foundation; either version 2 of* the License, or (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston,* MA 02111-1307 USA********************************************************************** NOTE: This header file defines an interface to U-Boot. Including* this (unmodified) header file in another file is considered normal* use of U-Boot, and does *not* fall under the heading of "derived* work".*********************************************************************/#ifndef _U_BOOT_H_
#define _U_BOOT_H_	1typedef struct bd_info {int			bi_baudrate;	/* serial console baudrate */unsigned long	bi_ip_addr;	/* IP Address */struct environment_s	       *bi_env;ulong	        bi_arch_number;	/* unique id for this board */ulong	        bi_boot_params;	/* where this board expects params */struct				/* RAM configuration */{ulong start;ulong size;}			bi_dram[CONFIG_NR_DRAM_BANKS];
} bd_t;#define bi_env_data bi_env->data
#define bi_env_crc  bi_env->crc#endif	/* _U_BOOT_H_ */
可参考
http://hi.baidu.com/shaoyi1110/blog/item/5246f5d1e0ac93123bf3cf56.html

这篇关于uboot 移植之gd_t,bd_t的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/630563

相关文章

BD错误集锦9——查询hive表格时出错:Wrong FS: hdfs://s233/user/../warehouse expected: hdfs://mycluster

集群环境描述:HDFS集群处于HA模式下,同时启动了YARN\JN\KAFKA\ZK。 现象: FAILED: SemanticException Unable to determine if hdfs://s233/user/hive/warehouse/mydb.db/ext_calllogs_in_hbase is encrypted: java.lang.IllegalArgument

BD错误集锦8——在集成Spring MVC + MyBtis编写mapper文件时需要注意格式 You have an error in your SQL syntax

报错的文件 <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.yuan.dao.YuanUserDao"><!

BD错误集锦7——在集成Spring MVC + MyBtis时使用c3p0作为数据库时报错Method com/mchange/v2/c3p0/impl/NewProxyPreparedStatem

异常信息如下: Type Exception ReportMessage Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyPreparedStatement.isClosed()Z is abstractDescr

BD错误集锦6——【IDEA报错】tomcat server功能无效,报错Java EE: EJB, JPA, Servlets

在网上查找原因,发现是非法关闭IDEA导致的。 Open Settings | Plugns and enable it. 在设置中enable JAVA EE和tomcat server即可。 参考: https://stackoverflow.com/questions/43607642/intellij-idea-plugin-errorproblems-found-loadin

BD错误集锦5——java.nio.file.FileSystemException 客户端没有所需的特权

问题:在运行storm本地模式程序时,java.nio.file.FileSystemException  客户端没有所需的特权   解决方式:以管理员身份运行IDEA即可。

BD错误集锦3——ERROR: Can't get master address from ZooKeeper; znode data == null

hbase集群没启动,傻子!   启动集群 [s233 s234 s235]启动zk集群 $>zkServer.sh start $>zkServer.sh status   [s233] 启动dfs系统 $>start-dfs.sh 如果s237 namenode启动失败,则 [s237] $>hadoop-daemon.sh start namenode [s233]启动yarn集群

BD错误集锦1——[Hive]ERROR StatusLogger No log4j2 configuration file found. Using default configuration:

错误描述:在使用IDEA进行jdbc方式连接到hive数据仓库时,出现以下错误:                ERROR StatusLogger No log4j2 configuration file found. 问题原因:缺少log4j2.xml文件   <?xml version="1.0" encoding="UTF-8"?><Configuration><Appender

移植对话框MFC

VC版 MFC程序对话框资源移植 以下均拷贝自上面,仅用来记录 (部分有删除) 法1: Eg:将B工程调试好的对话框移植到A工程中 1.资源移植         1.1  在2017打开B工程,在工作区Resource标签页中选中Dialog文件夹下的资源文件,按Ctrl+C或点击Edit->Copy.         1.2. 关闭当前工程,注意不要关闭VC6,打开B工程(File

海思3518平台的uboot 和 kernel烧写

############################# 3518 kernel & uboot 16Mflash  ######################################### 1、组件网络:                                                setenv serverip 1