Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Translating a linear address to physical address

postaquestion
Novice
1,893 Views

Can somebody tell me how to translate a linear address to physical address in PAE mode(36bits)? I'd like to create a DOS application that can be used to access memory above 4GB.

I've been studied the document "Intel 64 and IA-32 Architectures s/w developer's manual volume 3A". But I still confused. Could you please provide me a traslation sample or a block of sample code?

Thanks!

0 Kudos
7 Replies
Intel_Software_Netw1
1,893 Views

Hello,

PAE is only accessible in ring 0 meaning an application cannot access it directly but would have to go through the OS (or you can write your own driver) to accomplish this task.

Fortunately, you do not have to write your own driver to accomplish this. Windows already provides access to this functionality through their AWE (Address Windowing Extensions) API.

Please see the following link:
http://msdn2.microsoft.com/en-us/library/aa366527.aspx

Regards,

Gina B.
Intel Software Network Support
http://www.intel.com/software
email: ISN.support@intel.com

Intel is a registered trademark of Intel Corporation or its subsidiaries in the United States and other countries.

*Other names and brands may be claimed as the property of others.

0 Kudos
Intel_Software_Netw1
1,893 Views

Another Q&A that stemmed from this forum post:

Q. I have a question about PAE implementation. I'd like to develop an extended memory management application under DOS.(not Windows console). Can this be implemented under DOS? Could you tell me how to access physical memory above 4GB?

A. This can be used on any 32-bit application, be it DOS or Windows* Console. AWE maps and unmaps pages from a larger memory space into your own memory space, which can be up to 2GB (or 3GB with an option named 3GB RAM tuning).Please refer to the attached illustration. If you need more than 3GB memory space on Windows*, it is highly recommended to port your application to 64 bits and run on a 64-bit OS. Then you do not have to utilize AWE to access greater than 4GB of memory.

==

Lexi S.

IntelSoftware NetworkSupport

http://www.intel.com/software

Contact us

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,893 Views

This may seem obtuse...

Just what do you mean by "DOS application"?

About 15 years ago I wrote a utility, similar to a DOS Extender, that provided for Real Mode DOS to use 32-bit Flat Model addressing to data while executing code in 16-bit Seg:Off mode. Note this is Real Mode not Virtual 86 Mode. All well behavedDOS applications would work and your application had 4GB of addressing (although at the time you could not install that much memory).

If you mean "DOS application" as running in a console window in Windows then you really do not mean "DOS application", instead you mean Win32 console application (either 32-bit or 64-bit). If you mean a console application then install an x64 version of Windows and write your console application using a 64-bit compiler (C/C++/Fortran are available from Intel).

Now, if you really mean "DOS application" as an application that runs without Windows, without Linux, without MAC OSX, without other OS, then you have a different can-o-worms.

From my understanding of 64-bit mode(EM64T) is it is only available in Protected Mode. You can write a standalone "hook" that begins in Real Mode (16-bit) that sets up the page table and transitions into 64-bit Flat Mode Protected Mode and it would run your program... but you wouldn't have an O/S. You would have to duplicate what an O/S provides, but do it in a manner that fulfills any other requirements of the application (e.g. you have a real-time application and you cannot have traditional O/S latency issues).

So what do you mean by DOS application?

Jim Dempsey

0 Kudos
arintel1
Beginner
1,893 Views

Dear Jim,

I happen to seethis post of yours talking abouta "utility, similar to a DOS Extender, that provided for Real Mode DOS to use 32-bit Flat Model addressing to data while executing code in 16-bit Seg:Off mode."

Could you please give me someadvicehow to do that? I'm writing a Network Boot Program running in the 16-bit real mode (PXE environment) that needs to access some memory regions beyond the 1MB limit.

Thanks sincerely,

Arintel

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,893 Views

Could you please define what you mean by DOS application?

a) stand alone application that runs without Windows (Linux) or other operating system. e.g. boots from system BIOS. (FD, CD, HD, other)

b) A console application that run on Windows 32-bit (Linux 32-bit) or other 32-bit operating system.

c) A console application that run on Windows 64-bit (Linux 64-bit) or other 64-bit operating system

Jim Dempsey

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,893 Views

Sorry about the second post.

email me at jim_dempsey@ameritech.net

Jim

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,893 Views

Arintel,

After digging around in a box of old floppies I found one that had the code.

Jim

jim_dempsey@ameritech.net

0 Kudos
Reply