[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120314112137.68fa4f70@pyramind.ukuu.org.uk>
Date: Wed, 14 Mar 2012 11:21:37 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Florian Tobias Schandinat <FlorianSchandinat@....de>
Cc: "H. Peter Anvin" <hpa@...or.com>,
Randy Dunlap <rdunlap@...otime.net>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Michal Januszewski <spock@...too.org>,
linux-fbdev@...r.kernel.org, x86@...nel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Wang YanQing <udknight@...il.com>
Subject: Re: [PATCH] x86: export 'pcibios_enabled'
> > uvesafb could look for any PCI vga class device - which I suspect is
> > what it *should* be doing ?
>
> Would this really change depending on whether the page is NX-protected
> or not?
> Your suggestion sounds like it is about detecting whether there is any
> graphic chip present or not while the patch is about fixing an oops
> caused by NX-protection of the BIOS.
Right yes.. I misunderstood what you are trying to do. I'd assumed you
wanted to find the ROM and thus set it to the right mapping mode.
You can use set_memory_x() to mark memory executable (and _nx to set it back).
If you really need to know if NX is being used then the check
if (__supported_pte_mask & PTE_NX)
will do the trick and the variable is exported.
I'd suggest however you wrap that in a cpu_has_nx() type macro somewhere
in the arch headers.
If you go poking around pcibios values you are going to get burned if
someone is ever bored enough to make NX and PCIBIOS work together
differently.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists