OSDev.org

The Place to Start for Operating System Developers
It is currently Thu May 02, 2024 2:21 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Disk Access Under Pmode
PostPosted: Fri Oct 04, 2002 1:14 am 
As BIOS calls are disabled after switching into pmode,how do I access disks?
And is there any way to copy the code stored in BIOS so I could use it in Pmode?


Top
  
 
 Post subject: Re:Disk Access Under Pmode
PostPosted: Fri Oct 04, 2002 1:43 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
unfortunately no... the code in the BIOS accesses all its variables with a segment/offset approach ...

but, in fact, you make me doubt about it ... one could evaluate the code "on the fly" from the interrupt entry point, and translate the segment values in something that is more "pmode-friendly" (for instance, when you see segment #C000, you create a new segment which base is 0x000C0000 and put its selector overthere).

You might even not need to parse the code, but just let the CPU run and react on #GPF events (cpu: hum, hum .. i really dislike that 0xb800 selector ... biosmonitor: don't worry, dude, here's a nice 0x002c selector you can use instead cpu : gr8t! i'll use it with care

* cpu got access to VRAM *
)

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Disk Access Under Pmode
PostPosted: Fri Oct 04, 2002 1:44 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
anyway, i think using virtual mode is safer than this auwful hack ...

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Disk Access Under Pmode
PostPosted: Sat Oct 05, 2002 3:45 am 
Thanks for the message,but I just can't belive that all pmode OS(for example,windows 95) switch back to V386 mode or Real mode to call any BIOS function.If they do so on every VESA 1.2 bank switching and every disk access,it will surely be VERY SLOW!
I just wonder I can call bios functions WITHOUT always switch between different modes.


Top
  
 
 Post subject: Re:Disk Access Under Pmode
PostPosted: Sat Oct 05, 2002 4:43 pm 
Actually, you can grab a pointer to a function in the VESA BIOS to switch banks. The VESA BIOS Switch Bank function is 32-bit protected mode code, so it's alot faster to get that pointer, rather than use the Bios calls


Top
  
 
 Post subject: Re:Disk Access Under Pmode
PostPosted: Sun Oct 06, 2002 2:28 pm 
Don't use the BIOS at all, except for VESA for cards that don't support VBE3. Definitely write your own disk drivers.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group