Date: Fri, 15 Dec 2017 03:05:15 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326867 - head/sys/i386/acpica Message-ID: <201712150305.vBF35FFP036917@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712150305.vBF35FFP036917>