summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2014-06-01 00:37:37 +0000
committermlarkin <mlarkin@openbsd.org>2014-06-01 00:37:37 +0000
commita2f1632812d7badb13ff9a4306a48f9fc1f4a80d (patch)
tree4548ec1e0fefe972ef9a0f7d2ca1f1148f574c01
parentGet the public headers from the official place with <openssl/ > (diff)
downloadwireguard-openbsd-a2f1632812d7badb13ff9a4306a48f9fc1f4a80d.tar.xz
wireguard-openbsd-a2f1632812d7badb13ff9a4306a48f9fc1f4a80d.zip
Remove real mode VGA repost option. It was used by nobody, and even if it
were to be enabled, it had a bug that prevented it from working anyway. ok deraadt@, kettenis@
-rw-r--r--sys/arch/amd64/amd64/acpi_wakecode.S34
-rw-r--r--sys/arch/i386/i386/acpi_wakecode.S32
-rw-r--r--sys/dev/pci/vga_pci.c24
3 files changed, 8 insertions, 82 deletions
diff --git a/sys/arch/amd64/amd64/acpi_wakecode.S b/sys/arch/amd64/amd64/acpi_wakecode.S
index 8bf022ce592..16d505b2885 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.28 2014/03/10 05:03:50 mlarkin Exp $ */
+/* $OpenBSD: acpi_wakecode.S,v 1.29 2014/06/01 00:37:37 mlarkin Exp $ */
/*
* Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
@@ -85,7 +85,6 @@
.global _C_LABEL(acpi_long_mode_resume)
.global _C_LABEL(acpi_resume_end)
.global _C_LABEL(acpi_pdirpa)
- .global _C_LABEL(do_real_mode_post)
_C_LABEL(acpi_real_mode_resume):
_ACPI_TRMP_OFFSET(acpi_s3_vector_real)
nop
@@ -119,32 +118,6 @@ _ACPI_TRMP_OFFSET(acpi_s3_vector_real)
popfl
/*
- * Reset the video hardware (as best as we can).
- * We call the video bios at c000:0003, similar to
- * what the BIOS does on a machine restart.
- * Note that this will only reset the video card,
- * and may not enable LCDs or other attached displays.
- *
- * This will also put the hardware in "factory default"
- * display mode, which may not match what we had
- * when we went to sleep. On many machines (specifically
- * laptops), we might not restore the proper VGA mode
- * on resume. Caveat emptor.
- */
- cmpl $0, do_real_mode_post_off
- jz nobiosreset
- lcall $0xc000,$3
-
- /*
- * Restore our segment registers in case the call to
- * reset the video hardware clobbered them.
- */
- movw %cs,%ax
- movw %ax,%ds
- movw %ax,%ss
-nobiosreset:
-
- /*
* Set up esi to point to start of current routine's CS.
*/
xorl %esi,%esi
@@ -624,11 +597,6 @@ _ACPI_TRMP_LABEL(tmp_gdtable6416)
.quad 0x00009a0110000fff
_ACPI_TRMP_LABEL(tmp_gdt6416_end)
- .align 4
-_C_LABEL(do_real_mode_post):
-_ACPI_TRMP_OFFSET(do_real_mode_post_off)
- .long 0
-
.align 8
_ACPI_TRMP_LABEL(acpi_saved_rbx)
.quad 0
diff --git a/sys/arch/i386/i386/acpi_wakecode.S b/sys/arch/i386/i386/acpi_wakecode.S
index 3e3c1f8fd56..ee8634d090a 100644
--- a/sys/arch/i386/i386/acpi_wakecode.S
+++ b/sys/arch/i386/i386/acpi_wakecode.S
@@ -85,7 +85,6 @@
.global _C_LABEL(acpi_real_mode_resume)
.global _C_LABEL(acpi_protected_mode_resume)
.global _C_LABEL(acpi_resume_end)
- .global _C_LABEL(do_real_mode_post)
_C_LABEL(acpi_real_mode_resume):
_ACPI_TRMP_OFFSET(acpi_s3_vector_real)
nop
@@ -119,32 +118,6 @@ _ACPI_TRMP_OFFSET(acpi_s3_vector_real)
popfl
/*
- * Reset the video hardware (as best as we can).
- * We call the video bios at c000:0003, similar to
- * what the BIOS does on a machine restart.
- * Note that this will only reset the video card,
- * and may not enable LCDs or other attached displays.
- *
- * This will also put the hardware in "factory default"
- * display mode, which may not match what we had
- * when we went to sleep. On many machines (specifically
- * laptops), we might not restore the proper VGA mode
- * on resume. Caveat emptor.
- */
- cmpl $0, do_real_mode_post_off
- jz nobiosreset
- lcall $0xc000,$3
-
- /*
- * Restore our segment registers in case the call to
- * reset the video hardware clobbered them.
- */
- movw %cs,%ax
- movw %ax,%ds
- movw %ax,%ss
-nobiosreset:
-
- /*
* Set up esi to point to start of current routine's CS.
*/
xorl %esi,%esi
@@ -506,11 +479,6 @@ _ACPI_TRMP_LABEL(gdt_16_table)
_ACPI_TRMP_LABEL(gdt_16_end)
.align 4
-_C_LABEL(do_real_mode_post):
-_ACPI_TRMP_OFFSET(do_real_mode_post_off)
- .long 0
-
- .align 4
_ACPI_TRMP_LABEL(acpi_saved_ebx)
.long 0
_ACPI_TRMP_LABEL(acpi_saved_ecx)
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index f0c49d041b6..1d3c9ec7601 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_pci.c,v 1.77 2014/03/28 17:57:11 mpi Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.78 2014/06/01 00:37:37 mlarkin Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*
@@ -139,13 +139,11 @@ struct cfattach vga_pci_ca = {
#if !defined(SMALL_KERNEL) && NACPI > 0
int vga_pci_do_post;
-extern int do_real_mode_post;
struct vga_device_description {
u_int16_t rval[4];
u_int16_t rmask[4];
- char vga_pci_post;
- char real_mode_post;
+ char vga_pci_post;
};
static const struct vga_device_description vga_devs[] = {
@@ -157,19 +155,18 @@ static const struct vga_device_description vga_devs[] = {
*
* The next entry is a list of corresponding masks.
*
- * Finally the last two values set what resume should do, repost with
- * vga_pci (i.e. the x86emulator) or with a locore call to the video
- * bios.
+ * Finally the last value indicates if we should repost via
+ * vga_pci (i.e. the x86emulator) * bios.
*/
{ /* All machines with Intel US15W (until more evidence) */
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_US15W_IGD,
0x0000, 0x0000 },
- { 0xffff, 0xffff, 0x0000, 0x0000 }, 1, 0
+ { 0xffff, 0xffff, 0x0000, 0x0000 }, 1
},
{ /* All machines with Intel US15L (until more evidence) */
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_US15L_IGD,
0x0000, 0x0000 },
- { 0xffff, 0xffff, 0x0000, 0x0000 }, 1, 0
+ { 0xffff, 0xffff, 0x0000, 0x0000 }, 1
},
};
#endif
@@ -253,8 +250,6 @@ vga_pci_attach(struct device *parent, struct device *self, void *aux)
(subvend & vga_devs[i].rmask[2]) == vga_devs[i].rval[2] &&
(subprod & vga_devs[i].rmask[3]) == vga_devs[i].rval[3]) {
vga_pci_do_post = vga_devs[i].vga_pci_post;
- if (sc->sc_dev.dv_unit == 0) /* main screen only */
- do_real_mode_post = vga_devs[i].real_mode_post;
break;
}
#endif
@@ -303,13 +298,8 @@ vga_pci_activate(struct device *self, int act)
case DVACT_RESUME:
#if !defined(SMALL_KERNEL) && NACPI > 0
#if defined (X86EMU)
- if (vga_pci_do_post) {
-#ifdef obnoxious
- printf("%s: reposting video using BIOS. Is this necessary?\n",
- sc->sc_dev.dv_xname);
-#endif
+ if (vga_pci_do_post)
vga_post_call(sc->sc_posth);
- }
#endif
vga_restore_state(sc);
#endif