Real Mode Access

Real Mode Access

Portrait de Monroe Taylor III (Intel)

I am looking for recommendations on where I can go to get information on how to gain real mode access (Ring 0 access) in MS Window, and Linux for C++ development

Any recommendations?

Monroe Taylor III Test engineering Intel Corporation Americas Post Sales Support
8 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de J.D. Patel (Intel)

You may refer to plenty of documentation/examples available on kernel-mode / drivers for both OS's...

Portrait de jimdempseyatthecove

Quoting - Monroe Taylor III (Intel)
I am looking for recommendations on where I can go to get information on how to gain real mode access (Ring 0 access) in MS Window, and Linux for C++ development

Any recommendations?

Ring 0 and Real Mode are entirely different modes. Also, Real Mode is not the same as V86 mode.

While both Real Mode and V86 mode use segmented model V86 mode boxes you into a 1MB address range. In Real Mode, provided you set the selector size correctly (Granularity = Large) you can address using full 32-bit effective address. In V86 mode you GP fault when attempting to do so. In the early 90's I wrote an application extender for DOS that ran in Real Mode (non-V86 mode) where the app ran with CS and SSas granularity=small but with DS, ES, FS, GS set to granularity=large and with default addressing as 16-bit. With this setup MS-DOS ran fine as 16-bit segmented model however you could use address size overide 0x66 and then use 32-bit SIB addressing to give you access to 4GB of data. i.e the app could use 640KB code, and 4GB of data.

You might be able to write a driver to effectively shut off Windows, enter Real Mode, do your thing, and then resume Windows. Do not expect any access to Windows APIs (DLLs etc...) while in Real Mode.

Jim Dempsey

www.quickthreadprogramming.com
Portrait de Igor Levicki

Most likely he meant ring 0 because he asks about both Windows and linux. In both OS-es he would need kernel mode driver to be able to exacute code at ring 0 privilege.

-- Regards, Igor Levicki If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.
Portrait de Monroe Taylor III (Intel)

Quoting - Igor Levicki
Most likely he meant ring 0 because he asks about both Windows and linux. In both OS-es he would need kernel mode driver to be able to exacute code at ring 0 privilege.

Yes, you interpreted my question correctly. My team have been "googling" high and low as well as searched MSDN and Linux forums. Can you provide some specific sources or links where I can find this info?

Monroe Taylor III Test engineering Intel Corporation Americas Post Sales Support
Portrait de jimdempseyatthecove

Quoting - Monroe Taylor III (Intel)

Yes, you interpreted my question correctly. My team have been "googling" high and low as well as searched MSDN and Linux forums. Can you provide some specific sources or links where I can find this info?

For Windows check out Open Systems Resources, Inc. www.osr.com

Their book Windows NT Device Driver Development (on Amazon.com)

http://www.amazon.com/Windows-Device-Development-Classic-Reprints/dp/097...

Or Microsoft WDK

http://www.microsoft.com/whdc/Devtools/wdk/default.mspx

Jim Dempsey

www.quickthreadprogramming.com
Portrait de Monroe Taylor III (Intel)

Quoting - jimdempseyatthecove

For Windows check out Open Systems Resources, Inc. www.osr.com

Their book Windows NT Device Driver Development (on Amazon.com)

http://www.amazon.com/Windows-Device-Development-Classic-Reprints/dp/097...

Or Microsoft WDK

http://www.microsoft.com/whdc/Devtools/wdk/default.mspx

Jim Dempsey

We recently were referred to the MS WDK. I willtake a look at the other links you provided. I will continue to pursue info for Linux. Thanks

Monroe Taylor III Test engineering Intel Corporation Americas Post Sales Support
Portrait de J.D. Patel (Intel)

For the latest and greatest driver model WDF, both kernel KMDF and user mode UMDF, under Windows please refer to:

http://www.microsoft.com/whdc/driver/wdf/default.mspx

Depending on the OS you're targeting you may find WDF different/easier than WDM.

Needless to say, there is plenty of material on Microsoft website itself!
Enjoy!

- J.D. Patel

Connectez-vous pour laisser un commentaire.