Date: Thu, 16 Nov 2017 14:27:02 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325892 - in head/sys: conf i386/conf i386/i386 i386/include i386/pci i386/xbox isa x86/x86 Message-ID: <201711161427.vAGER2xj039311@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Nov 16 14:27:02 2017 New Revision: 325892 URL: https://svnweb.freebsd.org/changeset/base/325892 Log: Remove i386 XBOX support. It is for console presented at 2001 and featuring Pentium III processor. Even if any of them are still alive and run FreeBSD, we do not have any sign of life from their users. While removing another dozens of #ifdefs from the i386 sources reduces the aversion from looking at the code and improves the platform vitality. Reviewed by: cem, pfg, rink (XBOX support author) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D13016 Deleted: head/sys/i386/conf/XBOX head/sys/i386/include/xbox.h head/sys/i386/xbox/ Modified: head/sys/conf/files.i386 head/sys/conf/options head/sys/i386/conf/NOTES head/sys/i386/i386/machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/vm_machdep.c head/sys/i386/pci/pci_cfgreg.c head/sys/isa/syscons_isa.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/conf/files.i386 Thu Nov 16 14:27:02 2017 (r325892) @@ -549,10 +549,6 @@ libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard libkern/x86/crc32_sse42.c standard -i386/xbox/xbox.c optional xbox -i386/xbox/xboxfb.c optional xboxfb -dev/fb/boot_font.c optional xboxfb -i386/xbox/pic16l.s optional xbox # # x86 real mode BIOS support, required by dpms/pci/vesa # Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/conf/options Thu Nov 16 14:27:02 2017 (r325892) @@ -892,9 +892,6 @@ HWPMC_DEBUG opt_global.h HWPMC_HOOKS HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h -# XBOX options for FreeBSD/i386, but some files are MI -XBOX opt_xbox.h - # Interrupt filtering INTR_FILTER Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/conf/NOTES Thu Nov 16 14:27:02 2017 (r325892) @@ -221,23 +221,6 @@ options NPX_DEBUG # enable npx debugging # options PERFMON -# -# XBOX causes the kernel to be bootable on the Microsoft XBox console system. -# The resulting kernel will auto-detect whether it is being booted on a XBox, -# so kernels compiled with this option will also work on an ordinary PC. -# This option require I686_CPU. -# -# xboxfb includes support for the XBox frame buffer device. It is fully USB- -# keyboard aware, and will only be used if an xbox is detected. This option -# (obviously) requires XBOX support in your kernel. -# -# NOTE: xboxfb currently conflicts with syscons(4); if you have an XBOX and -# include both in your kernel; you will not get any video output. Ordinary -# PC's do not suffer from this. -# -options XBOX -device xboxfb - ##################################################################### # NETWORKING OPTIONS Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/i386/machdep.c Thu Nov 16 14:27:02 2017 (r325892) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include "opt_mp_watchdog.h" #include "opt_perfmon.h" #include "opt_platform.h" -#include "opt_xbox.h" #include <sys/param.h> #include <sys/proc.h> @@ -148,13 +147,6 @@ __FBSDID("$FreeBSD$"); #include <x86/isa/icu.h> #endif -#ifdef XBOX -#include <machine/xbox.h> - -int arch_i386_is_xbox = 0; -uint32_t arch_i386_xbox_memsize = 0; -#endif - /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); @@ -1780,18 +1772,6 @@ getmemsize(int first) caddr_t kmdp; has_smap = 0; -#ifdef XBOX - if (arch_i386_is_xbox) { - /* - * We queried the memory size before, so chop off 4MB for - * the framebuffer and inform the OS of this. - */ - physmap[0] = 0; - physmap[1] = (arch_i386_xbox_memsize * 1024 * 1024) - XBOX_FB_SIZE; - physmap_idx = 0; - goto physmap_done; - } -#endif bzero(&vmf, sizeof(vmf)); bzero(physmap, sizeof(physmap)); basemem = 0; @@ -2299,28 +2279,6 @@ init386(int first) r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (int) idt; lidt(&r_idt); - -#ifdef XBOX - /* - * The following code queries the PCI ID of 0:0:0. For the XBOX, - * This should be 0x10de / 0x02a5. - * - * This is exactly what Linux does. - */ - outl(0xcf8, 0x80000000); - if (inl(0xcfc) == 0x02a510de) { - arch_i386_is_xbox = 1; - pic16l_setled(XBOX_LED_GREEN); - - /* - * We are an XBOX, but we may have either 64MB or 128MB of - * memory. The PCI host bridge should be programmed for this, - * so we just query it. - */ - outl(0xcf8, 0x80000084); - arch_i386_xbox_memsize = (inl(0xcfc) == 0x7FFFFFF) ? 128 : 64; - } -#endif /* XBOX */ /* * Initialize the clock before the console so that console Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/i386/pmap.c Thu Nov 16 14:27:02 2017 (r325892) @@ -101,7 +101,6 @@ __FBSDID("$FreeBSD$"); #include "opt_pmap.h" #include "opt_smp.h" #include "opt_vm.h" -#include "opt_xbox.h" #include <sys/param.h> #include <sys/systm.h> @@ -149,10 +148,6 @@ __FBSDID("$FreeBSD$"); #include <machine/smp.h> #endif -#ifdef XBOX -#include <machine/xbox.h> -#endif - #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -501,12 +496,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) * physical memory region that is used by the ACPI wakeup code. This * mapping must not have PG_G set. */ -#ifdef XBOX - /* FIXME: This is gross, but needed for the XBOX. Since we are in such - * an early stadium, we cannot yet neatly map video memory ... :-( - * Better fixes are very welcome! */ - if (!arch_i386_is_xbox) -#endif for (i = 1; i < NKPT; i++) PTD[i] = 0; Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/i386/vm_machdep.c Thu Nov 16 14:27:02 2017 (r325892) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include "opt_npx.h" #include "opt_reset.h" #include "opt_cpu.h" -#include "opt_xbox.h" #include <sys/param.h> #include <sys/systm.h> @@ -91,10 +90,6 @@ __FBSDID("$FreeBSD$"); #include <isa/isareg.h> -#ifdef XBOX -#include <machine/xbox.h> -#endif - #ifndef NSFBUFS #define NSFBUFS (512 + maxusers * 16) #endif @@ -600,14 +595,6 @@ cpu_reset_proxy() void cpu_reset() { -#ifdef XBOX - if (arch_i386_is_xbox) { - /* Kick the PIC16L, it can reboot the box */ - pic16l_reboot(); - for (;;); - } -#endif - #ifdef SMP cpuset_t map; u_int cnt; Modified: head/sys/i386/pci/pci_cfgreg.c ============================================================================== --- head/sys/i386/pci/pci_cfgreg.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/pci/pci_cfgreg.c Thu Nov 16 14:27:02 2017 (r325892) @@ -30,8 +30,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_xbox.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -52,10 +50,6 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_extern.h> #include <vm/pmap.h> -#ifdef XBOX -#include <machine/xbox.h> -#endif - #define PRVERB(a) do { \ if (bootverbose) \ printf a ; \ @@ -252,39 +246,6 @@ static int pci_cfgenable(unsigned bus, unsigned slot, unsigned func, int reg, int bytes) { int dataport = 0; - -#ifdef XBOX - if (arch_i386_is_xbox) { - /* - * The Xbox MCPX chipset is a derivative of the nForce 1 - * chipset. It almost has the same bus layout; some devices - * cannot be used, because they have been removed. - */ - - /* - * Devices 00:00.1 and 00:00.2 used to be memory controllers on - * the nForce chipset, but on the Xbox, using them will lockup - * the chipset. - */ - if (bus == 0 && slot == 0 && (func == 1 || func == 2)) - return dataport; - - /* - * Bus 1 only contains a VGA controller at 01:00.0. When you try - * to probe beyond that device, you only get garbage, which - * could cause lockups. - */ - if (bus == 1 && (slot != 0 || func != 0)) - return dataport; - - /* - * Bus 2 used to contain the AGP controller, but the Xbox MCPX - * doesn't have one. Probing it can cause lockups. - */ - if (bus >= 2) - return dataport; - } -#endif if (bus <= PCI_BUSMAX && slot < devmax Modified: head/sys/isa/syscons_isa.c ============================================================================== --- head/sys/isa/syscons_isa.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/isa/syscons_isa.c Thu Nov 16 14:27:02 2017 (r325892) @@ -60,12 +60,6 @@ __FBSDID("$FreeBSD$"); #include <isa/isavar.h> -#include "opt_xbox.h" - -#ifdef XBOX -#include <machine/xbox.h> -#endif - static devclass_t sc_devclass; static sc_softc_t main_softc; @@ -157,19 +151,6 @@ sc_get_cons_priority(int *unit, int *flags) { const char *at; int f, u; - -#ifdef XBOX - /* - * The XBox Loader does not support hints, which makes our initial - * console probe fail. Therefore, if an XBox is found, we hardcode the - * existence of the console, as it is always there anyway. - */ - if (arch_i386_is_xbox) { - *unit = 0; - *flags = SC_KERNEL_CONSOLE; - return (CN_INTERNAL); - } -#endif *unit = -1; for (u = 0; u < 16; u++) { Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/x86/x86/cpu_machdep.c Thu Nov 16 14:27:02 2017 (r325892) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" #ifdef __i386__ #include "opt_apic.h" -#include "opt_xbox.h" #endif #include <sys/param.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711161427.vAGER2xj039311>