Watchdog for Boser (HS-7001)

Gary Jennejohn gary.jennejohn at freenet.de
Mon Dec 1 04:19:16 PST 2008


On Mon, 01 Dec 2008 09:38:51 +0100
Christoph Mallon <christoph.mallon at gmx.de> wrote:

> Won De Erick schrieb:
> > Hello,
> > 
> > I was trying the assembly language program that is specified in the following document (p24) to set, reset the built-in watchdog timer for the Boser Box.
> > 
> > http://www.boser.com.tw/manual/HS-7001v1.1.pdf
> > 
> > I then installed nasm in FreeBSD 6.2, and added the following lines at the beginning.
> > 
> > section .text
> >   global _start
> > 
> >   _start:
> > 
> > I did assemble, link (ld) and got no error. But when I run, I got the following error:
> > 
> > # ./watchdog.out
> > Bus error (core dumped)
> 
> > MOV DX, 2EH
> > MOV AL, 87H
> > OUT DX, AL
> > OUT DX, AL
> 
> Userland is not allowed to write to ports. That's the bus error you see. 
> Also without a call to the exit syscall at the end, it will segfault.
> 

See io(4), i386_get_ioperm(2), i386_set_ioperm(2), mem(4).

---
Gary Jennejohn


More information about the freebsd-hackers mailing list