From: Michael Brown <mbrown@fensystems.co.uk>
To: ipxe-devel@lists.ipxe.org, "seabios@seabios.org" <seabios@seabios.org>
Cc: Avi Kivity <avi@redhat.com>, KVM list <kvm@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [ipxe-devel] Big real mode use in ipxe
Date: Sun, 19 Aug 2012 16:34:50 +0100 [thread overview]
Message-ID: <201208191634.50590.mbrown@fensystems.co.uk> (raw)
In-Reply-To: <50310119.4070806@redhat.com>
On Sunday 19 Aug 2012 16:07:05 Avi Kivity wrote:
> Which is exactly what happens here. My understanding of big real mode is
> that to achieve a segment limit != 0xffff, you must go into 32-bit
> protected mode, load a segment with a larger limit, and return into real
> mode without touching the segment. The next load of the segment will
> reset the limit to 0xffff.
Not quite. You can't "return into real mode without touching the segment",
since part of the process of returning to real mode is to reload the segment
registers with real-mode values, and this happens _after_ setting CR0.PE=0.
Whenever CR0.PE=0, loading a segment register with value N will load the
literal value (N<<4) into the base address for that segment, without changing
the limit. This is the trick that allows flat real mode (aka big real mode) to
work; the limit remains at 4G even after loading the segment register with a
real-mode value.
> (and that seabios needs changes to either work in
> big real mode, or to put the processor back into big real mode after
> returning from a PMM service.
If seabios switches into protected mode when performing a PMM service, then it
_must_ leave the segment limits at 4G when returning to real mode. To do
otherwise will violate the PMM spec, and will break conforming clients such as
iPXE.
Michael
next prev parent reply other threads:[~2012-08-19 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-19 15:07 [Qemu-devel] Big real mode use in ipxe Avi Kivity
2012-08-19 15:34 ` Michael Brown [this message]
2012-08-19 15:42 ` [Qemu-devel] [ipxe-devel] " Avi Kivity
2012-08-19 15:53 ` Kevin O'Connor
2012-08-19 15:44 ` [Qemu-devel] " Kevin O'Connor
2012-08-19 15:52 ` Avi Kivity
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=201208191634.50590.mbrown@fensystems.co.uk \
--to=mbrown@fensystems.co.uk \
--cc=avi@redhat.com \
--cc=ipxe-devel@lists.ipxe.org \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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;
as well as URLs for NNTP newsgroup(s).