Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Remove OFB_ENABLE_CACHE



details:   https://anonhg.NetBSD.org/src/rev/aad008334ec5
branches:  trunk
changeset: 830037:aad008334ec5
user:      sevan <sevan%NetBSD.org@localhost>
date:      Fri Feb 23 02:54:56 2018 +0000

description:
Remove OFB_ENABLE_CACHE
from <macallan>
"it is outdated, genfb and friends don't need or use it, and it makes no sense
on accelerated drivers either. It tries to BAT-map the framebuffer cacheable,
which works on most macs but makes a few models lock up. Genfb doesn't have that
problem and is faster too."

diffstat:

 sys/arch/macppc/conf/GENERIC       |   8 +----
 sys/arch/macppc/conf/MAMBO         |   5 +---
 sys/arch/macppc/conf/POWERMAC      |   3 +-
 sys/arch/macppc/conf/POWERMAC_G5   |   3 --
 sys/arch/powerpc/oea/ofw_rascons.c |  47 +------------------------------------
 5 files changed, 6 insertions(+), 60 deletions(-)

diffs (156 lines):

diff -r 8ab71c084d7b -r aad008334ec5 sys/arch/macppc/conf/GENERIC
--- a/sys/arch/macppc/conf/GENERIC      Fri Feb 23 01:01:22 2018 +0000
+++ b/sys/arch/macppc/conf/GENERIC      Fri Feb 23 02:54:56 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.340 2018/02/17 01:31:02 sevan Exp $
+# $NetBSD: GENERIC,v 1.341 2018/02/23 02:54:56 sevan Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.340 $"
+#ident                 "GENERIC-$Revision: 1.341 $"
 
 maxusers       32
 
@@ -268,10 +268,6 @@
 
 # Display devices
 # ofb* at pci? dev ? function ?        # Generic Open Firmware Framebuffer
-# OFB_ENABLE_CACHE speeds up the console on many machines, but should
-# not be enabled on some older machines, such as the rev. A-D iMacs or any
-# O'Hare based machine that uses external cache like the PowerBook 3400c
-#options       OFB_ENABLE_CACHE        # Speed up console in ofb
 #options       OFB_FAKE_VGA_FB         # Allow X to mmap VGA regs
 # 
 # ofb is considered obsolete and machine-independent genfb should be used
diff -r 8ab71c084d7b -r aad008334ec5 sys/arch/macppc/conf/MAMBO
--- a/sys/arch/macppc/conf/MAMBO        Fri Feb 23 01:01:22 2018 +0000
+++ b/sys/arch/macppc/conf/MAMBO        Fri Feb 23 02:54:56 2018 +0000
@@ -6,7 +6,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.27 $"
+#ident                 "GENERIC-$Revision: 1.28 $"
 
 maxusers       32
 
@@ -130,9 +130,6 @@
 
 # Other  PCI devices
 #ofb*  at pci? dev ? function ?        # Generic Open Firmware Framebuffer
-# OFB_ENABLE_CACHE speeds up the console on many machines, but should
-# not be enabled on some older machines, such as the rev. A-D iMacs.
-#options       OFB_ENABLE_CACHE        # Speed up console
 pciide* at pci? dev ? function ? flags 0x0000  # GENERIC pciide driver
 obio*  at pci? dev ? function ?
 macofcons0 at pci? dev ? function ?    # OpenFirmware console (for debugging)
diff -r 8ab71c084d7b -r aad008334ec5 sys/arch/macppc/conf/POWERMAC
--- a/sys/arch/macppc/conf/POWERMAC     Fri Feb 23 01:01:22 2018 +0000
+++ b/sys/arch/macppc/conf/POWERMAC     Fri Feb 23 02:54:56 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: POWERMAC,v 1.68 2017/09/22 17:56:07 macallan Exp $
+#      $NetBSD: POWERMAC,v 1.69 2018/02/23 02:54:56 sevan Exp $
 #
 # POWERMAC config file
 #
@@ -85,7 +85,6 @@
 
 # ofb is deprecated, use genfb instead
 #ofb*  at pci? dev ? function ?        # Generic Open Firmware Framebuffer
