Date: Fri, 30 Mar 2012 19:10:14 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r233707 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include i386/xbox pc98/include x86/include x86/pci x86/x86 Message-ID: <201203301910.q2UJAE5q054456@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Mar 30 19:10:14 2012 New Revision: 233707 URL: http://svn.freebsd.org/changeset/base/233707 Log: Move the legacy(4) driver to x86. Added: head/sys/x86/include/legacyvar.h - copied, changed from r233702, head/sys/amd64/include/legacyvar.h head/sys/x86/x86/legacy.c - copied, changed from r233702, head/sys/i386/i386/legacy.c Deleted: head/sys/amd64/amd64/legacy.c head/sys/amd64/include/legacyvar.h head/sys/i386/i386/legacy.c head/sys/i386/include/legacyvar.h head/sys/pc98/include/legacyvar.h Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/xbox/xboxfb.c head/sys/x86/pci/pci_bus.c head/sys/x86/x86/mptable_pci.c Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Mar 30 17:38:57 2012 (r233706) +++ head/sys/conf/files.amd64 Fri Mar 30 19:10:14 2012 (r233707) @@ -113,7 +113,6 @@ amd64/amd64/identcpu.c standard amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard amd64/amd64/io.c optional io -amd64/amd64/legacy.c standard amd64/amd64/locore.S standard no-obj amd64/amd64/machdep.c standard amd64/amd64/mem.c optional mem @@ -477,6 +476,7 @@ x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c standard +x86/x86/legacy.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard x86/x86/mptable.c optional mptable Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Mar 30 17:38:57 2012 (r233706) +++ head/sys/conf/files.i386 Fri Mar 30 19:10:14 2012 (r233707) @@ -408,7 +408,6 @@ i386/i386/in_cksum.c optional inet | in i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem -i386/i386/legacy.c optional native i386/i386/locore.s optional native no-obj i386/xen/locore.s optional xen no-obj i386/i386/longrun.c optional cpu_enable_longrun @@ -529,6 +528,7 @@ x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic +x86/x86/legacy.c optional native x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/mptable.c optional apic native Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Fri Mar 30 17:38:57 2012 (r233706) +++ head/sys/conf/files.pc98 Fri Mar 30 19:10:14 2012 (r233707) @@ -147,7 +147,6 @@ i386/i386/in_cksum.c optional inet | in i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem -i386/i386/legacy.c standard i386/i386/locore.s standard no-obj i386/i386/mem.c optional mem i386/i386/minidump_machdep.c standard @@ -252,6 +251,7 @@ x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic +x86/x86/legacy.c standard x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/mptable.c optional apic Modified: head/sys/i386/xbox/xboxfb.c ============================================================================== --- head/sys/i386/xbox/xboxfb.c Fri Mar 30 17:38:57 2012 (r233706) +++ head/sys/i386/xbox/xboxfb.c Fri Mar 30 19:10:14 2012 (r233707) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <machine/bus.h> #include <machine/xbox.h> -#include <machine/legacyvar.h> +#include <x86/legacyvar.h> #include <dev/fb/fbreg.h> #include <dev/fb/gfb.h> #include <dev/syscons/syscons.h> Copied and modified: head/sys/x86/include/legacyvar.h (from r233702, head/sys/amd64/include/legacyvar.h) ============================================================================== --- head/sys/amd64/include/legacyvar.h Fri Mar 30 16:32:41 2012 (r233702, copy source) +++ head/sys/x86/include/legacyvar.h Fri Mar 30 19:10:14 2012 (r233707) @@ -26,8 +26,8 @@ * $FreeBSD$ */ -#ifndef _MACHINE_LEGACYVAR_H_ -#define _MACHINE_LEGACYVAR_H_ +#ifndef _X86_LEGACYVAR_H_ +#define _X86_LEGACYVAR_H_ enum legacy_device_ivars { LEGACY_IVAR_PCIDOMAIN, @@ -60,4 +60,4 @@ struct resource *legacy_pcib_alloc_resou int legacy_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); -#endif /* !_MACHINE_LEGACYVAR_H_ */ +#endif /* !_X86_LEGACYVAR_H_ */ Modified: head/sys/x86/pci/pci_bus.c ============================================================================== --- head/sys/x86/pci/pci_bus.c Fri Mar 30 17:38:57 2012 (r233706) +++ head/sys/x86/pci/pci_bus.c Fri Mar 30 19:10:14 2012 (r233707) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #ifdef CPU_ELAN #include <machine/md_var.h> #endif -#include <machine/legacyvar.h> +#include <x86/legacyvar.h> #include <machine/pci_cfgreg.h> #include <machine/resource.h> Copied and modified: head/sys/x86/x86/legacy.c (from r233702, head/sys/i386/i386/legacy.c) ============================================================================== --- head/sys/i386/i386/legacy.c Fri Mar 30 16:32:41 2012 (r233702, copy source) +++ head/sys/x86/x86/legacy.c Fri Mar 30 19:10:14 2012 (r233707) @@ -27,6 +27,10 @@ * SUCH DAMAGE. */ +#ifdef __i386__ +#include "opt_eisa.h" +#include "opt_mca.h" +#endif #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -47,14 +51,13 @@ __FBSDID("$FreeBSD$"); #include <sys/rman.h> #include <sys/smp.h> -#include "opt_mca.h" #ifdef DEV_MCA #include <i386/bios/mca_machdep.h> #endif #include <machine/clock.h> -#include <machine/legacyvar.h> #include <machine/resource.h> +#include <x86/legacyvar.h> static MALLOC_DEFINE(M_LEGACYDEV, "legacydrv", "legacy system device"); struct legacy_device { @@ -129,11 +132,11 @@ legacy_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); -#ifndef PC98 /* * If we didn't see EISA or ISA on a pci bridge, create some * connection points now so they show up "on motherboard". */ +#ifdef DEV_EISA if (!devclass_get_device(devclass_find("eisa"), 0)) { child = BUS_ADD_CHILD(dev, 0, "eisa", 0); if (child == NULL) Modified: head/sys/x86/x86/mptable_pci.c ============================================================================== --- head/sys/x86/x86/mptable_pci.c Fri Mar 30 17:38:57 2012 (r233706) +++ head/sys/x86/x86/mptable_pci.c Fri Mar 30 19:10:14 2012 (r233707) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include <dev/pci/pcivar.h> #include <dev/pci/pcib_private.h> #include <x86/mptable.h> -#include <machine/legacyvar.h> +#include <x86/legacyvar.h> #include <machine/pci_cfgreg.h> #include "pcib_if.h"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203301910.q2UJAE5q054456>