Subject: Re: physical addresses of kernel text?
To: David Young <dyoung@pobox.com>
From: Andrew Doran <ad@netbsd.org>
List: port-i386
Date: 10/02/2007 23:46:38
On Tue, Oct 02, 2007 at 04:55:31PM -0500, David Young wrote:

> What is the most straightforward way to find out the physical addresses
> of all of the kernel text?  I am aiming to program registers on the
> AMD Elan CPU's system controller to protect the kernel text from errant
> writes by PCI bus masters.

From within the kernel this should do it, but I haven't checked:

	extern char kernel_text, etext;

	spa = vtophys(&kernel_text);
	epa = vtophys(&etext);

Andrew