当前位置: 技术问答>linux和unix
Linux2.6.16修改中LCD分辨率后 内核无法启动
来源: 互联网 发布时间:2016-10-04
本文导语: 本帖最后由 meiky 于 2010-08-20 23:41:52 编辑 我修改了s3c2410fb.c中,原来为: static struct s3c2410fb_mach_info smdk2410_lcd_platdata = { .width= 320, .height= 240, .xres = { .defval= 320, .min= 320, .max= 320, }, .yres = { .defval= 240, .min= 240, .ma...
static struct s3c2410fb_mach_info smdk2410_lcd_platdata = {
.width= 320,
.height= 240,
.xres = {
.defval= 320,
.min= 320,
.max= 320,
},
.yres = {
.defval= 240,
.min= 240,
.max= 240,
},
.bpp = {
.defval= 16,
.min= 16,
.max= 16,
},
.regs = {
.lcdcon1= S3C2410_LCDCON1_TFT8BPP | S3C2410_LCDCON1_TFT | S3C2410_LCDCON1_CLKVAL(7),
.lcdcon2= S3C2410_LCDCON2_VBPD(7) | S3C2410_LCDCON2_VFPD(8) | S3C2410_LCDCON2_VSPW(8) | S3C2410_LCDCON2_LINEVAL(239),
.lcdcon3= S3C2410_LCDCON3_HBPD(50) | S3C2410_LCDCON3_HFPD(50) | S3C2410_LCDCON3_HOZVAL(319),
.lcdcon4= S3C2410_LCDCON4_HSPW(18) ,//| S3C2410_LCDCON4_MVAL(13),
.lcdcon5= S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_HWSWP | S3C2410_LCDCON5_PWREN,
},
.gpcup= 0xFFFFFFFF,
.gpcup_mask= 0xFFFFFFFF,
.gpccon= 0xaaaaaaaa,
.gpccon_mask= 0xFFFFFFFF,
.gpdup= 0xFFFFFFFF,
.gpdup_mask= 0xFFFFFFFF,
.gpdcon= 0xaaaaaaaa,
.gpdcon_mask= 0xFFFFFFFF,
.lpcsel= 0x00,
};
其中分辨率部分修改成
.width= 640,
.height= 480,
.xres = {
.defval= 640,
.min= 640,
.max= 640,
},
.yres = {
.defval= 480,
.min= 480,
.max= 480,
},
.bpp = {
.defval= 16,
.min= 16,
.max= 16,
},
内核启动时就
Starting kernel ...
Uncompressing Linux.............................................................
done, booting the kernel.
Linux version 2.6.16 (root@localhost.localdomain) (gcc version 4.1.1) #645 Sat M
ay 16 19:27:24 CST 2015
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: console=ttySAC0,115200 root=/dev/mtdblock3 noinitrd rootfst
ype=jffs2 ro mem=64m
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62896KB available (1652K code, 179K data, 76K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410: Initialising architecture
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
yaffs May 16 2015 19:26:16 Installing.
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
Console: switching to colour frame buffer device 80x60
fb0: s3c2410fb frame buffer device
Unable to handle kernel paging request at virtual address c48c0000
pgd = c0004000
[c48c0000] *pgd=30299011, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1]
CPU: 0
pc : [] lr : [] Not tainted
sp : c0287e7c ip : 00000000 fp : c0287eac
r10: 00000000 r9 : c01de780 r8 : 00000000
r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 00000000
r3 : 00000000 r2 : 00055fe0 r1 : c48c0000 r0 : ffc40000
Flags: nzCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: 717F Table: 30004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc02861a0)
Stack: (0xc0287e7c to 0xc0288000)
7e60: c02f1354
7e80: 00000000 c01be830 c01de784 ffc00000 c4880000 c00e6e64 c02f11c0 c02f1354
7ea0: c0287eec c0287eb0 c0013ae4 c00e6e3c c02f1354 c01c04cc c0287f24 00000020
7ec0: 00000000 c01be8fc c01be838 00000000 c01c6980 00000000 00000000 00000000
7ee0: c0287efc c0287ef0 c0102abc c00135d0 c0287f1c c0287f00 c01012f0 c0102aac
7f00: c01be8fc c01be838 c01013e0 c01c6980 c0287f34 c0287f20 c0101460 c0101278
7f20: 00000000 c0287f3c c0287f64 c0287f38 c0100ca0 c01013f0 00000000 c01ca6c0
7f40: c01ca6c0 c01be880 c01c6994 c01c6980 c01ca5d8 00000000 c0287f74 c0287f68
7f60: c01011f4 c0100c64 c0287f9c c0287f78 c01008f8 c01011e4 c01c6980 c00188cc
7f80: 00000000 00000000 00000000 00000000 c0287fb4 c0287fa0 c0101714 c010089c
7fa0: 00000000 c0286000 c0287fc4 c0287fb8 c0102c74 c010168c c0287fd4 c0287fc8
7fc0: c00e6e20 c0102c18 c0287ff4 c0287fd8 c001b0a0 c00e6e14 00000000 00000000
7fe0: 00000000 00000000 00000000 c0287ff8 c002d28c c001b03c e89da818 e1a0c00d
Backtrace:
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Code: 1a000031 e252201c e92d01e0 ba000003 (e8b151f8)
Kernel panic - not syncing: Attempted to kill init!
怎么回事!!!!!!!!!!
|
fb0: s3c2410fb frame buffer device
从这行看,驱动加载是成功了
建议你调试一下下面两个函数:
s3c2410fb_check_var
s3c2410fb_set_par
.width= 320,
.height= 240,
是否做了相应的修改?
从这行看,驱动加载是成功了
建议你调试一下下面两个函数:
s3c2410fb_check_var
s3c2410fb_set_par
.width= 320,
.height= 240,
是否做了相应的修改?
|
显示驱动根据分辨率分配显存大小, 需要确认分辨率更改后, 显存是否得到正确的分配? 如果显存的DMA buffer还按原分辨率来分配, 在操作是就会内存越界。