Date: Thu, 07 Mar 2002 15:27:47 -0700 (MST) From: "M. Warner Losh" <imp@village.org> To: valery.khromov@icluk.com Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Converting physical into virtual address Message-ID: <20020307.152747.127669206.imp@village.org> In-Reply-To: <009c01c1c356$93e13be0$c80ca8c0@khromovv> References: <009c01c1c356$93e13be0$c80ca8c0@khromovv>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <009c01c1c356$93e13be0$c80ca8c0@khromovv>
"Valery N. Khromov" <valery.khromov@icluk.com> writes:
: I'd like to develop a kernel module for FreeBSD, able to read & write
: directly to VGA text-mode screen buffer. I know that this buffer is located
: at 0xB8000 in physical address space. But in kernel I must address it using
: kernel virtual address space.
:
: Thus, the question is: how can I _correctly_ convert physical address into
: kernel virtual address?
:
: Now I use the following trick: 0xC0000000 + 0xB8000, but I want to use more
: correct method. :)
bus_alloc_resource() followed by bus_space_{read,write}_*.
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020307.152747.127669206.imp>
