Hello directfb-dev, I am currently developing on a VIA EPIA-M10000 (Ezra CPU) board booting from LinuxBIOS. Because of the way LinuxBIOS sets up the VGA and loads the kernel, vesafb cannot be used to get a framebuffer since the real-mode portion of the kernel that sets the video mode is never run. I was planning on testing 2.6 vesafb+vm86d, but I found that viafb does all the proper initialization I need.
Dmitry Borisov provided me with a small patch that allows viafb to be
compiled into the kernel statically and initialize properly. In the
current -epia patch it was broken. I added support for passing the two
missing parameters on the kernel commandline. The unified patch is
attached and can be applied on top of the most recent 2.4.25-epia1
patched kernel (at least until the Tony Murray adds it to the -epia
patch)
I believe, though, that I have found a bug in viafb when doing some
testing. I am trying to use bootsplash (3.0.7 patch release which is
also part of the -epia patch) in my application, and whenever I attempt
to use bootsplash in silent mode (splash=silent) I get an oops somewhere
inside of viafb. I have tested bootsplash on many framebuffer devices
(vesafb, matroxfb, atifb) and not had a problem.
Here is my ksymoops output:
<1>Unable to handle kernel NULL pointer dereference at virtual address
00000198
printing eip:
c01b875d
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c01b875d>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010286
eax: ddfe3e70 ebx: 00000258 ecx: c02a6ec0 edx: c01b8750
esi: c0ef8062 edi: 00000000 ebp: ddfe3e30 esp: ddfe3e20
ds: 0018 es: 0018 ss: 0018
Process swapper (pid: 1, stackpage=ddfe3000)
Stack: ddfe3e20 00000258 c0ef8062 00000010 c0ef8000 c01bd4b3 ddfe3e70
00000000
00000000 c02a6ec0 00000000 00000001 00000005 00005f9e 00000258
00000320
00000000 00000000 000018df 00000000 c0132ca5 000001f0 00000246
00000001
Call Trace: [<c01bd4b3>] [<c0132ca5>] [<c0130af0>] [<c01b11a1>]
[<c0186a03>]
[<c018a2ae>] [<c01b0226>] [<c01b760b>] [<c01ab141>] [<c01ab1d7>]
[<c0105000>]
[<c01050ae>] [<c0107483>] [<c0105090>]
Code: 8b 87 98 01 00 00 83 c0 12 83 e0 fc 29 c4 8b 55 0c 8d 5c 24
>>EIP; c01b875d <fbgen_get_fix+d/80> <=====
>>eax; ddfe3e70 <_end+1dd3159c/2154f78c>
>>ecx; c02a6ec0 <fb_display+0/4500>
>>edx; c01b8750 <fbgen_get_fix+0/80>
>>esi; c0ef8062 <_end+c4578e/2154f78c>
>>ebp; ddfe3e30 <_end+1dd3155c/2154f78c>
>>esp; ddfe3e20 <_end+1dd3154c/2154f78c>
Trace; c01bd4b3 <splash_getraw+6e3/cd0>
Trace; c0132ca5 <__get_free_pages+65/70>
Trace; c0130af0 <__kmem_cache_alloc+b0/e0>
Trace; c01b11a1 <fbcon_init+191/1b0>
Trace; c0186a03 <visual_init+a3/110>
Trace; c018a2ae <take_over_console+12e/1a0>
Trace; c01b0226 <register_framebuffer+e6/130>
Trace; c01b760b <via_pci_probe+47b/a00>
Trace; c01ab141 <pci_announce_device+21/60>
Trace; c01ab1d7 <pci_register_driver+57/60>
Trace; c0105000 <_stext+0/0>
Trace; c01050ae <init+1e/150>
Trace; c0107483 <arch_kernel_thread+23/30>
Trace; c0105090 <init+0/150>
Code; c01b875d <fbgen_get_fix+d/80>
00000000 <_EIP>:
Code; c01b875d <fbgen_get_fix+d/80> <=====
0: 8b 87 98 01 00 00 mov 0x198(%edi),%eax <=====
Code; c01b8763 <fbgen_get_fix+13/80>
6: 83 c0 12 add $0x12,%eax
Code; c01b8766 <fbgen_get_fix+16/80>
9: 83 e0 fc and $0xfffffffc,%eax
Code; c01b8769 <fbgen_get_fix+19/80>
c: 29 c4 sub %eax,%esp
Code; c01b876b <fbgen_get_fix+1b/80>
e: 8b 55 0c mov 0xc(%ebp),%edx
Code; c01b876e <fbgen_get_fix+1e/80>
11: 8d 5c 24 00 lea 0x0(%esp,1),%ebx
<0>Kernel panic: Attempted to kill init!
Hopefully, this bug should be easy to reproduce. I am using a serial
console to capture the oops. viafb must be compiled statically into the
kernel using the patch provided and booted in 16bpp with a resolution
compatible with the currently installed bootsplash theme. I have an
800x600 bootsplash theme installed, and here is my kernel commandline:
video=viafb:800x600,bpp=16,refresh=75,TVon=0 splash=silent console=tty0
console=ttyS0,57600
Any help on this matter is appreciated. I will help as much as I can but
I'm out of my element debugging the kernel, unfortunately ...
John
viafb-gork.diff
Description: Binary data
