Hi Bart, you were exactly right, the PMIDX is in fact PMID as
described by VESA VBE 3.0 specs (I already had it around because
of my experimental VBE3FAST refresh rate set tool)... Sigh. The X
was just there to distract me from the right answer ;-).

Protected Mode entry point info structure:
PMID [entry point offset word] [PM init entry point offset]
[0] [a000] [b000] [b800] [c000] and finally two bytes:
boolean(0/1)"isprotectedmode", checksum.

The [] values are all words, and the 0, a000, b000, b800 and c000
can be replaced by selectors for protected mode (0 is for BIOS data
area access, a000, b000 and b800 are obvious, c000 is for reading
data structures in BIOS).

So, bad luck, this funky feature is only for VESA VBE 3.0 compliant
VGA BIOSes, no generic protected mode BIOS goodie.

And you find that block by scanning for PMID in the first 32k of the
VGA BIOS, so there is no nice API for that. The protected mode entry
point is optional, but if VBE/AF is implemented, it offers protected
mode stuff, too. Basically a VBE 3.0 BIOS only makes sure that you
can bootstrap the card directly from within protected mode.

Would have been really nice if more cards would support VBE 3.0 ...
most modern cards only have VBE 2.0 (linear framebuffer modes, no
really fancy functionality apart from basic VGA things).

Eric

PS: When called from protected mode, the "BIOS data" area can start
out empty. The VGA BIOS will store things like int vectors and data
structures, and the area must be at least 600h bytes big. But of
course the int vector things will be kind of dummy in this context.
Data and stack have to be ready and at least 1k big when calling init.
Stack width is 16 bit, initial SP of 0 is recommended.
If the protected mode entry point is present, farcalling it has the
same effect as doing int 10 in real mode. BIOS code is 16 bit.
Only VBE and only graphics modes have to be supported - if old VGA and
text functions are supported in protected mode, you are lucky. None of
the GET functions (get video mode / display start, 4f03 / 4f07) is avail.


0000050: e99d 0700 4810 3a0c e93f 18e9 4718 504d  ....H.:..?..G.PM
0000060: 4944 5800 5b00 0000 00a0 00b0 00b8 00c0  IDX.[...........
0000070: 005b 0000 5043 4952 de10 2d00 0000 1800  .[..PCIR..-.....

PPS: In my BIOS, the "init" function just writes the CS alias selector
from the table (not c000 but your replacement for the value) to various
places and the 0000 alias selector to 2 other places in DS (which is
assumed to point to the BIOS), does "mov ds,ax", and "ret32s": ...
000018B9  66C3              o32 ret
This either means that selecting a graphics mode already bootstraps
the card or that they assume that you bootstrapped while booting (which
might not be the case if the card is not the primary one!). I myself am
a big fan of "load the BIOS into DOS RAM and farcall it, in order to
get the card bootstrapped"... Will show the usual banner message, wait
a moment, and leave the card initialized in text mode.



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to