Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Is it possible to address more than 1MB in real-mode
Wolfgang Kern wrote:
> Rod Pemberton  wrote:
> 
> 
>
> No it didn't affect it at all [on this very early AMD 486DX50],
> and I'm surprised that later CPUs keep the limits in 16-bit RM.
> I once read in the manuals that segment limits are hardwired
> to 64K for RM, but x86 design seem to have changed meanwhile.
>

That was never true (although the manuals had a lot of baloney in them.)
It is, however, true in *V86* mode.

-hpa


Report this thread to moderator Post Follow-up to this message
Old Post
H. Peter Anvin
03-23-08 11:59 PM


Re: Is it possible to address more than 1MB in real-mode
H. Peter Anvin wrote:
> Dirk Wolfgang Glomp wrote: 
>
> You don't know what the BIOS does behind the back of either DOS or
> anything else.  In particular, if the hardware requires access to high
> memory (as some disk and network controllers do these days), you have to
> go to PM.

I've been running AMI BIOS under a VT hypervisor lately (basically,
booting an OS with int 19h using native I/O and virtualized memory), and
it does use unreal mode (apparently, for some local APIC stuff, don't
ask me why, I have no idea). It also does that if you use int 13h.
Interrupt handlers do not go to PM, though, at least not the disk I/O ones.

By the way, emulating unreal mode with Intel's sucky VT is a special
kind of fun.


Report this thread to moderator Post Follow-up to this message
Old Post
Cyril Novikov
03-24-08 03:00 AM


Re: Is it possible to address more than 1MB in real-mode
Am Sun, 23 Mar 2008 12:37:06 -0700 schrieb H. Peter Anvin:

> Dirk Wolfgang Glomp wrote: 
>
> You don't know what the BIOS does behind the back of either DOS or
> anything else.  In particular, if the hardware requires access to high
> memory (as some disk and network controllers do these days), you have to
> go to PM.

For those controllers, i have to go to PM, or the driver is a PM-driver for
the RM, or the BIOS goes to PM and back before DOS is booting?

Dirk


Report this thread to moderator Post Follow-up to this message
Old Post
Dirk Wolfgang Glomp
03-24-08 08:58 AM


Re: Is it possible to address more than 1MB in real-mode
Dirk Wolfgang Glomp wrote:
> Am Sun, 23 Mar 2008 12:37:06 -0700 schrieb H. Peter Anvin:
> 
>
> For those controllers, i have to go to PM, or the driver is a PM-driver fo
r
> the RM, or the BIOS goes to PM and back before DOS is booting?
>

Typically, they drop into PM and back when they get an interrupt
(software or hardware.)

-hpa


Report this thread to moderator Post Follow-up to this message
Old Post
H. Peter Anvin
03-25-08 03:04 AM


Re: Is it possible to address more than 1MB in real-mode
Am Mon, 24 Mar 2008 09:38:59 -0700 schrieb H. Peter Anvin:

> Dirk Wolfgang Glomp wrote: 
>
> Typically, they drop into PM and back when they get an interrupt
> (software or hardware.)

Are these onboard-controllers like SATA hooking to int13h?

There is a problem to use emm386.exe?

Dirk


Report this thread to moderator Post Follow-up to this message
Old Post
Dirk Wolfgang Glomp
03-26-08 12:01 AM


Re: Is it possible to address more than 1MB in real-mode
Elcaro Nosille wrote:
> Would it be possible to use a 32-bit addressing-mode in real-mode via
> address-size prefix and thereby to have segments which are 4GB long?

Yes, it's possible. However, first you have to change the size of the
segments in the Internal Descriptor Cache. Otherwise, you'll get a GPF (i'm
not sure, however, if the processor even tries to handle such a strange
thing as a GPF triggered in real mode of if it tripple faults immediately)..
.

This (changing the size of the segments) is a feature of PM, so you need PM
to do this. So, you go to 16-bit PM, you load your segment registers with
4GB segment descriptors, and then you switch back to real mode, since you
still want to run the BIOS and things alike... Then, you can access data
above 1MB and (I suppose), run code there. Beware that the BIOS won't be
able to return to extended memory, though...

