Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2006 11:15:22 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        Stanislav Sedov <ssedov@mbsd.msk.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: exception handling in kernel code
Message-ID:  <20060814181521.GQ99774@funkthat.com>
In-Reply-To: <20060814194729.436fc453@localhost>
References:  <20060814124658.1d416cbe@localhost> <200608140932.57875.jhb@freebsd.org> <20060814194729.436fc453@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Stanislav Sedov wrote this message on Mon, Aug 14, 2006 at 19:47 +0600:
> I've implemented driver to allow user-level code to read MSRs (Model
> specific registers) (like linux's /dev/cpu/msr). It's required for
> some programs like x86info.
> 
> As long as not all MSRs documented and reading/writing unexistent MSR
> leads to GP fault, I need to recover in that case.

You should make a MD API for reading these out (if one doesn't already
exist) that handle the faulting for you, and then have your driver hook
into this api...

I had to do something similar for accessing PCI config registers
that don't exist and cause a fault...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060814181521.GQ99774>