From: Matan Ziv-Av (matan@arava.co.il)
Date: Sun 03 Jan 1999 - 00:26:48 IST
I have the VBE3.0 specification (they are now available from vesa's
wesite), and it seems that it is possible to write an svgalib driver
that uses VBE3.0 in protected mode.
I order to call the PM services the caller has to:
create segment selectors for 0xa0000 0xb0000 0xb8000,
and also copy the bios (0xc0000-0xcffff) to some area in RAM, and then
call some location in the copy of the BIOS in 16-bit PM.
My question is how to do that in Linux.
Also, does the fact that it is a 16-bit code force me to have all
selectors point to the low 16MB, or can I use all linear addresses?
I try to allocate a segment selector with
ldte.entry_number=5;
ldte.base_addr=0xa0000;
ldte.limit=65535;
ldte.seg_32bit=0 ;
ldte.contents=0 ;
ldte.read_exec_only=0 ;
ldte.limit_in_pages=0 ;
ldte.seg_not_present=0 ;
ldte.useable=1 ;
k=modify_ldt(1,&ldte,sizeof(struct modify_ldt_ldt_s));
but when I try to read the LDT with
i=modify_ldt(0,ldt_entry,360);
for(i=0;i<10;i++)
printf("%i %i %i %i %i %i %i %i\n",
ldt_entry[i].entry_number,
ldt_entry[i].base_addr,
ldt_entry[i].limit,
ldt_entry[i].seg_32bit,
ldt_entry[i].contents,
ldt_entry[i].read_exec_only,
ldt_entry[i].limit_in_pages,
ldt_entry[i].seg_not_present,
ldt_entry[i].useable
);
I get the following
0 0 0 0 0 0 0 0
0 0 2048 0 0 0 0 0
0 0 65535 0 1 1 0 0
0 0 32767 1 1 1 0 0
0 0 32767 0 0 1 1 1
0 0 65535 0 2 1 0 0
which might mean that the allocated selector has base_address 0.
The second reuirement (calling a specific address) I don't have an
idea how to do.
Any help is wanted.
Matan Ziv-Av. zivav@cs.bgu.ac.il
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST