Author: rpaulo
Date: Tue Feb 10 06:35:16 2015
New Revision: 278495
URL: https://svnweb.freebsd.org/changeset/base/278495

Log:
  Remove FreeBSD/wii.
  
  This port failed to gain traction and probably only a couple Wii consoles
  ran FreeBSD all the way to single user mode with an md(4). IPC
  support was never implemented, so it was impossible to use any peripheral
  
  Any further development, if any, will happen at https://github.com/rpaulo/wii.
  
  Discussed with:       nathanw (a long time ago), jhibbits

Deleted:
  head/sys/powerpc/conf/WII
  head/sys/powerpc/wii/
Modified:
  head/sys/conf/files.powerpc
  head/sys/conf/options.powerpc
  head/sys/powerpc/aim/locore32.S
  head/sys/powerpc/aim/machdep.c
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/conf/NOTES
  head/sys/powerpc/ofw/ofw_syscons.c

Modified: head/sys/conf/files.powerpc
==============================================================================
--- head/sys/conf/files.powerpc Tue Feb 10 04:34:39 2015        (r278494)
+++ head/sys/conf/files.powerpc Tue Feb 10 06:35:16 2015        (r278495)
@@ -242,9 +242,3 @@ powerpc/psim/iobus.c                optional        psim
 powerpc/psim/ata_iobus.c       optional        ata psim
 powerpc/psim/openpic_iobus.c   optional        psim
 powerpc/psim/uart_iobus.c      optional        uart psim
-powerpc/wii/platform_wii.c     optional        wii
-powerpc/wii/wii_bus.c          optional        wii
-powerpc/wii/wii_pic.c          optional        wii
-powerpc/wii/wii_fb.c           optional        wii
-powerpc/wii/wii_gpio.c         optional        wii wiigpio
-powerpc/wii/wii_ipc.c          optional        wii

Modified: head/sys/conf/options.powerpc
==============================================================================
--- head/sys/conf/options.powerpc       Tue Feb 10 04:34:39 2015        
(r278494)
+++ head/sys/conf/options.powerpc       Tue Feb 10 06:35:16 2015        
(r278495)
@@ -24,7 +24,6 @@ PS3                   opt_platform.h
 MAMBO
 PSERIES
 PSIM
-WII                    opt_platform.h
 
 SC_OFWFB               opt_ofwfb.h
 

Modified: head/sys/powerpc/aim/locore32.S
==============================================================================
--- head/sys/powerpc/aim/locore32.S     Tue Feb 10 04:34:39 2015        
(r278494)
+++ head/sys/powerpc/aim/locore32.S     Tue Feb 10 06:35:16 2015        
(r278495)
@@ -118,9 +118,7 @@ __start:
        bdnz    1b
        sync
        isync
-#ifdef WII
-#include <powerpc/wii/locore.S>
-#endif
+
        /* Zero bss, in case we were started by something unhelpful */
        li      0,0
        lis     8,_edata@ha

Modified: head/sys/powerpc/aim/machdep.c
==============================================================================
--- head/sys/powerpc/aim/machdep.c      Tue Feb 10 04:34:39 2015        
(r278494)
+++ head/sys/powerpc/aim/machdep.c      Tue Feb 10 06:35:16 2015        
(r278495)
@@ -260,9 +260,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_
        void            *kmdp;
         char           *env;
        register_t      msr, scratch;
-#ifdef WII
-       register_t      vers;
-#endif
        uint8_t         *cache_check;
        int             cacheline_warn;
        #ifndef __powerpc64__
@@ -281,16 +278,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_
        startkernel = __startkernel;
        endkernel = __endkernel;
 
-#ifdef WII
-       /*
-        * The Wii loader doesn't pass us any environment so, mdp
-        * points to garbage at this point. The Wii CPU is a 750CL.
-        */
-       vers = mfpvr();
-       if ((vers & 0xfffff0e0) == (MPC750 << 16 | MPC750CL)) 
-               mdp = NULL;
-#endif
-
        /* Check for ePAPR loader, which puts a magic value into r6 */
        if (mdp == (void *)0x65504150)
                mdp = NULL;
@@ -513,13 +500,13 @@ powerpc_init(vm_offset_t fdt, vm_offset_
                 */
 
                trap_offset += (size_t)&restorebridgesize;
-               bcopy(&restorebridge, (void *)EXC_RST, trap_offset); 
-               bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); 
-               bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); 
-               bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); 
-               bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); 
-               bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); 
-               bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); 
+               bcopy(&restorebridge, (void *)EXC_RST, trap_offset);
+               bcopy(&restorebridge, (void *)EXC_DSI, trap_offset);
+               bcopy(&restorebridge, (void *)EXC_ALI, trap_offset);
+               bcopy(&restorebridge, (void *)EXC_PGM, trap_offset);
+               bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset);
+               bcopy(&restorebridge, (void *)EXC_TRC, trap_offset);
+               bcopy(&restorebridge, (void *)EXC_BPT, trap_offset);
        }
        #endif
 
@@ -560,7 +547,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_
         * Restore MSR
         */
        mtmsr(msr);
-       
+
        /* Warn if cachline size was not determined */
        if (cacheline_warn == 1) {
                printf("WARNING: cacheline size undetermined, setting to 32\n");
@@ -569,7 +556,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_
        /*
         * Choose a platform module so we can get the physical memory map.
         */
-       
+
        platform_probe_and_attach();
 
        /*
@@ -698,7 +685,7 @@ int
 ptrace_single_step(struct thread *td)
 {
        struct trapframe *tf;
-       
+
        tf = td->td_frame;
        tf->srr1 |= PSL_SE;
 
@@ -789,7 +776,7 @@ db_trap_glue(struct trapframe *frame)
                int type = frame->exc;
 
                /* Ignore DTrace traps. */
-               if (*(uint32_t *)frame->srr0 == EXC_DTRACE) 
+               if (*(uint32_t *)frame->srr0 == EXC_DTRACE)
                        return (0);
                if (type == EXC_PGM && (frame->srr1 & 0x20000)) {
                        type = T_BREAKPOINT;

Modified: head/sys/powerpc/aim/mmu_oea.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea.c      Tue Feb 10 04:34:39 2015        
(r278494)
+++ head/sys/powerpc/aim/mmu_oea.c      Tue Feb 10 06:35:16 2015        
(r278495)
@@ -420,7 +420,7 @@ static void
 tlbia(void)
 {
        vm_offset_t va;
- 
+
        for (va = 0; va < 0x00040000; va += 0x00001000) {
                __asm __volatile("tlbie %0" :: "r"(va));
                powerpc_sync();
@@ -623,17 +623,8 @@ moea_cpu_bootstrap(mmu_t mmup, int ap)
                isync();
        }
 
-#ifdef WII
-       /*
-        * Special case for the Wii: don't install the PCI BAT.
-        */
-       if (strcmp(installed_platform(), "wii") != 0) {
-#endif
-               __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
-               __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
-#ifdef WII
-       }
-#endif
+       __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
+       __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
        isync();
 
        __asm __volatile("mtibatu 1,%0" :: "r"(0));
@@ -706,15 +697,9 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k
            :: "r"(battable[0].batu), "r"(battable[0].batl));
        mtmsr(msr);
 
-#ifdef WII
-        if (strcmp(installed_platform(), "wii") != 0) {
-#endif
-               /* map pci space */
-               __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
-               __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
-#ifdef WII
-       }
-#endif
+       /* map pci space */
+       __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
+       __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
        isync();
 
        /* set global direct map flag */
@@ -885,7 +870,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k
         */
        chosen = OF_finddevice("/chosen");
        if (chosen != -1 && OF_getprop(chosen, "mmu", &mmui, 4) != -1 &&
-           (mmu = OF_instance_to_package(mmui)) != -1 && 
+           (mmu = OF_instance_to_package(mmui)) != -1 &&
            (sz = OF_getproplen(mmu, "translations")) != -1) {
                translations = NULL;
                for (i = 0; phys_avail[i] != 0; i += 2) {
@@ -917,7 +902,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k
                        /* Enter the pages */
                        for (off = 0; off < translations[i].om_len;
                            off += PAGE_SIZE)
-                               moea_kenter(mmup, translations[i].om_va + off, 
+                               moea_kenter(mmup, translations[i].om_va + off,
                                            translations[i].om_pa + off);
                }
        }
@@ -1488,7 +1473,7 @@ void
 moea_kenter_attr(mmu_t mmu, vm_offset_t va, vm_offset_t pa, vm_memattr_t ma)
 {
        u_int           pte_lo;
-       int             error;  
+       int             error;
 
 #if 0
        if (va < VM_MIN_KERNEL_ADDRESS)
@@ -1637,7 +1622,7 @@ moea_pinit(mmu_t mmu, pmap_t pmap)
            == NULL) {
                pmap->pmap_phys = pmap;
        }
-       
+
 
        mtx_lock(&moea_vsid_mutex);
        /*
@@ -1782,7 +1767,7 @@ void
 moea_release(mmu_t mmu, pmap_t pmap)
 {
         int idx, mask;
-        
+
        /*
         * Free segment register's VSID
         */
@@ -1957,7 +1942,7 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon
        } else {
                if (moea_bpvo_pool_index >= BPVO_POOL_SIZE) {
                        panic("moea_enter: bpvo pool exhausted, %d, %d, %d",
-                             moea_bpvo_pool_index, BPVO_POOL_SIZE, 
+                             moea_bpvo_pool_index, BPVO_POOL_SIZE,
                              BPVO_POOL_SIZE * sizeof(struct pvo_entry));
                }
                pvo = &moea_bpvo_pool[moea_bpvo_pool_index];
@@ -2307,7 +2292,7 @@ moea_pte_spillable_ident(u_int ptegidx)
                if (!(pt->pte_lo & PTE_REF))
                        return (pvo_walk);
        }
-       
+
        return (pvo);
 }
 
@@ -2504,7 +2489,7 @@ moea_bat_mapped(int idx, vm_offset_t pa,
         */
        prot = battable[idx].batl & (BAT_I|BAT_G|BAT_PP_RW);
        if (prot != (BAT_I|BAT_G|BAT_PP_RW))
-               return (EPERM); 
+               return (EPERM);
 
        /*
         * The address should be within the BAT range. Assume that the
@@ -2527,7 +2512,7 @@ moea_dev_direct_mapped(mmu_t mmu, vm_pad
        int i;
 
        /*
-        * This currently does not work for entries that 
+        * This currently does not work for entries that
         * overlap 256M BAT segments.
         */
 
@@ -2560,7 +2545,7 @@ moea_mapdev_attr(mmu_t mmu, vm_offset_t 
        ppa = trunc_page(pa);
        offset = pa & PAGE_MASK;
        size = roundup(offset + size, PAGE_SIZE);
-       
+
        /*
         * If the physical address lies within a valid BAT table entry,
         * return the 1:1 mapping. This currently doesn't work

Modified: head/sys/powerpc/conf/NOTES
==============================================================================
--- head/sys/powerpc/conf/NOTES Tue Feb 10 04:34:39 2015        (r278494)
+++ head/sys/powerpc/conf/NOTES Tue Feb 10 06:35:16 2015        (r278495)
@@ -24,7 +24,6 @@ options       POWERMAC                #NewWorld Apple Power
 #options       PS3                     #Sony Playstation 3
 options        PSIM                    #GDB PSIM ppc simulator
 options        MAMBO                   #IBM Mambo Full System Simulator
-#options       WII                     #Nintendo Wii
 
 options        SC_OFWFB                # OFW frame buffer
 

Modified: head/sys/powerpc/ofw/ofw_syscons.c
==============================================================================
--- head/sys/powerpc/ofw/ofw_syscons.c  Tue Feb 10 04:34:39 2015        
(r278494)
+++ head/sys/powerpc/ofw/ofw_syscons.c  Tue Feb 10 06:35:16 2015        
(r278495)
@@ -412,7 +412,7 @@ ofwfb_init(int unit, video_adapter_t *ad
        adp->va_window = (vm_offset_t) ofwfb_static_window;
 
        /*
-        * Enable future font-loading and flag color support, as well as 
+        * Enable future font-loading and flag color support, as well as
         * adding V_ADP_MODECHANGE so that we ofwfb_set_mode() gets called
         * when the X server shuts down. This enables us to get the console
         * back when X disappears.
@@ -874,7 +874,7 @@ ofwfb_putc32(video_adapter_t *adp, vm_of
        addr = (uint32_t *)sc->sc_addr
                + (row + sc->sc_ymargin)*(sc->sc_stride/4)
                + col + sc->sc_xmargin;
-       
+
        fg = ofwfb_pix32(sc, ofwfb_foreground(a));
        bg = ofwfb_pix32(sc, ofwfb_background(a));
 
@@ -1000,12 +1000,6 @@ ofwfb_scidentify(driver_t *driver, devic
        device_t child;
 
        /*
-        * The Nintendo Wii doesn't have open firmware, so don't probe ofwfb
-        * because otherwise we will crash.
-        */
-       if (strcmp(installed_platform(), "wii") == 0)
-               return;
-       /*
         * Add with a priority guaranteed to make it last on
         * the device list
         */
@@ -1019,7 +1013,7 @@ ofwfb_scprobe(device_t dev)
 
        device_set_desc(dev, "System console");
 
-       error = sc_probe_unit(device_get_unit(dev), 
+       error = sc_probe_unit(device_get_unit(dev),
            device_get_flags(dev) | SC_AUTODETECT_KBD);
        if (error != 0)
                return (error);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to