flat assembler
Message board for the users of flat assembler.

Index > Windows > How, under Windows, could I get access to the first MB?

Author
Thread Post new topic Reply to topic
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Would it work to copy the first MB of memory and put that in a v8086 task anywhere and have as many fake BIOSs as I want? Or is there a technical reason why it wouldn't work?

Or is it likely that Windows trashes the first MB at some point?
Post 22 Jul 2010, 08:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
If you just want to copy the BIOS and run it in a v8086 task then it won't work without a lot of extra support code. The BIOS would not be aware that it can't access the hardware. You would need to emulate hardware access and provide some sort of sharing mechanism or capture all I/O operations and convert them to API calls.
Post 22 Jul 2010, 08:41
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
So the BIOS can't access hardware from a v8086. Would it work if I ran it as a driver in r0?

Assuming I have total control over all privileges, would it be easier then? This was going to be a demo for an idea I had for a driver for my OS.
Post 22 Jul 2010, 08:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
Giving it full privilege would be a disaster. It would conflict with the existing drivers. Windows would not know what the BIOS was doing and the BIOS would not know what Windows was doing. Chaos.

When everybody is playing together in the ring0 playground they all have to play nicely and be respectful of others. Else you get fights and someone always ends up going home crying.
Post 22 Jul 2010, 09:15
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Quote:
When everybody is playing together in the ring0 playground they all have to play nicely and be respectful of others. Else you get fights and someone always ends up going home crying.
Laughing

> Windows would not know what the BIOS was doing and the BIOS would not know what Windows was doing.
I see. Does Windows know what's going on when you set VESA modes inside NTVDM? I did that one time, the screen went black and I had to ctrl+alt+del to bring up the task manager and kill my prog.
Post 22 Jul 2010, 09:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
Tyler wrote:
Does Windows know what's going on when you set VESA modes inside NTVDM?
Yes. That is the "V" part of NTVDM.
Post 22 Jul 2010, 09:57
View user's profile Send private message Visit poster's website Reply with quote
Alphonso



Joined: 16 Jan 2007
Posts: 294
Alphonso
There's seems to be something similar to what your asking in windows already, see Geoff Chappells site http://www.geoffchappell.com/studies/windows/km/hal/api/x86bios/index.htm It has an example to enumerate int 15h E820 that seems to work well under both 32 and 64. Depends what you want to do, if you want to play HW then I think it's better to take Rev's good advice.

Edit: Of course check out Vid's excellent article kindly linked by Fodder below. Might as well read the other articles as well, some good stuff to be had. Wink


Last edited by Alphonso on 27 Jul 2010, 10:41; edited 2 times in total
Post 22 Jul 2010, 14:42
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Our very own vid also discovered the x86bios stuff, here's a link - it's from 2007, Chapell's is apparently from 2009 Smile
Post 25 Jul 2010, 19:44
View user's profile Send private message Visit poster's website Reply with quote
Alphonso



Joined: 16 Jan 2007
Posts: 294
Alphonso
How about that. I did read Vid's EFI posts sometime ago, not sure how I missed the X86BIOS stuff. Or maybe at the time I did read it and forgot about it. Sorry Vid. Embarassed
Post 27 Jul 2010, 10:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.