skyeye xscale 仿真错误
我下载了SkyEye 0.7.3仿真xscale的linux。用2.4.19的内核打了diff-2.4.19-rmk4、diff-2.4.19-rmk4-pxa2和diff-2.4.19-rmk4-pxa2-alvin2补丁。内核编译后,用skyeye加载运行。在内核启动时发现,运行到rest_init的
kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
出现了kernel panic错误:出错信息如下:
swapper (0): undefined instruction: pc=c001c478
Code: ea00002d e92d4ff0 e10fc000 e52dc004 (ec554000)
Internal error: Oops - undefined instruction: 60000013
CPU: 0
pc : [<c001c478>] lr : [<c0024860>] Not tainted
sp : c0115f9cip : 20000013fp : c0115fe4
r10: a0014da8r9 : 69052100r8 : c0114000
r7 : c0232000r6 : c0116920r5 : 00000000r4 : c0114000
r3 : 00000002r2 : 60000013r1 : c0232000r0 : c0114000
Flags: nzCvIRQs onFIQs onMode SVC_32Segment kernel
Control: 3927Table: A0004000DAC: 0000001D
Process swapper (pid: 0, stack limit = 0xc0114368)
Stack: (0xc0115f9c to 0xc0116000)
5f80: 20000013
5fa0: c0114000 00000000 c0116920 c0232000 c0114000 69052100 a0014da8 c0115fe4
5fc0: c0024860 c001d204 c0153e74 c0123270 c0123264 c0116bac 00000000 c0115fe8
5fe0: c001d2bc c002466c c012c3d0 c0153e74 c00086e0 c0123684 c0153e74 c0008080
Backtrace:
Function entered at [<c0024660>] from [<c001d2bc>]
r8 = C0116BACr7 = C0123264r6 = C0123270r5 = C0153E74
r4 = C001D204
Code: ea00002d e92d4ff0 e10fc000 e52dc004 (ec554000)
Kernel panic: Attempted to kill the idle task!
In idle task - not syncing
但我在init函数内加了几个printk语句后,内核可以正常启动了,不知道是不是skyeye的cache仿真没处理好的原因。目前,在内核加载后启动文件系统上的init时还是有错。我的init什么也没做,只是一个print语句。从出错的信息上看似乎是cache的问题。
我试过skyeye-testsuit-1.0.4中的内核和文件系统,内核可使用没有问题,但是加载文件系统时也有类似错误出现,只不过testsuit的内核可以进shell,而加载同一个文件系统映象,我的内核出错后就不再运行了。
我跟踪了一下发现在include/asm/proc-armv/processor.h的start_thread中出错的。
看来进程切换会引起skyeye出错。
***************************************************************
**** ****
**** SkyEyeSimulator Ver 0.7.3 withGDB 5.3 Interface ****
**** ****
***************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf".
(SkyEye) target sim
cpu info: xscale, xscale, 69052100, fffffff0, 2
mach info: name pxa_lubbock, mach_init addr 0x81414ec
log_info: log is off.
log_info:log file is /tmp/s_xa.log, fd is 0x0
log_info: log start clock 1
log_info: log end clock 1
SKYEYE: use xscale mmu ops
Loaded ROM ./piggy
Loaded ROM ./initrd4M.img
Connected to the simulator.
(SkyEye) run
Starting program:
warning: No executable file specified.
warning: No program loaded.
Linux version 2.4.19-rmk4-pxa2-alvin2 (root@localhost) (gcc version 3.2.1) #34 Thu May 27 19:17:13 CST 2004
CPU: Intel XScale-PXA250 revision 0
Machine: Intel DBPXA250 Development Platform
Ignoring unrecognised tag 0x00000000
Memory clock: 99.53MHz (*27)
Run Mode clock: 99.53MHz (*1)
Turbo Mode clock: 99.53MHz (*1.0, inactive)
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,115200 console=tty0 root=/dev/ram ramdisk=8192 ramdisk_start=0xa1000000
Console: colour dummy device 80x30
Calibrating delay loop... 7.29 BogoMIPS
Memory: 64MB = 64MB total
Memory: 63452KB available (1004K code, 263K data, 76K init)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
lock_kernel
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Console: switching to colour frame buffer device 80x30
Keyboard interface test failed: 00
Keyboard interface test failed: 00
Keyboard interface test failed: 00
initialize_kbd: Keyboard reset failed, no ACK
pty: 256 Unix98 ptys configured
Keyboard timed out
keyboard: Timeout - AT keyboard not present?
Keyboard timed out
keyboard: Timeout - AT keyboard not present?
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0x0000 (irq = 14) is a PXA UART
ttyS01 at 0x0000 (irq = 13) is a PXA UART
ttyS02 at 0x0000 (irq = 12) is a PXA UART
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
do_basic_setup
RAMDISK: ext2 filesystem found at block -1593835520
RAMDISK: Loading 4096 blocks into ram disk... done.
Freeing initrd memory: 8192K
VFS: Mounted root (ext2 filesystem) readonly.
prepare_namespace
Freeing init memory: 76K
free_initmem
unlock_kernel
execve
SKYEYE: xscale_cp15_cache_ops:invalidate BTB CANT!!!!!!!!!! 我会查看。谢谢! skyeye-v0.7.4 发布了。
我用了你的config,然后进行了如下处理,在skyeye-0.7.4上可以运行。
1 把你的config改名为.config
2修改.config
.config
CONFIG_CMDLINE="mem=64M root=/dev/ram ramdisk=8192 ramdisk_start=0xc1000000 console=ttyS0,115200"
3修改如下文件
arch/arm/mach-pxa/lubbock.c
fixup_lubbock function
disable
#if 0
#endif
4
make oldconfig
5
make menuconfig
General Setup
* default kernel command string: mem=64M root=/dev/ram ramdisk=8192 ramdisk_start=0xc1000000 console=ttyS0,115200
Block Device
* Initial RAM disk (initrd) support
然后编译内核,生成zImage, 用testsuit提供的文件系统initrd4M.img
skyeye.conf 内容如下:
cpu: xscale
mach: pxa_lubbock
mem_bank: map=I, type=RW, addr=0x40000000, size=0x0c000000
mem_bank: map=M, type=RW, addr=0xa0000000, size=0x00200000
mem_bank: map=M, type=RW, addr=0xa0200000, size=0x00100000, file=zImage, boot=yes
mem_bank: map=M, type=RW, addr=0xa0300000, size=0x00d00000
mem_bank: map=M, type=RW, addr=0xa1000000, size=0x00800000, file=./initrd4M.img
mem_bank: map=M, type=RW, addr=0xa1800000, size=0x02800000
然后运行skyeye
target sim
run
就可以看到输出了。 是我搞错了
我的配置 CONFIG_CMDLINE中多写了一个console=tty0,所以所有的输出都没了。
当时只是看到skyeye的输出有个出错提示SKYEYE: xscale_cp15_cache_ops:invalidate BTB CANT!!!!!!!!!!
所以认为是skyeye有问题。
谢谢版主! chyyuu说的第3点是什么意思?
不明白,
3修改如下文件
arch/arm/mach-pxa/lubbock.c
fixup_lubbock function
disable
#if 0
#endif 我的意思是:
就是把fixup_lubbock function 函数中
的
#if 0
...
#endif
这两个带#的语句注释掉。
页:
[1]