1. Mini2440 最大支持的SDRAM 是128M+128M
MINI2440 板子的内存是由两片64M大小的SDRAM组成,所以实际内存有128M。分别连接到芯片的BANK6和BANK7。从这个图可以看出 Mini2440 最大支持的SDRAM 是128M+128M,我们能不能利用 QEMU 直接给你模拟干满到 256M呢?各位看官看我的操作!
QEMU 模拟就是香啊,可以直接把想要的资源给他干满,不用更换硬件开发板!!省钱!省钱!
实现方案:
Bank6/Bank7: 64M = 32M+32M (默认的方案)
Bank6/Bank7:128M=64M+64M (看我的操作)
Bank6+Bank7: 128M+128M=256M (看我的操作)
2. 64M 干到 128M
U-Boot 1.3.2-mini2440 (Jun 19 2024 - 00:13:23)
CPUID: 32440001
FCLK: 405 MHz
HCLK: 101.250 MHz
PCLK: 50.625 MHz
I2C: ready
<uboot> ./board/mini2440/mini2440.c dram_init dram:128 MiB,mem->BANKCON[6] = 0x00018002
DRAM: 128 MB
<uboot> Nor flash...<uboot> ./board/mini2440/flash.c flash_init
<uboot> ## Transferring control to Linux (at address 30008000) ...
Uncompressing Linux... done, booting the kernel.
s3c_timers_write: Bad register 0x40
Linux version 3.0.4 (rtlinux@Rtlinux) (gcc version 4.4.3 (ctng-1.6.1) ) #7 Mon Jun 17 23:42:09 CST 2024
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: noinitrd root=/dev/mtdblock4 initrd=/linuxrc rootfstype=jffs2 console=ttySAC0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125408k/125408k available, 5664k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc8800000 - 0xf6000000 ( 728 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0025000 ( 116 kB)
.text : 0xc0025000 - 0xc0404e64 (3968 kB)
.data : 0xc0406000 - 0xc042a900 ( 147 kB)
.bss : 0xc042a924 - 0xc04653ec ( 235 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing subpending status 00000002
2.1 linux kernel 内存信息
root@buildroot:~$ cat /proc/meminfo
MemTotal: 125524 kB
MemFree: 121096 kB
Buffers: 0 kB
Cached: 1020 kB
SwapCached: 0 kB
Active: 776 kB
Inactive: 512 kB
Active(anon): 288 kB
Inactive(anon): 12 kB
Active(file): 488 kB
Inactive(file): 500 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 288 kB
Mapped: 448 kB
Shmem: 32 kB
Slab: 1772 kB
SReclaimable: 148 kB
SUnreclaim: 1624 kB
KernelStack: 264 kB
PageTables: 80 kB
NFS_Unstable: