QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1607|回复: 5

Linux启动中的错误

[复制链接]
发表于 2005-8-31 16:45:36 | 显示全部楼层 |阅读模式
为一块PXA270处理器的开发板移植Linux操作系统,内核启动前面正常。到最后运行用户进程init时发生错误。

Unable to handle kernel NULL pointer dereference at virtual address XXXXXXXX

根据Backtrace的信息,问题应该是这样的:

运行用户进程中发生缺页错误,这应该是elf格式最初只加载一页造成的。
在缺页错误的处理函数中,读取flash,加载用户程序需要运行的部分。

在这个过程中发生了以上错误。

代码是根据mainstone修改的,由于sdram以及flash部分的设计和mainstone基本一样,所以关于mmu和内存映射没有作什么修改。文件系统也直接用了mainstone的jffs2文件系统

哪位高手能指点一下,谢了!

附启动信息:
Uncompressing Linux.............................................................
Linux version 2.4.21-rmk1-pxa1-intc2 (root@INTEL) (gcc version 3.3.3) #1 .„1¤78.. 5
CPU: XScale-Bulverde revision 4
Machine: Intel DBBVA0 Development Platform
Ignoring unrecognised tag 0x00000000
Run Mode clock: 156.00MHz (*12)
Turbo Mode clock: 312.00MHz (*2.0, inactive)
Memory clock: 156.00MHz (Alt=1, SDCLK[0]=/4, SDCLK[1]=/2)
System bus clock: 156.00MHz
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 ip=192.168.1.101 console=ttyS0,115200 M
Console: colour dummy device 80x30
Calibrating delay loop... 155.64 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62420KB available (1939K code, 345K data, 80K 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: 512 (order: 0, 4096 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
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Init freq:312000kHz.
Registering CPU frequency change support.
CPU clock: 312.000 MHz (13.000-520.000 MHz)
CPU voltage: 1.400 mV (0.650-1.400 mV)
Register device ipmc successgul.
Starting kswapd
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis Communication.
I2C: PXA algorithm module loaded.
enable_irq(1 unbalanced from c00af324
I2C: Adding PXA-I2C-Adapter.
I2C: Scanning bus
I2C: Successfully added bus
Console: switching to colour frame buffer device 80x30
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-0 with no serial options enabled
ttyS00 at 0x0000 (irq = 22) is a PXA UART
ttyS01 at 0x0000 (irq = 21) is a PXA UART
ttyS02 at 0x0000 (irq = 20) is a PXA UART
SA1100 Real Time Clock driver v1.00
ac97_codec: AC97 Audio codec, id: CRY77 (Unknown)
UCB1x00 ID not found: 594d
UCB1x00 ID not found: 594d
LAN91x: not found.
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
SCSI subsystem driver Revision: 1.00
In file pxa-ac97.c, pm_registered.
Probing Mainstone flash at physical address 0x00000000 (32-bit buswidth)
Using buffer write method
RedBoot partition parsing not available
cmdlinepart partition parsing not available
Creating 4 MTD partitions on "Mainstone flash":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00240000 : "Kernel"
0x00240000-0x01240000 : "Filesystem"
0x01240000-0x02000000 : "Junk"
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
host/usb-ohci.c: USB OHCI at membase 0xfe000000, IRQ 3
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
Setting port 3 power failed.
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <[email protected]>
hid-core.c: USB HID support drivers
usb.c: registered new driver acm
acm.c: v0.21:USB Abstract Control Model driver for USB modems and ISDN adapters
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
vendorID: dead productID: beef
Linux video capture interface: v1.00
PXA_CAMERA: pxa_camera_video_init
PXA_CAMERA: video_register_device successfully. /dev/video0
mice: PS/2 mouse device common for all mice
pxa_ir: irda driver inited
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)
IP-Config: No network devices available.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
FAT: bogus logical sector size 381
FAT: bogus logical sector size 381
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing init memory: 80K
Unable to handle kernel paging request at virtual address 571572b3
pgd = c0008000
[571572b3] *pgd=00000000, *pmd = 00000000
Internal error: Oops: f3
CPU: 0
pc : [<c009e30c>]    lr : [<c009e310>]    Not tainted
sp : c037bd74  ip : 57157257  fp : c037bdc4
r10: 0015d000  r9 : c038b490  r8 : c3eb3000
r7 : 00000000  r6 : c0013cf4  r5 : c3ef8100  r4 : 00000000
r3 : 00000044  r2 : 00000000  r1 : 000ce6c0  r0 : 57157257
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 397F  Table: A0008000  DAC: 00000015
Process init (pid: 1, stack limit = 0xc037a37
Stack: (0xc037bd74 to 0xc037c000)
bd60:                                              c037bd94 c3ef8100 00000000
bd80: 00000000 00000003 00000000 c3eb3000 c3f974bc 00000363 00001000 00001000
bda0: 0015c000 c0013cf4 00000000 c3eb3000 c3f974bc 0015d000 c037bdf4 c037bdc8
bdc0: c009e8b8 c009e2b4 00001000 c03056d4 c03056ec c02330d8 00000000 c032bdd0
bde0: c001b120 c001b120 c037be14 c037bdf8 c009c894 c009e780 00001000 c03056d4
be00: c3efa8a4 c03056d4 c037be2c c037be18 c009c964 c009c824 c3efa910 c3efa8a4
be20: c037be40 c037be30 c009c9c0 c009c95c 00000000 c037be68 c037be44 c003e324
be40: c009c984 0000015c 00000003 0000016b c001b120 c000e120 c3efa8a4 c037be88
be60: c037be6c c003e3b8 c003e264 00000000 00000158 c032bdc0 0000016b c037bebc
be80: c037be8c c003fe14 c003e36c c3efa844 0000016b c037a000 c000e120 c000dd80
bea0: 00160000 c000e120 00000000 c000f0a0 c037bef4 c037bec0 c003b6a0 c003fcf0
bec0: c3ef26fc 000bf000 c03057b0 c037a000 c000f0a0 00000000 00160000 c000e120
bee0: c037bfa0 00160848 c037bf20 c037bef8 c003b8e4 c003b648 c000dd80 000bf000
bf00: 00160000 c000e120 00000000 c037a000 c000f0a0 c037bf48 c037bf24 c00225c4
bf20: c003b86c c037a000 c000f0a0 c000f0bc 00000007 c037bfa0 00160848 c037bf78
bf40: c037bf4c c002270c c002255c c000f0a0 00000007 c037bfdc c021104c 00160848
bf60: c037bfa0 00000000 000996ec c037bf9c c037bf7c c0022b90 c00226b0 ffffffff
bf80: c037bfdc 00160848 0000397f 00008284 00000000 c037bfa0 c001c7fc c0022b68
bfa0: 00160840 bfffff44 00000001 00001000 002759c0 bfffff44 00160848 00000000
bfc0: 00008284 00000000 000996ec 00000000 00160848 bffffd14 000a03e4 000bf2d8
bfe0: 60000010 ffffffff 00000000 c037bff8 c001e200 c001c17c 20002d36 000036cd
Backtrace:
Function entered at [<c009e2a8>] from [<c009e8b8>]
Function entered at [<c009e774>] from [<c009c894>]
Function entered at [<c009c818>] from [<c009c964>]
r6 = C03056D4  r5 = C3EFA8A4  r4 = C03056D4
Function entered at [<c009c950>] from [<c009c9c0>]
r5 = C3EFA8A4  r4 = C3EFA910
Function entered at [<c009c978>] from [<c003e324>]
r4 = 00000000
Function entered at [<c003e258>] from [<c003e3b8>]
Function entered at [<c003e360>] from [<c003fe14>]
r7 = 0000016B  r6 = C032BDC0  r5 = 00000158  r4 = 00000000
Function entered at [<c003fce4>] from [<c003b6a0>]
Function entered at [<c003b63c>] from [<c003b8e4>]
Function entered at [<c003b860>] from [<c00225c4>]
r8 = C000F0A0  r7 = C037A000  r6 = 00000000  r5 = C000E120
r4 = 00160000
Function entered at [<c0022550>] from [<c002270c>]
Function entered at [<c00226a4>] from [<c0022b90>]
Function entered at [<c0022b5c>] from [<c001c7fc>]
r8 = 00008284  r7 = 0000397F  r6 = 00160848  r5 = C037BFDC
r4 = FFFFFFFF
Code: e0031000 e1a0000c e3a03044 e1a0e00f (e59cf05c)
Kernel panic: Attempted to kill init!
Unable to handle kernel paging request at virtual address e73dee73
pgd = c0008000
[e73dee73] *pgd=00000000, *pmd = 00000000
Internal error: Oops: 8f3
CPU: 0
pc : [<c01cd074>]    lr : [<c0062920>]    Not tainted
sp : c037bbd8  ip : c3f97438  fp : c037bbfc
r10: 0015d000  r9 : 000000f3  r8 : 571572b3
r7 : 0000000b  r6 : c037a000  r5 : c0212e58  r4 : c037a000
r3 : c037bbd8  r2 : e73dee73  r1 : 00000002  r0 : c3f97434
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 397F  Table: A0008000  DAC: 00000015
Process init (pid: 1, stack limit = 0xc037a37
Stack: (0xc037bbd8 to 0xc037c000)
bbc0:                                                       c3f97438 00000000
bbe0: c037a000 00000001 c3f97400 c0212e58 c037bc14 c037bc00 c0062920 c01cd028
bc00: 00000000 c037bd2c c037bc28 c037bc18 c0062998 c00628dc 00000000 c037bc3c
bc20: c037bc2c c004df88 c0062964 c037a000 c037bc4c c037bc40 c004dfd4 c004df6c
bc40: c037bc60 c037bc50 c002ac14 c004dfcc c037a000 c037bc94 c037bc74 c002e5e4
bc60: c002ab3c c01d9148 00000000 00000000 00000001 c037a000 c037bd2c c000f0a0
bc80: 000000f3 571572b3 c037bcac c037bc98 c002189c c002e2e0 c037bd2c 571572b3
bca0: c037bccc c037bcb0 c0022490 c00217e0 c037bd2c e59cf05c c009e30c 0000005c
bcc0: c037bd04 c037bcd0 c0023b48 c002242c c037bd2c 00000005 00000009 000000f3
bce0: c037bd60 c021101c 571572b3 c037bd2c a0000013 0015d000 c037bd28 c037bd08
bd00: c0022b90 c0023a38 ffffffff c037bd60 c0013cf4 00000000 c3eb3000 c037bdc4
bd20: c037bd2c c001c4c0 c0022b68 57157257 000ce6c0 00000000 00000044 00000000
bd40: c3ef8100 c0013cf4 00000000 c3eb3000 c038b490 0015d000 c037bdc4 57157257
bd60: c037bd74 c009e310 c009e30c a0000013 ffffffff c037bd94 c3ef8100 00000000
bd80: 00000000 00000003 00000000 c3eb3000 c3f974bc 00000363 00001000 00001000
bda0: 0015c000 c0013cf4 00000000 c3eb3000 c3f974bc 0015d000 c037bdf4 c037bdc8
bdc0: c009e8b8 c009e2b4 00001000 c03056d4 c03056ec c02330d8 00000000 c032bdd0
bde0: c001b120 c001b120 c037be14 c037bdf8 c009c894 c009e780 00001000 c03056d4
be00: c3efa8a4 c03056d4 c037be2c c037be18 c009c964 c009c824 c3efa910 c3efa8a4
be20: c037be40 c037be30 c009c9c0 c009c95c 00000000 c037be68 c037be44 c003e324
be40: c009c984 0000015c 00000003 0000016b c001b120 c000e120 c3efa8a4 c037be88
be60: c037be6c c003e3b8 c003e264 00000000 00000158 c032bdc0 0000016b c037bebc
be80: c037be8c c003fe14 c003e36c c3efa844 0000016b c037a000 c000e120 c000dd80
bea0: 00160000 c000e120 00000000 c000f0a0 c037bef4 c037bec0 c003b6a0 c003fcf0
bec0: c3ef26fc 000bf000 c03057b0 c037a000 c000f0a0 00000000 00160000 c000e120
bee0: c037bfa0 00160848 c037bf20 c037bef8 c003b8e4 c003b648 c000dd80 000bf000
bf00: 00160000 c000e120 00000000 c037a000 c000f0a0 c037bf48 c037bf24 c00225c4
bf20: c003b86c c037a000 c000f0a0 c000f0bc 00000007 c037bfa0 00160848 c037bf78
bf40: c037bf4c c002270c c002255c c000f0a0 00000007 c037bfdc c021104c 00160848
bf60: c037bfa0 00000000 000996ec c037bf9c c037bf7c c0022b90 c00226b0 ffffffff
bf80: c037bfdc 00160848 0000397f 00008284 00000000 c037bfa0 c001c7fc c0022b68
bfa0: 00160840 bfffff44 00000001 00001000 002759c0 bfffff44 00160848 00000000
bfc0: 00008284 00000000 000996ec 00000000 00160848 bffffd14 000a03e4 000bf2d8
bfe0: 60000010 ffffffff 00000000 c037bff8 c001e200 c001c17c 20002d36 000036cd
Backtrace:
Function entered at [<c01cd01c>] from [<c0062920>]
r5 = C0212E58  r4 = C3F97400
Function entered at [<c00628d0>] from [<c0062998>]
r5 = C037BD2C  r4 = 00000000
Function entered at [<c0062958>] from [<c004df88>]
r4 = 00000000
Function entered at [<c004df60>] from [<c004dfd4>]
r4 = C037A000
Function entered at [<c004dfc0>] from [<c002ac14>]
Function entered at [<c002ab2c>] from [<c002e5e4>]
r3 = 00000001  r2 = 00000000  r1 = 00000000  r0 = C01D9148
r4 = C037A000
Function entered at [<c002e2d4>] from [<c002189c>]
r8 = 571572B3  r7 = 000000F3  r6 = C000F0A0  r5 = C037BD2C
r4 = C037A000
Function entered at [<c00217d4>] from [<c0022490>]
r5 = 571572B3  r4 = C037BD2C
Function entered at [<c0022420>] from [<c0023b48>]
r7 = 0000005C  r6 = C009E30C  r5 = E59CF05C  r4 = C037BD2C
Function entered at [<c0023a2c>] from [<c0022b90>]
Function entered at [<c0022b5c>] from [<c001c4c0>]
r8 = C3EB3000  r7 = 00000000  r6 = C0013CF4  r5 = C037BD60
r4 = FFFFFFFF
Function entered at [<c009e2a8>] from [<c009e8b8>]
Function entered at [<c009e774>] from [<c009c894>]
Function entered at [<c009c818>] from [<c009c964>]
r6 = C03056D4  r5 = C3EFA8A4  r4 = C03056D4
Function entered at [<c009c950>] from [<c009c9c0>]
r5 = C3EFA8A4  r4 = C3EFA910
Function entered at [<c009c978>] from [<c003e324>]
r4 = 00000000
Function entered at [<c003e258>] from [<c003e3b8>]
Function entered at [<c003e360>] from [<c003fe14>]
r7 = 0000016B  r6 = C032BDC0  r5 = 00000158  r4 = 00000000
Function entered at [<c003fce4>] from [<c003b6a0>]
Function entered at [<c003b63c>] from [<c003b8e4>]
Function entered at [<c003b860>] from [<c00225c4>]
r8 = C000F0A0  r7 = C037A000  r6 = 00000000  r5 = C000E120
r4 = 00160000
Function entered at [<c0022550>] from [<c002270c>]
Function entered at [<c00226a4>] from [<c0022b90>]
Function entered at [<c0022b5c>] from [<c001c7fc>]
r8 = 00008284  r7 = 0000397F  r6 = 00160848  r5 = C037BFDC
r4 = FFFFFFFF
Code: e59c2004 e24b3024 e50bc024 e58c3004 (e5823000)
Kernel panic: Attempted to kill init!
Unable to handle kernel paging request at virtual address 6b3ab1af
pgd = c0004000
[6b3ab1af] *pgd=00000000, *pmd = 00000000
Internal error: Oops: f3
CPU: 0
pc : [<c0062774>]    lr : [<c00518b4>]    Not tainted
sp : c0367f98  ip : c0367fc0  fp : c0367fbc
r10: c0212e58  r9 : 69054114  r8 : c3f97400
r7 : 00000000  r6 : c3f97458  r5 : c0366000  r4 : c0212de4
r3 : 12655615  r2 : 00000000  r1 : 00000000  r0 : 6b3ab1ab
Flags: NzcV  IRQs on  FIQs on  Mode SVC_32  Segment kernel
Control: 397F  Table: A0008000  DAC: 0000001D
Process kupdated (pid: 6, stack limit = 0xc036637
Stack: (0xc0367f98 to 0xc0368000)
7f80:                                                       c0212de4 c0366000
7fa0: c0366340 c0366350 c021a6e8 a0017090 c0367fd0 c0367fc0 c00518b4 c0062738
7fc0: c0212de4 c0367ff4 c0367fd4 c0051bf8 c00518b0 c0051adc c037a000 c022969c
7fe0: c022968c c0210d08 00000000 c0367ff8 c001e200 c0051ae8 0000e516 80081fdd
Backtrace:
Function entered at [<c006272c>] from [<c00518b4>]
Function entered at [<c00518a4>] from [<c0051bf8>]
r4 = C0212DE4
Function entered at [<c0051adc>] from [<c001e200>]
r8 = C0210D08  r7 = C022968C  r6 = C022969C  r5 = C037A000
r4 = C0051ADC
Code: e5960004 e1500006 0a000045 e1a07001 (e5902004)
发表于 2005-8-31 17:45:22 | 显示全部楼层
mtd的檫除尺寸不对把,问题在你的文件系统
你是怎样生成文件映像的??
回复

使用道具 举报

 楼主| 发表于 2005-9-1 09:56:41 | 显示全部楼层
使用mainstone toolchain 里提供的文件系统和mkfs.jffs2
回复

使用道具 举报

发表于 2005-9-2 08:49:57 | 显示全部楼层
VFS: Mounted root (jffs2 filesystem) readonly
这个提示有问题,jffs2应该是可读写的
在命令行里添加rootfstype=jffs2 root=/dev/mtdblock2 rw
再试试!
另外你的内存是64M吗???
回复

使用道具 举报

 楼主| 发表于 2005-9-21 16:01:27 | 显示全部楼层
添加rootfstype=jffs2 root=/dev/mtdblock2 rw 仍然不能启动

内存是64M的
回复

使用道具 举报

发表于 2005-9-23 00:09:01 | 显示全部楼层
Seems issue is about your VFS. Can you ask a  compiled fs image to have a try to make confirm that your kernel configuration is OK?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-3 02:22 , Processed in 0.048030 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表