All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kasper Dupont <kasperd@daimi.au.dk>
To: root@chaos.analogic.com
Cc: "H.Rosmanith (Kernel Mailing List)"
	<kernel@wildsau.idv.uni.linz.at>,
	linux-kernel@vger.kernel.org,
	Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
Subject: Re: emm386 hangs when booting from linux
Date: Sat, 01 Mar 2003 00:26:30 +0100	[thread overview]
Message-ID: <3E5FF026.F892B2F7@daimi.au.dk> (raw)
In-Reply-To: Pine.LNX.3.95.1030228174739.13518A-100000@chaos

"Richard B. Johnson" wrote:
> 
> On Fri, 28 Feb 2003, H.Rosmanith (Kernel Mailing List) wrote:
> 
> >
> > hello,
> >
> > for some reason, I am using the "switch to 16 bit realmode" function
> > present in the linux kernel to execute various 16bit code. One thing
> > that I am doing is to read the mbr off a harddisk to 0x7c00 and then
> > jump to there. This allows to e.g. "quickboot dos" from linux without
> > having to go through bios startup.
> >
> > I got this working with *one* exception: as soon as I load emm386
> > in config.sys, the system hangs. It doesn't hang completely, e.g.
> > the num-lock led changes light when pressing num-lock, and ctrlaltdel
> > reboots the system. When I "REM"ark the emm386.exe, then dos will
> > boot and display a "C:\>" prompt.
> 
> So you are trying a "home-brew" DOS-EMU which already exists and works
> well.

No, that was not what he wrote. Try reading it again. There is
nothing being emulated there.

> emm386.exe attempts to go to protected mode. That's how it works.

Yes.

> That's how it's able to make "high-RAM" appear in "low-RAM" windows
> for the emm386 specification. Of course it will fail when you
> are in virtual 386 mode.

First of all IIRC emm will fail before it attempts to enter
protected mode. It will use some status function to read the
current mode and if it finds the CPU in vm86 mode, emm plain
refuses to work. (Insert appropriate rant about vm86 design
here.) But in this particular case the CPU is not in vm86
mode, but rather in real mode. Loading emm should work.

> The real DOS-EMU emulates the extended/expanded
> memory specification so you don't need this in 'config.sys'. I sometimes
> boot real DOS usinf DOS-EMU and it works fine. You need to configure
> it so it will look at, say config.emu, instead of the DOS config.sys.
> That way, you can keep boot-specific configuration files.

But an emulator is not always usable as a replacement for a
real DOS. There are some things you cannot do under the
emulation.

Booting DOS from Linux is not as easy as booting Linux from
DOS. DOS relies much more on the BIOS, and the state of the
computer as it is setup by the BIOS. What needs to be right
for DOS to work is the contents of the BIOS data areas of
RAM, and the interrupt vector table, and state of some of
the hardware.

It is surprising it worked that well. You can't even boot
DOS from DOS, DOS will have changed interrupt vectors which
would cause a second DOS to fail. If Linux is booted from
LOADLIN there will already be messed enough with the
interrupt vector table, that there is no hope of returning
to real mode and have a usable BIOS. Linux will AFAIK not
touch the interrupt vector table, but you need a loader,
that operates early enough and doesn't change them either.

-- 
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaarep@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);

  parent reply	other threads:[~2003-02-28 23:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28  3:18 emm386 hangs when booting from linux H.Rosmanith (Kernel Mailing List)
2003-02-28  3:30 ` H.Rosmanith (Kernel Mailing List)
2003-02-28 22:54 ` Richard B. Johnson
2003-02-28 23:26   ` H.Rosmanith (Kernel Mailing List)
2003-02-28 23:26   ` Kasper Dupont [this message]
2003-02-28 23:43     ` H.Rosmanith (Kernel Mailing List)
2003-02-28 23:59       ` Kasper Dupont
2003-03-01  0:05         ` hr
2003-03-02 10:26         ` H.Rosmanith (Kernel Mailing List)
2003-03-02 10:29           ` H.Rosmanith (Kernel Mailing List)
2003-03-06 10:25           ` Denis Vlasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E5FF026.F892B2F7@daimi.au.dk \
    --to=kasperd@daimi.au.dk \
    --cc=herp@wildsau.idv.uni.linz.at \
    --cc=kernel@wildsau.idv.uni.linz.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.