Michael Corcoran
2005-Aug-10 22:48 UTC
[dtrace-discuss] issues dereferencing memory with dtrace
I''m trying to do something a bit odd with dtrace and can''t figure out why this won''t work. What I''m trying to do for root causing a bug I''m seeing is to print out the contents of an OBP address during probes to see when a specific value gets set. Via mdb I can do this:> 0xf067b0c0/X0xf067b0c0: 1020300 However, the following (trimmed down) dscript does not work with this address. If I chose a known kernel address, I can get it to work, but not with this OBP address. #!/usr/sbin/dtrace -Fs END { trace(*(uint_t *)0xf067b0c0); } Is there a known limitation I''m running into here? Anyone have any suggestions as to a workaround? Thanks, Mike
Michael Shapiro
2005-Aug-11 02:37 UTC
[dtrace-discuss] issues dereferencing memory with dtrace
> I''m trying to do something a bit odd with dtrace and can''t figure out > why this won''t work. What I''m trying to do for root causing a bug I''m > seeing is to print out the contents of an OBP address during probes to > see when a specific value gets set. Via mdb I can do this: > > > 0xf067b0c0/X > 0xf067b0c0: 1020300 > > However, the following (trimmed down) dscript does not work with this > address. If I chose a known kernel address, I can get it to work, but > not with this OBP address. > > #!/usr/sbin/dtrace -Fs > END > { > trace(*(uint_t *)0xf067b0c0); > } > > > Is there a known limitation I''m running into here? Anyone have any > suggestions as to a workaround? > > Thanks, > > MikeWe can''t permit arbitrary dereferencing of OBP addresses because the kernel can''t know which of them may be memory-mapped device registers. Any access to i/o space is verboten in DTrace because it can hang the machine if you have h/w that is either unsafely designed or has registers with side-effects on read. If you have a development system and wish to disable the safety mechanism you can construct your own kernel without the bit of sun4''s dtrace_toxic_ranges() that refers to OFW_START_ADDR, OFW_END_ADDR. -Mike -- Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/