On Tue, Feb 10, 2004 at 06:48:38AM -0500, L. Jensen wrote:
> On Tuesday 10 February 2004 03:07 am, Ryan Underwood wrote:
> > To clarify, I did this:
> > $ sudo dd if=/dev/mem of=/tmp/bios bs=1 skip=786432 count=32768
> 
> Thanks, this is a good tip.  To be clear, I am disassembling using the command
> 
> objdump -D -b binary -EL -m i386 -M addr16 -M data16 bios > bios.asm
> 
> I get different results if I drop either or both -M options.  Is it right this 
> way?

The line you posted above should be fine.  If you drop those options,
you will be disassembling it as a 32-bit binary which will produce
wrong results, except in cases where pure chance intervenes. :)

> There are a good number of "out %ax,(%dx)" instructions together with 
> outsw and outsb.  I see many "call 0xabcd" instructions with a 4 digit hex 
> address.  Sometimes that address is the address of a nearby instruction, but 
> many times the address is not aligned with an instruction.  Something wrong 
> there?

Not sure, I have seen the same thing using objdump.  I.D.A. tends to get
the references right.

> I've seen lines like this in the log
> 
> (II) I810(0): Primary V_BIOS segment is: 0xc000
> ......
> (II) I810(0): Will use BIOS call 0x5f05 to set refresh rates for CRTs.
> (II) I810(0): Will use BIOS call 0x5f64 to enable displays.
> 
> Should I be looking in 0x5000 too?

You'd have to look at the source to see what that actually means, but my
guess is that those are just parameters to int10 that specify a
particular bios function to invoke.  To figure out what they are doing
exactly you would have to find the entry point in the bios and see what
it does with its parameters (frequently passed in ax,dx and return in ax).

> it is doing to narrow down the right BIOS function?  Finally, suppose I 
> figure out how the BIOS sets the video modes and how to modify it to set the 
> missing SXGA+ 1400x1050 mode.  How do I teach xf86 to use this?

I think hooking in your own BIOS functionality would be very difficult.
There would have to be space left over in the image and you would have
to hope that all the jumps are relative.  It would be easier to figure
out what port needs to be frobbed and in what way from the BIOS and from
the data sheet, and simply add that to the XFree86 driver or to a
standalone utility (as a quicker fix).

-- 
Ryan Underwood, <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Reply via email to