From owner-freebsd-questions Sat Jan 30 01:45:33 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA07090 for freebsd-questions-outgoing; Sat, 30 Jan 1999 01:45:33 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from peedub.muc.de (newpc.muc.ditec.de [194.120.126.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA07083 for ; Sat, 30 Jan 1999 01:45:29 -0800 (PST) (envelope-from garyj@peedub.muc.de) Received: from peedub.muc.de (localhost [127.0.0.1]) by peedub.muc.de (8.9.2/8.6.9) with ESMTP id KAA44869 for ; Sat, 30 Jan 1999 10:29:09 +0100 (CET) Message-Id: <199901300929.KAA44869@peedub.muc.de> X-Mailer: exmh version 2.0.2 2/24/98 To: freebsd-questions@FreeBSD.ORG Subject: Re: writing in /dev/kmem From: Gary Jennejohn Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 30 Jan 1999 10:29:09 +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "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