James Howard wrote:
> 
> On Sat, 3 Mar 2001, Wes Peters wrote:
> 
> > You don't even have to overwrite it some times.  Accessing word-size-only
> > registers in memory a byte at a time can cause a bus error and panic...
> 
> I have never worked with FreeBSD at this low a level.  How does one do
> this and why?  :)

Some memory locations are memory-mapped I/O registers, rather than "just
RAM", and have to be read at the correct width for the register.  Reading
a 32-bit register with an 8-bit read can cause a bus error; since you're
poking around in kernel memory (/dev/*k*mem) a panic ensues.

This was a sure-fire way to crash RISC Ultrix, and I think SunOS M68K too.  
I don't know that this will work on x86, with it's separate I/O address
space, and it doesn't work on SPARC because you can't get to the right
Address Space Identifier (ASI) for anything other than RAM (and maybe
some ROM).

-- 
            "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                         Softweyr LLC
[EMAIL PROTECTED]                                           http://softweyr.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to