From: hpa@zytor.com (H. Peter Anvin)
To: linux-kernel@vger.kernel.org
Subject: Re: BOOT_CS
Date: Wed, 25 Feb 2004 16:23:09 +0000 (UTC) [thread overview]
Message-ID: <c1ii5d$e3k$1@terminus.zytor.com> (raw)
In-Reply-To: 20040225103043.44010.qmail@web11807.mail.yahoo.com
Followup to: <20040225103043.44010.qmail@web11807.mail.yahoo.com>
By author: =?iso-8859-1?q?Etienne=20Lorrain?= <etienne_lorrain@yahoo.fr>
In newsgroup: linux.dev.kernel
>
> What I did is simply load and uncompress Linux to a legally allocated
> HIMEM block (so that is a 100 % compatible DOS software, you can use
> a network disk or a disk cache for that) and check everything is right
> before disabling interruption, switch back to real mode with
> 4 Gb segments of non paged memory, copy the block at the right place,
> and start Linux in protected mode.
> You have to remember keeping the code short in between the back switch
> to real mode and the start of Linux because the data (Linux kernel)
> is at a clear physical address, but your code itself is in a 4 Kbyte
> page which is available - but the page after it may not be loaded
> so no more code...
>
[...]
There is a hook in the kernel immediately after enteing protected mode
for *exactly* this reason -- it was added to support LOADLIN. The
whole point is that your boot loader obtains control at that point so
you can put things back where they need to go (such as 0x100000 for
the main part of the kernel, which you will *never* get from an
HMA-enabled DOS.) The algorithm for that is pretty straightforward;
you can even deal with the case where you have scattered pages all
over memory.
-hpa
next prev parent reply other threads:[~2004-02-25 16:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-25 10:30 BOOT_CS Etienne Lorrain
2004-02-25 16:23 ` H. Peter Anvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-26 12:17 BOOT_CS Etienne Lorrain
2004-02-26 21:49 ` BOOT_CS Denis Vlasenko
2004-02-27 10:03 ` BOOT_CS Etienne Lorrain
2004-02-27 18:41 ` BOOT_CS H. Peter Anvin
2004-02-24 10:05 BOOT_CS Etienne Lorrain
2004-02-24 15:39 ` BOOT_CS H. Peter Anvin
2004-02-21 5:47 BOOT_CS H. Peter Anvin
2004-02-21 12:43 ` BOOT_CS Coywolf Qi Hunt
2004-02-21 16:32 ` BOOT_CS Jamie Lokier
2004-02-22 15:13 ` BOOT_CS Eric W. Biederman
2004-02-22 19:47 ` BOOT_CS H. Peter Anvin
2004-02-22 22:05 ` BOOT_CS Eric W. Biederman
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='c1ii5d$e3k$1@terminus.zytor.com' \
--to=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