Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86 Remove x86_genfb_mtrr_init. PATs have been avai...
details: https://anonhg.NetBSD.org/src/rev/3f747c4cf265
branches: trunk
changeset: 950405:3f747c4cf265
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Jan 28 01:57:31 2021 +0000
description:
Remove x86_genfb_mtrr_init. PATs have been available since the Pentium III
and this code has been #if notyet'd shortly after being introduced.
diffstat:
sys/arch/x86/include/genfb_machdep.h | 3 +-
sys/arch/x86/pci/pci_machdep.c | 6 +---
sys/arch/x86/x86/genfb_machdep.c | 43 +----------------------------------
sys/arch/x86/x86/hyperv.c | 12 +--------
4 files changed, 7 insertions(+), 57 deletions(-)
diffs (148 lines):
diff -r 1a8170319360 -r 3f747c4cf265 sys/arch/x86/include/genfb_machdep.h
--- a/sys/arch/x86/include/genfb_machdep.h Wed Jan 27 22:42:53 2021 +0000
+++ b/sys/arch/x86/include/genfb_machdep.h Thu Jan 28 01:57:31 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.h,v 1.4 2019/11/30 05:28:28 nonaka Exp $ */
+/* $NetBSD: genfb_machdep.h,v 1.5 2021/01/28 01:57:31 jmcneill Exp $ */
/*-
* Copyright (c) 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,6 @@
int x86_genfb_init(void);
int x86_genfb_cnattach(void);
-void x86_genfb_mtrr_init(uint64_t, uint32_t);
void x86_genfb_set_console_dev(device_t);
void x86_genfb_ddb_trap_callback(int);
diff -r 1a8170319360 -r 3f747c4cf265 sys/arch/x86/pci/pci_machdep.c
--- a/sys/arch/x86/pci/pci_machdep.c Wed Jan 27 22:42:53 2021 +0000
+++ b/sys/arch/x86/pci/pci_machdep.c Thu Jan 28 01:57:31 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.87 2020/05/04 15:55:56 jdolecek Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.88 2021/01/28 01:57:31 jmcneill Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.87 2020/05/04 15:55:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.88 2021/01/28 01:57:31 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1018,8 +1018,6 @@
switch (newmode) {
case WSDISPLAYIO_MODE_EMUL:
- x86_genfb_mtrr_init(sc->sc_fboffset,
- sc->sc_height * sc->sc_stride);
# if NACPICA > 0 && defined(VGA_POST)
if (curmode != newmode) {
if (vga_posth != NULL && acpi_md_vesa_modenum != 0) {
diff -r 1a8170319360 -r 3f747c4cf265 sys/arch/x86/x86/genfb_machdep.c
--- a/sys/arch/x86/x86/genfb_machdep.c Wed Jan 27 22:42:53 2021 +0000
+++ b/sys/arch/x86/x86/genfb_machdep.c Thu Jan 28 01:57:31 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.c,v 1.15 2019/11/30 05:28:28 nonaka Exp $ */
+/* $NetBSD: genfb_machdep.c,v 1.16 2021/01/28 01:57:31 jmcneill Exp $ */
/*-
* Copyright (c) 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,9 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.15 2019/11/30 05:28:28 nonaka Exp $");
-
-#include "opt_mtrr.h"
+__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.16 2021/01/28 01:57:31 jmcneill Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -45,7 +43,6 @@
#include <sys/bus.h>
#include <machine/bootinfo.h>
-#include <machine/mtrr.h>
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsdisplayvar.h>
@@ -99,42 +96,6 @@
}
}
-void
-x86_genfb_mtrr_init(uint64_t physaddr, uint32_t size)
-{
-#if notyet
-#ifdef MTRR
- struct mtrr mtrr;
- int error, n;
-
- if (mtrr_funcs == NULL) {
- aprint_debug("%s: no mtrr funcs\n", __func__);
- return;
- }
-
- mtrr.base = physaddr;
- mtrr.len = size;
- mtrr.type = MTRR_TYPE_WC;
- mtrr.flags = MTRR_VALID;
- mtrr.owner = 0;
-
- aprint_debug("%s: 0x%" PRIx64 "-0x%" PRIx64 "\n", __func__,
- mtrr.base, mtrr.base + mtrr.len - 1);
-
- n = 1;
- KERNEL_LOCK(1, NULL);
- error = mtrr_set(&mtrr, &n, curlwp->l_proc, MTRR_GETSET_KERNEL);
- if (n != 0)
- mtrr_commit();
- KERNEL_UNLOCK_ONE(NULL);
-
- aprint_debug("%s: mtrr_set returned %d\n", __func__, error);
-#else
- aprint_debug("%s: kernel lacks MTRR option\n", __func__);
-#endif
-#endif
-}
-
int
x86_genfb_init(void)
{
diff -r 1a8170319360 -r 3f747c4cf265 sys/arch/x86/x86/hyperv.c
--- a/sys/arch/x86/x86/hyperv.c Wed Jan 27 22:42:53 2021 +0000
+++ b/sys/arch/x86/x86/hyperv.c Thu Jan 28 01:57:31 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hyperv.c,v 1.12 2020/10/12 12:11:03 ryoon Exp $ */
+/* $NetBSD: hyperv.c,v 1.13 2021/01/28 01:57:31 jmcneill Exp $ */
/*-
* Copyright (c) 2009-2012,2016-2017 Microsoft Corp.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
#ifdef __KERNEL_RCSID
-__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.12 2020/10/12 12:11:03 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.13 2021/01/28 01:57:31 jmcneill Exp $");
#endif
#ifdef __FBSDID
__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hyperv.c 331757 2018-03-30 02:25:12Z emaste $");
@@ -1056,14 +1056,6 @@
static bool
x86_genfb_setmode(struct genfb_softc *sc, int newmode)
{
-#if NGENFB > 0
- switch (newmode) {
- case WSDISPLAYIO_MODE_EMUL:
- x86_genfb_mtrr_init(sc->sc_fboffset,
- sc->sc_height * sc->sc_stride);
- break;
- }
-#endif
return true;
}
Home |
Main Index |
Thread Index |
Old Index