linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jos Hulzink <josh@stack.nl>
To: Jamie Lokier <jamie@shareable.org>, Andi Kleen <ak@muc.de>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Use correct x86 reboot vector
Date: Sat, 10 May 2003 21:41:57 +0200	[thread overview]
Message-ID: <200305102141.57860.josh@stack.nl> (raw)
In-Reply-To: <20030510161529.GB29271@mail.jlokier.co.uk>

On Saturday 10 May 2003 18:15, Jamie Lokier wrote:
> I just did some Googling and found that there examples of DOS code
> fragments using both vectors.  Also, the original IBM BIOS (as they
> say) had a long jump at the vector, which is presumably one of the
> many de facto ABIs which real mode programmers grew to depend on.

The 16 byte code space is very small, and usually only contains that LONG jump 
to an usable address space.

When the vector f000:fff0 is used, we can survive BIOSes that use relative 
jumps with negative offsets or indirect short jumps instead.

When the vector ffff:0000 is used, the code segment effectively contains only 
16 bytes (or someone must abuse the 8086 wraparound), can't think of negative 
offset short jumps there. As the code is read-only in this early stage, (BIOS 
code is RW after the BIOS copied itself to RAM) self modifying code (which 
uses absolute addressing) can be excluded too.

Okay... now, as 386 and newer cpus need a far jump to unlock A20-A31, I think 
it is safe to assume all BIOSes will do a far jump as soon as possible, which 
means it doesn't matter which vector is used.

For the sake of bad behaving BIOSes however, I'd vote for the f000:fff0 
vector, unless someone can hand me a paper that says it is wrong.

Jos

  parent reply	other threads:[~2003-05-10 17:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-10  2:56 [PATCH] Use correct x86 reboot vector Andi Kleen
2003-05-10  3:35 ` CaT
2003-05-10  3:58   ` H. Peter Anvin
2003-05-10 14:49   ` Alan Cox
2003-05-10 16:17     ` Jamie Lokier
2003-05-10 18:47       ` Jos Hulzink
2003-05-11 18:01     ` Eric W. Biederman
2003-05-11 17:24       ` Alan Cox
2003-05-11 19:04         ` Eric W. Biederman
2003-05-12  5:48         ` [PATCH] always shutdown on the bootstrap processor Eric W. Biederman
2003-05-10 16:15 ` [PATCH] Use correct x86 reboot vector Jamie Lokier
2003-05-10 17:09   ` Randy.Dunlap
2003-05-10 19:41   ` Jos Hulzink [this message]
2003-05-10 18:10     ` Jamie Lokier
2003-05-10 20:55       ` Jos Hulzink
2003-05-11  3:50       ` Linus Torvalds
2003-05-11  9:37         ` Jos Hulzink
2003-05-11 14:01           ` Jamie Lokier
2003-05-11 17:38             ` Davide Libenzi
2003-05-11 17:56               ` Eric W. Biederman
2003-05-11 18:23                 ` Davide Libenzi
2003-05-11 19:12                   ` Eric W. Biederman
2003-05-12 15:36                     ` Maciej W. Rozycki
2003-05-13  6:35                     ` H. Peter Anvin
2003-05-11 18:38                 ` Linus Torvalds
2003-05-11 19:00                   ` Matt Mackall
2003-05-11 19:16                     ` Eric W. Biederman
2003-05-12  1:07                     ` H. Peter Anvin
2003-05-11 19:10                   ` Eric W. Biederman
2003-05-11 18:43                 ` Christer Weinigel
2003-05-11 20:22                   ` wingel
2003-05-11 20:26                     ` Davide Libenzi
2003-05-11 17:54         ` Eric W. Biederman
2003-05-13 12:49 Chuck Ebbert
2003-05-13 18:45 ` H. Peter Anvin
2003-05-13 19:04   ` Richard B. Johnson
2003-05-13 19:27     ` 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=200305102141.57860.josh@stack.nl \
    --to=josh@stack.nl \
    --cc=ak@muc.de \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).