linux-mips
[Top] [All Lists]

Re: watch exception only for kseg0 addresses..?

To: Daniel Jacobowitz <dan@debian.org>
Subject: Re: watch exception only for kseg0 addresses..?
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Wed, 4 Dec 2002 18:54:02 +0100 (MET)
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <20021204155128.GA18940@nevyn.them.org>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On Wed, 4 Dec 2002, Daniel Jacobowitz wrote:

> Sorry, by "not handy" I meant I didn't have the manuals available :)

 'http://www.mips.com/Documentation/R4400_Uman_book_Ed2.pdf' or see under
"Publications"/"R4000...".  There are other sources of the book available,
e.g. somewhere within SGI web pages.  R10k implements a single watchpoint
this way, too. 

> >  What do you think?
> 
> You don't reveal to userland what size watchpoints are available - i.e.
> how large a watchpoint can be.  Does the mask match the hardware
> implementation, and what are the restrictions on it?

 For that you set up a disabled watchpoint with a mask set to all ones (or
the range you are interested in).  Then when you retrieve it, you may see
which bits stayed at ones.  Similarly you may check for hardwired
don't-cares by using a mask with all zeroes.  The mask may differ for each
watchpoint, e.g. for R4650 it's different for IWatch and DWatch, so you
really want to have a per-watchpoint setting.  Also the MIPS32/64 ISA
specification implies a mask need not be contiguous. 

 Similarly you may check for access types permitted, by enabling all of
them (or ones you are interested in) and seeing which ones remained
enabled.  Per-watchpoint, again. 

 I'd prefer not to overdesign the API leaving as much information as
possible passed as is.  This way userland gets more control over what's
available.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>