[Savage40] s3switch does segmentation fault / xv overlay on tv
weired
Harald Strack
hstrack at trymedia.com
Thu May 26 10:46:26 PDT 2005
Tim Roberts wrote:
> Harald Strack wrote:
>
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x08049ca7 in em_outb () at lrmi.c:539
>> 539 asm volatile ("outb %b0, (%w1)"
>> (gdb) info registers
>> edx 0x70 112
>>
>> -> writing 2 bytes to 0x70 ? (correct me, when i am wrong)
>
>
>
> Probably correct. I should have had you do a disassembly just to be
> sure. There are two forms of the "out" instruction: one form embeds
> the port number in the instruction, and the other form gets it from
> dx. In this case, it is probably the dx form. And, actually, it's
> only writing one byte ("outb").
>
That's why I have no clue: I now about C, Unix and so on ... but
assembly. I will learn it.
>> (gdb) info registers
>> edx 0xb2 178
>>
>> -> writing 2 bytes to 0xb2 ? (correct me, when i am wrong)
>
>
>
The next error is another one... Without the port 0xb2 it will core dump.
> Probably not, as we'll see next:
>
>> Next try:
>> # ./s3switch pal
>> vm86() failed
>> return = 0x1
>> eax = 0x00000080
>> ebx = 0x00000100
>> ecx = 0x00005f07
>> edx = 0x000000b2
>> esi = 0x0000005f
>> edi = 0x0000ffff
>> ebp = 0x00000fd4
>> eip = 0x00009a39
>> cs = 0xc000
>> esp = 0x00000fb2
>> ss = 0x1000
>> ds = 0x0000
>> es = 0x0000
>> fs = 0x0000
>> gs = 0x0000
>> eflags = 0x000b3202
>> cs:ip = [ e6 4f 3d 80 53 75 04 59 5b eb 03 83 c4 04 66 8b ]
>
>
>
> "e6 4f" is the embedded port number out instruction, so in this case,
> the port is 0x4f.
>
I see, you know about assambly ...
>
>
> For "not knowing enough", you're doing pretty good so far. If you add
> 0x4f instead of 0xb2, you'll probably be pretty close. Maybe one more.
>
Thank you.
Here is the final patch (I am a lucky guy with my 2 bytes not-know how
in case of port 0x70):
--- ../s3.org/s3switch.c 2002-09-12 00:25:33.000000000 +0200
+++ s3switch.c 2005-05-26 19:41:41.953199488 +0200
@@ -100,6 +100,13 @@
ioperm( 0x40, 4, enable );
ioperm( 0x61, 1, enable );
ioperm( 0x80, 1, enable );
+
+ //For buggy IBM t23 BIOS
+ ioperm( 0x70, 1, enable );
+ ioperm( 0x71, 1, enable );
+ ioperm( 0xb2, 1, enable );
+ ioperm( 0x4f, 1, enable );
+
ioperm( 0x3b0, 0x30, enable );
}
It works!!!
Thank you very much for your help!
Wish a nice Weekend
Harry
More information about the Savage40
mailing list