Chinaunix首页 | 论坛 | 博客
  • 博客访问: 148472
  • 博文数量: 44
  • 博客积分: 2085
  • 博客等级: 大尉
  • 技术积分: 455
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-31 11:03
文章分类

全部博文(44)

文章存档

2013年(3)

2011年(8)

2010年(11)

2009年(22)

我的朋友

分类: 嵌入式

2009-10-20 16:38:00

SDRAM from 16M to 32M

1>修改Flash Utility 的配置文件 cp_12.inc

....
rem - ++++++++++++++++++++++++++++++++++++++++++++++++++
rem - SDRAM Control Register (SDCONF0/SDCONF1):
rem -
rem - SDCONF[31:19] - based address
rem -  base address = (value) << 18
rem -
rem - SDCONF[18:16] - reserved
rem -
rem - SDCONF[15]  - SDRAM Mode Set Command Register
rem -
rem - SDCONF[14]  - reserved
rem -
rem - SDCONF[13]  - auto-precharge mode
rem -  0   - auto-precharge
rem -  1   - no auto-precharge
rem -
rem - SDCONF[12:11] - latency
rem -  00   - 1 MCLK
rem -  01   - 2 MCLK
rem -  10   - 3 MCLK
rem -  11   - reserved
rem -
rem - SDCONF[10:8] - reserved
rem -
rem - SDCONF[7]  - number of banks
rem -  0   - 2 banks
rem -  1   - 4 banks
rem -
rem - SDCONF[6:5]  - width of data bus
rem -  00   - bank disable
rem -  01   - 8-bit
rem -  10   - 16-bit
rem -  11   - 32-bit
rem -
rem - SDCONF[4:3]  - number of column address bit
rem -  00   - 8-bit
rem -  01   - 9-bit
rem -  10   - 10-bit
rem -  11   - reserved
rem -
rem - SDCONF[2:0]  - size of SDRAM
rem -  000   - bank disabled
rem -  001~110  - (2^value)Mbytes
rem -  111   - reserved
rem -
rem - current setting:
rem -  base address -
rem -   SDRAM0: 0x00000000 ~ 0x007FFFFF
rem -   SDRAM1: 0x00800000 ~ 0x00FFFFFF
rem -  Set mode command, auto-precharge enable,
rem -  CAS latency = 3, 4 banks, 32-bit data bus,
rem -  column address = 8-bit, 8M bytes
rem - ++++++++++++++++++++++++++++++++++++++++++++++++++
rem - setmem 0xFFF01008 0x00009041 32 // Zy
rem - setmem 0xFFF0100C 0x00000000 32 // Zy
LONG 0xFFF01008 0x000090E3 // to: LONG 0xFFF01008 0x000090E4
LONG 0xFFF0100C 0x010090E3 // to: LONG 0xFFF0100C 0x020090E4

....

2>redboot:

修改下面文件packages/hal/arm/w90n740/current/include/hal_platform_setup.h

0x000090E3 ---> 0x000090E4

0x010090E3 ---> 0x020090E4

修改下面文件packages/hal/arm/w90n740/current/include/pkgconf/

CYGMEM_REGION_ram_SIZE and CYGMEM_SECTION_heap1_SIZE

3>kernel: 

sdram 大小的修改include/linux/autoconf.h 或

make menuconfig -->System Type-->SDRAM Size

4>运行后发现问题:
Unhandled fault: alignment exception (13) at 0x00000001

fault-common.c(97): start_code=0x1f80040, start_stack=0x1ffff58)

Internal error: Oops: 0

CPU: 0

pc : [<000d7bf8>]    lr : [<00049ab8>]    Not tainted

sp : 0063bf5c  ip : ff000067  fp : 0063bf7c

r10: 01ffff99  r9 : 00000015  r8 : 0063bf8c

r7 : 00000000  r6 : 00609000  r5 : 01ffff99  r4 : ff000067

r3 : 00000003  r2 : 00000000  r1 : 01000f95  r0 : ff609067

Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  Segment kernel

Control: 0

Process mount (pid: 12, stackpage=0063b000)

Stack:

0063bf40:                            00049ab8  000d7bf8 20000013 ffffffff 001e7008

0063bf60: 001e3020 001e2008 c0ed0000 00014720  0063bfac 0063bf80 0004a05c 00049a48

0063bf80: 0060a008 0060a008 00001002 00000000  001e7008 00000000 001e2008 0063a000

0063bfa0: 00000000 0063bfb0 00014580 0004a044  001e7008 00019c84 001e2008 001e3020

0063bfc0: 01ffff99 c0ed0000 001e7008 00000000  001e2008 001e2008 001e3020 001e7008

0063bfe0: 01ffff99 01fffcbc 01fffcc0 01fffcac  01f8ac2c 01fb913c 60000010 001e2008

Backtrace:

Function entered at [<00049a38>] from [<0004a05c>]

 r8 = 00014720  r7 = C0ED0000  r6 = 001E2008  r5 = 001E3020

 r4 = 001E7008

Function entered at [<0004a034>] from [<00014580>]

 r7 = 0063A000  r6 = 001E2008  r5 = 00000000  r4 = 001E7008

Code: b4c02001 d4c02001 (e4c02001) e0811003 e3a02000

Memory fault
对照System.map

00049a38 t copy_mount_options

0004a034 T sys_mount

修改fs/namespace.c-->copy_mount_options()

0x1000000 ---> 0x2000000

阅读(2112) | 评论(0) | 转发(0) |
0

上一篇:RAM FileSystem and expand

下一篇:C编成

给主人留下些什么吧!~~