From owner-svn-src-head@freebsd.org Fri Dec 15 03:05:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32367E98367; Fri, 15 Dec 2017 03:05:16 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF70163C92; Fri, 15 Dec 2017 03:05:15 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBF35Fmg036918; Fri, 15 Dec 2017 03:05:15 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBF35FFP036917; Fri, 15 Dec 2017 03:05:15 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201712150305.vBF35FFP036917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 15 Dec 2017 03:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326867 - head/sys/i386/acpica X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/i386/acpica X-SVN-Commit-Revision: 326867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 03:05:16 -0000 Author: bde Date: Fri Dec 15 03:05:14 2017 New Revision: 326867 URL: https://svnweb.freebsd.org/changeset/base/326867 Log: Minor cleanups found while fixing a bug involving double mapping of low memory: Load the kernel eflags less magically, as in locore. The magic increased when I removed eflags from the pcb in r305899. Remove a jump to low memory that became garbage when the i386 version was mostly replaced by the amd64 version in r235622. The amd64 version is very similar. It still loads the flags magically, but is not missing comments about using the special page table. Reviewed by: kib Modified: head/sys/i386/acpica/acpi_wakecode.S Modified: head/sys/i386/acpica/acpi_wakecode.S ============================================================================== --- head/sys/i386/acpica/acpi_wakecode.S Thu Dec 14 23:21:31 2017 (r326866) +++ head/sys/i386/acpica/acpi_wakecode.S Fri Dec 15 03:05:14 2017 (r326867) @@ -50,17 +50,19 @@ .code16 wakeup_start: /* - * Set up segment registers for real mode, a small stack for - * any calls we make, and clear any flags. + * Set up segment registers for real mode and a small stack for + * any calls we make. Set up full 32-bit bootstrap kernel flags + * since resumectx() doesn't restore flags. PSL_KERNEL gives + * bootstrap kernel flags (with interrupts disabled), not normal + * kernel flags. */ cli /* make sure no interrupts */ mov %cs, %ax /* copy %cs to %ds. Remember these */ mov %ax, %ds /* are offsets rather than selectors */ mov %ax, %ss movw $PAGE_SIZE, %sp - xorw %ax, %ax - pushw %ax - popfw + pushl $PSL_KERNEL + popfl /* To debug resume hangs, beep the speaker if the user requested. */ testb $~0, resume_beep - wakeup_start @@ -156,8 +158,6 @@ wakeup_32: orl $CR0_PG, %eax mov %eax, %cr0 - jmp 1f -1: /* Jump to return address. */ jmp *%edx