From: mlarkin Date: Thu, 26 Dec 2013 18:52:09 +0000 (+0000) Subject: Back at t2k13, I wrote code to park APs in real mode before resuming a X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4b115d939a465e11a76345ee5514cc57304c996f;p=openbsd Back at t2k13, I wrote code to park APs in real mode before resuming a hibernated image. We backed out the code because it was causing reboots on resume. Turns out the parking code had a bug that caused the CPU to jump to some bogus address (calculating a bad offset for the jump target), which was likely the source of the problem. This diff fixes the bad offset calculation (verified by looking at the resulting asm output). This will be the first step in attempting to resurrect the original idea (and eventually add i386 if/when it works). discussed with deraadt@ --- diff --git a/sys/arch/amd64/amd64/acpi_wakecode.S b/sys/arch/amd64/amd64/acpi_wakecode.S index 63f28968e45..8e94d2ccfd0 100644 --- a/sys/arch/amd64/amd64/acpi_wakecode.S +++ b/sys/arch/amd64/amd64/acpi_wakecode.S @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_wakecode.S,v 1.21 2013/11/02 00:42:16 mlarkin Exp $ */ +/* $OpenBSD: acpi_wakecode.S,v 1.22 2013/12/26 18:52:09 mlarkin Exp $ */ /* * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI @@ -458,7 +458,7 @@ _ACPI_TRMP_LABEL(hibernate_resume_vector_3b) ljmp $0x0400, $hib_hlt_real -_ACPI_TRMP_LABEL(hib_hlt_real) +_ACPI_TRMP_OFFSET(hib_hlt_real) hlt ljmp $0x0400, $hib_hlt_real