Subject: Re: amd64 reboot when using acpi
To: None <current-users@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: current-users
Date: 06/10/2007 12:39:51
blymn@baesystems.com.au (Brett Lymn) writes:

>kernel: double fault trap, code=0
>Stopped in pid 17.1 (pagedaemon) at     netbsd:Xintr_legacy7+0x34:      movq    %r13,0x48(%rsp)
>db{1}> 

>So, it looks like a double fault in an interrupt handler on CPU 1.

This is on entry to the interrupt handler and at this place
the CPU has already executed a couple of store operations to the
stack.

IDTVEC(intr_/**/name/**/num)                                            ;\
        pushq   $0                      /* dummy error code */          ;\
        pushq   $T_ASTFLT               /* trap # for doing ASTs */     ;\
        INTRENTRY                                                       ;\

#define INTRENTRY \
        subq    $32,%rsp                ; \
        testq   $SEL_UPL,56(%rsp)       ; \
        je      98f                     ; \
        swapgs                          ; \
        movw    %gs,0(%rsp)             ; \
        movw    %fs,8(%rsp)             ; \
        movw    %es,16(%rsp)            ; \
        movw    %ds,24(%rsp)            ; \
98:     INTR_SAVE_GPRS

#define INTR_SAVE_GPRS \
        subq    $120,%rsp       ; \
        movq    %r15,TF_R15(%rsp)       ; \
        movq    %r14,TF_R14(%rsp)       ; \
        movq    %r13,TF_R13(%rsp)       ; \              <----------
        movq    %r12,TF_R12(%rsp)       ; \

Could that be a stack overflow of some kind?

-- 
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."