Date: Sat, 30 Jan 1999 10:29:09 +0100 From: Gary Jennejohn <garyj@muc.de> To: freebsd-questions@FreeBSD.ORG Subject: Re: writing in /dev/kmem Message-ID: <199901300929.KAA44869@peedub.muc.de>
next in thread | raw e-mail | index | archive | help
"Md. Ahsan Habib" writes: >The error shows "Bad Address". I used the address 0xa0000 mentioned in man >kmem. >thanks, > >--Ahsan > [I tried replying directly, but the mailer at vt.edu doesn't seem to ] [like me] OK, the first thing that occurs to me is that 0xa0000 is _not_ a kernel virtual address. The manpage clearly states that only kernel virtual addresses can be accessed using /dev/kmem. AFAIK kernel virtual addresses start at 0x100000, i.e. after the ISA I/O space, however the real value is buried in ugly macros which are defined in /usr/src/sys/i386/include/pmap.h. Anyway, try offsetting the addresses with KERNBASE, which is defined in /usr/src/sys/i386/include/vmparam.h. You'll hve to include a bunch of other header files to get this to work. I think that the 0xa0000 example is intended for /dev/mem, which uses physical rather than virtual addresses. HTH -------- Gary Jennejohn Home - garyj@muc.de Work - garyj@fkr.dec.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901300929.KAA44869>