What I described is what we usually call Unreal Mode, Voodoo Mode, Flat
Real Mode, 32-bit Real Mode (this is the less accurate of them!), etc.
In the unlikely case that you have a 386 or a 286, you can also use LOADALL
(but it's not recommended unless you don't intend to share your code with
anyone else).

JJ


Report this thread to moderator Post Follow-up to this message
Old Post
João Jerónimo
03-26-08 08:58 AM


Re: Is it possible to address more than 1MB in real-mode
Am Wed, 26 Mar 2008 02:53:27 +0000 schrieb João Jerónimo:

[Unrealmode]
> Then, you can access data
> above 1MB and (I suppose), run code there.

I think the Descriptor Cache can´t be hold a codesegment with 4GB when we
switch back to RM. So only the instructionpointer(IP with 16bit) let us
execute our opcodes in the fist MB of ram.

Dirk


Report this thread to moderator Post Follow-up to this message
Old Post
Dirk Wolfgang Glomp
03-26-08 01:00 PM


Re: Is it possible to address more than 1MB in real-mode
On Feb 18, 4:08_pm, Elcaro Nosille wrote:

> Would it be possible to use a 32-bit addressing-mode in real-mode via
> address-size prefix and thereby to have segments which are 4GB long?

It's possible to use a 32 bit protected mode bios extender.
This permits 32 bit protected mode programming with full bios access.

æBIOS now boots and runs from a USB flash drive in both modes (floppy
and hard drive) as well as Qemu emulation.
æBIOS is free to download and includes the full source code in FASM.

Mike Gonta
look and see - many look but few see

http://aeBIOS.com



Report this thread to moderator Post Follow-up to this message
Old Post
Mike Gonta
03-27-08 12:03 AM


Re: Is it possible to address more than 1MB in real-mode
Dirk Wolfgang Glomp wrote: 
>
> I think the Descriptor Cache can´t be hold a codesegment with 4GB when we
> switch back to RM. So only the instructionpointer(IP with 16bit) let us
> execute our opcodes in the fist MB of ram.

I admit you are likely to be right.

JJ


Report this thread to moderator Post Follow-up to this message
Old Post
João Jerónimo
03-27-08 03:07 AM


Re: Is it possible to address more than 1MB in real-mode
JJ "João Jerónimo" asked:

> Elcaro Nosille wrote: 

> Yes, it's possible. However, first you have to change the size of the
> segments in the Internal Descriptor Cache. Otherwise, you'll get a GPF
(i'm
> not sure, however, if the processor even tries to handle such a strange
> thing as a GPF triggered in real mode of if it tripple faults
immediately)...

> This (changing the size of the segments) is a feature of PM, so you need
PM
> to do this. So, you go to 16-bit PM, you load your segment registers with
> 4GB segment descriptors, and then you switch back to real mode, since you
> still want to run the BIOS and things alike... Then, you can access data
> above 1MB and (I suppose), run code there. Beware that the BIOS won't be
> able to return to extended memory, though...

> What I described is what we usually call Unreal Mode, Voodoo Mode, Flat
> Real Mode, 32-bit Real Mode (this is the less accurate of them!), etc.
> In the unlikely case that you have a 386 or a 286, you can also use
LOADALL
> (but it's not recommended unless you don't intend to share your code with
> anyone else).


The opcode for 'Loadall' got a totally different meaning on newer CPUs !

I figured it out a few ws ago, YES if you don't (re)set the limit
of your seg-regs whenever you switch from PM to RM. The stored seg-limits
(this hidden 48 bits) remain valid and let you access all 4GB within RM.

Last checks showed that this is valid for CPUs above/equal 486DX, while
previous CPUs may have a hard-wired 64 KB limit for RM (stated in 386/486
Intel docs) regardless of desciptor setups (mentioned as ignored at
all in RM).

Modern (586+) seem to remember the PM-limit settings for seg regs when
re-entering real (unreal/bigreal then) mode [except for CS of course].
__
wolfgang



Report this thread to moderator Post Follow-up to this message
Old Post
Wolfgang Kern
03-27-08 03:07 AM


Sponsored Links




Last Thread Next Thread Next
Pages (5): « 1 2 3 [4] 5 »
Search this forum -> 
Post New Thread

A86 Assembler archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:49 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.