lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] 2.4.0-test2: %cr4 in a register dump

Having cool trap code is OK. If you check the debugging extension flag
in the feature bits before attempting to access CR4, then it will never
trap and you'll know if the processor has a CR4 register or not, which
is what I thought you guys were trying to accomplish....

I'm sure Linus will do what's right in any case -- I tought the info
would be useful. If you check the bit, then you will know for certain
the processor can support the opcodes.

:-)

Jeff

Tigran Aivazian wrote:
>
> but Jeff, his trapping patch was so beautiful and elegant! (if only I
> understood how it works... - presumably the same principle as described
> in Documentation/exception.txt)
>
> Regards,
> Tigran
>
> On Wed, 5 Jul 2000, Jeff V. Merkey wrote:
>
> >
> > How about just checking the feature flags to see if debugging extensions
> > are present (IO breakpoints) which always means that a valid CR4
> > register is present (since the bit to enable IO breakpoints in located
> > in CR4). Then the patch will work accross all Pentium class processors
> > and you won't need the trap .....
> >
> > :-)
> >
> > Jeff
> >
> > Brian Gerst wrote:
> > >
> > > Linus Torvalds wrote:
> > > > If I remember correctly, there are CPU's out there that will bomb out
> > > > horribly when you access %cr4 if the register doesn't exist.
> > > >
> > > > Do I remember wrong?
> > > >
> > > > I'd certainly agree with printing out cr4 even if it would be zero, I just
> > > > disagree very much with adding a register read to the dump output that may
> > > > cause an infinite regression of traps..
> > > >
> > > > Linus
> > >
> > > How about just trapping the illegal opcode exception then? (patch
> > > untested)
> > >
> > > --
> > >
> > > Brian Gerst
> > >
> > > ------------------------------------------------------------------------
> > > Name: cr4.diff
> > > cr4.diff Type: application/x-unknown-content-type-diff_auto_file
> > > Encoding: base64
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.rutgers.edu
> > Please read the FAQ at http://www.tux.org/lkml/
> >

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.040 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site