-#options       OFB_ENABLE_CACHE        # Speed up console
 obio*  at pci? dev ? function ?
 
 nsphy* at mii? phy ?                   # NS83840 PHYs
diff -r 8ab71c084d7b -r aad008334ec5 sys/arch/macppc/conf/POWERMAC_G5
--- a/sys/arch/macppc/conf/POWERMAC_G5  Fri Feb 23 01:01:22 2018 +0000
+++ b/sys/arch/macppc/conf/POWERMAC_G5  Fri Feb 23 02:54:56 2018 +0000
@@ -147,9 +147,6 @@
 
 # Other  PCI devices
 #ofb*  at pci? dev ? function ?        # Generic Open Firmware Framebuffer
-# OFB_ENABLE_CACHE speeds up the console on many machines, but should
-# not be enabled on some older machines, such as the rev. A-D iMacs.
-#options       OFB_ENABLE_CACHE        # Speed up console
 pciide* at pci? dev ? function ? flags 0x0000  # GENERIC pciide driver
 svwsata* at pci? dev ? function ?              # ServerWorks SATA controllers
 obio*  at pci? dev ? function ?
diff -r 8ab71c084d7b -r aad008334ec5 sys/arch/powerpc/oea/ofw_rascons.c
--- a/sys/arch/powerpc/oea/ofw_rascons.c        Fri Feb 23 01:01:22 2018 +0000
+++ b/sys/arch/powerpc/oea/ofw_rascons.c        Fri Feb 23 02:54:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_rascons.c,v 1.9 2013/04/11 18:04:20 macallan Exp $ */
+/*     $NetBSD: ofw_rascons.c,v 1.10 2018/02/23 02:54:56 sevan Exp $   */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_rascons.c,v 1.9 2013/04/11 18:04:20 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_rascons.c,v 1.10 2018/02/23 02:54:56 sevan Exp $");
 
 #include "wsdisplay.h"
 
@@ -58,16 +58,6 @@
 /* we need a wsdisplay to do anything halfway useful */
 #if NWSDISPLAY > 0
 
-#if defined(PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
-int rascons_enable_cache = 0;
-#else
-#ifdef OFB_ENABLE_CACHE
-int rascons_enable_cache = 1;
-#else
-int rascons_enable_cache = 0;
-#endif
-#endif /* PPC_OEA64 */
-
 static int copy_rom_font(void);
 static struct wsdisplay_font openfirm6x11;
 static vaddr_t fbaddr;
@@ -196,39 +186,6 @@
        if (width == -1 || height == -1 || fbaddr == 0 || fbaddr == -1)
                return false;
 
-       /* Enable write-through cache. */
-#if defined (PPC_OEA) && !defined (PPC_OEA64) && !defined (PPC_OEA64_BRIDGE)
-       if (rascons_enable_cache) {
-               vaddr_t va;
-               /*
-                * Let's try to find an empty 256M BAT to use
-                */
-               for (va = SEGMENT_LENGTH; va < (USER_SR << ADDR_SR_SHFT);
-                    va += SEGMENT_LENGTH) {
-                       const u_int i = BAT_VA2IDX(va);
-                       const u_int n = BAT_VA2IDX(SEGMENT_LENGTH);
-                       u_int j;
-                       for (j = 0; j < n; j++) {
-                               if (battable[i+j].batu != 0) {
-                                       break;
-                               }
-                       }
-                       if (j == n) {
-                               register_t batl = BATL(fbaddr & 0xf0000000,
-                                   BAT_G | BAT_W | BAT_M, BAT_PP_RW);
-                               register_t batu = BATL(va, BAT_BL_256M, BAT_Vs);
-                               for (j = 0; j < n; j++) {
-                                       battable[i+j].batl = batl;
-                                       battable[i+j].batu = batu;
-                               }
-                               fbaddr &= SEGMENT_MASK;
-                               fbaddr |= va;
-                               break;
-                       }
-               }
-       }
-#endif /* PPC_OEA64 */
-
        /* initialize rasops */
        ri->ri_width = width;
        ri->ri_height = height;



Home | Main Index | Thread Index | Old Index