我迷迷糊学看了lowlevel_init.S中的代码之后,有一个感觉就是,要想读懂其中的代码首先得看一下你所用的芯片手册,因为里面有比较详细的存储器控制(MemoryController)描述。我用的是s3c2440手册里写得十分清楚,总共有8个块(Banks)(Bank0~Bank7),每个块对应着不同的控制与地址线,其实这些Bank很大一部分是对应着的控制寄存器的地址,这个要看实际的芯片与板子,看了下面的理解估计会有个大概。 第二,就是要清楚你的板子上对的存储地址的分配,一般板子手册上都会有的。我的开发板是友善之臂的mini2440(不是很富裕只能买一些平民板子),在它的手册里写有SDRAM存储系统与FLASH系统的介绍包括芯片型号,存储大小,这些都是后面移植要注意,毕竟U-boot的移植就是对硬件支持的修改。mini2440的SDRAM使用两片32M bytes总共64M bytes型号为HY57V561620FTP芯片,地址空间为0x30000000~0x34000000 进入正题: /* * Memory Setup stuff - taken from blob memsetup.S * * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) * * Modified for the Samsung SMDK2410 by * (C) Copyright 2002 * David Mueller, ELSOFT AG, * * 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 no
关于lowlevel_init函数的理解
最新推荐文章于 2024-09-21 19:15:00 发布