OSDev.org
https://forum.osdev.org/

Disk Access Under Pmode
https://forum.osdev.org/viewtopic.php?f=1&t=7193
Page 1 of 1

Author:  peter c [ Fri Oct 04, 2002 1:14 am ]
Post subject:  Disk Access Under Pmode

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?

Author:  Pype.Clicker [ Fri Oct 04, 2002 1:43 am ]
Post subject:  Re:Disk Access Under Pmode

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 *
)

Author:  Pype.Clicker [ Fri Oct 04, 2002 1:44 am ]
Post subject:  Re:Disk Access Under Pmode

anyway, i think using virtual mode is safer than this auwful hack ...

Author:  Peter C [ Sat Oct 05, 2002 3:45 am ]
Post subject:  Re:Disk Access Under Pmode

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.

Author:  Warmaster199 [ Sat Oct 05, 2002 4:43 pm ]
Post subject:  Re:Disk Access Under Pmode

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

Author:  Tim [ Sun Oct 06, 2002 2:28 pm ]
Post subject:  Re:Disk Access Under Pmode

Don't use the BIOS at all, except for VESA for cards that don't support VBE3. Definitely write your own disk drivers.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/