NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-amd64/38587: suspend/resume: crash & reboot



>Number:         38587
>Category:       port-amd64
>Synopsis:       suspend/resume: crash & reboot
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 05 16:15:00 +0000 2008
>Originator:     Christoph Egger
>Release:        4.99.62
>Organization:
>Environment:
NetBSD tulln.amd.com 4.99.62 NetBSD 4.99.62 (GENERIC) #0: Mon May  5 11:25:20 
CEST 2008   
cegger%powermacg5.local@localhost:/Users/cegger/devel/bsd/netbsd/obj.kern.amd64/compile/GENERIC
 amd64
>Description:

Suspend seems to work fine.
On Resume, machine crashes and reboots immediately.

Hardware: HP Pavilion dv9700 Notebook with AMD Turion X2

With help from jmcneill I debugged this by putting
a  1: jmp 1b

in sys/arch/amd64/acpi/acpi_wakecode.S and looked
where it hangs and where it reboots.

I figurd out, the wrmsr generates a general protection
fault (#GP). Since GDT/LDT/IDT are not set up at this point,
CPU invokes a reboot.

With a little modification, change

movl    WAKEUP_msr_efer + ACPI_WAKEUP_ADDR,%eax

to

        xorl %eax,%eax
        orl $(EFER_LME|EFER_SCE),%eax

the wrmsr no longer throughs a #GP and it continues
to file src/sys/arch/amd64/acpi/acpi_wakup_low.S
where this instruction

movw    %ax,%ds

raises an exception and causes a crash & reboot.

It is supposed, the lgdt instruction loaded some garbage
and the above wrmsr fix is not correct.


>How-To-Repeat:

Suspend and resume.

>Fix:



Home | Main Index | Thread Index | Old Index