-/* $OpenBSD: acpi_wakecode.S,v 1.23 2014/01/05 20:23:56 mlarkin Exp $ */
+/* $OpenBSD: acpi_wakecode.S,v 1.24 2014/01/10 22:34:41 mlarkin Exp $ */
/*
* Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
/* Get out of 64 bit CS */
lgdtq tmp_gdt6416
- rex64 ljmp *(hibernate_indirect_16)
+ rex64 ljmpq *(hibernate_indirect_16)
_ACPI_TRMP_LABEL(hibernate_indirect_16)
.quad hibernate_resume_vector_3
.word 0x18
-_ACPI_TRMP_LABEL(hibernate_resume_vector_3)
+_ACPI_TRMP_OFFSET(hibernate_resume_vector_3)
.code16
movl %cr0, %eax
/* Get out of 64 bit CS */
lgdtq tmp_gdt6416
- rex64 ljmp *(hibernate_indirect_16b)
+ rex64 ljmpq *(hibernate_indirect_16b)
_ACPI_TRMP_LABEL(hibernate_indirect_16b)
.quad hibernate_resume_vector_3b
.word 0x18
-_ACPI_TRMP_LABEL(hibernate_resume_vector_3b)
+_ACPI_TRMP_OFFSET(hibernate_resume_vector_3b)
.code16
movl %cr0, %eax
.quad 0x0000000000000000
.quad 0x00af9a000000ffff
.quad 0x00cf92000000ffff
- .quad 0x00009a000000ffff
+ .quad 0x00009a0110000fff
_ACPI_TRMP_LABEL(tmp_gdt6416_end)
.align 4
-/* $OpenBSD: hibernate_machdep.c,v 1.18 2014/01/05 23:06:54 mlarkin Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.19 2014/01/10 22:34:41 mlarkin Exp $ */
/*
* Copyright (c) 2012 Mike Larkin <mlarkin@openbsd.org>
/* Start the hatched (but idling) APs */
cpu_boot_secondary_processors();
- /* Now shut them down */
- acpi_sleep_mp();
+ /* Demote the APs to real mode */
+ x86_broadcast_ipi(X86_IPI_HALT_REALMODE);
+
+ /* Wait a bit for the APs to park themselves */
+ delay(1000000);
+
}
#endif /* MULTIPROCESSOR */