[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160409020444.GX1990@wotan.suse.de>
Date: Sat, 9 Apr 2016 04:04:44 +0200
From: "Luis R. Rodriguez" <mcgrof@...nel.org>
To: Toshi Kani <toshi.kani@....com>
Cc: "Luis R. Rodriguez" <mcgrof@...nel.org>,
Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Matt Fleming <matt@...eblueprint.co.uk>,
Olof Johansson <olof@...om.net>,
Paul Stewart <pstew@...omium.org>,
Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
xen-devel@...ts.xensource.com
Subject: Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code
On Thu, Mar 17, 2016 at 03:56:47PM -0600, Toshi Kani wrote:
> On Wed, 2016-03-16 at 00:29 +0100, Luis R. Rodriguez wrote:
> > On x86 Linux code we now have ioremap_uc() that can't use MTRR behind the
> > scenes, why would something like this on the BIOS not be possible? That
> > ultimately uses set_pte_at(). What limitations are there on the BIOS
> > that prevent us from just using strong UC for PAT on the BIOS?
>
> Because it requires to run in virtual mode with page tables.
I see now. Specifically, BIOSes run in real mode, and PAT uses
paging. Paging requires bit 31 on CR0 set (PG), and PG has no
effect if the PE flag (Protection Enable) bit 0 on CR0 is clear.
If PE is clear we have real mode, which is what the BIOS uses.
Stupid question then:
are there no use case for a BIOS to enter PE, even if just
limited to set paging attributes for instance. For the simple
sake of burying MTRR this seems worthy, but I wonder if there
are other paging needs a BIOS might find use for.
Luis
Powered by blists - more mailing lists