public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Booting a modular kernel through a multiple streams file / Making Linux multiboot capable and grub loading kernel modules at boot time.
Date: 21 Dec 2001 09:57:09 -0700	[thread overview]
Message-ID: <m17krgse8q.fsf@frodo.biederman.org> (raw)
In-Reply-To: <200112181605.KAA00820@tomcat.admin.navo.hpc.mil> <m18zbzwp34.fsf@frodo.biederman.org> <3C205FBC.60307@zytor.com> <m1zo4fursh.fsf@frodo.biederman.org> <9vrlef$mat$1@cesium.transmeta.com> <m1r8pqv1w3.fsf@frodo.biederman.org> <3C218BF3.6010603@zytor.com> <m1n10dvobd.fsf@frodo.biederman.org> <3C222F84.4060509@zytor.com>
In-Reply-To: <3C222F84.4060509@zytor.com>

"H. Peter Anvin" <hpa@zytor.com> writes:

> Eric W. Biederman wrote:
> 
> > Agreed.  And to completely dispel the myth.  Etherboot has been doing
> > something similar for years.  It disables interrupts in 32bit mode so
> > it doesn't have quite as much work to do but otherwise it is pretty
> > much the same picture.
> >
> 
> 
> If you disable interrupts in 32-bit mode a lot of things will not work.

The basic technique use by etherboot is:
In 32bit mode handle no interrupts.  When you want to do a BIOS call
switch to 16bit mode enable interrupts do the call.  disable interrupts
and switch back to 32bit mode.

As far as I can tell this is a similar idea to what you are doing in
genesis.  etherboot doesn't need everything so it doesn't handle the
general case.  But given that it is public program, I mentioned it
because to help dispell the myth that you can do bios call from 32 bit
protected mode..

> > I finally tracked down the reason why Setup.S is run in real mode,
> > instead of being called from protected mode.  And that is in extremely
> > hostile environments (like loadlin works in) loading the kernel wrecks
> > the firmware callbacks.  So you must do your BIOS calls as a special
> > case before you switch to protected mode.
> 
> 
> No, it's because it was easier to do it that way -- do all BIOS calls once and
> for all in the early part of the execution of the kernel, and then forget about
> it.

That may have been the original reason.  But the reason to keep the
code that way is so we work with loadlin, (and any kin it might have).  

I have tested it and after you are loaded by loadlin you cannot go
back and make BIOS calls.  The problem is that dos TSR's and device
drivers have intercepted BIOS interrupts, and we stomp all over
those.

It may be possible to overcome this by saving the state of the entire
dos session but to be safe we would need to take a core dump of the
entire machine.  And for such little gain I don't think that is worth
it.

Eric


  reply	other threads:[~2001-12-21 16:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-18 16:05 Booting a modular kernel through a multiple streams file / Making Linux multiboot capable and grub loading kernel modules at boot time Jesse Pollard
     [not found] ` <m1r8prwuv7.fsf@frodo.biederman.org>
     [not found]   ` <3C204282.3000504@zytor.com>
     [not found]     ` <m1itb3wsld.fsf@frodo.biederman.org>
     [not found]       ` <3C2052C0.2010700@zytor.com>
2001-12-19  9:12         ` Eric W. Biederman
2001-12-19  9:37           ` H. Peter Anvin
2001-12-19 15:57             ` Eric W. Biederman
2001-12-20  3:20               ` H. Peter Anvin
2001-12-20  6:31                 ` Eric W. Biederman
2001-12-20  6:57                   ` H. Peter Anvin
2001-12-20 16:39                     ` Eric W. Biederman
2001-12-20 18:35                       ` H. Peter Anvin
2001-12-21 16:57                         ` Eric W. Biederman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-12-17 22:10 Booting a modular kernel through a multiple streams file Grover, Andrew
2001-12-18 15:26 ` Booting a modular kernel through a multiple streams file / Making Linux multiboot capable and grub loading kernel modules at boot time Christian Koenig
2001-12-18 18:32   ` H. Peter Anvin

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=m17krgse8q.fsf@frodo.biederman.org \
    --to=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox