ia64/xen-unstable

changeset 1281:58faf9c981d8

bitkeeper revision 1.842.1.1 (40715b38BNfFZvL7yV9c1GJbSaAK0g)

Many files:
new file
Upgrade Xen APIC and ACPI and PCI subsystems to new features and fixes in latest Linux 2.4.
acpi.c:
Rename: xen/arch/i386/acpitable.c -> xen/arch/i386/acpi.c
.del-acpitable.h~539b823a64c2b9d8:
Delete: xen/arch/i386/acpitable.h
author kaf24@scramble.cl.cam.ac.uk
date Mon Apr 05 13:12:24 2004 +0000 (2004-04-05)
parents 163ed7bfd989
children 66f0f14f0320
files .rootkeys xen/Rules.mk xen/arch/i386/acpi.c xen/arch/i386/acpitable.c xen/arch/i386/acpitable.h xen/arch/i386/apic.c xen/arch/i386/io_apic.c xen/arch/i386/mpparse.c xen/arch/i386/pci-i386.c xen/arch/i386/pci-i386.h xen/arch/i386/pci-irq.c xen/arch/i386/pci-pc.c xen/arch/i386/setup.c xen/drivers/Makefile xen/drivers/acpi/Makefile xen/drivers/acpi/acpi_ksyms.c xen/drivers/acpi/tables.c xen/drivers/acpi_ksyms.c xen/drivers/ide/ide-probe.c xen/drivers/pci/pci.c xen/drivers/pci/pci.ids xen/drivers/pci/quirks.c xen/drivers/pci/setup-bus.c xen/drivers/tables.c xen/include/acpi/acconfig.h xen/include/acpi/acdebug.h xen/include/acpi/acdisasm.h xen/include/acpi/acdispat.h xen/include/acpi/acevents.h xen/include/acpi/acexcep.h xen/include/acpi/acglobal.h xen/include/acpi/achware.h xen/include/acpi/acinterp.h xen/include/acpi/aclocal.h xen/include/acpi/acmacros.h xen/include/acpi/acnamesp.h xen/include/acpi/acobject.h xen/include/acpi/acoutput.h xen/include/acpi/acparser.h xen/include/acpi/acpi.h xen/include/acpi/acpi_bus.h xen/include/acpi/acpi_drivers.h xen/include/acpi/acpiosxf.h xen/include/acpi/acpixf.h xen/include/acpi/acresrc.h xen/include/acpi/acstruct.h xen/include/acpi/actables.h xen/include/acpi/actbl.h xen/include/acpi/actbl1.h xen/include/acpi/actbl2.h xen/include/acpi/actbl71.h xen/include/acpi/actypes.h xen/include/acpi/acutils.h xen/include/acpi/amlcode.h xen/include/acpi/amlresrc.h xen/include/acpi/platform/acenv.h xen/include/acpi/platform/acgcc.h xen/include/acpi/platform/aclinux.h xen/include/asm-i386/acpi.h xen/include/asm-i386/apic.h xen/include/asm-i386/apicdef.h xen/include/asm-i386/config.h xen/include/asm-i386/cpufeature.h xen/include/asm-i386/div64.h xen/include/asm-i386/dma.h xen/include/asm-i386/fixmap.h xen/include/asm-i386/hardirq.h xen/include/asm-i386/hdreg.h xen/include/asm-i386/io_apic.h xen/include/asm-i386/mpspec.h xen/include/asm-i386/pci.h xen/include/asm-i386/processor.h xen/include/asm-i386/smp.h xen/include/asm-i386/smpboot.h xen/include/asm-i386/time.h xen/include/xen/acpi.h xen/include/xen/pci.h xen/include/xen/pci_ids.h
line diff
     1.1 --- a/.rootkeys	Mon Apr 05 08:23:33 2004 +0000
     1.2 +++ b/.rootkeys	Mon Apr 05 13:12:24 2004 +0000
     1.3 @@ -120,8 +120,7 @@ 3ddb79bcbOVHh38VJzc97-JEGD4dJQ xen/Makef
     1.4  3ddb79bcWnTwYsQRWl_PaneJfa6p0w xen/Rules.mk
     1.5  3ddb79bcZbRBzT3elFWSX7u6NtMagQ xen/arch/i386/Makefile
     1.6  3ddb79bcBQF85CfLS4i1WGZ4oLLaCA xen/arch/i386/Rules.mk
     1.7 -3e5636e5FAYZ5_vQnmgwFJfSdmO5Mw xen/arch/i386/acpitable.c
     1.8 -3e5636e7NRe-LqmOmyagUFWr70bcag xen/arch/i386/acpitable.h
     1.9 +3e5636e5FAYZ5_vQnmgwFJfSdmO5Mw xen/arch/i386/acpi.c
    1.10  3ddb79bcsjinG9k1KcvbVBuas1R2dA xen/arch/i386/apic.c
    1.11  3ddb79bcSC_LvnmFlX-T5iTgaR0SKg xen/arch/i386/boot/boot.S
    1.12  3ddb79bcUrk2EIaM5VsT6wUudH1kkg xen/arch/i386/delay.c
    1.13 @@ -187,6 +186,10 @@ 3ddb79bdQqFHtHRGEO2dsxGgo6eAhw xen/commo
    1.14  403a3edbejm33XLTGMuinKEwQBrOIg xen/common/trace.c
    1.15  3ddb79bd3zgV33PHdt-cgh3sxcb1hw xen/common/vsprintf.c
    1.16  3ddb79c0ppNeJtjC4va8j41ADCnchA xen/drivers/Makefile
    1.17 +40715b2bi9gU43-cYzlmPDgreYQchw xen/drivers/acpi/Makefile
    1.18 +40715b2bDxNCz5LFV8FAXihmYJZFUQ xen/drivers/acpi/acpi_ksyms.c
    1.19 +40715b2cNVOegtvyft_AHFKJYRprfA xen/drivers/acpi/tables.c
    1.20 +40715b2br9s0oHQxre-rWM8KSpa0RA xen/drivers/acpi_ksyms.c
    1.21  3ddb79beWzgPS8ozf2BL2g3ZkiWhhQ xen/drivers/block/Makefile
    1.22  3ddb79be04dyXzyXqDbMRS_1funwXQ xen/drivers/block/blkpg.c
    1.23  400be8220k_K_8-GFqi_KI7DtnG4wg xen/drivers/block/cciss.c
    1.24 @@ -397,6 +400,42 @@ 3fd432fbHyYMzfNAB_5mKGOvh1HTrg xen/drive
    1.25  3fd432fbFBLr85q2xIgdvDR7S2kvlw xen/drivers/scsi/sym53c8xx_2/sym_misc.c
    1.26  3fd432fbOri8Ue9-QTi6X-WviC2JYA xen/drivers/scsi/sym53c8xx_2/sym_misc.h
    1.27  3fd432fbM9qma6nz_-GWRpZ7v1pqrg xen/drivers/scsi/sym53c8xx_2/sym_nvram.c
    1.28 +40715b2bZb6VFx6gPELSuItqa-E84w xen/drivers/tables.c
    1.29 +40715b2cFpte_UNWnBZW0Du7z9AhTQ xen/include/acpi/acconfig.h
    1.30 +40715b2cEQWX-PaxEH30qI48K1krnQ xen/include/acpi/acdebug.h
    1.31 +40715b2c_7j-oy3ZNAuqE3IFNPzArg xen/include/acpi/acdisasm.h
    1.32 +40715b2cFdcPx-2FHGM1Q-M-592xYQ xen/include/acpi/acdispat.h
    1.33 +40715b2cKqD_Lihnlmvnyl4AAl3EFw xen/include/acpi/acevents.h
    1.34 +40715b2ctNvVZ058w8eM8DR9hOat_A xen/include/acpi/acexcep.h
    1.35 +40715b2com8I01qcHcAw47e93XsCqQ xen/include/acpi/acglobal.h
    1.36 +40715b2cS1t4uI3sMsu-c0M4qqAIrw xen/include/acpi/achware.h
    1.37 +40715b2chSz545A4Tq-y3WAtanzPMQ xen/include/acpi/acinterp.h
    1.38 +40715b2cGf23lRI58NphiaDQl698-w xen/include/acpi/aclocal.h
    1.39 +40715b2cdG7tCF2NMk0j1RCQQPzPXg xen/include/acpi/acmacros.h
    1.40 +40715b2ckP2XZZDkSTehu6riuMogDA xen/include/acpi/acnamesp.h
    1.41 +40715b2c4AvHYn2-2YIyt3mx-Mm5tw xen/include/acpi/acobject.h
    1.42 +40715b2cPUXsHzmchvXx7QHAfW0nMw xen/include/acpi/acoutput.h
    1.43 +40715b2cNbYpt9CHmCHg3RG7fBdACA xen/include/acpi/acparser.h
    1.44 +40715b2cWM_6zR14U9Tp0s_q8D002A xen/include/acpi/acpi.h
    1.45 +40715b2dcJDTiROgyMk9swD_veWktA xen/include/acpi/acpi_bus.h
    1.46 +40715b2dRFlZK6apnH7WkUCBdyFXWA xen/include/acpi/acpi_drivers.h
    1.47 +40715b2dtgZhNGAzlyBMe3kqve3mqw xen/include/acpi/acpiosxf.h
    1.48 +40715b2dpW5TY7n5rzCufsDhJVWuMQ xen/include/acpi/acpixf.h
    1.49 +40715b2dp9-_D9LTjcvtf-Yopih5mQ xen/include/acpi/acresrc.h
    1.50 +40715b2djvd97KbIpt4wyJgxwqCqmg xen/include/acpi/acstruct.h
    1.51 +40715b2dRIU9cQgmTjtCRNleIJDAYg xen/include/acpi/actables.h
    1.52 +40715b2dy8ECRkSo9x0tRRueAjPx1g xen/include/acpi/actbl.h
    1.53 +40715b2ds4J-XWn9Ix-lgBiJffNgxw xen/include/acpi/actbl1.h
    1.54 +40715b2d_aMKMjKKNImJR4km52KRHA xen/include/acpi/actbl2.h
    1.55 +40715b2dxC03aemijgL-iDH_-BkKRw xen/include/acpi/actbl71.h
    1.56 +40715b2d0oQUijKwEw6SDJ4LhD8c4g xen/include/acpi/actypes.h
    1.57 +40715b2dBByvcAtRpN5mafyEYLcBWA xen/include/acpi/acutils.h
    1.58 +40715b2d_iPcZ0uUVGblPvjsHOwE5Q xen/include/acpi/amlcode.h
    1.59 +40715b2d3CdS6dIpZDTiCJRlDG3LCA xen/include/acpi/amlresrc.h
    1.60 +40715b2dKRW7A71SNaeV6zfrEzYxPw xen/include/acpi/platform/acenv.h
    1.61 +40715b2d8fYydJMcODFrV1ocLklGDg xen/include/acpi/platform/acgcc.h
    1.62 +40715b2d1yZkqyAt0kgx2xEwsatuuA xen/include/acpi/platform/aclinux.h
    1.63 +40715b2dWe0tDhx9LkLXzTQkvD49RA xen/include/asm-i386/acpi.h
    1.64  3ddb79c3l4IiQtf6MS2jIzcd-hJS8g xen/include/asm-i386/apic.h
    1.65  3ddb79c3QJYWr8LLGdonLbWmNb9pQQ xen/include/asm-i386/apicdef.h
    1.66  3ddb79c3OiG9eTsi9Dy3F_OkuRAzKA xen/include/asm-i386/atomic.h
    1.67 @@ -409,6 +448,7 @@ 3ddb79c2ADvRmdexd9y3AYK9_NTx-Q xen/inclu
    1.68  3ddb79c2jFkPAZTDmU35L6IUssYMgQ xen/include/asm-i386/debugreg.h
    1.69  3ddb79c3r9-31dIsewPV3P3i8HALsQ xen/include/asm-i386/delay.h
    1.70  3ddb79c34BFiXjBJ_cCKB0aCsV1IDw xen/include/asm-i386/desc.h
    1.71 +40715b2dTokMLYGSuD58BnxOqyWVew xen/include/asm-i386/div64.h
    1.72  3e564149UkU91RX7onzpCAmbj_IFjw xen/include/asm-i386/dma.h
    1.73  3e20b82fl1jmQiKdLy7fxMcutfpjWA xen/include/asm-i386/domain_page.h
    1.74  3ddb79c3NU8Zy40OTrq3D-i30Y3t4A xen/include/asm-i386/fixmap.h
    1.75 @@ -513,6 +553,7 @@ 3ddb79c4R4iVwqIIeychVQYmIH4FUg xen/inclu
    1.76  3ddb79c4yw_mfd4Uikn3v_IOPRpa1Q xen/include/scsi/scsicam.h
    1.77  3ddb79c4HKPMLvDBP9LxzPi_szVxGA xen/include/scsi/sg.h
    1.78  3e397e66m2tO3s-J8Jnr7Ws_tGoPTg xen/include/xen/ac_timer.h
    1.79 +40715b2epYl2jBbxzz9CI2rgIca7Zg xen/include/xen/acpi.h
    1.80  3ddb79c0nTsjSpVK4ZVTI9WwN24xtQ xen/include/xen/blk.h
    1.81  3ddb79c0dVhTHLsv6CPTf4baKix4mA xen/include/xen/blkdev.h
    1.82  3ddb79c18ePBgitnOs7GiOCFilODVw xen/include/xen/blkpg.h
     2.1 --- a/xen/Rules.mk	Mon Apr 05 08:23:33 2004 +0000
     2.2 +++ b/xen/Rules.mk	Mon Apr 05 13:12:24 2004 +0000
     2.3 @@ -19,6 +19,7 @@ OBJS    += $(patsubst %.c,%.o,$(C_SRCS))
     2.4  # Note that link order matters!
     2.5  ALL_OBJS := $(BASEDIR)/common/common.o
     2.6  ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
     2.7 +ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
     2.8  ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
     2.9  ifneq ($(nodev),y)
    2.10  ALL_OBJS += $(BASEDIR)/net/network.o
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/xen/arch/i386/acpi.c	Mon Apr 05 13:12:24 2004 +0000
     3.3 @@ -0,0 +1,676 @@
     3.4 +/*
     3.5 + *  acpi.c - Architecture-Specific Low-Level ACPI Support
     3.6 + *
     3.7 + *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
     3.8 + *  Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com>
     3.9 + *  Copyright (C) 2001 Patrick Mochel <mochel@osdl.org>
    3.10 + *
    3.11 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3.12 + *
    3.13 + *  This program is free software; you can redistribute it and/or modify
    3.14 + *  it under the terms of the GNU General Public License as published by
    3.15 + *  the Free Software Foundation; either version 2 of the License, or
    3.16 + *  (at your option) any later version.
    3.17 + *
    3.18 + *  This program is distributed in the hope that it will be useful,
    3.19 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.20 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.21 + *  GNU General Public License for more details.
    3.22 + *
    3.23 + *  You should have received a copy of the GNU General Public License
    3.24 + *  along with this program; if not, write to the Free Software
    3.25 + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3.26 + *
    3.27 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3.28 + */
    3.29 +
    3.30 +#include <xen/config.h>
    3.31 +#include <xen/kernel.h>
    3.32 +#include <xen/init.h>
    3.33 +#include <xen/types.h>
    3.34 +/*#include <xen/stddef.h>*/
    3.35 +#include <xen/slab.h>
    3.36 +#include <xen/pci.h>
    3.37 +/*#include <xen/bootmem.h>*/
    3.38 +#include <xen/irq.h>
    3.39 +#include <xen/acpi.h>
    3.40 +#include <asm/mpspec.h>
    3.41 +#include <asm/io.h>
    3.42 +#include <asm/apic.h>
    3.43 +#include <asm/apicdef.h>
    3.44 +#include <asm/page.h>
    3.45 +/*#include <asm/pgtable.h>*/
    3.46 +#include <asm/pgalloc.h>
    3.47 +#include <asm/io_apic.h>
    3.48 +#include <asm/acpi.h>
    3.49 +/*#include <asm/save_state.h>*/
    3.50 +#include <asm/smpboot.h>
    3.51 +
    3.52 +
    3.53 +#define PREFIX			"ACPI: "
    3.54 +
    3.55 +int acpi_lapic = 0;
    3.56 +int acpi_ioapic = 0;
    3.57 +
    3.58 +/* --------------------------------------------------------------------------
    3.59 +                              Boot-time Configuration
    3.60 +   -------------------------------------------------------------------------- */
    3.61 +
    3.62 +#ifdef CONFIG_ACPI_BOOT
    3.63 +int acpi_noirq __initdata = 0;  /* skip ACPI IRQ initialization */
    3.64 +int acpi_ht __initdata = 1;     /* enable HT */
    3.65 +
    3.66 +enum acpi_irq_model_id		acpi_irq_model;
    3.67 +
    3.68 +
    3.69 +/*
    3.70 + * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
    3.71 + * to map the target physical address. The problem is that set_fixmap()
    3.72 + * provides a single page, and it is possible that the page is not
    3.73 + * sufficient.
    3.74 + * By using this area, we can map up to MAX_IO_APICS pages temporarily,
    3.75 + * i.e. until the next __va_range() call.
    3.76 + *
    3.77 + * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
    3.78 + * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
    3.79 + * count idx down while incrementing the phys address.
    3.80 + */
    3.81 +char *__acpi_map_table(unsigned long phys, unsigned long size)
    3.82 +{
    3.83 +	unsigned long base, offset, mapped_size;
    3.84 +	int idx;
    3.85 +
    3.86 +	if (phys + size < 8*1024*1024) 
    3.87 +		return __va(phys); 
    3.88 +
    3.89 +	offset = phys & (PAGE_SIZE - 1);
    3.90 +	mapped_size = PAGE_SIZE - offset;
    3.91 +	set_fixmap(FIX_ACPI_END, phys);
    3.92 +	base = fix_to_virt(FIX_ACPI_END);
    3.93 +
    3.94 +	/*
    3.95 +	 * Most cases can be covered by the below.
    3.96 +	 */
    3.97 +	idx = FIX_ACPI_END;
    3.98 +	while (mapped_size < size) {
    3.99 +		if (--idx < FIX_ACPI_BEGIN)
   3.100 +			return 0;	/* cannot handle this */
   3.101 +		phys += PAGE_SIZE;
   3.102 +		set_fixmap(idx, phys);
   3.103 +		mapped_size += PAGE_SIZE;
   3.104 +	}
   3.105 +
   3.106 +	return ((unsigned char *) base + offset);
   3.107 +}
   3.108 +
   3.109 +
   3.110 +#ifdef CONFIG_X86_LOCAL_APIC
   3.111 +
   3.112 +static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
   3.113 +
   3.114 +
   3.115 +static int __init
   3.116 +acpi_parse_madt (
   3.117 +	unsigned long		phys_addr,
   3.118 +	unsigned long		size)
   3.119 +{
   3.120 +	struct acpi_table_madt	*madt = NULL;
   3.121 +
   3.122 +	if (!phys_addr || !size)
   3.123 +		return -EINVAL;
   3.124 +
   3.125 +	madt = (struct acpi_table_madt *) __acpi_map_table(phys_addr, size);
   3.126 +	if (!madt) {
   3.127 +		printk(KERN_WARNING PREFIX "Unable to map MADT\n");
   3.128 +		return -ENODEV;
   3.129 +	}
   3.130 +
   3.131 +	if (madt->lapic_address)
   3.132 +		acpi_lapic_addr = (u64) madt->lapic_address;
   3.133 +
   3.134 +	printk(KERN_INFO PREFIX "Local APIC address 0x%08x\n",
   3.135 +		madt->lapic_address);
   3.136 +
   3.137 +	detect_clustered_apic(madt->header.oem_id, madt->header.oem_table_id);
   3.138 +
   3.139 +	return 0;
   3.140 +}
   3.141 +
   3.142 +
   3.143 +static int __init
   3.144 +acpi_parse_lapic (
   3.145 +	acpi_table_entry_header *header)
   3.146 +{
   3.147 +	struct acpi_table_lapic	*processor = NULL;
   3.148 +
   3.149 +	processor = (struct acpi_table_lapic*) header;
   3.150 +	if (!processor)
   3.151 +		return -EINVAL;
   3.152 +
   3.153 +	acpi_table_print_madt_entry(header);
   3.154 +
   3.155 +	mp_register_lapic (
   3.156 +		processor->id,					   /* APIC ID */
   3.157 +		processor->flags.enabled);			  /* Enabled? */
   3.158 +
   3.159 +	return 0;
   3.160 +}
   3.161 +
   3.162 +
   3.163 +static int __init
   3.164 +acpi_parse_lapic_addr_ovr (
   3.165 +	acpi_table_entry_header *header)
   3.166 +{
   3.167 +	struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL;
   3.168 +
   3.169 +	lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr*) header;
   3.170 +	if (!lapic_addr_ovr)
   3.171 +		return -EINVAL;
   3.172 +
   3.173 +	acpi_lapic_addr = lapic_addr_ovr->address;
   3.174 +
   3.175 +	return 0;
   3.176 +}
   3.177 +
   3.178 +static int __init
   3.179 +acpi_parse_lapic_nmi (
   3.180 +	acpi_table_entry_header *header)
   3.181 +{
   3.182 +	struct acpi_table_lapic_nmi *lapic_nmi = NULL;
   3.183 +
   3.184 +	lapic_nmi = (struct acpi_table_lapic_nmi*) header;
   3.185 +	if (!lapic_nmi)
   3.186 +		return -EINVAL;
   3.187 +
   3.188 +	acpi_table_print_madt_entry(header);
   3.189 +
   3.190 +	if (lapic_nmi->lint != 1)
   3.191 +		printk(KERN_WARNING PREFIX "NMI not connected to LINT 1!\n");
   3.192 +
   3.193 +	return 0;
   3.194 +}
   3.195 +
   3.196 +#endif /*CONFIG_X86_LOCAL_APIC*/
   3.197 +
   3.198 +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
   3.199 +
   3.200 +static int __init
   3.201 +acpi_parse_ioapic (
   3.202 +	acpi_table_entry_header *header)
   3.203 +{
   3.204 +	struct acpi_table_ioapic *ioapic = NULL;
   3.205 +
   3.206 +	ioapic = (struct acpi_table_ioapic*) header;
   3.207 +	if (!ioapic)
   3.208 +		return -EINVAL;
   3.209 + 
   3.210 +	acpi_table_print_madt_entry(header);
   3.211 +
   3.212 +	mp_register_ioapic (
   3.213 +		ioapic->id,
   3.214 +		ioapic->address,
   3.215 +		ioapic->global_irq_base);
   3.216 + 
   3.217 +	return 0;
   3.218 +}
   3.219 +
   3.220 +
   3.221 +static int __init
   3.222 +acpi_parse_int_src_ovr (
   3.223 +	acpi_table_entry_header *header)
   3.224 +{
   3.225 +	struct acpi_table_int_src_ovr *intsrc = NULL;
   3.226 +
   3.227 +	intsrc = (struct acpi_table_int_src_ovr*) header;
   3.228 +	if (!intsrc)
   3.229 +		return -EINVAL;
   3.230 +
   3.231 +	acpi_table_print_madt_entry(header);
   3.232 +
   3.233 +	mp_override_legacy_irq (
   3.234 +		intsrc->bus_irq,
   3.235 +		intsrc->flags.polarity,
   3.236 +		intsrc->flags.trigger,
   3.237 +		intsrc->global_irq);
   3.238 +
   3.239 +	return 0;
   3.240 +}
   3.241 +
   3.242 +
   3.243 +static int __init
   3.244 +acpi_parse_nmi_src (
   3.245 +	acpi_table_entry_header *header)
   3.246 +{
   3.247 +	struct acpi_table_nmi_src *nmi_src = NULL;
   3.248 +
   3.249 +	nmi_src = (struct acpi_table_nmi_src*) header;
   3.250 +	if (!nmi_src)
   3.251 +		return -EINVAL;
   3.252 +
   3.253 +	acpi_table_print_madt_entry(header);
   3.254 +
   3.255 +	/* TBD: Support nimsrc entries? */
   3.256 +
   3.257 +	return 0;
   3.258 +}
   3.259 +
   3.260 +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/
   3.261 +
   3.262 +
   3.263 +static unsigned long __init
   3.264 +acpi_scan_rsdp (
   3.265 +	unsigned long		start,
   3.266 +	unsigned long		length)
   3.267 +{
   3.268 +	unsigned long		offset = 0;
   3.269 +	unsigned long		sig_len = sizeof("RSD PTR ") - 1;
   3.270 +
   3.271 +	/*
   3.272 +	 * Scan all 16-byte boundaries of the physical memory region for the
   3.273 +	 * RSDP signature.
   3.274 +	 */
   3.275 +	for (offset = 0; offset < length; offset += 16) {
   3.276 +		if (strncmp((char *) (start + offset), "RSD PTR ", sig_len))
   3.277 +			continue;
   3.278 +		return (start + offset);
   3.279 +	}
   3.280 +
   3.281 +	return 0;
   3.282 +}
   3.283 +
   3.284 +
   3.285 +unsigned long __init
   3.286 +acpi_find_rsdp (void)
   3.287 +{
   3.288 +	unsigned long		rsdp_phys = 0;
   3.289 +
   3.290 +	/*
   3.291 +	 * Scan memory looking for the RSDP signature. First search EBDA (low
   3.292 +	 * memory) paragraphs and then search upper memory (E0000-FFFFF).
   3.293 +	 */
   3.294 +	rsdp_phys = acpi_scan_rsdp (0, 0x400);
   3.295 +	if (!rsdp_phys)
   3.296 +		rsdp_phys = acpi_scan_rsdp (0xE0000, 0xFFFFF);
   3.297 +
   3.298 +	return rsdp_phys;
   3.299 +}
   3.300 +
   3.301 +
   3.302 +/*
   3.303 + * acpi_boot_init()
   3.304 + *  called from setup_arch(), always.
   3.305 + *	1. maps ACPI tables for later use
   3.306 + *	2. enumerates lapics
   3.307 + *	3. enumerates io-apics
   3.308 + *
   3.309 + * side effects:
   3.310 + * 	acpi_lapic = 1 if LAPIC found
   3.311 + *	acpi_ioapic = 1 if IOAPIC found
   3.312 + *	if (acpi_lapic && acpi_ioapic) smp_found_config = 1;
   3.313 + *	if acpi_blacklisted() acpi_disabled = 1;
   3.314 + *	acpi_irq_model=...
   3.315 + *	...
   3.316 + *
   3.317 + * return value: (currently ignored)
   3.318 + *	0: success
   3.319 + *	!0: failure
   3.320 + */
   3.321 +int __init
   3.322 +acpi_boot_init (void)
   3.323 +{
   3.324 +	int			result = 0;
   3.325 +
   3.326 +	if (acpi_disabled && !acpi_ht)
   3.327 +		return(1);
   3.328 +
   3.329 +	/*
   3.330 +	 * The default interrupt routing model is PIC (8259).  This gets
   3.331 +	 * overriden if IOAPICs are enumerated (below).
   3.332 +	 */
   3.333 +	acpi_irq_model = ACPI_IRQ_MODEL_PIC;
   3.334 +
   3.335 +	/* 
   3.336 +	 * Initialize the ACPI boot-time table parser.
   3.337 +	 */
   3.338 +	result = acpi_table_init();
   3.339 +	if (result) {
   3.340 +		acpi_disabled = 1;
   3.341 +		return result;
   3.342 +	}
   3.343 +
   3.344 +	result = acpi_blacklisted();
   3.345 +	if (result) {
   3.346 +		printk(KERN_NOTICE PREFIX "BIOS listed in blacklist, disabling ACPI support\n");
   3.347 +		acpi_disabled = 1;
   3.348 +		return result;
   3.349 +	}
   3.350 +
   3.351 +#ifdef CONFIG_X86_LOCAL_APIC
   3.352 +
   3.353 +	/* 
   3.354 +	 * MADT
   3.355 +	 * ----
   3.356 +	 * Parse the Multiple APIC Description Table (MADT), if exists.
   3.357 +	 * Note that this table provides platform SMP configuration 
   3.358 +	 * information -- the successor to MPS tables.
   3.359 +	 */
   3.360 +
   3.361 +	result = acpi_table_parse(ACPI_APIC, acpi_parse_madt);
   3.362 +	if (!result) {
   3.363 +		return 0;
   3.364 +	}
   3.365 +	else if (result < 0) {
   3.366 +		printk(KERN_ERR PREFIX "Error parsing MADT\n");
   3.367 +		return result;
   3.368 +	}
   3.369 +	else if (result > 1) 
   3.370 +		printk(KERN_WARNING PREFIX "Multiple MADT tables exist\n");
   3.371 +
   3.372 +	/* 
   3.373 +	 * Local APIC
   3.374 +	 * ----------
   3.375 +	 * Note that the LAPIC address is obtained from the MADT (32-bit value)
   3.376 +	 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
   3.377 +	 */
   3.378 +
   3.379 +	result = acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr);
   3.380 +	if (result < 0) {
   3.381 +		printk(KERN_ERR PREFIX "Error parsing LAPIC address override entry\n");
   3.382 +		return result;
   3.383 +	}
   3.384 +
   3.385 +	mp_register_lapic_address(acpi_lapic_addr);
   3.386 +
   3.387 +	result = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic);
   3.388 +	if (!result) { 
   3.389 +		printk(KERN_ERR PREFIX "No LAPIC entries present\n");
   3.390 +		/* TBD: Cleanup to allow fallback to MPS */
   3.391 +		return -ENODEV;
   3.392 +	}
   3.393 +	else if (result < 0) {
   3.394 +		printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
   3.395 +		/* TBD: Cleanup to allow fallback to MPS */
   3.396 +		return result;
   3.397 +	}
   3.398 +
   3.399 +	result = acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi);
   3.400 +	if (result < 0) {
   3.401 +		printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
   3.402 +		/* TBD: Cleanup to allow fallback to MPS */
   3.403 +		return result;
   3.404 +	}
   3.405 +
   3.406 +	acpi_lapic = 1;
   3.407 +
   3.408 +#endif /*CONFIG_X86_LOCAL_APIC*/
   3.409 +
   3.410 +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
   3.411 +
   3.412 +	/* 
   3.413 +	 * I/O APIC 
   3.414 +	 * --------
   3.415 +	 */
   3.416 +
   3.417 +	/*
   3.418 +	 * ACPI interpreter is required to complete interrupt setup,
   3.419 +	 * so if it is off, don't enumerate the io-apics with ACPI.
   3.420 +	 * If MPS is present, it will handle them,
   3.421 +	 * otherwise the system will stay in PIC mode
   3.422 +	 */
   3.423 +	if (acpi_disabled || acpi_noirq) {
   3.424 +		return 1;
   3.425 +	}
   3.426 +
   3.427 +	/*
   3.428 +	 * if "noapic" boot option, don't look for IO-APICs
   3.429 +	 */
   3.430 +	if (ioapic_setup_disabled()) {
   3.431 +		printk(KERN_INFO PREFIX "Skipping IOAPIC probe "
   3.432 +			"due to 'noapic' option.\n");
   3.433 +		return 1;
   3.434 +        }
   3.435 +
   3.436 +
   3.437 +	result = acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic);
   3.438 +	if (!result) { 
   3.439 +		printk(KERN_ERR PREFIX "No IOAPIC entries present\n");
   3.440 +		return -ENODEV;
   3.441 +	}
   3.442 +	else if (result < 0) {
   3.443 +		printk(KERN_ERR PREFIX "Error parsing IOAPIC entry\n");
   3.444 +		return result;
   3.445 +	}
   3.446 +
   3.447 +	/* Build a default routing table for legacy (ISA) interrupts. */
   3.448 +	mp_config_acpi_legacy_irqs();
   3.449 +
   3.450 +	result = acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr);
   3.451 +	if (result < 0) {
   3.452 +		printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n");
   3.453 +		/* TBD: Cleanup to allow fallback to MPS */
   3.454 +		return result;
   3.455 +	}
   3.456 +
   3.457 +	result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src);
   3.458 +	if (result < 0) {
   3.459 +		printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
   3.460 +		/* TBD: Cleanup to allow fallback to MPS */
   3.461 +		return result;
   3.462 +	}
   3.463 +
   3.464 +	acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
   3.465 +
   3.466 +	acpi_irq_balance_set(NULL);
   3.467 +
   3.468 +	acpi_ioapic = 1;
   3.469 +
   3.470 +	if (acpi_lapic && acpi_ioapic)
   3.471 +		smp_found_config = 1;
   3.472 +
   3.473 +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/
   3.474 +
   3.475 +	return 0;
   3.476 +}
   3.477 +
   3.478 +#endif /*CONFIG_ACPI_BOOT*/
   3.479 +
   3.480 +#ifdef	CONFIG_ACPI_BUS
   3.481 +/*
   3.482 + * "acpi_pic_sci=level" (current default)
   3.483 + * programs the PIC-mode SCI to Level Trigger.
   3.484 + * (NO-OP if the BIOS set Level Trigger already)
   3.485 + *
   3.486 + * If a PIC-mode SCI is not recogznied or gives spurious IRQ7's
   3.487 + * it may require Edge Trigger -- use "acpi_pic_sci=edge"
   3.488 + * (NO-OP if the BIOS set Edge Trigger already)
   3.489 + *
   3.490 + * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers
   3.491 + * for the 8259 PIC.  bit[n] = 1 means irq[n] is Level, otherwise Edge.
   3.492 + * ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0)
   3.493 + * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
   3.494 + */
   3.495 +
   3.496 +static __initdata int	acpi_pic_sci_trigger;	/* 0: level, 1: edge */
   3.497 +
   3.498 +void __init
   3.499 +acpi_pic_sci_set_trigger(unsigned int irq)
   3.500 +{
   3.501 +	unsigned char mask = 1 << (irq & 7);
   3.502 +	unsigned int port = 0x4d0 + (irq >> 3);
   3.503 +	unsigned char val = inb(port);
   3.504 +
   3.505 +	
   3.506 +	printk(PREFIX "IRQ%d SCI:", irq);
   3.507 +	if (!(val & mask)) {
   3.508 +		printk(" Edge");
   3.509 +
   3.510 +		if (!acpi_pic_sci_trigger) {
   3.511 +			printk(" set to Level");
   3.512 +			outb(val | mask, port);
   3.513 +		}
   3.514 +	} else {
   3.515 +		printk(" Level");
   3.516 +
   3.517 +		if (acpi_pic_sci_trigger) {
   3.518 +			printk(" set to Edge");
   3.519 +			outb(val | mask, port);
   3.520 +		}
   3.521 +	}
   3.522 +	printk(" Trigger.\n");
   3.523 +}
   3.524 +
   3.525 +int __init
   3.526 +acpi_pic_sci_setup(char *str)
   3.527 +{
   3.528 +	while (str && *str) {
   3.529 +		if (strncmp(str, "level", 5) == 0)
   3.530 +			acpi_pic_sci_trigger = 0;	/* force level trigger */
   3.531 +		if (strncmp(str, "edge", 4) == 0)
   3.532 +			acpi_pic_sci_trigger = 1;	/* force edge trigger */
   3.533 +		str = strchr(str, ',');
   3.534 +		if (str)
   3.535 +			str += strspn(str, ", \t");
   3.536 +	}
   3.537 +	return 1;
   3.538 +}
   3.539 +
   3.540 +__setup("acpi_pic_sci=", acpi_pic_sci_setup);
   3.541 +
   3.542 +#endif /* CONFIG_ACPI_BUS */
   3.543 +
   3.544 +
   3.545 +
   3.546 +/* --------------------------------------------------------------------------
   3.547 +                              Low-Level Sleep Support
   3.548 +   -------------------------------------------------------------------------- */
   3.549 +
   3.550 +#ifdef CONFIG_ACPI_SLEEP
   3.551 +
   3.552 +#define DEBUG
   3.553 +
   3.554 +#ifdef DEBUG
   3.555 +#include <xen/serial.h>
   3.556 +#endif
   3.557 +
   3.558 +/* address in low memory of the wakeup routine. */
   3.559 +unsigned long acpi_wakeup_address = 0;
   3.560 +
   3.561 +/* new page directory that we will be using */
   3.562 +static pmd_t *pmd;
   3.563 +
   3.564 +/* saved page directory */
   3.565 +static pmd_t saved_pmd;
   3.566 +
   3.567 +/* page which we'll use for the new page directory */
   3.568 +static pte_t *ptep;
   3.569 +
   3.570 +extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
   3.571 +
   3.572 +/*
   3.573 + * acpi_create_identity_pmd
   3.574 + *
   3.575 + * Create a new, identity mapped pmd.
   3.576 + *
   3.577 + * Do this by creating new page directory, and marking all the pages as R/W
   3.578 + * Then set it as the new Page Middle Directory.
   3.579 + * And, of course, flush the TLB so it takes effect.
   3.580 + *
   3.581 + * We save the address of the old one, for later restoration.
   3.582 + */
   3.583 +static void acpi_create_identity_pmd (void)
   3.584 +{
   3.585 +	pgd_t *pgd;
   3.586 +	int i;
   3.587 +
   3.588 +	ptep = (pte_t*)__get_free_page(GFP_KERNEL);
   3.589 +
   3.590 +	/* fill page with low mapping */
   3.591 +	for (i = 0; i < PTRS_PER_PTE; i++)
   3.592 +		set_pte(ptep + i, mk_pte_phys(i << PAGE_SHIFT, PAGE_SHARED));
   3.593 +
   3.594 +	pgd = pgd_offset(current->active_mm, 0);
   3.595 +	pmd = pmd_alloc(current->mm,pgd, 0);
   3.596 +
   3.597 +	/* save the old pmd */
   3.598 +	saved_pmd = *pmd;
   3.599 +
   3.600 +	/* set the new one */
   3.601 +	set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(ptep)));
   3.602 +
   3.603 +	/* flush the TLB */
   3.604 +	local_flush_tlb();
   3.605 +}
   3.606 +
   3.607 +/*
   3.608 + * acpi_restore_pmd
   3.609 + *
   3.610 + * Restore the old pmd saved by acpi_create_identity_pmd and
   3.611 + * free the page that said function alloc'd
   3.612 + */
   3.613 +static void acpi_restore_pmd (void)
   3.614 +{
   3.615 +	set_pmd(pmd, saved_pmd);
   3.616 +	local_flush_tlb();
   3.617 +	free_page((unsigned long)ptep);
   3.618 +}
   3.619 +
   3.620 +/**
   3.621 + * acpi_save_state_mem - save kernel state
   3.622 + *
   3.623 + * Create an identity mapped page table and copy the wakeup routine to
   3.624 + * low memory.
   3.625 + */
   3.626 +int acpi_save_state_mem (void)
   3.627 +{
   3.628 +	acpi_create_identity_pmd();
   3.629 +	acpi_copy_wakeup_routine(acpi_wakeup_address);
   3.630 +
   3.631 +	return 0;
   3.632 +}
   3.633 +
   3.634 +/**
   3.635 + * acpi_save_state_disk - save kernel state to disk
   3.636 + *
   3.637 + */
   3.638 +int acpi_save_state_disk (void)
   3.639 +{
   3.640 +	return 1;
   3.641 +}
   3.642 +
   3.643 +/*
   3.644 + * acpi_restore_state
   3.645 + */
   3.646 +void acpi_restore_state_mem (void)
   3.647 +{
   3.648 +	acpi_restore_pmd();
   3.649 +}
   3.650 +
   3.651 +/**
   3.652 + * acpi_reserve_bootmem - do _very_ early ACPI initialisation
   3.653 + *
   3.654 + * We allocate a page in low memory for the wakeup
   3.655 + * routine for when we come back from a sleep state. The
   3.656 + * runtime allocator allows specification of <16M pages, but not
   3.657 + * <1M pages.
   3.658 + */
   3.659 +void __init acpi_reserve_bootmem(void)
   3.660 +{
   3.661 +	acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
   3.662 +	printk(KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address);
   3.663 +}
   3.664 +
   3.665 +void do_suspend_lowlevel_s4bios(int resume)
   3.666 +{
   3.667 +	if (!resume) {
   3.668 +		save_processor_context();
   3.669 +		acpi_save_register_state((unsigned long)&&acpi_sleep_done);
   3.670 +		acpi_enter_sleep_state_s4bios();
   3.671 +		return;
   3.672 +	}
   3.673 +acpi_sleep_done:
   3.674 +	restore_processor_context();
   3.675 +}
   3.676 +
   3.677 +
   3.678 +#endif /*CONFIG_ACPI_SLEEP*/
   3.679 +
     4.1 --- a/xen/arch/i386/acpitable.c	Mon Apr 05 08:23:33 2004 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,552 +0,0 @@
     4.4 -/*
     4.5 - *  acpitable.c - IA32-specific ACPI boot-time initialization (Revision: 1)
     4.6 - *
     4.7 - *  Copyright (C) 1999 Andrew Henroid
     4.8 - *  Copyright (C) 2001 Richard Schaal
     4.9 - *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
    4.10 - *  Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com>
    4.11 - *  Copyright (C) 2001 Arjan van de Ven <arjanv@redhat.com>
    4.12 - *
    4.13 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4.14 - *
    4.15 - *  This program is free software; you can redistribute it and/or modify
    4.16 - *  it under the terms of the GNU General Public License as published by
    4.17 - *  the Free Software Foundation; either version 2 of the License, or
    4.18 - *  (at your option) any later version.
    4.19 - *
    4.20 - *  This program is distributed in the hope that it will be useful,
    4.21 - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.22 - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.23 - *  GNU General Public License for more details.
    4.24 - *
    4.25 - *  You should have received a copy of the GNU General Public License
    4.26 - *  along with this program; if not, write to the Free Software
    4.27 - *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    4.28 - *
    4.29 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4.30 - *
    4.31 - * $Id: acpitable.c,v 1.7 2001/11/04 12:21:18 fenrus Exp $
    4.32 - */
    4.33 -#include <xen/config.h>
    4.34 -#include <xen/kernel.h>
    4.35 -#include <xen/init.h>
    4.36 -#include <xen/types.h>
    4.37 -#include <xen/slab.h>
    4.38 -#include <xen/pci.h>
    4.39 -#include <asm/mpspec.h>
    4.40 -#include <asm/io.h>
    4.41 -#include <asm/apic.h>
    4.42 -#include <asm/apicdef.h>
    4.43 -#include <asm/page.h>
    4.44 -#include <asm/io_apic.h>
    4.45 -
    4.46 -#ifdef CONFIG_X86_IO_APIC
    4.47 -
    4.48 -#include "acpitable.h"
    4.49 -
    4.50 -static acpi_table_handler acpi_boot_ops[ACPI_TABLE_COUNT];
    4.51 -
    4.52 -
    4.53 -static unsigned char __init
    4.54 -acpi_checksum(void *buffer, int length)
    4.55 -{
    4.56 -	int i;
    4.57 -	unsigned char *bytebuffer;
    4.58 -	unsigned char sum = 0;
    4.59 -
    4.60 -	if (!buffer || length <= 0)
    4.61 -		return 0;
    4.62 -
    4.63 -	bytebuffer = (unsigned char *) buffer;
    4.64 -
    4.65 -	for (i = 0; i < length; i++)
    4.66 -		sum += *(bytebuffer++);
    4.67 -
    4.68 -	return sum;
    4.69 -}
    4.70 -
    4.71 -static void __init
    4.72 -acpi_print_table_header(acpi_table_header * header)
    4.73 -{
    4.74 -	if (!header)
    4.75 -		return;
    4.76 -
    4.77 -	printk(KERN_INFO "ACPI table found: %.4s v%d [%.6s %.8s %d.%d]\n",
    4.78 -	       header->signature, header->revision, header->oem_id,
    4.79 -	       header->oem_table_id, header->oem_revision >> 16,
    4.80 -	       header->oem_revision & 0xffff);
    4.81 -
    4.82 -	return;
    4.83 -}
    4.84 -
    4.85 -/*******************************************************************************
    4.86 - *
    4.87 - * FUNCTION:    acpi_tb_scan_memory_for_rsdp
    4.88 - *
    4.89 - * PARAMETERS:  address       - Starting pointer for search
    4.90 - *              length        - Maximum length to search
    4.91 - *
    4.92 - * RETURN:      Pointer to the RSDP if found and valid, otherwise NULL.
    4.93 - *
    4.94 - * DESCRIPTION: Search a block of memory for the RSDP signature
    4.95 - *
    4.96 - ******************************************************************************/
    4.97 -
    4.98 -static void *__init
    4.99 -acpi_tb_scan_memory_for_rsdp(void *address, int length)
   4.100 -{
   4.101 -	u32 offset;
   4.102 -
   4.103 -	if (length <= 0)
   4.104 -		return NULL;
   4.105 -
   4.106 -	/* Search from given start addr for the requested length  */
   4.107 -
   4.108 -	offset = 0;
   4.109 -
   4.110 -	while (offset < length) {
   4.111 -		/* The signature must match and the checksum must be correct */
   4.112 -		if (strncmp(address, RSDP_SIG, sizeof(RSDP_SIG) - 1) == 0 &&
   4.113 -		    acpi_checksum(address, RSDP_CHECKSUM_LENGTH) == 0) {
   4.114 -			/* If so, we have found the RSDP */
   4.115 -			printk(KERN_INFO "ACPI: RSDP located at physical address %p\n",
   4.116 -			       address);
   4.117 -			return address;
   4.118 -		}
   4.119 -		offset += RSDP_SCAN_STEP;
   4.120 -		address += RSDP_SCAN_STEP;
   4.121 -	}
   4.122 -
   4.123 -	/* Searched entire block, no RSDP was found */
   4.124 -	printk(KERN_INFO "ACPI: Searched entire block, no RSDP was found.\n");
   4.125 -	return NULL;
   4.126 -}
   4.127 -
   4.128 -/*******************************************************************************
   4.129 - *
   4.130 - * FUNCTION:    acpi_find_root_pointer
   4.131 - *
   4.132 - * PARAMETERS:  none
   4.133 - *
   4.134 - * RETURN:      physical address of the RSDP 
   4.135 - *
   4.136 - * DESCRIPTION: Search lower 1_mbyte of memory for the root system descriptor
   4.137 - *              pointer structure.  If it is found, set *RSDP to point to it.
   4.138 - *
   4.139 - *              NOTE: The RSDP must be either in the first 1_k of the Extended
   4.140 - *              BIOS Data Area or between E0000 and FFFFF (ACPI 1.0 section
   4.141 - *              5.2.2; assertion #421).
   4.142 - *
   4.143 - ******************************************************************************/
   4.144 -
   4.145 -static struct acpi_table_rsdp * __init
   4.146 -acpi_find_root_pointer(void)
   4.147 -{
   4.148 -	struct acpi_table_rsdp * rsdp;
   4.149 -
   4.150 -	/*
   4.151 -	 * Physical address is given
   4.152 -	 */
   4.153 -	/*
   4.154 -	 * Region 1) Search EBDA (low memory) paragraphs
   4.155 -	 */
   4.156 -	rsdp = acpi_tb_scan_memory_for_rsdp(__va(LO_RSDP_WINDOW_BASE),
   4.157 -					 LO_RSDP_WINDOW_SIZE);
   4.158 -
   4.159 -	if (rsdp)
   4.160 -		return rsdp;
   4.161 -
   4.162 -	/*
   4.163 -	 * Region 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
   4.164 -	 */
   4.165 -	rsdp = acpi_tb_scan_memory_for_rsdp(__va(HI_RSDP_WINDOW_BASE),
   4.166 -					       HI_RSDP_WINDOW_SIZE);
   4.167 -
   4.168 -	
   4.169 -					     
   4.170 -	if (rsdp)
   4.171 -		return rsdp;
   4.172 -
   4.173 -	printk(KERN_ERR "ACPI: System description tables not found\n");
   4.174 -	return NULL;
   4.175 -}
   4.176 -
   4.177 -
   4.178 -/*
   4.179 - * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
   4.180 - * to map the target physical address. The problem is that set_fixmap()
   4.181 - * provides a single page, and it is possible that the page is not
   4.182 - * sufficient.
   4.183 - * By using this area, we can map up to MAX_IO_APICS pages temporarily,
   4.184 - * i.e. until the next __va_range() call.
   4.185 - *
   4.186 - * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
   4.187 - * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
   4.188 - * count idx down while incrementing the phys address.
   4.189 - */
   4.190 -static __init char *
   4.191 -__va_range(unsigned long phys, unsigned long size)
   4.192 -{
   4.193 -	unsigned long base, offset, mapped_size;
   4.194 -	int idx;
   4.195 -
   4.196 -	offset = phys & (PAGE_SIZE - 1);
   4.197 -	mapped_size = PAGE_SIZE - offset;
   4.198 -	set_fixmap(FIX_IO_APIC_BASE_END, phys);
   4.199 -	base = fix_to_virt(FIX_IO_APIC_BASE_END);
   4.200 -	dprintk("__va_range(0x%lx, 0x%lx): idx=%d mapped at %lx\n", phys, size,
   4.201 -		FIX_IO_APIC_BASE_END, base);
   4.202 -
   4.203 -	/*
   4.204 -	 * Most cases can be covered by the below.
   4.205 -	 */
   4.206 -	idx = FIX_IO_APIC_BASE_END;
   4.207 -	while (mapped_size < size) {
   4.208 -		if (--idx < FIX_IO_APIC_BASE_0)
   4.209 -			return 0;	/* cannot handle this */
   4.210 -		phys += PAGE_SIZE;
   4.211 -		set_fixmap(idx, phys);
   4.212 -		mapped_size += PAGE_SIZE;
   4.213 -	}
   4.214 -
   4.215 -	return ((unsigned char *) base + offset);
   4.216 -}
   4.217 -
   4.218 -static int __init acpi_tables_init(void)
   4.219 -{
   4.220 -	int result = -ENODEV;
   4.221 -	acpi_table_header *header = NULL;
   4.222 -	struct acpi_table_rsdp *rsdp = NULL;
   4.223 -	struct acpi_table_rsdt *rsdt = NULL;
   4.224 -	struct acpi_table_rsdt saved_rsdt;
   4.225 -	int tables = 0;
   4.226 -	int type = 0;
   4.227 -	int i = 0;
   4.228 -
   4.229 -
   4.230 -	rsdp = (struct acpi_table_rsdp *) acpi_find_root_pointer();
   4.231 -
   4.232 -	if (!rsdp)
   4.233 -		return -ENODEV;
   4.234 -		
   4.235 -	printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision,
   4.236 -	       rsdp->oem_id);
   4.237 -	       
   4.238 -	if (strncmp(rsdp->signature, RSDP_SIG,strlen(RSDP_SIG))) {
   4.239 -		printk(KERN_WARNING "RSDP table signature incorrect\n");
   4.240 -		return -EINVAL;
   4.241 -	}
   4.242 -
   4.243 -	rsdt = (struct acpi_table_rsdt *)
   4.244 -	    __va_range(rsdp->rsdt_address, sizeof(struct acpi_table_rsdt));
   4.245 -
   4.246 -	if (!rsdt) {
   4.247 -		printk(KERN_WARNING "ACPI: Invalid root system description tables (RSDT)\n");
   4.248 -		return -ENODEV;
   4.249 -	}
   4.250 -	
   4.251 -	header = & rsdt->header;
   4.252 -	acpi_print_table_header(header);
   4.253 -	
   4.254 -	if (strncmp(header->signature, RSDT_SIG, strlen(RSDT_SIG))) {
   4.255 -		printk(KERN_WARNING "ACPI: RSDT signature incorrect\n");
   4.256 -		return -ENODEV;
   4.257 -	}
   4.258 -		
   4.259 -	/* 
   4.260 -	 * The number of tables is computed by taking the 
   4.261 -	 * size of all entries (header size minus total 
   4.262 -	 * size of RSDT) divided by the size of each entry
   4.263 -	 * (4-byte table pointers).
   4.264 -	 */
   4.265 -	tables = (header->length - sizeof(acpi_table_header)) / 4;
   4.266 -		    
   4.267 -	memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt));
   4.268 -
   4.269 -	if (saved_rsdt.header.length > sizeof(saved_rsdt)) {
   4.270 -		printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n", saved_rsdt.header.length);
   4.271 -		return -ENODEV;
   4.272 -	}
   4.273 -
   4.274 -	for (i = 0; i < tables; i++) {
   4.275 -		/* Map in header, then map in full table length. */
   4.276 -		header = (acpi_table_header *)
   4.277 -			    __va_range(saved_rsdt.entry[i],
   4.278 -				       sizeof(acpi_table_header));
   4.279 -		if (!header)
   4.280 -			break;
   4.281 -		header = (acpi_table_header *)
   4.282 -			    __va_range(saved_rsdt.entry[i], header->length);
   4.283 -		if (!header)
   4.284 -			break;
   4.285 -
   4.286 -		acpi_print_table_header(header);
   4.287 -		
   4.288 -		if (acpi_checksum(header,header->length)) {
   4.289 -			printk(KERN_WARNING "ACPI %s has invalid checksum\n", 
   4.290 -				acpi_table_signatures[i]);
   4.291 -			continue;
   4.292 -		}
   4.293 -		
   4.294 -		for (type = 0; type < ACPI_TABLE_COUNT; type++)
   4.295 -			if (!strncmp((char *) &header->signature,
   4.296 -			     acpi_table_signatures[type],strlen(acpi_table_signatures[type])))
   4.297 -				break;
   4.298 -
   4.299 -		if (type >= ACPI_TABLE_COUNT) {
   4.300 -			printk(KERN_WARNING "ACPI: Unsupported table %.4s\n",
   4.301 -			       header->signature);
   4.302 -			continue;
   4.303 -		}
   4.304 -
   4.305 -
   4.306 -		if (!acpi_boot_ops[type])
   4.307 -			continue;
   4.308 -			
   4.309 -		result = acpi_boot_ops[type] (header,
   4.310 -						 (unsigned long) saved_rsdt.
   4.311 -						 entry[i]);
   4.312 -	}
   4.313 -
   4.314 -	return result;
   4.315 -}
   4.316 -
   4.317 -static int total_cpus __initdata = 0;
   4.318 -int have_acpi_tables;
   4.319 -
   4.320 -extern void __init MP_processor_info(struct mpc_config_processor *);
   4.321 -
   4.322 -static void __init
   4.323 -acpi_parse_lapic(struct acpi_table_lapic *local_apic)
   4.324 -{
   4.325 -	struct mpc_config_processor proc_entry;
   4.326 -	int ix = 0;
   4.327 -
   4.328 -	if (!local_apic)
   4.329 -		return;
   4.330 -
   4.331 -	printk(KERN_INFO "LAPIC (acpi_id[0x%04x] id[0x%x] enabled[%d])\n",
   4.332 -		local_apic->acpi_id, local_apic->id, local_apic->flags.enabled);
   4.333 -
   4.334 -	printk(KERN_INFO "CPU %d (0x%02x00)", total_cpus, local_apic->id);
   4.335 -
   4.336 -	if (local_apic->flags.enabled) {
   4.337 -		printk(" enabled");
   4.338 -		ix = local_apic->id;
   4.339 -		if (ix >= MAX_APICS) {
   4.340 -			printk(KERN_WARNING
   4.341 -			       "Processor #%d INVALID - (Max ID: %d).\n", ix,
   4.342 -			       MAX_APICS);
   4.343 -			return;
   4.344 -		}
   4.345 -		/* 
   4.346 -		 * Fill in the info we want to save.  Not concerned about 
   4.347 -		 * the processor ID.  Processor features aren't present in 
   4.348 -		 * the table.
   4.349 -		 */
   4.350 -		proc_entry.mpc_type = MP_PROCESSOR;
   4.351 -		proc_entry.mpc_apicid = local_apic->id;
   4.352 -		proc_entry.mpc_cpuflag = CPU_ENABLED;
   4.353 -		if (proc_entry.mpc_apicid == boot_cpu_physical_apicid) {
   4.354 -			printk(" (BSP)");
   4.355 -			proc_entry.mpc_cpuflag |= CPU_BOOTPROCESSOR;
   4.356 -		}
   4.357 -		proc_entry.mpc_cpufeature =
   4.358 -		    (boot_cpu_data.x86 << 8) | 
   4.359 -		    (boot_cpu_data.x86_model << 4) | 
   4.360 -		     boot_cpu_data.x86_mask;
   4.361 -		proc_entry.mpc_featureflag = boot_cpu_data.x86_capability[0];
   4.362 -		proc_entry.mpc_reserved[0] = 0;
   4.363 -		proc_entry.mpc_reserved[1] = 0;
   4.364 -		proc_entry.mpc_apicver = 0x10;	/* integrated APIC */
   4.365 -		MP_processor_info(&proc_entry);
   4.366 -	} else {
   4.367 -		printk(" disabled");
   4.368 -	}
   4.369 -	printk("\n");
   4.370 -
   4.371 -	total_cpus++;
   4.372 -	return;
   4.373 -}
   4.374 -
   4.375 -static void __init
   4.376 -acpi_parse_ioapic(struct acpi_table_ioapic *ioapic)
   4.377 -{
   4.378 -
   4.379 -	if (!ioapic)
   4.380 -		return;
   4.381 -
   4.382 -	printk(KERN_INFO
   4.383 -	       "IOAPIC (id[0x%x] address[0x%x] global_irq_base[0x%x])\n",
   4.384 -	       ioapic->id, ioapic->address, ioapic->global_irq_base);
   4.385 -
   4.386 -	if (nr_ioapics >= MAX_IO_APICS) {
   4.387 -		printk(KERN_WARNING
   4.388 -		       "Max # of I/O APICs (%d) exceeded (found %d).\n",
   4.389 -		       MAX_IO_APICS, nr_ioapics);
   4.390 -/*		panic("Recompile kernel with bigger MAX_IO_APICS!\n");   */
   4.391 -	}
   4.392 -}
   4.393 -
   4.394 -
   4.395 -/* Interrupt source overrides inform the machine about exceptions
   4.396 -   to the normal "PIC" mode interrupt routing */
   4.397 -   
   4.398 -static void __init
   4.399 -acpi_parse_int_src_ovr(struct acpi_table_int_src_ovr *intsrc)
   4.400 -{
   4.401 -	if (!intsrc)
   4.402 -		return;
   4.403 -
   4.404 -	printk(KERN_INFO
   4.405 -	       "INT_SRC_OVR (bus[%d] irq[0x%x] global_irq[0x%x] polarity[0x%x] trigger[0x%x])\n",
   4.406 -	       intsrc->bus, intsrc->bus_irq, intsrc->global_irq,
   4.407 -	       intsrc->flags.polarity, intsrc->flags.trigger);
   4.408 -}
   4.409 -
   4.410 -/*
   4.411 - * At this point, we look at the interrupt assignment entries in the MPS
   4.412 - * table.
   4.413 - */ 
   4.414 - 
   4.415 -static void __init acpi_parse_nmi_src(struct acpi_table_nmi_src *nmisrc)
   4.416 -{
   4.417 -	if (!nmisrc)
   4.418 -		return;
   4.419 -
   4.420 -	printk(KERN_INFO
   4.421 -	       "NMI_SRC (polarity[0x%x] trigger[0x%x] global_irq[0x%x])\n",
   4.422 -	       nmisrc->flags.polarity, nmisrc->flags.trigger,
   4.423 -	       nmisrc->global_irq);
   4.424 -
   4.425 -}
   4.426 -static void __init
   4.427 -acpi_parse_lapic_nmi(struct acpi_table_lapic_nmi *localnmi)
   4.428 -{
   4.429 -	if (!localnmi)
   4.430 -		return;
   4.431 -
   4.432 -	printk(KERN_INFO
   4.433 -	       "LAPIC_NMI (acpi_id[0x%04x] polarity[0x%x] trigger[0x%x] lint[0x%x])\n",
   4.434 -	       localnmi->acpi_id, localnmi->flags.polarity,
   4.435 -	       localnmi->flags.trigger, localnmi->lint);
   4.436 -}
   4.437 -static void __init
   4.438 -acpi_parse_lapic_addr_ovr(struct acpi_table_lapic_addr_ovr *lapic_addr_ovr)
   4.439 -{
   4.440 -	if (!lapic_addr_ovr)
   4.441 -		return;
   4.442 -
   4.443 -	printk(KERN_INFO "LAPIC_ADDR_OVR (address[0x%lx])\n",
   4.444 -	       (unsigned long) lapic_addr_ovr->address);
   4.445 -
   4.446 -}
   4.447 -
   4.448 -static void __init
   4.449 -acpi_parse_plat_int_src(struct acpi_table_plat_int_src *plintsrc)
   4.450 -{
   4.451 -	if (!plintsrc)
   4.452 -		return;
   4.453 -
   4.454 -	printk(KERN_INFO
   4.455 -	       "PLAT_INT_SRC (polarity[0x%x] trigger[0x%x] type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n",
   4.456 -	       plintsrc->flags.polarity, plintsrc->flags.trigger,
   4.457 -	       plintsrc->type, plintsrc->id, plintsrc->eid,
   4.458 -	       plintsrc->iosapic_vector, plintsrc->global_irq);
   4.459 -}
   4.460 -static int __init
   4.461 -acpi_parse_madt(acpi_table_header * header, unsigned long phys)
   4.462 -{
   4.463 -
   4.464 -	struct acpi_table_madt *madt;	    
   4.465 -	acpi_madt_entry_header *entry_header;
   4.466 -	int table_size;
   4.467 -	
   4.468 -	madt = (struct acpi_table_madt *) __va_range(phys, header->length);
   4.469 -
   4.470 -	if (!madt)
   4.471 -		return -EINVAL;
   4.472 -
   4.473 -	table_size = (int) (header->length - sizeof(*madt));
   4.474 -	entry_header =
   4.475 -	    (acpi_madt_entry_header *) ((void *) madt + sizeof(*madt));
   4.476 -
   4.477 -	while (entry_header && (table_size > 0)) {
   4.478 -		switch (entry_header->type) {
   4.479 -		case ACPI_MADT_LAPIC:
   4.480 -			acpi_parse_lapic((struct acpi_table_lapic *)
   4.481 -					 entry_header);
   4.482 -			break;
   4.483 -		case ACPI_MADT_IOAPIC:
   4.484 -			acpi_parse_ioapic((struct acpi_table_ioapic *)
   4.485 -					  entry_header);
   4.486 -			break;
   4.487 -		case ACPI_MADT_INT_SRC_OVR:
   4.488 -			acpi_parse_int_src_ovr((struct acpi_table_int_src_ovr *)
   4.489 -					       entry_header);
   4.490 -			break;
   4.491 -		case ACPI_MADT_NMI_SRC:
   4.492 -			acpi_parse_nmi_src((struct acpi_table_nmi_src *)
   4.493 -					   entry_header);
   4.494 -			break;
   4.495 -		case ACPI_MADT_LAPIC_NMI:
   4.496 -			acpi_parse_lapic_nmi((struct acpi_table_lapic_nmi *)
   4.497 -					     entry_header);
   4.498 -			break;
   4.499 -		case ACPI_MADT_LAPIC_ADDR_OVR:
   4.500 -			acpi_parse_lapic_addr_ovr((struct
   4.501 -						   acpi_table_lapic_addr_ovr *)
   4.502 -						  entry_header);
   4.503 -			break;
   4.504 -		case ACPI_MADT_PLAT_INT_SRC:
   4.505 -			acpi_parse_plat_int_src((struct acpi_table_plat_int_src
   4.506 -						 *) entry_header);
   4.507 -			break;
   4.508 -		default:
   4.509 -			printk(KERN_WARNING
   4.510 -			       "Unsupported MADT entry type 0x%x\n",
   4.511 -			       entry_header->type);
   4.512 -			break;
   4.513 -		}
   4.514 -		table_size -= entry_header->length;
   4.515 -		entry_header =
   4.516 -		    (acpi_madt_entry_header *) ((void *) entry_header +
   4.517 -						entry_header->length);
   4.518 -	}
   4.519 -
   4.520 -	if (!total_cpus) {
   4.521 -		printk("ACPI: No Processors found in the APCI table.\n");
   4.522 -		return -EINVAL;
   4.523 -	}
   4.524 -
   4.525 -	printk(KERN_INFO "%d CPUs total\n", total_cpus);
   4.526 -
   4.527 -	if (madt->lapic_address)
   4.528 -		mp_lapic_addr = madt->lapic_address;
   4.529 -	else
   4.530 -		mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
   4.531 -
   4.532 -	printk(KERN_INFO "Local APIC address %x\n", madt->lapic_address);
   4.533 -
   4.534 -	return 0;
   4.535 -}
   4.536 -
   4.537 -extern int opt_noacpi;
   4.538 -
   4.539 -/*
   4.540 - * Configure the processor info using MADT in the ACPI tables. If we fail to
   4.541 - * configure that, then we use the MPS tables.
   4.542 - */
   4.543 -void __init
   4.544 -config_acpi_tables(void)
   4.545 -{
   4.546 -	memset(&acpi_boot_ops, 0, sizeof(acpi_boot_ops));
   4.547 -	acpi_boot_ops[ACPI_APIC] = acpi_parse_madt;
   4.548 -
   4.549 -	if (!opt_noacpi && !acpi_tables_init()) {
   4.550 -		have_acpi_tables = 1;
   4.551 -		printk("Enabling the CPU's according to the ACPI table\n");
   4.552 -	}
   4.553 -}
   4.554 -
   4.555 -#endif /* CONFIG_X86_IO_APIC */
     5.1 --- a/xen/arch/i386/acpitable.h	Mon Apr 05 08:23:33 2004 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,260 +0,0 @@
     5.4 -/*
     5.5 - *  acpitable.c - IA32-specific ACPI boot-time initialization (Revision: 1)
     5.6 - *
     5.7 - *  Copyright (C) 1999 Andrew Henroid
     5.8 - *  Copyright (C) 2001 Richard Schaal
     5.9 - *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
    5.10 - *  Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com>
    5.11 - *  Copyright (C) 2001 Arjan van de Ven <arjanv@redhat.com>
    5.12 - *
    5.13 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5.14 - *
    5.15 - *  This program is free software; you can redistribute it and/or modify
    5.16 - *  it under the terms of the GNU General Public License as published by
    5.17 - *  the Free Software Foundation; either version 2 of the License, or
    5.18 - *  (at your option) any later version.
    5.19 - *
    5.20 - *  This program is distributed in the hope that it will be useful,
    5.21 - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.22 - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.23 - *  GNU General Public License for more details.
    5.24 - *
    5.25 - *  You should have received a copy of the GNU General Public License
    5.26 - *  along with this program; if not, write to the Free Software
    5.27 - *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    5.28 - *
    5.29 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5.30 - *
    5.31 - * $Id: acpitable.h,v 1.3 2001/11/03 22:41:34 fenrus Exp $
    5.32 - */
    5.33 -
    5.34 -/*
    5.35 - * The following codes are cut&pasted from drivers/acpi. Part of the code
    5.36 - * there can be not updated or delivered yet.
    5.37 - * To avoid conflicts when CONFIG_ACPI is defined, the following codes are
    5.38 - * modified so that they are self-contained in this file.
    5.39 - * -- jun
    5.40 - */
    5.41 - 
    5.42 -#ifndef _HEADER_ACPITABLE_H_
    5.43 -#define _HEADER_ACPITABLE_H_
    5.44 -
    5.45 -#define dprintk printk
    5.46 -typedef unsigned int ACPI_TBLPTR;
    5.47 -
    5.48 -typedef struct {		/* ACPI common table header */
    5.49 -	char signature[4];	/* identifies type of table */
    5.50 -	u32 length;		/* length of table,
    5.51 -				   in bytes, * including header */
    5.52 -	u8 revision;		/* specification minor version # */
    5.53 -	u8 checksum;		/* to make sum of entire table == 0 */
    5.54 -	char oem_id[6];		/* OEM identification */
    5.55 -	char oem_table_id[8];	/* OEM table identification */
    5.56 -	u32 oem_revision;	/* OEM revision number */
    5.57 -	char asl_compiler_id[4];	/* ASL compiler vendor ID */
    5.58 -	u32 asl_compiler_revision;	/* ASL compiler revision number */
    5.59 -} acpi_table_header __attribute__ ((packed));;
    5.60 -
    5.61 -enum {
    5.62 -	ACPI_APIC = 0,
    5.63 -	ACPI_BOOT,
    5.64 -	ACPI_DBGP,
    5.65 -	ACPI_DSDT,
    5.66 -	ACPI_ECDT,
    5.67 -	ACPI_ETDT,
    5.68 -	ACPI_FACP,
    5.69 -	ACPI_FACS,
    5.70 -	ACPI_OEMX,
    5.71 -	ACPI_PSDT,
    5.72 -	ACPI_SBST,
    5.73 -	ACPI_SLIT,
    5.74 -	ACPI_SPCR,
    5.75 -	ACPI_SRAT,
    5.76 -	ACPI_SSDT,
    5.77 -	ACPI_SPMI,
    5.78 -	ACPI_XSDT,
    5.79 -	ACPI_TABLE_COUNT
    5.80 -};
    5.81 -
    5.82 -static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
    5.83 -	"APIC",
    5.84 -	"BOOT",
    5.85 -	"DBGP",
    5.86 -	"DSDT",
    5.87 -	"ECDT",
    5.88 -	"ETDT",
    5.89 -	"FACP",
    5.90 -	"FACS",
    5.91 -	"OEM",
    5.92 -	"PSDT",
    5.93 -	"SBST",
    5.94 -	"SLIT",
    5.95 -	"SPCR",
    5.96 -	"SRAT",
    5.97 -	"SSDT",
    5.98 -	"SPMI",
    5.99 -	"XSDT"
   5.100 -};
   5.101 -
   5.102 -struct acpi_table_madt {
   5.103 -	acpi_table_header header;
   5.104 -	u32 lapic_address;
   5.105 -	struct {
   5.106 -		u32 pcat_compat:1;
   5.107 -		u32 reserved:31;
   5.108 -	} flags __attribute__ ((packed));
   5.109 -} __attribute__ ((packed));;
   5.110 -
   5.111 -enum {
   5.112 -	ACPI_MADT_LAPIC = 0,
   5.113 -	ACPI_MADT_IOAPIC,
   5.114 -	ACPI_MADT_INT_SRC_OVR,
   5.115 -	ACPI_MADT_NMI_SRC,
   5.116 -	ACPI_MADT_LAPIC_NMI,
   5.117 -	ACPI_MADT_LAPIC_ADDR_OVR,
   5.118 -	ACPI_MADT_IOSAPIC,
   5.119 -	ACPI_MADT_LSAPIC,
   5.120 -	ACPI_MADT_PLAT_INT_SRC,
   5.121 -	ACPI_MADT_ENTRY_COUNT
   5.122 -};
   5.123 -
   5.124 -#define RSDP_SIG			"RSD PTR "
   5.125 -#define RSDT_SIG 			"RSDT"
   5.126 -
   5.127 -#define ACPI_DEBUG_PRINT(pl)
   5.128 -
   5.129 -#define ACPI_MEMORY_MODE                0x01
   5.130 -#define ACPI_LOGICAL_ADDRESSING         0x00
   5.131 -#define ACPI_PHYSICAL_ADDRESSING        0x01
   5.132 -
   5.133 -#define LO_RSDP_WINDOW_BASE         	0	/* Physical Address */
   5.134 -#define HI_RSDP_WINDOW_BASE         	0xE0000	/* Physical Address */
   5.135 -#define LO_RSDP_WINDOW_SIZE         	0x400
   5.136 -#define HI_RSDP_WINDOW_SIZE         	0x20000
   5.137 -#define RSDP_SCAN_STEP			16
   5.138 -#define RSDP_CHECKSUM_LENGTH		20
   5.139 -
   5.140 -typedef int (*acpi_table_handler) (acpi_table_header * header, unsigned long);
   5.141 -
   5.142 -struct acpi_table_rsdp {
   5.143 -	char signature[8];
   5.144 -	u8 checksum;
   5.145 -	char oem_id[6];
   5.146 -	u8 revision;
   5.147 -	u32 rsdt_address;
   5.148 -} __attribute__ ((packed));
   5.149 -
   5.150 -struct acpi_table_rsdt {
   5.151 -	acpi_table_header header;
   5.152 -	u32 entry[ACPI_TABLE_COUNT];
   5.153 -} __attribute__ ((packed));
   5.154 -
   5.155 -typedef struct {
   5.156 -	u8 type;
   5.157 -	u8 length;
   5.158 -} acpi_madt_entry_header __attribute__ ((packed));
   5.159 -
   5.160 -typedef struct {
   5.161 -	u16 polarity:2;
   5.162 -	u16 trigger:2;
   5.163 -	u16 reserved:12;
   5.164 -} acpi_madt_int_flags __attribute__ ((packed));
   5.165 -
   5.166 -struct acpi_table_lapic {
   5.167 -	acpi_madt_entry_header header;
   5.168 -	u8 acpi_id;
   5.169 -	u8 id;
   5.170 -	struct {
   5.171 -		u32 enabled:1;
   5.172 -		u32 reserved:31;
   5.173 -	} flags __attribute__ ((packed));
   5.174 -} __attribute__ ((packed));
   5.175 -
   5.176 -struct acpi_table_ioapic {
   5.177 -	acpi_madt_entry_header header;
   5.178 -	u8 id;
   5.179 -	u8 reserved;
   5.180 -	u32 address;
   5.181 -	u32 global_irq_base;
   5.182 -} __attribute__ ((packed));
   5.183 -
   5.184 -struct acpi_table_int_src_ovr {
   5.185 -	acpi_madt_entry_header header;
   5.186 -	u8 bus;
   5.187 -	u8 bus_irq;
   5.188 -	u32 global_irq;
   5.189 -	acpi_madt_int_flags flags;
   5.190 -} __attribute__ ((packed));
   5.191 -
   5.192 -struct acpi_table_nmi_src {
   5.193 -	acpi_madt_entry_header header;
   5.194 -	acpi_madt_int_flags flags;
   5.195 -	u32 global_irq;
   5.196 -} __attribute__ ((packed));
   5.197 -
   5.198 -struct acpi_table_lapic_nmi {
   5.199 -	acpi_madt_entry_header header;
   5.200 -	u8 acpi_id;
   5.201 -	acpi_madt_int_flags flags;
   5.202 -	u8 lint;
   5.203 -} __attribute__ ((packed));
   5.204 -
   5.205 -struct acpi_table_lapic_addr_ovr {
   5.206 -	acpi_madt_entry_header header;
   5.207 -	u8 reserved[2];
   5.208 -	u64 address;
   5.209 -} __attribute__ ((packed));
   5.210 -
   5.211 -struct acpi_table_iosapic {
   5.212 -	acpi_madt_entry_header header;
   5.213 -	u8 id;
   5.214 -	u8 reserved;
   5.215 -	u32 global_irq_base;
   5.216 -	u64 address;
   5.217 -} __attribute__ ((packed));
   5.218 -
   5.219 -struct acpi_table_lsapic {
   5.220 -	acpi_madt_entry_header header;
   5.221 -	u8 acpi_id;
   5.222 -	u8 id;
   5.223 -	u8 eid;
   5.224 -	u8 reserved[3];
   5.225 -	struct {
   5.226 -		u32 enabled:1;
   5.227 -		u32 reserved:31;
   5.228 -	} flags;
   5.229 -} __attribute__ ((packed));
   5.230 -
   5.231 -struct acpi_table_plat_int_src {
   5.232 -	acpi_madt_entry_header header;
   5.233 -	acpi_madt_int_flags flags;
   5.234 -	u8 type;
   5.235 -	u8 id;
   5.236 -	u8 eid;
   5.237 -	u8 iosapic_vector;
   5.238 -	u32 global_irq;
   5.239 -	u32 reserved;
   5.240 -} __attribute__ ((packed));
   5.241 -
   5.242 -/*
   5.243 - * ACPI Table Descriptor.  One per ACPI table
   5.244 - */
   5.245 -typedef struct acpi_table_desc {
   5.246 -	struct acpi_table_desc *prev;
   5.247 -	struct acpi_table_desc *next;
   5.248 -	struct acpi_table_desc *installed_desc;
   5.249 -	acpi_table_header *pointer;
   5.250 -	void *base_pointer;
   5.251 -	u8 *aml_pointer;
   5.252 -	u64 physical_address;
   5.253 -	u32 aml_length;
   5.254 -	u32 length;
   5.255 -	u32 count;
   5.256 -	u16 table_id;
   5.257 -	u8 type;
   5.258 -	u8 allocation;
   5.259 -	u8 loaded_into_namespace;
   5.260 -
   5.261 -} acpi_table_desc __attribute__ ((packed));;
   5.262 -
   5.263 -#endif
     6.1 --- a/xen/arch/i386/apic.c	Mon Apr 05 08:23:33 2004 +0000
     6.2 +++ b/xen/arch/i386/apic.c	Mon Apr 05 13:12:24 2004 +0000
     6.3 @@ -1,23 +1,3 @@
     6.4 -/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
     6.5 - ****************************************************************************
     6.6 - * (C) 2002 - Rolf Neugebauer - Intel Research Cambridge
     6.7 - ****************************************************************************
     6.8 - *
     6.9 - *        File: apic.c
    6.10 - *      Author: 
    6.11 - *     Changes: 
    6.12 - *              
    6.13 - *        Date: Nov 2002
    6.14 - * 
    6.15 - * Environment: Xen Hypervisor
    6.16 - * Description: programmable APIC timer interface for accurate timers
    6.17 - *              modified version of Linux' apic.c
    6.18 - *
    6.19 - ****************************************************************************
    6.20 - * $Id: c-insert.c,v 1.7 2002/11/08 16:04:34 rn Exp $
    6.21 - ****************************************************************************
    6.22 - */
    6.23 -
    6.24  /*
    6.25   *  Local APIC handling, local APIC timers
    6.26   *
    6.27 @@ -28,6 +8,8 @@
    6.28   *                  thanks to Eric Gilmore
    6.29   *                  and Rolf G. Tews
    6.30   *                  for testing these extensively.
    6.31 + *	Maciej W. Rozycki	:	Various updates and fixes.
    6.32 + *	Mikael Pettersson	:	Power Management for UP-APIC.
    6.33   */
    6.34  
    6.35  
    6.36 @@ -52,17 +34,12 @@
    6.37  #include <xen/ac_timer.h>
    6.38  #include <xen/perfc.h>
    6.39  
    6.40 -#undef APIC_TIME_TRACE
    6.41 -#ifdef APIC_TIME_TRACE
    6.42 -#define TRC(_x) _x
    6.43 -#else
    6.44 -#define TRC(_x)
    6.45 -#endif
    6.46 -
    6.47  
    6.48  /* Using APIC to generate smp_local_timer_interrupt? */
    6.49  int using_apic_timer = 0;
    6.50  
    6.51 +static int enabled_via_apicbase;
    6.52 +
    6.53  int get_maxlvt(void)
    6.54  {
    6.55      unsigned int v, ver, maxlvt;
    6.56 @@ -74,7 +51,7 @@ int get_maxlvt(void)
    6.57      return maxlvt;
    6.58  }
    6.59  
    6.60 -static void clear_local_APIC(void)
    6.61 +void clear_local_APIC(void)
    6.62  {
    6.63      int maxlvt;
    6.64      unsigned long v;
    6.65 @@ -82,6 +59,14 @@ static void clear_local_APIC(void)
    6.66      maxlvt = get_maxlvt();
    6.67  
    6.68      /*
    6.69 +     * Masking an LVT entry on a P6 can trigger a local APIC error
    6.70 +     * if the vector is zero. Mask LVTERR first to prevent this.
    6.71 +     */
    6.72 +    if (maxlvt >= 3) {
    6.73 +        v = ERROR_APIC_VECTOR; /* any non-zero vector will do */
    6.74 +        apic_write_around(APIC_LVTERR, v | APIC_LVT_MASKED);
    6.75 +    }
    6.76 +    /*
    6.77       * Careful: we have to set masks only first to deassert
    6.78       * any level-triggered sources.
    6.79       */
    6.80 @@ -91,10 +76,6 @@ static void clear_local_APIC(void)
    6.81      apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED);
    6.82      v = apic_read(APIC_LVT1);
    6.83      apic_write_around(APIC_LVT1, v | APIC_LVT_MASKED);
    6.84 -    if (maxlvt >= 3) {
    6.85 -        v = apic_read(APIC_LVTERR);
    6.86 -        apic_write_around(APIC_LVTERR, v | APIC_LVT_MASKED);
    6.87 -    }
    6.88      if (maxlvt >= 4) {
    6.89          v = apic_read(APIC_LVTPC);
    6.90          apic_write_around(APIC_LVTPC, v | APIC_LVT_MASKED);
    6.91 @@ -110,6 +91,12 @@ static void clear_local_APIC(void)
    6.92          apic_write_around(APIC_LVTERR, APIC_LVT_MASKED);
    6.93      if (maxlvt >= 4)
    6.94          apic_write_around(APIC_LVTPC, APIC_LVT_MASKED);
    6.95 +    v = GET_APIC_VERSION(apic_read(APIC_LVR));
    6.96 +    if (APIC_INTEGRATED(v)) {	/* !82489DX */
    6.97 +        if (maxlvt > 3)
    6.98 +            apic_write(APIC_ESR, 0);
    6.99 +        apic_read(APIC_ESR);
   6.100 +    }
   6.101  }
   6.102  
   6.103  void __init connect_bsp_APIC(void)
   6.104 @@ -157,6 +144,13 @@ void disable_local_APIC(void)
   6.105      value = apic_read(APIC_SPIV);
   6.106      value &= ~APIC_SPIV_APIC_ENABLED;
   6.107      apic_write_around(APIC_SPIV, value);
   6.108 +
   6.109 +    if (enabled_via_apicbase) {
   6.110 +        unsigned int l, h;
   6.111 +        rdmsr(MSR_IA32_APICBASE, l, h);
   6.112 +        l &= ~MSR_IA32_APICBASE_ENABLE;
   6.113 +        wrmsr(MSR_IA32_APICBASE, l, h);
   6.114 +    }
   6.115  }
   6.116  
   6.117  /*
   6.118 @@ -222,7 +216,9 @@ int __init verify_local_APIC(void)
   6.119  
   6.120  void __init sync_Arb_IDs(void)
   6.121  {
   6.122 -    /* Wait for idle. */
   6.123 +    /*
   6.124 +     * Wait for idle.
   6.125 +     */
   6.126      apic_wait_icr_idle();
   6.127  
   6.128      Dprintk("Synchronizing Arb IDs.\n");
   6.129 @@ -245,6 +241,12 @@ void __init init_bsp_APIC(void)
   6.130  {
   6.131  }
   6.132  
   6.133 +static unsigned long calculate_ldr(unsigned long old)
   6.134 +{
   6.135 +    unsigned long id = 1UL << smp_processor_id();
   6.136 +    return (old & ~APIC_LDR_MASK)|SET_APIC_LOGICAL_ID(id);
   6.137 +}
   6.138 +
   6.139  void __init setup_local_APIC (void)
   6.140  {
   6.141      unsigned long value, ver, maxlvt;
   6.142 @@ -270,15 +272,13 @@ void __init setup_local_APIC (void)
   6.143       * Put the APIC into flat delivery mode.
   6.144       * Must be "all ones" explicitly for 82489DX.
   6.145       */
   6.146 -    apic_write_around(APIC_DFR, 0xffffffff);
   6.147 +    apic_write_around(APIC_DFR, APIC_DFR_FLAT);
   6.148  
   6.149      /*
   6.150       * Set up the logical destination ID.
   6.151       */
   6.152      value = apic_read(APIC_LDR);
   6.153 -    value &= ~APIC_LDR_MASK;
   6.154 -    value |= (1<<(smp_processor_id()+24));
   6.155 -    apic_write_around(APIC_LDR, value);
   6.156 +    apic_write_around(APIC_LDR, calculate_ldr(value));
   6.157  
   6.158      /*
   6.159       * Set Task Priority to 'accept all'. We never change this
   6.160 @@ -380,6 +380,8 @@ static int __init detect_init_APIC (void
   6.161      case X86_VENDOR_AMD:
   6.162          if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1)
   6.163              break;
   6.164 +        if (boot_cpu_data.x86 == 15 && cpu_has_apic)
   6.165 +            break;
   6.166          goto no_apic;
   6.167      case X86_VENDOR_INTEL:
   6.168          if (boot_cpu_data.x86 == 6 ||
   6.169 @@ -403,6 +405,7 @@ static int __init detect_init_APIC (void
   6.170              l &= ~MSR_IA32_APICBASE_BASE;
   6.171              l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
   6.172              wrmsr(MSR_IA32_APICBASE, l, h);
   6.173 +            enabled_via_apicbase = 1;
   6.174          }
   6.175      }
   6.176  
   6.177 @@ -416,6 +419,12 @@ static int __init detect_init_APIC (void
   6.178      set_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability);
   6.179      mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
   6.180      boot_cpu_physical_apicid = 0;
   6.181 +
   6.182 +    /* The BIOS may have set up the APIC at some other address */
   6.183 +    rdmsr(MSR_IA32_APICBASE, l, h);
   6.184 +    if (l & MSR_IA32_APICBASE_ENABLE)
   6.185 +        mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
   6.186 +
   6.187  	if (nmi_watchdog != NMI_NONE)
   6.188  		nmi_watchdog = NMI_LOCAL_APIC;
   6.189  
     7.1 --- a/xen/arch/i386/io_apic.c	Mon Apr 05 08:23:33 2004 +0000
     7.2 +++ b/xen/arch/i386/io_apic.c	Mon Apr 05 13:12:24 2004 +0000
     7.3 @@ -17,6 +17,7 @@
     7.4   *					thanks to Eric Gilmore
     7.5   *					and Rolf G. Tews
     7.6   *					for testing these extensively
     7.7 + *	Paul Diefenbaugh	:	Added full ACPI support
     7.8   */
     7.9  
    7.10  #include <xen/config.h>
    7.11 @@ -125,7 +126,7 @@ static void __init replace_pin_at_irq(un
    7.12  			break;						\
    7.13  		reg = io_apic_read(entry->apic, 0x10 + R + pin*2);	\
    7.14  		reg ACTION;						\
    7.15 -		io_apic_modify(entry->apic, reg);			\
    7.16 +		io_apic_write(entry->apic, 0x10 + R + pin*2, reg);	\
    7.17  		if (!entry->next)					\
    7.18  			break;						\
    7.19  		entry = irq_2_pin + entry->next;			\
    7.20 @@ -166,6 +167,14 @@ void clear_IO_APIC_pin(unsigned int apic
    7.21  	struct IO_APIC_route_entry entry;
    7.22  	unsigned long flags;
    7.23  
    7.24 +	/* Check delivery_mode to be sure we're not clearing an SMI pin */
    7.25 +	spin_lock_irqsave(&ioapic_lock, flags);
    7.26 +	*(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
    7.27 +	*(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
    7.28 +	spin_unlock_irqrestore(&ioapic_lock, flags);
    7.29 +	if (entry.delivery_mode == dest_SMI)
    7.30 +		return;
    7.31 +
    7.32  	/*
    7.33  	 * Disable it in the IO-APIC irq-routing table:
    7.34  	 */
    7.35 @@ -878,6 +887,7 @@ void __init print_IO_APIC(void)
    7.36  	struct IO_APIC_reg_00 reg_00;
    7.37  	struct IO_APIC_reg_01 reg_01;
    7.38  	struct IO_APIC_reg_02 reg_02;
    7.39 +	struct IO_APIC_reg_03 reg_03;
    7.40  	unsigned long flags;
    7.41  
    7.42   	printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
    7.43 @@ -898,13 +908,17 @@ void __init print_IO_APIC(void)
    7.44  	*(int *)&reg_01 = io_apic_read(apic, 1);
    7.45  	if (reg_01.version >= 0x10)
    7.46  		*(int *)&reg_02 = io_apic_read(apic, 2);
    7.47 +	if (reg_01.version >= 0x20)
    7.48 +		*(int *)&reg_03 = io_apic_read(apic, 3);
    7.49  	spin_unlock_irqrestore(&ioapic_lock, flags);
    7.50  
    7.51  	printk("\n");
    7.52  	printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mpc_apicid);
    7.53  	printk(KERN_DEBUG ".... register #00: %08X\n", *(int *)&reg_00);
    7.54  	printk(KERN_DEBUG ".......    : physical APIC id: %02X\n", reg_00.ID);
    7.55 -	if (reg_00.__reserved_1 || reg_00.__reserved_2)
    7.56 +	printk(KERN_DEBUG ".......    : Delivery Type: %X\n", reg_00.delivery_type);
    7.57 +	printk(KERN_DEBUG ".......    : LTS          : %X\n", reg_00.LTS);
    7.58 +	if (reg_00.__reserved_0 || reg_00.__reserved_1 || reg_00.__reserved_2)
    7.59  		UNEXPECTED_IO_APIC();
    7.60  
    7.61  	printk(KERN_DEBUG ".... register #01: %08X\n", *(int *)&reg_01);
    7.62 @@ -1710,15 +1724,184 @@ void __init setup_IO_APIC(void)
    7.63  	printk("ENABLING IO-APIC IRQs\n");
    7.64  
    7.65  	/*
    7.66 -	 * Set up the IO-APIC IRQ routing table by parsing the MP-BIOS
    7.67 -	 * mptable:
    7.68 +	 * Set up IO-APIC IRQ routing.
    7.69  	 */
    7.70 -	setup_ioapic_ids_from_mpc();
    7.71 +	if (!acpi_ioapic)
    7.72 +		setup_ioapic_ids_from_mpc();
    7.73  	sync_Arb_IDs();
    7.74  	setup_IO_APIC_irqs();
    7.75  	init_IO_APIC_traps();
    7.76  	check_timer();
    7.77 -	print_IO_APIC();
    7.78 +	if (!acpi_ioapic)
    7.79 +		print_IO_APIC();
    7.80  }
    7.81  
    7.82  #endif /* CONFIG_X86_IO_APIC */
    7.83 +
    7.84 +
    7.85 +
    7.86 +/* --------------------------------------------------------------------------
    7.87 +                          ACPI-based IOAPIC Configuration
    7.88 +   -------------------------------------------------------------------------- */
    7.89 +
    7.90 +#ifdef CONFIG_ACPI_BOOT
    7.91 +
    7.92 +#define IO_APIC_MAX_ID		15
    7.93 +
    7.94 +int __init io_apic_get_unique_id (int ioapic, int apic_id)
    7.95 +{
    7.96 +	struct IO_APIC_reg_00 reg_00;
    7.97 +	static unsigned long apic_id_map = 0;
    7.98 +	unsigned long flags;
    7.99 +	int i = 0;
   7.100 +
   7.101 +	/*
   7.102 +	 * The P4 platform supports up to 256 APIC IDs on two separate APIC 
   7.103 +	 * buses (one for LAPICs, one for IOAPICs), where predecessors only 
   7.104 +	 * supports up to 16 on one shared APIC bus.
   7.105 +	 * 
   7.106 +	 * TBD: Expand LAPIC/IOAPIC support on P4-class systems to take full
   7.107 +	 *      advantage of new APIC bus architecture.
   7.108 +	 */
   7.109 +
   7.110 +	if (!apic_id_map)
   7.111 +		apic_id_map = phys_cpu_present_map;
   7.112 +
   7.113 +	spin_lock_irqsave(&ioapic_lock, flags);
   7.114 +	*(int *)&reg_00 = io_apic_read(ioapic, 0);
   7.115 +	spin_unlock_irqrestore(&ioapic_lock, flags);
   7.116 +
   7.117 +	if (apic_id >= IO_APIC_MAX_ID) {
   7.118 +		printk(KERN_WARNING "IOAPIC[%d]: Invalid apic_id %d, trying "
   7.119 +			"%d\n", ioapic, apic_id, reg_00.ID);
   7.120 +		apic_id = reg_00.ID;
   7.121 +	}
   7.122 +
   7.123 +	/* XAPICs do not need unique IDs */
   7.124 +	if (clustered_apic_mode == CLUSTERED_APIC_XAPIC){
   7.125 +		printk(KERN_INFO "IOAPIC[%d]: Assigned apic_id %d\n", 
   7.126 +			ioapic, apic_id);
   7.127 +		return apic_id;
   7.128 +	}
   7.129 +
   7.130 +	/*
   7.131 +	 * Every APIC in a system must have a unique ID or we get lots of nice 
   7.132 +	 * 'stuck on smp_invalidate_needed IPI wait' messages.
   7.133 +	 */
   7.134 +	if (apic_id_map & (1 << apic_id)) {
   7.135 +
   7.136 +		for (i = 0; i < IO_APIC_MAX_ID; i++) {
   7.137 +			if (!(apic_id_map & (1 << i)))
   7.138 +				break;
   7.139 +		}
   7.140 +
   7.141 +		if (i == IO_APIC_MAX_ID)
   7.142 +			panic("Max apic_id exceeded!\n");
   7.143 +
   7.144 +		printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, "
   7.145 +			"trying %d\n", ioapic, apic_id, i);
   7.146 +
   7.147 +		apic_id = i;
   7.148 +	} 
   7.149 +
   7.150 +	apic_id_map |= (1 << apic_id);
   7.151 +
   7.152 +	if (reg_00.ID != apic_id) {
   7.153 +		reg_00.ID = apic_id;
   7.154 +
   7.155 +		spin_lock_irqsave(&ioapic_lock, flags);
   7.156 +		io_apic_write(ioapic, 0, *(int *)&reg_00);
   7.157 +		*(int *)&reg_00 = io_apic_read(ioapic, 0);
   7.158 +		spin_unlock_irqrestore(&ioapic_lock, flags);
   7.159 +
   7.160 +		/* Sanity check */
   7.161 +		if (reg_00.ID != apic_id)
   7.162 +			panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
   7.163 +	}
   7.164 +
   7.165 +	printk(KERN_INFO "IOAPIC[%d]: Assigned apic_id %d\n", ioapic, apic_id);
   7.166 +
   7.167 +	return apic_id;
   7.168 +}
   7.169 +
   7.170 +
   7.171 +int __init io_apic_get_version (int ioapic)
   7.172 +{
   7.173 +	struct IO_APIC_reg_01	reg_01;
   7.174 +	unsigned long flags;
   7.175 +
   7.176 +	spin_lock_irqsave(&ioapic_lock, flags);
   7.177 +	*(int *)&reg_01 = io_apic_read(ioapic, 1);
   7.178 +	spin_unlock_irqrestore(&ioapic_lock, flags);
   7.179 +
   7.180 +	return reg_01.version;
   7.181 +}
   7.182 +
   7.183 +
   7.184 +int __init io_apic_get_redir_entries (int ioapic)
   7.185 +{
   7.186 +	struct IO_APIC_reg_01	reg_01;
   7.187 +	unsigned long flags;
   7.188 +
   7.189 +	spin_lock_irqsave(&ioapic_lock, flags);
   7.190 +	*(int *)&reg_01 = io_apic_read(ioapic, 1);
   7.191 +	spin_unlock_irqrestore(&ioapic_lock, flags);
   7.192 +
   7.193 +	return reg_01.entries;
   7.194 +}
   7.195 +
   7.196 +
   7.197 +int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low)
   7.198 +{
   7.199 +	struct IO_APIC_route_entry entry;
   7.200 +	unsigned long flags;
   7.201 +
   7.202 +	if (!IO_APIC_IRQ(irq)) {
   7.203 +		printk(KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0/n", 
   7.204 +			ioapic);
   7.205 +		return -EINVAL;
   7.206 +	}
   7.207 +
   7.208 +	/*
   7.209 +	 * Generate a PCI IRQ routing entry and program the IOAPIC accordingly.
   7.210 +	 * Note that we mask (disable) IRQs now -- these get enabled when the
   7.211 +	 * corresponding device driver registers for this IRQ.
   7.212 +	 */
   7.213 +
   7.214 +	memset(&entry,0,sizeof(entry));
   7.215 +
   7.216 +	entry.delivery_mode = dest_LowestPrio;
   7.217 +	entry.dest_mode = INT_DELIVERY_MODE;
   7.218 +	entry.dest.logical.logical_dest = target_cpus();
   7.219 +	entry.mask = 1;					 /* Disabled (masked) */
   7.220 +	entry.trigger = edge_level;
   7.221 +	entry.polarity = active_high_low;
   7.222 +
   7.223 +	add_pin_to_irq(irq, ioapic, pin);
   7.224 +
   7.225 +	entry.vector = assign_irq_vector(irq);
   7.226 +
   7.227 +	printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
   7.228 +		"IRQ %d Mode:%i Active:%i)\n", ioapic,
   7.229 +		mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
   7.230 +
   7.231 +	if (edge_level) {
   7.232 +	irq_desc[irq].handler = &ioapic_level_irq_type;
   7.233 +	} else {
   7.234 +		irq_desc[irq].handler = &ioapic_edge_irq_type;
   7.235 +	}
   7.236 +
   7.237 +	set_intr_gate(entry.vector, interrupt[irq]);
   7.238 +
   7.239 +	if (!ioapic && (irq < 16))
   7.240 +		disable_8259A_irq(irq);
   7.241 +
   7.242 +	spin_lock_irqsave(&ioapic_lock, flags);
   7.243 +	io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1));
   7.244 +	io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0));
   7.245 +	spin_unlock_irqrestore(&ioapic_lock, flags);
   7.246 +
   7.247 +	return 0;
   7.248 +}
   7.249 +
   7.250 +#endif /*CONFIG_ACPI_BOOT*/
     8.1 --- a/xen/arch/i386/mpparse.c	Mon Apr 05 08:23:33 2004 +0000
     8.2 +++ b/xen/arch/i386/mpparse.c	Mon Apr 05 13:12:24 2004 +0000
     8.3 @@ -9,20 +9,24 @@
     8.4   *		Erich Boleyn	:	MP v1.4 and additional changes.
     8.5   *		Alan Cox	:	Added EBDA scanning
     8.6   *		Ingo Molnar	:	various cleanups and rewrites
     8.7 - *	Maciej W. Rozycki	:	Bits for default MP configurations
     8.8 + *		Maciej W. Rozycki:	Bits for default MP configurations
     8.9 + *		Paul Diefenbaugh:	Added full ACPI support
    8.10   */
    8.11  
    8.12  #include <xen/config.h>
    8.13  #include <xen/init.h>
    8.14  #include <xen/lib.h>
    8.15 -#include <asm/io.h>
    8.16 +#include <xen/kernel.h>
    8.17  #include <xen/irq.h>
    8.18  #include <xen/smp.h>
    8.19 +#include <xen/mm.h>
    8.20 +#include <xen/acpi.h>
    8.21 +#include <asm/acpi.h>
    8.22 +#include <asm/io.h>
    8.23  #include <asm/apic.h>
    8.24  #include <asm/mpspec.h>
    8.25  #include <asm/pgalloc.h>
    8.26  #include <asm/smpboot.h>
    8.27 -#include <xen/kernel.h>
    8.28  
    8.29  int numnodes = 1; /* XXX Xen */
    8.30  
    8.31 @@ -124,6 +128,8 @@ static char __init *mpc_family(int famil
    8.32  		case 0x0F:
    8.33  			if (model == 0x00)
    8.34  				return("Pentium 4(tm)");
    8.35 +			if (model == 0x01)
    8.36 +				return("Pentium 4(tm)");
    8.37  			if (model == 0x02)
    8.38  				return("Pentium 4(tm) XEON(tm)");
    8.39  			if (model == 0x0F)
    8.40 @@ -133,13 +139,6 @@ static char __init *mpc_family(int famil
    8.41  	return n;
    8.42  }
    8.43  
    8.44 -#ifdef CONFIG_X86_IO_APIC
    8.45 -// XXX Xen extern int have_acpi_tables;	/* set by acpitable.c */
    8.46 -#define have_acpi_tables (0)
    8.47 -#else
    8.48 -#define have_acpi_tables (0)
    8.49 -#endif
    8.50 -
    8.51  /* 
    8.52   * Have to match translation table entries to main table entries by counter
    8.53   * hence the mpc_record variable .... can't see a less disgusting way of
    8.54 @@ -228,6 +227,11 @@ void __init MP_processor_info (struct mp
    8.55  		boot_cpu_logical_apicid = logical_apicid;
    8.56  	}
    8.57  
    8.58 +	if (num_processors >= NR_CPUS){
    8.59 +		printk(KERN_WARNING "NR_CPUS limit of %i reached. Cannot "
    8.60 +			"boot CPU(apicid 0x%x).\n", NR_CPUS, m->mpc_apicid);
    8.61 +		return;
    8.62 +	}
    8.63  	num_processors++;
    8.64  
    8.65  	if (m->mpc_apicid > MAX_APICS) {
    8.66 @@ -444,10 +448,11 @@ static int __init smp_read_mpc(struct mp
    8.67  	
    8.68  	printk("APIC at: 0x%lX\n",mpc->mpc_lapic);
    8.69  
    8.70 -	/* save the local APIC address, it might be non-default,
    8.71 -	 * but only if we're not using the ACPI tables
    8.72 +	/* 
    8.73 +	 * Save the local APIC address (it might be non-default) -- but only
    8.74 +	 * if we're not using ACPI.
    8.75  	 */
    8.76 -	if (!have_acpi_tables)
    8.77 +	if (!acpi_lapic)
    8.78  		mp_lapic_addr = mpc->mpc_lapic;
    8.79  
    8.80  	if ((clustered_apic_mode == CLUSTERED_APIC_NUMAQ) && mpc->mpc_oemptr) {
    8.81 @@ -504,14 +509,7 @@ static int __init smp_read_mpc(struct mp
    8.82  	
    8.83  	count = (max_mp_busses * sizeof(int)) * 4;
    8.84  	count += (max_irq_sources * sizeof(struct mpc_config_intsrc));
    8.85 -	
    8.86 -	{
    8.87 -	//bus_data = alloc_bootmem(count);  XXX Xen
    8.88 -	static char arr[4096];
    8.89 -	if(count > 4096) BUG();
    8.90 -	bus_data = (void*)arr;
    8.91 -	
    8.92 -	}
    8.93 +	bus_data = (void *)__get_free_pages(GFP_KERNEL, get_order(count));
    8.94  	if (!bus_data) {
    8.95  		printk(KERN_ERR "SMP mptable: out of memory!\n");
    8.96  		return 0;
    8.97 @@ -521,7 +519,7 @@ static int __init smp_read_mpc(struct mp
    8.98  	mp_bus_id_to_local = (int *)&bus_data[(max_mp_busses * sizeof(int)) * 2];
    8.99  	mp_bus_id_to_pci_bus = (int *)&bus_data[(max_mp_busses * sizeof(int)) * 3];
   8.100  	mp_irqs = (struct mpc_config_intsrc *)&bus_data[(max_mp_busses * sizeof(int)) * 4];
   8.101 -	memset(mp_bus_id_to_pci_bus, -1, max_mp_busses);
   8.102 +	memset(mp_bus_id_to_pci_bus, -1, max_mp_busses * sizeof(int));
   8.103  
   8.104  	/*
   8.105  	 *	Now process the configuration blocks.
   8.106 @@ -534,9 +532,8 @@ static int __init smp_read_mpc(struct mp
   8.107  			{
   8.108  				struct mpc_config_processor *m=
   8.109  					(struct mpc_config_processor *)mpt;
   8.110 -
   8.111 -				/* ACPI may already have provided this one for us */
   8.112 -				if (!have_acpi_tables)
   8.113 +				/* ACPI may have already provided this data */
   8.114 +				if (!acpi_lapic)
   8.115  					MP_processor_info(m);
   8.116  				mpt += sizeof(*m);
   8.117  				count += sizeof(*m);
   8.118 @@ -689,6 +686,24 @@ static inline void __init construct_defa
   8.119  	struct mpc_config_lintsrc lintsrc;
   8.120  	int linttypes[2] = { mp_ExtINT, mp_NMI };
   8.121  	int i;
   8.122 +	struct {
   8.123 +		int mp_bus_id_to_type[MAX_MP_BUSSES];
   8.124 +		int mp_bus_id_to_node[MAX_MP_BUSSES];
   8.125 +		int mp_bus_id_to_local[MAX_MP_BUSSES];
   8.126 +		int mp_bus_id_to_pci_bus[MAX_MP_BUSSES];
   8.127 +		struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
   8.128 +	} *bus_data;
   8.129 +
   8.130 +	bus_data = (void *)__get_free_pages(GFP_KERNEL, get_order(sizeof(*bus_data)));
   8.131 +	if (!bus_data)
   8.132 +		panic("SMP mptable: out of memory!\n");
   8.133 +	mp_bus_id_to_type = bus_data->mp_bus_id_to_type;
   8.134 +	mp_bus_id_to_node = bus_data->mp_bus_id_to_node;
   8.135 +	mp_bus_id_to_local = bus_data->mp_bus_id_to_local;
   8.136 +	mp_bus_id_to_pci_bus = bus_data->mp_bus_id_to_pci_bus;
   8.137 +	mp_irqs = bus_data->mp_irqs;
   8.138 +	for (i = 0; i < MAX_MP_BUSSES; ++i)
   8.139 +		mp_bus_id_to_pci_bus[i] = -1;
   8.140  
   8.141  	/*
   8.142  	 * local APIC has default address
   8.143 @@ -765,7 +780,6 @@ static inline void __init construct_defa
   8.144  }
   8.145  
   8.146  static struct intel_mp_floating *mpf_found;
   8.147 -extern void 	config_acpi_tables(void);
   8.148  
   8.149  /*
   8.150   * Scan the memory blocks for an SMP configuration block.
   8.151 @@ -774,17 +788,19 @@ void __init get_smp_config (void)
   8.152  {
   8.153  	struct intel_mp_floating *mpf = mpf_found;
   8.154  
   8.155 -#ifdef CONFIG_X86_IO_APIC
   8.156  	/*
   8.157 -	 * Check if the ACPI tables are provided. Use them only to get
   8.158 -	 * the processor information, mainly because it provides
   8.159 -	 * the info on the logical processor(s), rather than the physical
   8.160 -	 * processor(s) that are provided by the MPS. We attempt to 
   8.161 -	 * check only if the user provided a commandline override
   8.162 +	 * ACPI may be used to obtain the entire SMP configuration or just to 
   8.163 +	 * enumerate/configure processors (CONFIG_ACPI_HT_ONLY).  Note that 
   8.164 +	 * ACPI supports both logical (e.g. Hyper-Threading) and physical 
   8.165 +	 * processors, where MPS only supports physical.
   8.166  	 */
   8.167 -        config_acpi_tables();
   8.168 -#endif
   8.169 -	
   8.170 +	if (acpi_lapic && acpi_ioapic) {
   8.171 +		printk(KERN_INFO "Using ACPI (MADT) for SMP configuration information\n");
   8.172 +		return;
   8.173 +	}
   8.174 +	else if (acpi_lapic)
   8.175 +		printk(KERN_INFO "Using ACPI for processor (LAPIC) configuration information\n");
   8.176 +
   8.177  	printk("Intel MultiProcessor Specification v1.%d\n", mpf->mpf_specification);
   8.178  	if (mpf->mpf_feature2 & (1<<7)) {
   8.179  		printk("    IMCR and PIC compatibility mode.\n");
   8.180 @@ -943,3 +959,423 @@ void __init find_smp_config (void)
   8.181  #endif
   8.182  }
   8.183  
   8.184 +
   8.185 +/* --------------------------------------------------------------------------
   8.186 +                            ACPI-based MP Configuration
   8.187 +   -------------------------------------------------------------------------- */
   8.188 +
   8.189 +#ifdef CONFIG_ACPI_BOOT
   8.190 +
   8.191 +void __init mp_register_lapic_address (
   8.192 +	u64			address)
   8.193 +{
   8.194 +	mp_lapic_addr = (unsigned long) address;
   8.195 +
   8.196 +	set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
   8.197 +
   8.198 +	if (boot_cpu_physical_apicid == -1U)
   8.199 +		boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID));
   8.200 +
   8.201 +	Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
   8.202 +}
   8.203 +
   8.204 +
   8.205 +void __init mp_register_lapic (
   8.206 +	u8			id, 
   8.207 +	u8			enabled)
   8.208 +{
   8.209 +	struct mpc_config_processor processor;
   8.210 +	int			boot_cpu = 0;
   8.211 +	
   8.212 +	if (id >= MAX_APICS) {
   8.213 +		printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
   8.214 +			id, MAX_APICS);
   8.215 +		return;
   8.216 +	}
   8.217 +
   8.218 +	if (id == boot_cpu_physical_apicid)
   8.219 +		boot_cpu = 1;
   8.220 +
   8.221 +	processor.mpc_type = MP_PROCESSOR;
   8.222 +	processor.mpc_apicid = id;
   8.223 +
   8.224 +	/*
   8.225 +	 * mp_register_lapic_address() which is called before the
   8.226 +	 * current function does the fixmap of FIX_APIC_BASE.
   8.227 +	 * Read in the correct APIC version from there
   8.228 +	 */
   8.229 +	processor.mpc_apicver = apic_read(APIC_LVR);
   8.230 +
   8.231 +	processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0);
   8.232 +	processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0);
   8.233 +	processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | 
   8.234 +		(boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
   8.235 +	processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
   8.236 +	processor.mpc_reserved[0] = 0;
   8.237 +	processor.mpc_reserved[1] = 0;
   8.238 +
   8.239 +	MP_processor_info(&processor);
   8.240 +}
   8.241 +
   8.242 +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
   8.243 +
   8.244 +#define MP_ISA_BUS		0
   8.245 +#define MP_MAX_IOAPIC_PIN	127
   8.246 +
   8.247 +struct mp_ioapic_routing {
   8.248 +	int			apic_id;
   8.249 +	int			irq_start;
   8.250 +	int			irq_end;
   8.251 +	u32			pin_programmed[4];
   8.252 +} mp_ioapic_routing[MAX_IO_APICS];
   8.253 +
   8.254 +
   8.255 +static int __init mp_find_ioapic (
   8.256 +	int			irq)
   8.257 +{
   8.258 +	int			i = 0;
   8.259 +
   8.260 +	/* Find the IOAPIC that manages this IRQ. */
   8.261 +	for (i = 0; i < nr_ioapics; i++) {
   8.262 +		if ((irq >= mp_ioapic_routing[i].irq_start)
   8.263 +			&& (irq <= mp_ioapic_routing[i].irq_end))
   8.264 +			return i;
   8.265 +	}
   8.266 +
   8.267 +	printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq);
   8.268 +
   8.269 +	return -1;
   8.270 +}
   8.271 +	
   8.272 +
   8.273 +void __init mp_register_ioapic (
   8.274 +	u8			id, 
   8.275 +	u32			address,
   8.276 +	u32			irq_base)
   8.277 +{
   8.278 +	int			idx = 0;
   8.279 +
   8.280 +	if (nr_ioapics >= MAX_IO_APICS) {
   8.281 +		printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
   8.282 +			"(found %d)\n", MAX_IO_APICS, nr_ioapics);
   8.283 +		panic("Recompile kernel with bigger MAX_IO_APICS!\n");
   8.284 +	}
   8.285 +	if (!address) {
   8.286 +		printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"
   8.287 +			" found in MADT table, skipping!\n");
   8.288 +		return;
   8.289 +	}
   8.290 +
   8.291 +	idx = nr_ioapics++;
   8.292 +
   8.293 +	mp_ioapics[idx].mpc_type = MP_IOAPIC;
   8.294 +	mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE;
   8.295 +	mp_ioapics[idx].mpc_apicaddr = address;
   8.296 +
   8.297 +	set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
   8.298 +	mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id);
   8.299 +	mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
   8.300 +	
   8.301 +	/* 
   8.302 +	 * Build basic IRQ lookup table to facilitate irq->io_apic lookups
   8.303 +	 * and to prevent reprogramming of IOAPIC pins (PCI IRQs).
   8.304 +	 */
   8.305 +	mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mpc_apicid;
   8.306 +	mp_ioapic_routing[idx].irq_start = irq_base;
   8.307 +	mp_ioapic_routing[idx].irq_end = irq_base + 
   8.308 +		io_apic_get_redir_entries(idx);
   8.309 +
   8.310 +	printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
   8.311 +		"IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, 
   8.312 +		mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
   8.313 +		mp_ioapic_routing[idx].irq_start,
   8.314 +		mp_ioapic_routing[idx].irq_end);
   8.315 +
   8.316 +	return;
   8.317 +}
   8.318 +
   8.319 +
   8.320 +void __init mp_override_legacy_irq (
   8.321 +	u8			bus_irq,
   8.322 +	u8			polarity, 
   8.323 +	u8			trigger, 
   8.324 +	u32			global_irq)
   8.325 +{
   8.326 +	struct mpc_config_intsrc intsrc;
   8.327 +	int			i = 0;
   8.328 +	int			found = 0;
   8.329 +	int			ioapic = -1;
   8.330 +	int			pin = -1;
   8.331 +
   8.332 +	/* 
   8.333 +	 * Convert 'global_irq' to 'ioapic.pin'.
   8.334 +	 */
   8.335 +	ioapic = mp_find_ioapic(global_irq);
   8.336 +	if (ioapic < 0)
   8.337 +		return;
   8.338 +	pin = global_irq - mp_ioapic_routing[ioapic].irq_start;
   8.339 +
   8.340 +	/*
   8.341 +	 * TBD: This check is for faulty timer entries, where the override
   8.342 +	 *      erroneously sets the trigger to level, resulting in a HUGE 
   8.343 +	 *      increase of timer interrupts!
   8.344 +	 */
   8.345 +	if ((bus_irq == 0) && (global_irq == 2) && (trigger == 3))
   8.346 +		trigger = 1;
   8.347 +
   8.348 +	intsrc.mpc_type = MP_INTSRC;
   8.349 +	intsrc.mpc_irqtype = mp_INT;
   8.350 +	intsrc.mpc_irqflag = (trigger << 2) | polarity;
   8.351 +	intsrc.mpc_srcbus = MP_ISA_BUS;
   8.352 +	intsrc.mpc_srcbusirq = bus_irq;				       /* IRQ */
   8.353 +	intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;	   /* APIC ID */
   8.354 +	intsrc.mpc_dstirq = pin;				    /* INTIN# */
   8.355 +
   8.356 +	Dprintk("Int: type %d, pol %d, trig %d, bus %d, irq %d, %d-%d\n",
   8.357 +		intsrc.mpc_irqtype, intsrc.mpc_irqflag & 3, 
   8.358 +		(intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus, 
   8.359 +		intsrc.mpc_srcbusirq, intsrc.mpc_dstapic, intsrc.mpc_dstirq);
   8.360 +
   8.361 +	/* 
   8.362 +	 * If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it.
   8.363 +	 * Otherwise create a new entry (e.g. global_irq == 2).
   8.364 +	 */
   8.365 +	for (i = 0; i < mp_irq_entries; i++) {
   8.366 +		if ((mp_irqs[i].mpc_dstapic == intsrc.mpc_dstapic) 
   8.367 +			&& (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) {
   8.368 +			mp_irqs[i] = intsrc;
   8.369 +			found = 1;
   8.370 +			break;
   8.371 +		}
   8.372 +	}
   8.373 +	if (!found) {
   8.374 +		mp_irqs[mp_irq_entries] = intsrc;
   8.375 +		if (++mp_irq_entries == MAX_IRQ_SOURCES)
   8.376 +			panic("Max # of irq sources exceeded!\n");
   8.377 +	}
   8.378 +
   8.379 +	return;
   8.380 +}
   8.381 +
   8.382 +
   8.383 +void __init mp_config_acpi_legacy_irqs (void)
   8.384 +{
   8.385 +	int			i = 0;
   8.386 +	int			ioapic = -1;
   8.387 +
   8.388 +	/*
   8.389 +	 * Initialize mp_irqs for IRQ configuration.
   8.390 +	 */
   8.391 +	unsigned char *bus_data;
   8.392 +	int count;
   8.393 +
   8.394 +	count = (MAX_MP_BUSSES * sizeof(int)) * 4;
   8.395 +	count += (MAX_IRQ_SOURCES * sizeof(int)) * 4;
   8.396 +	bus_data = (void *)__get_free_pages(GFP_KERNEL, get_order(count));
   8.397 +	if (!bus_data) {
   8.398 +		panic("Fatal: can't allocate bus memory for ACPI legacy IRQ!");
   8.399 +	}
   8.400 +	mp_bus_id_to_type = (int *)&bus_data[0];
   8.401 +	mp_bus_id_to_node = (int *)&bus_data[(MAX_MP_BUSSES * sizeof(int))];
   8.402 +	mp_bus_id_to_local = (int *)&bus_data[(MAX_MP_BUSSES * sizeof(int)) * 2];
   8.403 +	mp_bus_id_to_pci_bus = (int *)&bus_data[(MAX_MP_BUSSES * sizeof(int)) * 3];
   8.404 +	mp_irqs = (struct mpc_config_intsrc *)&bus_data[(MAX_MP_BUSSES * sizeof(int)) * 4];
   8.405 +	for (i = 0; i < MAX_MP_BUSSES; ++i)
   8.406 +	  mp_bus_id_to_pci_bus[i] = -1;
   8.407 +
   8.408 +	/* 
   8.409 +	 * Fabricate the legacy ISA bus (bus #31).
   8.410 +	 */
   8.411 +	mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA;
   8.412 +	Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
   8.413 +
   8.414 +	/* 
   8.415 +	 * Locate the IOAPIC that manages the ISA IRQs (0-15). 
   8.416 +	 */
   8.417 +	ioapic = mp_find_ioapic(0);
   8.418 +	if (ioapic < 0)
   8.419 +		return;
   8.420 +
   8.421 +	/* 
   8.422 +	 * Use the default configuration for the IRQs 0-15.  These may be
   8.423 +	 * overriden by (MADT) interrupt source override entries.
   8.424 +	 */
   8.425 +	for (i = 0; i < 16; i++) {
   8.426 +
   8.427 +		if (i == 2) continue;			/* Don't connect IRQ2 */
   8.428 +
   8.429 +		mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC;
   8.430 +		mp_irqs[mp_irq_entries].mpc_irqflag = 0;	/* Conforming */
   8.431 +		mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS;
   8.432 +		mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
   8.433 +		mp_irqs[mp_irq_entries].mpc_irqtype = i ? mp_INT : mp_ExtINT;   /* 8259A to #0 */
   8.434 +		mp_irqs[mp_irq_entries].mpc_srcbusirq = i;	   /* Identity mapped */
   8.435 +		mp_irqs[mp_irq_entries].mpc_dstirq = i;
   8.436 +
   8.437 +		Dprintk("Int: type %d, pol %d, trig %d, bus %d, irq %d, "
   8.438 +			"%d-%d\n", 
   8.439 +			mp_irqs[mp_irq_entries].mpc_irqtype, 
   8.440 +			mp_irqs[mp_irq_entries].mpc_irqflag & 3, 
   8.441 +			(mp_irqs[mp_irq_entries].mpc_irqflag >> 2) & 3, 
   8.442 +			mp_irqs[mp_irq_entries].mpc_srcbus, 
   8.443 +			mp_irqs[mp_irq_entries].mpc_srcbusirq, 
   8.444 +			mp_irqs[mp_irq_entries].mpc_dstapic, 
   8.445 +			mp_irqs[mp_irq_entries].mpc_dstirq);
   8.446 +
   8.447 +		if (++mp_irq_entries == MAX_IRQ_SOURCES)
   8.448 +			panic("Max # of irq sources exceeded!\n");
   8.449 +	}
   8.450 +}
   8.451 +
   8.452 +/*extern FADT_DESCRIPTOR acpi_fadt;*/
   8.453 +
   8.454 +void __init mp_config_ioapic_for_sci(int irq)
   8.455 +{
   8.456 +	int ioapic;
   8.457 +	int ioapic_pin;
   8.458 +	struct acpi_table_madt* madt;
   8.459 +	struct acpi_table_int_src_ovr *entry = NULL;
   8.460 +	acpi_interrupt_flags flags;
   8.461 +	void *madt_end;
   8.462 +	acpi_status status;
   8.463 +
   8.464 +	/*
   8.465 +	 * Ensure that if there is an interrupt source override entry
   8.466 +	 * for the ACPI SCI, we leave it as is. Unfortunately this involves
   8.467 +	 * walking the MADT again.
   8.468 +	 */
   8.469 +	status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
   8.470 +		(struct acpi_table_header **) &madt);
   8.471 +	if (ACPI_SUCCESS(status)) {
   8.472 +		madt_end = (void *) (unsigned long)madt + madt->header.length;
   8.473 +
   8.474 +		entry = (struct acpi_table_int_src_ovr *)
   8.475 +                ((unsigned long) madt + sizeof(struct acpi_table_madt));
   8.476 +
   8.477 +		while ((void *) entry < madt_end) {
   8.478 +                	if (entry->header.type == ACPI_MADT_INT_SRC_OVR &&
   8.479 +			    acpi_fadt.sci_int == entry->bus_irq)
   8.480 +				goto found;
   8.481 +			
   8.482 +                	entry = (struct acpi_table_int_src_ovr *)
   8.483 +                	        ((unsigned long) entry + entry->header.length);
   8.484 +        	}
   8.485 +	}
   8.486 +	/*
   8.487 +	 * Although the ACPI spec says that the SCI should be level/low
   8.488 +	 * don't reprogram it unless there is an explicit MADT OVR entry
   8.489 +	 * instructing us to do so -- otherwise we break Tyan boards which
   8.490 +	 * have the SCI wired edge/high but no MADT OVR.
   8.491 +	 */
   8.492 +	return;
   8.493 +
   8.494 +found:
   8.495 +	/*
   8.496 +	 * See the note at the end of ACPI 2.0b section
   8.497 +	 * 5.2.10.8 for what this is about.
   8.498 +	 */
   8.499 +	flags = entry->flags;
   8.500 +	acpi_fadt.sci_int = entry->global_irq;
   8.501 +	irq = entry->global_irq;
   8.502 +	
   8.503 +	ioapic = mp_find_ioapic(irq);
   8.504 +
   8.505 +	ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
   8.506 +
   8.507 +	/*
   8.508 +	 * MPS INTI flags:
   8.509 +	 *  trigger: 0=default, 1=edge, 3=level
   8.510 +	 *  polarity: 0=default, 1=high, 3=low
   8.511 +	 * Per ACPI spec, default for SCI means level/low.
   8.512 +	 */
   8.513 +	io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 
   8.514 +		(flags.trigger == 1 ? 0 : 1), (flags.polarity == 1 ? 0 : 1));
   8.515 +}
   8.516 +
   8.517 +
   8.518 +#ifdef CONFIG_ACPI_PCI
   8.519 +
   8.520 +void __init mp_parse_prt (void)
   8.521 +{
   8.522 +	struct list_head	*node = NULL;
   8.523 +	struct acpi_prt_entry	*entry = NULL;
   8.524 +	int			ioapic = -1;
   8.525 +	int			ioapic_pin = 0;
   8.526 +	int			irq = 0;
   8.527 +	int			idx, bit = 0;
   8.528 +	int			edge_level = 0;
   8.529 +	int			active_high_low = 0;
   8.530 +
   8.531 +	/*
   8.532 +	 * Parsing through the PCI Interrupt Routing Table (PRT) and program
   8.533 +	 * routing for all entries.
   8.534 +	 */
   8.535 +	list_for_each(node, &acpi_prt.entries) {
   8.536 +		entry = list_entry(node, struct acpi_prt_entry, node);
   8.537 +
   8.538 +		/* Need to get irq for dynamic entry */
   8.539 +		if (entry->link.handle) {
   8.540 +			irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
   8.541 +			if (!irq)
   8.542 +				continue;
   8.543 +		}
   8.544 +		else {
   8.545 +			/* Hardwired IRQ. Assume PCI standard settings */
   8.546 +			irq = entry->link.index;
   8.547 +			edge_level = 1;
   8.548 +			active_high_low = 1;
   8.549 +		}
   8.550 +
   8.551 +		/* Don't set up the ACPI SCI because it's already set up */
   8.552 +                if (acpi_fadt.sci_int == irq) {
   8.553 +                        entry->irq = irq; /*we still need to set entry's irq*/
   8.554 +			continue;
   8.555 +                }
   8.556 +	
   8.557 +		ioapic = mp_find_ioapic(irq);
   8.558 +		if (ioapic < 0)
   8.559 +			continue;
   8.560 +		ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
   8.561 +
   8.562 +		/* 
   8.563 +		 * Avoid pin reprogramming.  PRTs typically include entries  
   8.564 +		 * with redundant pin->irq mappings (but unique PCI devices);
   8.565 +		 * we only only program the IOAPIC on the first.
   8.566 +		 */
   8.567 +		bit = ioapic_pin % 32;
   8.568 +		idx = (ioapic_pin < 32) ? 0 : (ioapic_pin / 32);
   8.569 +		if (idx > 3) {
   8.570 +			printk(KERN_ERR "Invalid reference to IOAPIC pin "
   8.571 +				"%d-%d\n", mp_ioapic_routing[ioapic].apic_id, 
   8.572 +				ioapic_pin);
   8.573 +			continue;
   8.574 +		}
   8.575 +		if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
   8.576 +			printk(KERN_DEBUG "Pin %d-%d already programmed\n",
   8.577 +				mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
   8.578 +			entry->irq = irq;
   8.579 +			continue;
   8.580 +		}
   8.581 +
   8.582 +		mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
   8.583 +
   8.584 +		if (!io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low))
   8.585 +			entry->irq = irq;
   8.586 +
   8.587 +		printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d\n",
   8.588 +			entry->id.segment, entry->id.bus, 
   8.589 +			entry->id.device, ('A' + entry->pin), 
   8.590 +			mp_ioapic_routing[ioapic].apic_id, ioapic_pin, 
   8.591 +			entry->irq);
   8.592 +	}
   8.593 +	
   8.594 +	print_IO_APIC();
   8.595 +
   8.596 +	return;
   8.597 +}
   8.598 +
   8.599 +#endif /*CONFIG_ACPI_PCI*/
   8.600 +
   8.601 +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/
   8.602 +
   8.603 +#endif /*CONFIG_ACPI*/
     9.1 --- a/xen/arch/i386/pci-i386.c	Mon Apr 05 08:23:33 2004 +0000
     9.2 +++ b/xen/arch/i386/pci-i386.c	Mon Apr 05 13:12:24 2004 +0000
     9.3 @@ -295,6 +295,17 @@ static void __init pcibios_assign_resour
     9.4  	}
     9.5  }
     9.6  
     9.7 +void __init pcibios_set_cacheline_size(void)
     9.8 +{
     9.9 +	struct cpuinfo_x86 *c = &boot_cpu_data;
    9.10 +
    9.11 +	pci_cache_line_size = 32 >> 2;
    9.12 +	if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD)
    9.13 +		pci_cache_line_size = 64 >> 2;	/* K7 & K8 */
    9.14 +	else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL)
    9.15 +		pci_cache_line_size = 128 >> 2;	/* P4 */
    9.16 +}
    9.17 +
    9.18  void __init pcibios_resource_survey(void)
    9.19  {
    9.20  	DBG("PCI: Allocating resources\n");
    10.1 --- a/xen/arch/i386/pci-i386.h	Mon Apr 05 08:23:33 2004 +0000
    10.2 +++ b/xen/arch/i386/pci-i386.h	Mon Apr 05 13:12:24 2004 +0000
    10.3 @@ -27,8 +27,10 @@ extern unsigned int pci_probe;
    10.4  /* pci-i386.c */
    10.5  
    10.6  extern unsigned int pcibios_max_latency;
    10.7 +extern u8 pci_cache_line_size;
    10.8  
    10.9  void pcibios_resource_survey(void);
   10.10 +void pcibios_set_cacheline_size(void);
   10.11  int pcibios_enable_resources(struct pci_dev *, int);
   10.12  
   10.13  /* pci-pc.c */
    11.1 --- a/xen/arch/i386/pci-irq.c	Mon Apr 05 08:23:33 2004 +0000
    11.2 +++ b/xen/arch/i386/pci-irq.c	Mon Apr 05 13:12:24 2004 +0000
    11.3 @@ -6,15 +6,15 @@
    11.4  
    11.5  #include <xen/config.h>
    11.6  #include <xen/types.h>
    11.7 +#include <xen/kernel.h>
    11.8  #include <xen/pci.h>
    11.9  #include <xen/init.h>
   11.10  #include <xen/slab.h>
   11.11  #include <xen/interrupt.h>
   11.12  #include <xen/irq.h>
   11.13 -#include <xen/sched.h>
   11.14 +
   11.15  #include <asm/io.h>
   11.16  #include <asm/smp.h>
   11.17 -#include <asm/mpspec.h>
   11.18  #include <asm/io_apic.h>
   11.19  
   11.20  #include "pci-i386.h"
   11.21 @@ -45,6 +45,11 @@ struct irq_router {
   11.22  	int (*set)(struct pci_dev *router, struct pci_dev *dev, int pirq, int new);
   11.23  };
   11.24  
   11.25 +struct irq_router_handler {
   11.26 +	u16 vendor;
   11.27 +	int (*probe)(struct irq_router *r, struct pci_dev *router, u16 device);
   11.28 +};
   11.29 +
   11.30  /*
   11.31   *  Search 0xf0000 -- 0xfffff for the PCI IRQ Routing Table.
   11.32   */
   11.33 @@ -115,7 +120,7 @@ static void __init pirq_peer_trick(void)
   11.34   *  Code for querying and setting of IRQ routes on various interrupt routers.
   11.35   */
   11.36  
   11.37 -static void eisa_set_level_irq(unsigned int irq)
   11.38 +void eisa_set_level_irq(unsigned int irq)
   11.39  {
   11.40  	unsigned char mask = 1 << (irq & 7);
   11.41  	unsigned int port = 0x4d0 + (irq >> 3);
   11.42 @@ -195,15 +200,16 @@ static int pirq_piix_set(struct pci_dev 
   11.43  /*
   11.44   * The VIA pirq rules are nibble-based, like ALI,
   11.45   * but without the ugly irq number munging.
   11.46 + * However, PIRQD is in the upper instead of lower nibble.
   11.47   */
   11.48  static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
   11.49  {
   11.50 -	return read_config_nybble(router, 0x55, pirq);
   11.51 +	return read_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq);
   11.52  }
   11.53  
   11.54  static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
   11.55  {
   11.56 -	write_config_nybble(router, 0x55, pirq, irq);
   11.57 +	write_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq, irq);
   11.58  	return 1;
   11.59  }
   11.60  
   11.61 @@ -255,111 +261,221 @@ static int pirq_cyrix_set(struct pci_dev
   11.62  }
   11.63  
   11.64  /*
   11.65 - *	PIRQ routing for SiS 85C503 router used in several SiS chipsets
   11.66 - *	According to the SiS 5595 datasheet (preliminary V1.0, 12/24/1997)
   11.67 - *	the related registers work as follows:
   11.68 - *	
   11.69 - *	general: one byte per re-routable IRQ,
   11.70 + *	PIRQ routing for SiS 85C503 router used in several SiS chipsets.
   11.71 + *	We have to deal with the following issues here:
   11.72 + *	- vendors have different ideas about the meaning of link values
   11.73 + *	- some onboard devices (integrated in the chipset) have special
   11.74 + *	  links and are thus routed differently (i.e. not via PCI INTA-INTD)
   11.75 + *	- different revision of the router have a different layout for
   11.76 + *	  the routing registers, particularly for the onchip devices
   11.77 + *
   11.78 + *	For all routing registers the common thing is we have one byte
   11.79 + *	per routeable link which is defined as:
   11.80   *		 bit 7      IRQ mapping enabled (0) or disabled (1)
   11.81 - *		 bits [6:4] reserved
   11.82 + *		 bits [6:4] reserved (sometimes used for onchip devices)
   11.83   *		 bits [3:0] IRQ to map to
   11.84   *		     allowed: 3-7, 9-12, 14-15
   11.85   *		     reserved: 0, 1, 2, 8, 13
   11.86   *
   11.87 - *	individual registers in device config space:
   11.88 - *
   11.89 - *	0x41/0x42/0x43/0x44:	PCI INT A/B/C/D - bits as in general case
   11.90 - *
   11.91 - *	0x61:			IDEIRQ: bits as in general case - but:
   11.92 - *				bits [6:5] must be written 01
   11.93 - *				bit 4 channel-select primary (0), secondary (1)
   11.94 - *
   11.95 - *	0x62:			USBIRQ: bits as in general case - but:
   11.96 - *				bit 4 OHCI function disabled (0), enabled (1)
   11.97 + *	The config-space registers located at 0x41/0x42/0x43/0x44 are
   11.98 + *	always used to route the normal PCI INT A/B/C/D respectively.
   11.99 + *	Apparently there are systems implementing PCI routing table using
  11.100 + *	link values 0x01-0x04 and others using 0x41-0x44 for PCI INTA..D.
  11.101 + *	We try our best to handle both link mappings.
  11.102   *	
  11.103 - *	0x6a:			ACPI/SCI IRQ - bits as in general case
  11.104 + *	Currently (2003-05-21) it appears most SiS chipsets follow the
  11.105 + *	definition of routing registers from the SiS-5595 southbridge.
  11.106 + *	According to the SiS 5595 datasheets the revision id's of the
  11.107 + *	router (ISA-bridge) should be 0x01 or 0xb0.
  11.108   *
  11.109 - *	0x7e:			Data Acq. Module IRQ - bits as in general case
  11.110 + *	Furthermore we've also seen lspci dumps with revision 0x00 and 0xb1.
  11.111 + *	Looks like these are used in a number of SiS 5xx/6xx/7xx chipsets.
  11.112 + *	They seem to work with the current routing code. However there is
  11.113 + *	some concern because of the two USB-OHCI HCs (original SiS 5595
  11.114 + *	had only one). YMMV.
  11.115 + *
  11.116 + *	Onchip routing for router rev-id 0x01/0xb0 and probably 0x00/0xb1:
  11.117 + *
  11.118 + *	0x61:	IDEIRQ:
  11.119 + *		bits [6:5] must be written 01
  11.120 + *		bit 4 channel-select primary (0), secondary (1)
  11.121   *
  11.122 - *	Apparently there are systems implementing PCI routing table using both
  11.123 - *	link values 0x01-0x04 and 0x41-0x44 for PCI INTA..D, but register offsets
  11.124 - *	like 0x62 as link values for USBIRQ e.g. So there is no simple
  11.125 - *	"register = offset + pirq" relation.
  11.126 - *	Currently we support PCI INTA..D and USBIRQ and try our best to handle
  11.127 - *	both link mappings.
  11.128 - *	IDE/ACPI/DAQ mapping is currently unsupported (left untouched as set by BIOS).
  11.129 + *	0x62:	USBIRQ:
  11.130 + *		bit 6 OHCI function disabled (0), enabled (1)
  11.131 + *	
  11.132 + *	0x6a:	ACPI/SCI IRQ: bits 4-6 reserved
  11.133 + *
  11.134 + *	0x7e:	Data Acq. Module IRQ - bits 4-6 reserved
  11.135 + *
  11.136 + *	We support USBIRQ (in addition to INTA-INTD) and keep the
  11.137 + *	IDE, ACPI and DAQ routing untouched as set by the BIOS.
  11.138 + *
  11.139 + *	Currently the only reported exception is the new SiS 65x chipset
  11.140 + *	which includes the SiS 69x southbridge. Here we have the 85C503
  11.141 + *	router revision 0x04 and there are changes in the register layout
  11.142 + *	mostly related to the different USB HCs with USB 2.0 support.
  11.143 + *
  11.144 + *	Onchip routing for router rev-id 0x04 (try-and-error observation)
  11.145 + *
  11.146 + *	0x60/0x61/0x62/0x63:	1xEHCI and 3xOHCI (companion) USB-HCs
  11.147 + *				bit 6-4 are probably unused, not like 5595
  11.148   */
  11.149  
  11.150 -static int pirq_sis_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
  11.151 +#define PIRQ_SIS_IRQ_MASK	0x0f
  11.152 +#define PIRQ_SIS_IRQ_DISABLE	0x80
  11.153 +#define PIRQ_SIS_USB_ENABLE	0x40
  11.154 +#define PIRQ_SIS_DETECT_REGISTER 0x40
  11.155 +
  11.156 +/* return value:
  11.157 + * -1 on error
  11.158 + * 0 for PCI INTA-INTD
  11.159 + * 0 or enable bit mask to check or set for onchip functions
  11.160 + */
  11.161 +static inline int pirq_sis5595_onchip(int pirq, int *reg)
  11.162 +{
  11.163 +	int ret = -1;
  11.164 +
  11.165 +	*reg = pirq;
  11.166 +	switch(pirq) {
  11.167 +	case 0x01:
  11.168 +	case 0x02:
  11.169 +	case 0x03:
  11.170 +	case 0x04:
  11.171 +		*reg += 0x40;
  11.172 +	case 0x41:
  11.173 +	case 0x42:
  11.174 +	case 0x43:
  11.175 +	case 0x44:
  11.176 +		ret = 0;
  11.177 +		break;
  11.178 +
  11.179 +	case 0x62:
  11.180 +		ret = PIRQ_SIS_USB_ENABLE;	/* documented for 5595 */
  11.181 +		break;
  11.182 +
  11.183 +	case 0x61:
  11.184 +	case 0x6a:
  11.185 +	case 0x7e:
  11.186 +		printk(KERN_INFO "SiS pirq: IDE/ACPI/DAQ mapping not implemented: (%u)\n",
  11.187 +		       (unsigned) pirq);
  11.188 +		/* fall thru */
  11.189 +	default:
  11.190 +		printk(KERN_INFO "SiS router unknown request: (%u)\n",
  11.191 +		       (unsigned) pirq);
  11.192 +		break;
  11.193 +	}
  11.194 +	return ret;
  11.195 +}		
  11.196 +
  11.197 +/* return value:
  11.198 + * -1 on error
  11.199 + * 0 for PCI INTA-INTD
  11.200 + * 0 or enable bit mask to check or set for onchip functions
  11.201 + */
  11.202 +static inline int pirq_sis96x_onchip(int pirq, int *reg)
  11.203 +{
  11.204 +	int ret = -1;
  11.205 +
  11.206 +	*reg = pirq;
  11.207 +	switch(pirq) {
  11.208 +	case 0x01:
  11.209 +	case 0x02:
  11.210 +	case 0x03:
  11.211 +	case 0x04:
  11.212 +		*reg += 0x40;
  11.213 +	case 0x41:
  11.214 +	case 0x42:
  11.215 +	case 0x43:
  11.216 +	case 0x44:
  11.217 +	case 0x60:
  11.218 +	case 0x61:
  11.219 +	case 0x62:
  11.220 +	case 0x63:
  11.221 +		ret = 0;
  11.222 +		break;
  11.223 +
  11.224 +	default:
  11.225 +		printk(KERN_INFO "SiS router unknown request: (%u)\n",
  11.226 +		       (unsigned) pirq);
  11.227 +		break;
  11.228 +	}
  11.229 +	return ret;
  11.230 +}		
  11.231 +
  11.232 +
  11.233 +static int pirq_sis5595_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
  11.234  {
  11.235  	u8 x;
  11.236 -	int reg = pirq;
  11.237 +	int reg, check;
  11.238 +
  11.239 +	check = pirq_sis5595_onchip(pirq, &reg);
  11.240 +	if (check < 0)
  11.241 +		return 0;
  11.242  
  11.243 -	switch(pirq) {
  11.244 -		case 0x01:
  11.245 -		case 0x02:
  11.246 -		case 0x03:
  11.247 -		case 0x04:
  11.248 -			reg += 0x40;
  11.249 -		case 0x41:
  11.250 -		case 0x42:
  11.251 -		case 0x43:
  11.252 -		case 0x44:
  11.253 -		case 0x62:
  11.254 -			pci_read_config_byte(router, reg, &x);
  11.255 -			if (reg != 0x62)
  11.256 -				break;
  11.257 -			if (!(x & 0x40))
  11.258 -				return 0;
  11.259 -			break;
  11.260 -		case 0x61:
  11.261 -		case 0x6a:
  11.262 -		case 0x7e:
  11.263 -			printk(KERN_INFO "SiS pirq: advanced IDE/ACPI/DAQ mapping not yet implemented\n");
  11.264 -			return 0;
  11.265 -		default:			
  11.266 -			printk(KERN_INFO "SiS router pirq escape (%d)\n", pirq);
  11.267 -			return 0;
  11.268 -	}
  11.269 -	return (x & 0x80) ? 0 : (x & 0x0f);
  11.270 +	pci_read_config_byte(router, reg, &x);
  11.271 +	if (check != 0  &&  !(x & check))
  11.272 +		return 0;
  11.273 +
  11.274 +	return (x & PIRQ_SIS_IRQ_DISABLE) ? 0 : (x & PIRQ_SIS_IRQ_MASK);
  11.275  }
  11.276  
  11.277 -static int pirq_sis_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
  11.278 +static int pirq_sis96x_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
  11.279  {
  11.280  	u8 x;
  11.281 -	int reg = pirq;
  11.282 +	int reg, check;
  11.283 +
  11.284 +	check = pirq_sis96x_onchip(pirq, &reg);
  11.285 +	if (check < 0)
  11.286 +		return 0;
  11.287 +
  11.288 +	pci_read_config_byte(router, reg, &x);
  11.289 +	if (check != 0  &&  !(x & check))
  11.290 +		return 0;
  11.291 +
  11.292 +	return (x & PIRQ_SIS_IRQ_DISABLE) ? 0 : (x & PIRQ_SIS_IRQ_MASK);
  11.293 +}
  11.294  
  11.295 -	switch(pirq) {
  11.296 -		case 0x01:
  11.297 -		case 0x02:
  11.298 -		case 0x03:
  11.299 -		case 0x04:
  11.300 -			reg += 0x40;
  11.301 -		case 0x41:
  11.302 -		case 0x42:
  11.303 -		case 0x43:
  11.304 -		case 0x44:
  11.305 -		case 0x62:
  11.306 -			x = (irq&0x0f) ? (irq&0x0f) : 0x80;
  11.307 -			if (reg != 0x62)
  11.308 -				break;
  11.309 -			/* always mark OHCI enabled, as nothing else knows about this */
  11.310 -			x |= 0x40;
  11.311 -			break;
  11.312 -		case 0x61:
  11.313 -		case 0x6a:
  11.314 -		case 0x7e:
  11.315 -			printk(KERN_INFO "advanced SiS pirq mapping not yet implemented\n");
  11.316 -			return 0;
  11.317 -		default:			
  11.318 -			printk(KERN_INFO "SiS router pirq escape (%d)\n", pirq);
  11.319 -			return 0;
  11.320 -	}
  11.321 +static int pirq_sis5595_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
  11.322 +{
  11.323 +	u8 x;
  11.324 +	int reg, set;
  11.325 +
  11.326 +	set = pirq_sis5595_onchip(pirq, &reg);
  11.327 +	if (set < 0)
  11.328 +		return 0;
  11.329 +
  11.330 +	x = (irq & PIRQ_SIS_IRQ_MASK);
  11.331 +	if (x == 0)
  11.332 +		x = PIRQ_SIS_IRQ_DISABLE;
  11.333 +	else
  11.334 +		x |= set;
  11.335 +
  11.336  	pci_write_config_byte(router, reg, x);
  11.337  
  11.338  	return 1;
  11.339  }
  11.340  
  11.341 +static int pirq_sis96x_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
  11.342 +{
  11.343 +	u8 x;
  11.344 +	int reg, set;
  11.345 +
  11.346 +	set = pirq_sis96x_onchip(pirq, &reg);
  11.347 +	if (set < 0)
  11.348 +		return 0;
  11.349 +
  11.350 +	x = (irq & PIRQ_SIS_IRQ_MASK);
  11.351 +	if (x == 0)
  11.352 +		x = PIRQ_SIS_IRQ_DISABLE;
  11.353 +	else
  11.354 +		x |= set;
  11.355 +
  11.356 +	pci_write_config_byte(router, reg, x);
  11.357 +
  11.358 +	return 1;
  11.359 +}
  11.360 +
  11.361 +
  11.362  /*
  11.363   * VLSI: nibble offset 0x74 - educated guess due to routing table and
  11.364   *       config space of VLSI 82C534 PCI-bridge/router (1004:0102)
  11.365 @@ -452,94 +568,264 @@ static int pirq_bios_set(struct pci_dev 
  11.366  	return pcibios_set_irq_routing(bridge, pin, irq);
  11.367  }
  11.368  
  11.369 -static struct irq_router pirq_bios_router =
  11.370 -	{ "BIOS", 0, 0, NULL, pirq_bios_set };
  11.371 -
  11.372  #endif
  11.373  
  11.374 -static struct irq_router pirq_routers[] = {
  11.375 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_0, pirq_piix_get, pirq_piix_set },
  11.376 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, pirq_piix_get, pirq_piix_set },
  11.377 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, pirq_piix_get, pirq_piix_set },
  11.378 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371MX,   pirq_piix_get, pirq_piix_set },
  11.379 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_0, pirq_piix_get, pirq_piix_set },
  11.380 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, pirq_piix_get, pirq_piix_set },
  11.381 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, pirq_piix_get, pirq_piix_set },
  11.382 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, pirq_piix_get, pirq_piix_set },
  11.383 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, pirq_piix_get, pirq_piix_set },
  11.384 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, pirq_piix_get, pirq_piix_set },
  11.385 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, pirq_piix_get, pirq_piix_set },
  11.386 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, pirq_piix_get, pirq_piix_set },
  11.387 -	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, pirq_piix_get, pirq_piix_set },
  11.388 +
  11.389 +static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.390 +{
  11.391 +	/* We must not touch 440GX even if we have tables. 440GX has
  11.392 +	   different IRQ routing weirdness */
  11.393 +	if(pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0, NULL) ||
  11.394 +	   pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2, NULL))
  11.395 +		return 0;
  11.396 +	switch(device)
  11.397 +	{
  11.398 +		case PCI_DEVICE_ID_INTEL_82371FB_0:
  11.399 +		case PCI_DEVICE_ID_INTEL_82371SB_0:
  11.400 +		case PCI_DEVICE_ID_INTEL_82371AB_0:
  11.401 +		case PCI_DEVICE_ID_INTEL_82371MX:
  11.402 +		case PCI_DEVICE_ID_INTEL_82443MX_0:
  11.403 +		case PCI_DEVICE_ID_INTEL_82801AA_0:
  11.404 +		case PCI_DEVICE_ID_INTEL_82801AB_0:
  11.405 +		case PCI_DEVICE_ID_INTEL_82801BA_0:
  11.406 +		case PCI_DEVICE_ID_INTEL_82801BA_10:
  11.407 +		case PCI_DEVICE_ID_INTEL_82801CA_0:
  11.408 +		case PCI_DEVICE_ID_INTEL_82801CA_12:
  11.409 +		case PCI_DEVICE_ID_INTEL_82801DB_0:
  11.410 +		case PCI_DEVICE_ID_INTEL_82801E_0:
  11.411 +		case PCI_DEVICE_ID_INTEL_82801EB_0:
  11.412 +		case PCI_DEVICE_ID_INTEL_ESB_0:
  11.413 +			r->name = "PIIX/ICH";
  11.414 +			r->get = pirq_piix_get;
  11.415 +			r->set = pirq_piix_set;
  11.416 +			return 1;
  11.417 +	}
  11.418 +	return 0;
  11.419 +}
  11.420 +
  11.421 +static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.422 +{
  11.423 +	/* FIXME: We should move some of the quirk fixup stuff here */
  11.424 +	switch(device)
  11.425 +	{
  11.426 +		case PCI_DEVICE_ID_VIA_82C586_0:
  11.427 +		case PCI_DEVICE_ID_VIA_82C596:
  11.428 +		case PCI_DEVICE_ID_VIA_82C686:
  11.429 +		case PCI_DEVICE_ID_VIA_8231:
  11.430 +		/* FIXME: add new ones for 8233/5 */
  11.431 +			r->name = "VIA";
  11.432 +			r->get = pirq_via_get;
  11.433 +			r->set = pirq_via_set;
  11.434 +			return 1;
  11.435 +	}
  11.436 +	return 0;
  11.437 +}
  11.438  
  11.439 -	{ "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, pirq_ali_get, pirq_ali_set },
  11.440 +static __init int vlsi_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.441 +{
  11.442 +	switch(device)
  11.443 +	{
  11.444 +		case PCI_DEVICE_ID_VLSI_82C534:
  11.445 +			r->name = "VLSI 82C534";
  11.446 +			r->get = pirq_vlsi_get;
  11.447 +			r->set = pirq_vlsi_set;
  11.448 +			return 1;
  11.449 +	}
  11.450 +	return 0;
  11.451 +}
  11.452 +
  11.453  
  11.454 -	{ "ITE", PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_IT8330G_0, pirq_ite_get, pirq_ite_set },
  11.455 +static __init int serverworks_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.456 +{
  11.457 +	switch(device)
  11.458 +	{
  11.459 +		case PCI_DEVICE_ID_SERVERWORKS_OSB4:
  11.460 +		case PCI_DEVICE_ID_SERVERWORKS_CSB5:
  11.461 +			r->name = "ServerWorks";
  11.462 +			r->get = pirq_serverworks_get;
  11.463 +			r->set = pirq_serverworks_set;
  11.464 +			return 1;
  11.465 +	}
  11.466 +	return 0;
  11.467 +}
  11.468 +
  11.469 +static __init int sis_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.470 +{
  11.471 +	u8 reg;
  11.472 +	u16 devid;
  11.473 +
  11.474 +	if (device != PCI_DEVICE_ID_SI_503)
  11.475 +		return 0;
  11.476 +		
  11.477 +	/*
  11.478 +	 * In case of SiS south bridge, we need to detect the two
  11.479 +	 * kinds of routing tables we have seen so far (5595 and 96x). 
  11.480 +	 * Since the maintain the same device ID, we need to do poke 
  11.481 +	 * the PCI configuration space to find the router type we are
  11.482 +	 * dealing with.
  11.483 +	 */
  11.484 +
  11.485 +	/*
  11.486 +	 * Factoid: writing bit6 of register 0x40 of the router config space
  11.487 +	 * will make the SB to show up 0x096x inside the device id. Note,
  11.488 +	 * we need to restore register 0x40 after the device id poke.
  11.489 +	 */
  11.490 +
  11.491 +	pci_read_config_byte(router, PIRQ_SIS_DETECT_REGISTER, &reg);
  11.492 +	pci_write_config_byte(router, PIRQ_SIS_DETECT_REGISTER, reg | (1 << 6));
  11.493 +	pci_read_config_word(router, PCI_DEVICE_ID, &devid);
  11.494 +	pci_write_config_byte(router, PIRQ_SIS_DETECT_REGISTER, reg);
  11.495  
  11.496 -	{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, pirq_via_get, pirq_via_set },
  11.497 -	{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, pirq_via_get, pirq_via_set },
  11.498 -	{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, pirq_via_get, pirq_via_set },
  11.499 +	if ((devid & 0xfff0) == 0x0960) {
  11.500 +		r->name = "SIS96x";
  11.501 +		r->get = pirq_sis96x_get;
  11.502 +		r->set = pirq_sis96x_set;
  11.503 +		DBG("PCI: Detecting SiS router at %02x:%02x : SiS096x detected\n",
  11.504 +		    rt->rtr_bus, rt->rtr_devfn);
  11.505 +	} else {
  11.506 +		r->name = "SIS5595";
  11.507 +		r->get = pirq_sis5595_get;
  11.508 +		r->set = pirq_sis5595_set;
  11.509 +		DBG("PCI: Detecting SiS router at %02x:%02x : SiS5595 detected\n",
  11.510 +		    rt->rtr_bus, rt->rtr_devfn);
  11.511 +	}
  11.512 +	return 1;
  11.513 +}
  11.514  
  11.515 -	{ "OPTI", PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C700, pirq_opti_get, pirq_opti_set },
  11.516 +static __init int cyrix_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.517 +{
  11.518 +	switch(device)
  11.519 +	{
  11.520 +		case PCI_DEVICE_ID_CYRIX_5520:
  11.521 +			r->name = "NatSemi";
  11.522 +			r->get = pirq_cyrix_get;
  11.523 +			r->set = pirq_cyrix_set;
  11.524 +			return 1;
  11.525 +	}
  11.526 +	return 0;
  11.527 +}
  11.528 +
  11.529 +static __init int opti_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.530 +{
  11.531 +	switch(device)
  11.532 +	{
  11.533 +		case PCI_DEVICE_ID_OPTI_82C700:
  11.534 +			r->name = "OPTI";
  11.535 +			r->get = pirq_opti_get;
  11.536 +			r->set = pirq_opti_set;
  11.537 +			return 1;
  11.538 +	}
  11.539 +	return 0;
  11.540 +}
  11.541  
  11.542 -	{ "NatSemi", PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, pirq_cyrix_get, pirq_cyrix_set },
  11.543 -	{ "SIS", PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, pirq_sis_get, pirq_sis_set },
  11.544 -	{ "VLSI 82C534", PCI_VENDOR_ID_VLSI, PCI_DEVICE_ID_VLSI_82C534, pirq_vlsi_get, pirq_vlsi_set },
  11.545 -	{ "ServerWorks", PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4,
  11.546 -	  pirq_serverworks_get, pirq_serverworks_set },
  11.547 -	{ "ServerWorks", PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5,
  11.548 -	  pirq_serverworks_get, pirq_serverworks_set },
  11.549 -	{ "AMD756 VIPER", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B,
  11.550 -		pirq_amd756_get, pirq_amd756_set },
  11.551 -	{ "AMD766", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413,
  11.552 -		pirq_amd756_get, pirq_amd756_set },
  11.553 -	{ "AMD768", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7443,
  11.554 -		pirq_amd756_get, pirq_amd756_set },
  11.555 +static __init int ite_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.556 +{
  11.557 +	switch(device)
  11.558 +	{
  11.559 +		case PCI_DEVICE_ID_ITE_IT8330G_0:
  11.560 +			r->name = "ITE";
  11.561 +			r->get = pirq_ite_get;
  11.562 +			r->set = pirq_ite_set;
  11.563 +			return 1;
  11.564 +	}
  11.565 +	return 0;
  11.566 +}
  11.567 +
  11.568 +static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.569 +{
  11.570 +	switch(device)
  11.571 +	{
  11.572 +		case PCI_DEVICE_ID_AL_M1533:
  11.573 +			r->name = "ALI";
  11.574 +			r->get = pirq_ali_get;
  11.575 +			r->set = pirq_ali_set;
  11.576 +			return 1;
  11.577 +		/* Should add 156x some day */
  11.578 +	}
  11.579 +	return 0;
  11.580 +}
  11.581  
  11.582 -	{ "default", 0, 0, NULL, NULL }
  11.583 +static __init int amd_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
  11.584 +{
  11.585 +	switch(device)
  11.586 +	{
  11.587 +		case PCI_DEVICE_ID_AMD_VIPER_740B:
  11.588 +			r->name = "AMD756";
  11.589 +			break;
  11.590 +		case PCI_DEVICE_ID_AMD_VIPER_7413:
  11.591 +			r->name = "AMD766";
  11.592 +			break;
  11.593 +		case PCI_DEVICE_ID_AMD_VIPER_7443:
  11.594 +			r->name = "AMD768";
  11.595 +			break;
  11.596 +		default:
  11.597 +			return 0;
  11.598 +	}
  11.599 +	r->get = pirq_amd756_get;
  11.600 +	r->set = pirq_amd756_set;
  11.601 +	return 1;
  11.602 +}
  11.603 +		
  11.604 +static __initdata struct irq_router_handler pirq_routers[] = {
  11.605 +	{ PCI_VENDOR_ID_INTEL, intel_router_probe },
  11.606 +	{ PCI_VENDOR_ID_AL, ali_router_probe },
  11.607 +	{ PCI_VENDOR_ID_ITE, ite_router_probe },
  11.608 +	{ PCI_VENDOR_ID_VIA, via_router_probe },
  11.609 +	{ PCI_VENDOR_ID_OPTI, opti_router_probe },
  11.610 +	{ PCI_VENDOR_ID_SI, sis_router_probe },
  11.611 +	{ PCI_VENDOR_ID_CYRIX, cyrix_router_probe },
  11.612 +	{ PCI_VENDOR_ID_VLSI, vlsi_router_probe },
  11.613 +	{ PCI_VENDOR_ID_SERVERWORKS, serverworks_router_probe },
  11.614 +	{ PCI_VENDOR_ID_AMD, amd_router_probe },
  11.615 +	/* Someone with docs needs to add the ATI Radeon IGP */
  11.616 +	{ 0, NULL }
  11.617  };
  11.618 -
  11.619 -static struct irq_router *pirq_router;
  11.620 +static struct irq_router pirq_router;
  11.621  static struct pci_dev *pirq_router_dev;
  11.622  
  11.623 -static void __init pirq_find_router(void)
  11.624 +/*
  11.625 + *	FIXME: should we have an option to say "generic for
  11.626 + *	chipset" ?
  11.627 + */
  11.628 + 
  11.629 +static void __init pirq_find_router(struct irq_router *r)
  11.630  {
  11.631  	struct irq_routing_table *rt = pirq_table;
  11.632 -	struct irq_router *r;
  11.633 +	struct irq_router_handler *h;
  11.634  
  11.635  #ifdef CONFIG_PCI_BIOS
  11.636  	if (!rt->signature) {
  11.637  		printk(KERN_INFO "PCI: Using BIOS for IRQ routing\n");
  11.638 -		pirq_router = &pirq_bios_router;
  11.639 +		r->set = pirq_bios_set;
  11.640 +		r->name = "BIOS";
  11.641  		return;
  11.642  	}
  11.643  #endif
  11.644  
  11.645 +	/* Default unless a driver reloads it */
  11.646 +	r->name = "default";
  11.647 +	r->get = NULL;
  11.648 +	r->set = NULL;
  11.649 +	
  11.650  	DBG("PCI: Attempting to find IRQ router for %04x:%04x\n",
  11.651  	    rt->rtr_vendor, rt->rtr_device);
  11.652  
  11.653 -	/* fall back to default router if nothing else found */
  11.654 -	pirq_router = &pirq_routers[ARRAY_SIZE(pirq_routers) - 1];
  11.655 -
  11.656  	pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn);
  11.657  	if (!pirq_router_dev) {
  11.658  		DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
  11.659  		return;
  11.660  	}
  11.661  
  11.662 -	for(r=pirq_routers; r->vendor; r++) {
  11.663 -		/* Exact match against router table entry? Use it! */
  11.664 -		if (r->vendor == rt->rtr_vendor && r->device == rt->rtr_device) {
  11.665 -			pirq_router = r;
  11.666 +	for( h = pirq_routers; h->vendor; h++) {
  11.667 +		/* First look for a router match */
  11.668 +		if (rt->rtr_vendor == h->vendor && h->probe(r, pirq_router_dev, rt->rtr_device))
  11.669  			break;
  11.670 -		}
  11.671 -		/* Match against router device entry? Use it as a fallback */
  11.672 -		if (r->vendor == pirq_router_dev->vendor && r->device == pirq_router_dev->device) {
  11.673 -			pirq_router = r;
  11.674 -		}
  11.675 +		/* Fall back to a device match */
  11.676 +		if (pirq_router_dev->vendor == h->vendor && h->probe(r, pirq_router_dev, pirq_router_dev->device))
  11.677 +			break;
  11.678  	}
  11.679  	printk(KERN_INFO "PCI: Using IRQ router %s [%04x/%04x] at %s\n",
  11.680 -		pirq_router->name,
  11.681 +		pirq_router.name,
  11.682  		pirq_router_dev->vendor,
  11.683  		pirq_router_dev->device,
  11.684  		pirq_router_dev->slot_name);
  11.685 @@ -568,7 +854,7 @@ static int pcibios_lookup_irq(struct pci
  11.686  	int i, pirq, newirq;
  11.687  	int irq = 0;
  11.688  	u32 mask;
  11.689 -	struct irq_router *r = pirq_router;
  11.690 +	struct irq_router *r = &pirq_router;
  11.691  	struct pci_dev *dev2;
  11.692  	char *msg = NULL;
  11.693  
  11.694 @@ -688,7 +974,7 @@ void __init pcibios_irq_init(void)
  11.695  #endif
  11.696  	if (pirq_table) {
  11.697  		pirq_peer_trick();
  11.698 -		pirq_find_router();
  11.699 +		pirq_find_router(&pirq_router);
  11.700  		if (pirq_table->exclusive_irqs) {
  11.701  			int i;
  11.702  			for (i=0; i<16; i++)
  11.703 @@ -779,9 +1065,16 @@ void pcibios_penalize_isa_irq(int irq)
  11.704  void pcibios_enable_irq(struct pci_dev *dev)
  11.705  {
  11.706  	u8 pin;
  11.707 +	extern int interrupt_line_quirk;
  11.708 +	
  11.709  	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
  11.710  	if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
  11.711  		char *msg;
  11.712 +
  11.713 +		/* With IDE legacy devices the IRQ lookup failure is not a problem.. */
  11.714 +		if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5))
  11.715 +			return;
  11.716 +
  11.717  		if (io_apic_assign_pci_irqs)
  11.718  			msg = " Probably buggy MP table.";
  11.719  		else if (pci_probe & PCI_BIOS_IRQ_SCAN)
  11.720 @@ -791,4 +1084,9 @@ void pcibios_enable_irq(struct pci_dev *
  11.721  		printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
  11.722  		       'A' + pin - 1, dev->slot_name, msg);
  11.723  	}
  11.724 +	/* VIA bridges use interrupt line for apic/pci steering across
  11.725 +	   the V-Link */
  11.726 +	else if (interrupt_line_quirk)
  11.727 +		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
  11.728 +		
  11.729  }
    12.1 --- a/xen/arch/i386/pci-pc.c	Mon Apr 05 08:23:33 2004 +0000
    12.2 +++ b/xen/arch/i386/pci-pc.c	Mon Apr 05 13:12:24 2004 +0000
    12.3 @@ -6,11 +6,12 @@
    12.4  
    12.5  #include <xen/config.h>
    12.6  #include <xen/types.h>
    12.7 -/*#include <xen/kernel.h>*/
    12.8 +#include <xen/kernel.h>
    12.9  #include <xen/sched.h>
   12.10  #include <xen/pci.h>
   12.11  #include <xen/init.h>
   12.12  #include <xen/ioport.h>
   12.13 +#include <xen/acpi.h>
   12.14  
   12.15  /*#include <asm/segment.h>*/
   12.16  #include <asm/io.h>
   12.17 @@ -32,6 +33,8 @@ struct pci_ops *pci_root_ops = NULL;
   12.18  int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int len, u32 *value) = NULL;
   12.19  int (*pci_config_write)(int seg, int bus, int dev, int fn, int reg, int len, u32 value) = NULL;
   12.20  
   12.21 +static int pci_using_acpi_prt = 0;
   12.22 +
   12.23  #ifdef CONFIG_MULTIQUAD
   12.24  #define BUS2QUAD(global) (mp_bus_id_to_node[global])
   12.25  #define BUS2LOCAL(global) (mp_bus_id_to_local[global])
   12.26 @@ -442,36 +445,21 @@ static struct pci_ops pci_direct_conf2 =
   12.27  static int __devinit pci_sanity_check(struct pci_ops *o)
   12.28  {
   12.29  	u16 x;
   12.30 -	struct pci_bus *bus;		/* Fake bus and device */
   12.31 -	struct pci_dev *dev;
   12.32 -	int ret = 0;
   12.33 +	struct pci_bus bus;		/* Fake bus and device */
   12.34 +	struct pci_dev dev;
   12.35  
   12.36  	if (pci_probe & PCI_NO_CHECKS)
   12.37  		return 1;
   12.38 -
   12.39 -	bus = kmalloc(sizeof(*bus), GFP_KERNEL);
   12.40 -	dev = kmalloc(sizeof(*dev), GFP_KERNEL);
   12.41 -	if ( (bus == NULL) || (dev == NULL) )
   12.42 -		goto out;
   12.43 -
   12.44 -	bus->number = 0;
   12.45 -	dev->bus = bus;
   12.46 -	for(dev->devfn=0; dev->devfn < 0x100; dev->devfn++)
   12.47 -		if ((!o->read_word(dev, PCI_CLASS_DEVICE, &x) &&
   12.48 +	bus.number = 0;
   12.49 +	dev.bus = &bus;
   12.50 +	for(dev.devfn=0; dev.devfn < 0x100; dev.devfn++)
   12.51 +		if ((!o->read_word(&dev, PCI_CLASS_DEVICE, &x) &&
   12.52  		     (x == PCI_CLASS_BRIDGE_HOST || x == PCI_CLASS_DISPLAY_VGA)) ||
   12.53 -		    (!o->read_word(dev, PCI_VENDOR_ID, &x) &&
   12.54 +		    (!o->read_word(&dev, PCI_VENDOR_ID, &x) &&
   12.55  		     (x == PCI_VENDOR_ID_INTEL || x == PCI_VENDOR_ID_COMPAQ)))
   12.56 -		{
   12.57 -			ret = 1;
   12.58 -			break;
   12.59 -		}
   12.60 - out:
   12.61 -	if ( bus != NULL )
   12.62 -		kfree(bus);
   12.63 -	if ( dev != NULL)
   12.64 -		kfree(dev);
   12.65 +			return 1;
   12.66  	DBG("PCI: Sanity check failed\n");
   12.67 -	return ret;
   12.68 +	return 0;
   12.69  }
   12.70  
   12.71  static struct pci_ops * __devinit pci_check_direct(void)
   12.72 @@ -1032,7 +1020,8 @@ struct irq_routing_table * __devinit pci
   12.73  		"xor %%ah, %%ah\n"
   12.74  		"1:"
   12.75  		: "=a" (ret),
   12.76 -		  "=b" (map)
   12.77 +		  "=b" (map),
   12.78 +		  "+m" (opt)
   12.79  		: "0" (PCIBIOS_GET_ROUTING_OPTIONS),
   12.80  		  "1" (0),
   12.81  		  "D" ((long) &opt),
   12.82 @@ -1372,6 +1361,23 @@ void __devinit  pcibios_fixup_bus(struct
   12.83  	pci_read_bridge_bases(b);
   12.84  }
   12.85  
   12.86 +struct pci_bus * __devinit pcibios_scan_root(int busnum)
   12.87 +{
   12.88 +	struct list_head *list;
   12.89 +	struct pci_bus *bus;
   12.90 +
   12.91 +	list_for_each(list, &pci_root_buses) {
   12.92 +		bus = pci_bus_b(list);
   12.93 +		if (bus->number == busnum) {
   12.94 +			/* Already scanned */
   12.95 +			return bus;
   12.96 +		}
   12.97 +	}
   12.98 +
   12.99 +	printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
  12.100 +
  12.101 +	return pci_scan_bus(busnum, pci_root_ops, NULL);
  12.102 +}
  12.103  
  12.104  void __devinit pcibios_config_init(void)
  12.105  {
  12.106 @@ -1424,8 +1430,22 @@ void __init pcibios_init(void)
  12.107  		return;
  12.108  	}
  12.109  
  12.110 +	pcibios_set_cacheline_size();
  12.111 +
  12.112  	printk(KERN_INFO "PCI: Probing PCI hardware\n");
  12.113 -	pci_root_bus = pci_scan_bus(0, pci_root_ops, NULL);
  12.114 +#ifdef CONFIG_ACPI_PCI
  12.115 +	if (!acpi_noirq && !acpi_pci_irq_init()) {
  12.116 +		pci_using_acpi_prt = 1;
  12.117 +		printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
  12.118 +		printk(KERN_INFO "PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'\n");
  12.119 +	}
  12.120 +#endif
  12.121 +	if (!pci_using_acpi_prt) {
  12.122 +		pci_root_bus = pcibios_scan_root(0);
  12.123 +		pcibios_irq_init();
  12.124 +		pcibios_fixup_peer_bridges();
  12.125 +		pcibios_fixup_irqs();
  12.126 +	}
  12.127  	if (clustered_apic_mode && (numnodes > 1)) {
  12.128  		for (quad = 1; quad < numnodes; ++quad) {
  12.129  			printk("Scanning PCI bus %d for quad %d\n", 
  12.130 @@ -1435,9 +1455,6 @@ void __init pcibios_init(void)
  12.131  		}
  12.132  	}
  12.133  
  12.134 -	pcibios_irq_init();
  12.135 -	pcibios_fixup_peer_bridges();
  12.136 -	pcibios_fixup_irqs();
  12.137  	pcibios_resource_survey();
  12.138  
  12.139  #ifdef CONFIG_PCI_BIOS
  12.140 @@ -1489,6 +1506,9 @@ char * __devinit  pcibios_setup(char *st
  12.141  	} else if (!strncmp(str, "lastbus=", 8)) {
  12.142  		pcibios_last_bus = simple_strtol(str+8, NULL, 0);
  12.143  		return NULL;
  12.144 +	} else if (!strncmp(str, "noacpi", 6)) {
  12.145 +		acpi_noirq_set();
  12.146 +		return NULL;
  12.147  	}
  12.148  	return str;
  12.149  }
  12.150 @@ -1504,6 +1524,15 @@ int pcibios_enable_device(struct pci_dev
  12.151  
  12.152  	if ((err = pcibios_enable_resources(dev, mask)) < 0)
  12.153  		return err;
  12.154 +
  12.155 +#ifdef CONFIG_ACPI_PCI
  12.156 +	if (pci_using_acpi_prt) {
  12.157 +		acpi_pci_irq_enable(dev);
  12.158 +		return 0;
  12.159 +	}
  12.160 +#endif
  12.161 +
  12.162  	pcibios_enable_irq(dev);
  12.163 +
  12.164  	return 0;
  12.165  }
    13.1 --- a/xen/arch/i386/setup.c	Mon Apr 05 08:23:33 2004 +0000
    13.2 +++ b/xen/arch/i386/setup.c	Mon Apr 05 13:12:24 2004 +0000
    13.3 @@ -6,6 +6,7 @@
    13.4  #include <xen/sched.h>
    13.5  #include <xen/pci.h>
    13.6  #include <xen/serial.h>
    13.7 +#include <xen/acpi.h>
    13.8  #include <asm/bitops.h>
    13.9  #include <asm/smp.h>
   13.10  #include <asm/processor.h>
   13.11 @@ -16,13 +17,29 @@
   13.12  #include <asm/pdb.h>
   13.13  #include <xen/trace.h>
   13.14  
   13.15 -struct cpuinfo_x86 boot_cpu_data = { 0 };
   13.16 +char ignore_irq13;		/* set if exception 16 works */
   13.17 +struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
   13.18 +
   13.19  /* Lots of nice things, since we only target PPro+. */
   13.20  unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE;
   13.21 +EXPORT_SYMBOL(mmu_cr4_features);
   13.22 +
   13.23  unsigned long wait_init_idle;
   13.24  
   13.25  struct task_struct *idle_task[NR_CPUS] = { &idle0_task };
   13.26  
   13.27 +#ifdef	CONFIG_ACPI_INTERPRETER
   13.28 +	int acpi_disabled = 0;
   13.29 +#else
   13.30 +	int acpi_disabled = 1;
   13.31 +#endif
   13.32 +EXPORT_SYMBOL(acpi_disabled);
   13.33 +
   13.34 +#ifdef	CONFIG_ACPI_BOOT
   13.35 +extern	int __initdata acpi_ht;
   13.36 +int acpi_force __initdata = 0;
   13.37 +#endif
   13.38 +
   13.39  int phys_proc_id[NR_CPUS];
   13.40  int logical_proc_id[NR_CPUS];
   13.41  
   13.42 @@ -363,6 +380,8 @@ void __init start_of_day(void)
   13.43      }
   13.44  #endif
   13.45      paging_init();                /* not much here now, but sets up fixmap */
   13.46 +    if ( !opt_noacpi )
   13.47 +        acpi_boot_init();
   13.48  #ifdef CONFIG_SMP
   13.49      if ( smp_found_config ) 
   13.50          get_smp_config();
    14.1 --- a/xen/drivers/Makefile	Mon Apr 05 08:23:33 2004 +0000
    14.2 +++ b/xen/drivers/Makefile	Mon Apr 05 13:12:24 2004 +0000
    14.3 @@ -1,6 +1,7 @@
    14.4  
    14.5  default:
    14.6  	$(MAKE) -C char
    14.7 +	$(MAKE) -C acpi
    14.8  	$(MAKE) -C pci
    14.9  	if [ "$(nodev)" != "y" ]; then \
   14.10  	$(MAKE) -C net ; \
   14.11 @@ -13,6 +14,7 @@ default:
   14.12  
   14.13  clean:
   14.14  	$(MAKE) -C char clean
   14.15 +	$(MAKE) -C acpi clean
   14.16  	$(MAKE) -C pci clean
   14.17  	$(MAKE) -C net clean
   14.18  	$(MAKE) -C block clean
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/xen/drivers/acpi/Makefile	Mon Apr 05 13:12:24 2004 +0000
    15.3 @@ -0,0 +1,63 @@
    15.4 +#
    15.5 +# Makefile for the Linux ACPI interpreter
    15.6 +# 
    15.7 +
    15.8 +include $(BASEDIR)/Rules.mk
    15.9 +
   15.10 +OBJS := acpi_ksyms.o tables.o
   15.11 +
   15.12 +default: $(OBJS)
   15.13 +	$(LD) -r -o driver.o $(OBJS)
   15.14 +
   15.15 +clean:
   15.16 +	rm -f *.o *~ core
   15.17 +
   15.18 +#export ACPI_CFLAGS
   15.19 +#
   15.20 +#ACPI_CFLAGS	:= -Os 
   15.21 +#
   15.22 +#ifdef CONFIG_ACPI_DEBUG
   15.23 +#  ACPI_CFLAGS	+= -DACPI_DEBUG_OUTPUT
   15.24 +#endif
   15.25 +#
   15.26 +#EXTRA_CFLAGS	+= $(ACPI_CFLAGS)
   15.27 +#
   15.28 +#export-objs 	:= acpi_ksyms.o processor.o
   15.29 +#
   15.30 +#obj-$(CONFIG_ACPI)	:= acpi_ksyms.o 
   15.31 +#
   15.32 +#
   15.33 +# ACPI Boot-Time Table Parsing
   15.34 +#
   15.35 +#obj-$(CONFIG_ACPI_BOOT)		+= tables.o
   15.36 +#obj-$(CONFIG_ACPI_INTERPRETER)	+= blacklist.o
   15.37 +#
   15.38 +#
   15.39 +# ACPI Core Subsystem (Interpreter)
   15.40 +#
   15.41 +#ifeq ($(CONFIG_ACPI_INTERPRETER),y)
   15.42 +#  obj-y		+= osl.o utils.o
   15.43 +#  subdir-y	+= dispatcher events executer hardware namespace parser \
   15.44 +#		   resources tables utilities
   15.45 +#  obj-y 	+= $(foreach dir,$(subdir-y),$(dir)/$(dir).o)
   15.46 +#endif
   15.47 +#
   15.48 +#
   15.49 +# ACPI Bus and Device Drivers
   15.50 +#
   15.51 +#ifeq ($(CONFIG_ACPI_BUS),y)
   15.52 +#  obj-y				+= bus.o 
   15.53 +#  obj-$(CONFIG_ACPI_AC) 	+= ac.o
   15.54 +#  obj-$(CONFIG_ACPI_BATTERY)	+= battery.o
   15.55 +#  obj-$(CONFIG_ACPI_BUTTON)	+= button.o
   15.56 +#  obj-$(CONFIG_ACPI_EC)		+= ec.o
   15.57 +#  obj-$(CONFIG_ACPI_FAN)	+= fan.o
   15.58 +#  obj-$(CONFIG_ACPI_PCI)	+= pci_root.o pci_link.o pci_irq.o pci_bind.o
   15.59 +#  obj-$(CONFIG_ACPI_POWER)	+= power.o
   15.60 +#  obj-$(CONFIG_ACPI_PROCESSOR)	+= processor.o
   15.61 +#  obj-$(CONFIG_ACPI_THERMAL)	+= thermal.o
   15.62 +#  obj-$(CONFIG_ACPI_SYSTEM)	+= system.o
   15.63 +#  obj-$(CONFIG_ACPI_NUMA)	+= numa.o
   15.64 +#  obj-$(CONFIG_ACPI_ASUS)	+= asus_acpi.o
   15.65 +#  obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o
   15.66 +#endif
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/xen/drivers/acpi/acpi_ksyms.c	Mon Apr 05 13:12:24 2004 +0000
    16.3 @@ -0,0 +1,157 @@
    16.4 +/*
    16.5 + *  acpi_ksyms.c - ACPI Kernel Symbols ($Revision: 15 $)
    16.6 + *
    16.7 + *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
    16.8 + *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
    16.9 + *
   16.10 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   16.11 + *
   16.12 + *  This program is free software; you can redistribute it and/or modify
   16.13 + *  it under the terms of the GNU General Public License as published by
   16.14 + *  the Free Software Foundation; either version 2 of the License, or (at
   16.15 + *  your option) any later version.
   16.16 + *
   16.17 + *  This program is distributed in the hope that it will be useful, but
   16.18 + *  WITHOUT ANY WARRANTY; without even the implied warranty of
   16.19 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   16.20 + *  General Public License for more details.
   16.21 + *
   16.22 + *  You should have received a copy of the GNU General Public License along
   16.23 + *  with this program; if not, write to the Free Software Foundation, Inc.,
   16.24 + *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
   16.25 + *
   16.26 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   16.27 + */
   16.28 +
   16.29 +#include <xen/module.h>
   16.30 +#include <xen/acpi.h>
   16.31 +
   16.32 +#ifdef CONFIG_ACPI_INTERPRETER
   16.33 +
   16.34 +/* ACPI Debugger */
   16.35 +
   16.36 +#ifdef ENABLE_DEBUGGER
   16.37 +
   16.38 +extern int			acpi_in_debugger;
   16.39 +
   16.40 +EXPORT_SYMBOL(acpi_in_debugger);
   16.41 +EXPORT_SYMBOL(acpi_db_user_commands);
   16.42 +
   16.43 +#endif /* ENABLE_DEBUGGER */
   16.44 +
   16.45 +/* ACPI Core Subsystem */
   16.46 +
   16.47 +#ifdef ACPI_DEBUG_OUTPUT
   16.48 +EXPORT_SYMBOL(acpi_dbg_layer);
   16.49 +EXPORT_SYMBOL(acpi_dbg_level);
   16.50 +EXPORT_SYMBOL(acpi_ut_debug_print_raw);
   16.51 +EXPORT_SYMBOL(acpi_ut_debug_print);
   16.52 +EXPORT_SYMBOL(acpi_ut_status_exit);
   16.53 +EXPORT_SYMBOL(acpi_ut_value_exit);
   16.54 +EXPORT_SYMBOL(acpi_ut_exit);
   16.55 +EXPORT_SYMBOL(acpi_ut_trace);
   16.56 +#endif /*ACPI_DEBUG_OUTPUT*/
   16.57 +
   16.58 +EXPORT_SYMBOL(acpi_get_handle);
   16.59 +EXPORT_SYMBOL(acpi_get_parent);
   16.60 +EXPORT_SYMBOL(acpi_get_type);
   16.61 +EXPORT_SYMBOL(acpi_get_name);
   16.62 +EXPORT_SYMBOL(acpi_get_object_info);
   16.63 +EXPORT_SYMBOL(acpi_get_next_object);
   16.64 +EXPORT_SYMBOL(acpi_evaluate_object);
   16.65 +EXPORT_SYMBOL(acpi_get_table);
   16.66 +EXPORT_SYMBOL(acpi_get_firmware_table);
   16.67 +EXPORT_SYMBOL(acpi_install_notify_handler);
   16.68 +EXPORT_SYMBOL(acpi_remove_notify_handler);
   16.69 +EXPORT_SYMBOL(acpi_install_gpe_handler);
   16.70 +EXPORT_SYMBOL(acpi_remove_gpe_handler);
   16.71 +EXPORT_SYMBOL(acpi_install_address_space_handler);
   16.72 +EXPORT_SYMBOL(acpi_remove_address_space_handler);
   16.73 +EXPORT_SYMBOL(acpi_install_fixed_event_handler);
   16.74 +EXPORT_SYMBOL(acpi_remove_fixed_event_handler);
   16.75 +EXPORT_SYMBOL(acpi_acquire_global_lock);
   16.76 +EXPORT_SYMBOL(acpi_release_global_lock);
   16.77 +EXPORT_SYMBOL(acpi_install_gpe_block);
   16.78 +EXPORT_SYMBOL(acpi_remove_gpe_block);
   16.79 +EXPORT_SYMBOL(acpi_get_current_resources);
   16.80 +EXPORT_SYMBOL(acpi_get_possible_resources);
   16.81 +EXPORT_SYMBOL(acpi_walk_resources);
   16.82 +EXPORT_SYMBOL(acpi_set_current_resources);
   16.83 +EXPORT_SYMBOL(acpi_enable_event);
   16.84 +EXPORT_SYMBOL(acpi_disable_event);
   16.85 +EXPORT_SYMBOL(acpi_clear_event);
   16.86 +EXPORT_SYMBOL(acpi_get_timer_duration);
   16.87 +EXPORT_SYMBOL(acpi_get_timer);
   16.88 +EXPORT_SYMBOL(acpi_get_sleep_type_data);
   16.89 +EXPORT_SYMBOL(acpi_get_register);
   16.90 +EXPORT_SYMBOL(acpi_set_register);
   16.91 +EXPORT_SYMBOL(acpi_enter_sleep_state);
   16.92 +EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios);
   16.93 +EXPORT_SYMBOL(acpi_get_system_info);
   16.94 +EXPORT_SYMBOL(acpi_get_devices);
   16.95 +
   16.96 +/* ACPI OS Services Layer (acpi_osl.c) */
   16.97 +
   16.98 +EXPORT_SYMBOL(acpi_os_free);
   16.99 +EXPORT_SYMBOL(acpi_os_printf);
  16.100 +EXPORT_SYMBOL(acpi_os_sleep);
  16.101 +EXPORT_SYMBOL(acpi_os_stall);
  16.102 +EXPORT_SYMBOL(acpi_os_signal);
  16.103 +EXPORT_SYMBOL(acpi_os_queue_for_execution);
  16.104 +EXPORT_SYMBOL(acpi_os_signal_semaphore);
  16.105 +EXPORT_SYMBOL(acpi_os_create_semaphore);
  16.106 +EXPORT_SYMBOL(acpi_os_delete_semaphore);
  16.107 +EXPORT_SYMBOL(acpi_os_wait_semaphore);
  16.108 +
  16.109 +EXPORT_SYMBOL(acpi_os_read_pci_configuration);
  16.110 +
  16.111 +/* ACPI Utilities (acpi_utils.c) */
  16.112 +
  16.113 +EXPORT_SYMBOL(acpi_extract_package);
  16.114 +EXPORT_SYMBOL(acpi_evaluate_integer);
  16.115 +EXPORT_SYMBOL(acpi_evaluate_reference);
  16.116 +
  16.117 +#endif /*CONFIG_ACPI_INTERPRETER*/
  16.118 +
  16.119 +
  16.120 +/* ACPI Bus Driver (acpi_bus.c) */
  16.121 +
  16.122 +#ifdef CONFIG_ACPI_BUS
  16.123 +
  16.124 +EXPORT_SYMBOL(acpi_fadt);
  16.125 +EXPORT_SYMBOL(acpi_walk_namespace);
  16.126 +EXPORT_SYMBOL(acpi_root_dir);
  16.127 +EXPORT_SYMBOL(acpi_bus_get_device);
  16.128 +EXPORT_SYMBOL(acpi_bus_get_status);
  16.129 +EXPORT_SYMBOL(acpi_bus_get_power);
  16.130 +EXPORT_SYMBOL(acpi_bus_set_power);
  16.131 +EXPORT_SYMBOL(acpi_bus_generate_event);
  16.132 +EXPORT_SYMBOL(acpi_bus_receive_event);
  16.133 +EXPORT_SYMBOL(acpi_bus_register_driver);
  16.134 +EXPORT_SYMBOL(acpi_bus_unregister_driver);
  16.135 +EXPORT_SYMBOL(acpi_bus_scan);
  16.136 +EXPORT_SYMBOL(acpi_init);
  16.137 +
  16.138 +#endif /*CONFIG_ACPI_BUS*/
  16.139 +
  16.140 +
  16.141 +/* ACPI PCI Driver (pci_irq.c) */
  16.142 +
  16.143 +#ifdef CONFIG_ACPI_PCI
  16.144 +
  16.145 +#include <xen/pci.h>
  16.146 +extern int acpi_pci_irq_enable(struct pci_dev *dev);
  16.147 +EXPORT_SYMBOL(acpi_pci_irq_enable);
  16.148 +extern int acpi_pci_irq_lookup (int segment, int bus, int device, int pin);
  16.149 +EXPORT_SYMBOL(acpi_pci_irq_lookup);
  16.150 +EXPORT_SYMBOL(acpi_pci_register_driver);
  16.151 +EXPORT_SYMBOL(acpi_pci_unregister_driver);
  16.152 +#endif /*CONFIG_ACPI_PCI */
  16.153 +
  16.154 +#ifdef CONFIG_ACPI_EC
  16.155 +/* ACPI EC driver (ec.c) */
  16.156 +
  16.157 +EXPORT_SYMBOL(ec_read);
  16.158 +EXPORT_SYMBOL(ec_write);
  16.159 +#endif
  16.160 +
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/xen/drivers/acpi/tables.c	Mon Apr 05 13:12:24 2004 +0000
    17.3 @@ -0,0 +1,588 @@
    17.4 +/*
    17.5 + *  acpi_tables.c - ACPI Boot-Time Table Parsing
    17.6 + *
    17.7 + *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
    17.8 + *
    17.9 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   17.10 + *
   17.11 + *  This program is free software; you can redistribute it and/or modify
   17.12 + *  it under the terms of the GNU General Public License as published by
   17.13 + *  the Free Software Foundation; either version 2 of the License, or
   17.14 + *  (at your option) any later version.
   17.15 + *
   17.16 + *  This program is distributed in the hope that it will be useful,
   17.17 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   17.18 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17.19 + *  GNU General Public License for more details.
   17.20 + *
   17.21 + *  You should have received a copy of the GNU General Public License
   17.22 + *  along with this program; if not, write to the Free Software
   17.23 + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   17.24 + *
   17.25 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   17.26 + *
   17.27 + */
   17.28 +
   17.29 +#include <xen/config.h>
   17.30 +#include <xen/init.h>
   17.31 +#include <xen/kernel.h>
   17.32 +#include <xen/sched.h>
   17.33 +#include <xen/smp.h>
   17.34 +#include <xen/string.h>
   17.35 +#include <xen/types.h>
   17.36 +#include <xen/irq.h>
   17.37 +#include <xen/errno.h>
   17.38 +#include <xen/acpi.h>
   17.39 +/*#include <xen/bootmem.h>*/
   17.40 +
   17.41 +#define PREFIX			"ACPI: "
   17.42 +
   17.43 +#define ACPI_MAX_TABLES		256
   17.44 +
   17.45 +static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
   17.46 +	[ACPI_TABLE_UNKNOWN]	= "????",
   17.47 +	[ACPI_APIC]		= "APIC",
   17.48 +	[ACPI_BOOT]		= "BOOT",
   17.49 +	[ACPI_DBGP]		= "DBGP",
   17.50 +	[ACPI_DSDT]		= "DSDT",
   17.51 +	[ACPI_ECDT]		= "ECDT",
   17.52 +	[ACPI_ETDT]		= "ETDT",
   17.53 +	[ACPI_FADT]		= "FACP",
   17.54 +	[ACPI_FACS]		= "FACS",
   17.55 +	[ACPI_OEMX]		= "OEM",
   17.56 +	[ACPI_PSDT]		= "PSDT",
   17.57 +	[ACPI_SBST]		= "SBST",
   17.58 +	[ACPI_SLIT]		= "SLIT",
   17.59 +	[ACPI_SPCR]		= "SPCR",
   17.60 +	[ACPI_SRAT]		= "SRAT",
   17.61 +	[ACPI_SSDT]		= "SSDT",
   17.62 +	[ACPI_SPMI]		= "SPMI",
   17.63 +	[ACPI_HPET]		= "HPET",
   17.64 +};
   17.65 +
   17.66 +static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
   17.67 +static char *mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
   17.68 +
   17.69 +/* System Description Table (RSDT/XSDT) */
   17.70 +struct acpi_table_sdt {
   17.71 +	unsigned long		pa;
   17.72 +	enum acpi_table_id	id;
   17.73 +	unsigned long		size;
   17.74 +} __attribute__ ((packed));
   17.75 +
   17.76 +static unsigned long		sdt_pa;		/* Physical Address */
   17.77 +static unsigned long		sdt_count;	/* Table count */
   17.78 +
   17.79 +static struct acpi_table_sdt	sdt_entry[ACPI_MAX_TABLES];
   17.80 +
   17.81 +void
   17.82 +acpi_table_print (
   17.83 +	struct acpi_table_header *header,
   17.84 +	unsigned long		phys_addr)
   17.85 +{
   17.86 +	char			*name = NULL;
   17.87 +
   17.88 +	if (!header)
   17.89 +		return;
   17.90 +
   17.91 +	/* Some table signatures aren't good table names */
   17.92 +
   17.93 +	if (!strncmp((char *) &header->signature,
   17.94 +		acpi_table_signatures[ACPI_APIC],
   17.95 +		sizeof(header->signature))) {
   17.96 +		name = "MADT";
   17.97 +	}
   17.98 +	else if (!strncmp((char *) &header->signature,
   17.99 +		acpi_table_signatures[ACPI_FADT],
  17.100 +		sizeof(header->signature))) {
  17.101 +		name = "FADT";
  17.102 +	}
  17.103 +	else
  17.104 +		name = header->signature;
  17.105 +
  17.106 +	printk(KERN_INFO PREFIX "%.4s (v%3.3d %6.6s %8.8s 0x%08x %.4s 0x%08x) @ 0x%p\n",
  17.107 +		name, header->revision, header->oem_id,
  17.108 +		header->oem_table_id, header->oem_revision,
  17.109 +		header->asl_compiler_id, header->asl_compiler_revision,
  17.110 +		(void *) phys_addr);
  17.111 +}
  17.112 +
  17.113 +
  17.114 +void
  17.115 +acpi_table_print_madt_entry (
  17.116 +	acpi_table_entry_header	*header)
  17.117 +{
  17.118 +	if (!header)
  17.119 +		return;
  17.120 +
  17.121 +	switch (header->type) {
  17.122 +
  17.123 +	case ACPI_MADT_LAPIC:
  17.124 +	{
  17.125 +		struct acpi_table_lapic *p =
  17.126 +			(struct acpi_table_lapic*) header;
  17.127 +		printk(KERN_INFO PREFIX "LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n",
  17.128 +			p->acpi_id, p->id, p->flags.enabled?"enabled":"disabled");
  17.129 +	}
  17.130 +		break;
  17.131 +
  17.132 +	case ACPI_MADT_IOAPIC:
  17.133 +	{
  17.134 +		struct acpi_table_ioapic *p =
  17.135 +			(struct acpi_table_ioapic*) header;
  17.136 +		printk(KERN_INFO PREFIX "IOAPIC (id[0x%02x] address[0x%08x] global_irq_base[0x%x])\n",
  17.137 +			p->id, p->address, p->global_irq_base);
  17.138 +	}
  17.139 +		break;
  17.140 +
  17.141 +	case ACPI_MADT_INT_SRC_OVR:
  17.142 +	{
  17.143 +		struct acpi_table_int_src_ovr *p =
  17.144 +			(struct acpi_table_int_src_ovr*) header;
  17.145 +		printk(KERN_INFO PREFIX "INT_SRC_OVR (bus %d bus_irq %d global_irq %d %s %s)\n",
  17.146 +			p->bus, p->bus_irq, p->global_irq,
  17.147 +			mps_inti_flags_polarity[p->flags.polarity],
  17.148 +			mps_inti_flags_trigger[p->flags.trigger]);
  17.149 +		if(p->flags.reserved)
  17.150 +			printk(KERN_INFO PREFIX "INT_SRC_OVR unexpected reserved flags: 0x%x\n",
  17.151 +				p->flags.reserved);
  17.152 +
  17.153 +	}
  17.154 +		break;
  17.155 +
  17.156 +	case ACPI_MADT_NMI_SRC:
  17.157 +	{
  17.158 +		struct acpi_table_nmi_src *p =
  17.159 +			(struct acpi_table_nmi_src*) header;
  17.160 +		printk(KERN_INFO PREFIX "NMI_SRC (%s %s global_irq %d)\n",
  17.161 +			mps_inti_flags_polarity[p->flags.polarity],
  17.162 +			mps_inti_flags_trigger[p->flags.trigger], p->global_irq);
  17.163 +	}
  17.164 +		break;
  17.165 +
  17.166 +	case ACPI_MADT_LAPIC_NMI:
  17.167 +	{
  17.168 +		struct acpi_table_lapic_nmi *p =
  17.169 +			(struct acpi_table_lapic_nmi*) header;
  17.170 +		printk(KERN_INFO PREFIX "LAPIC_NMI (acpi_id[0x%02x] %s %s lint[0x%x])\n",
  17.171 +			p->acpi_id,
  17.172 +			mps_inti_flags_polarity[p->flags.polarity],
  17.173 +			mps_inti_flags_trigger[p->flags.trigger], p->lint);
  17.174 +	}
  17.175 +		break;
  17.176 +
  17.177 +	case ACPI_MADT_LAPIC_ADDR_OVR:
  17.178 +	{
  17.179 +		struct acpi_table_lapic_addr_ovr *p =
  17.180 +			(struct acpi_table_lapic_addr_ovr*) header;
  17.181 +		printk(KERN_INFO PREFIX "LAPIC_ADDR_OVR (address[%p])\n",
  17.182 +			(void *) (unsigned long) p->address);
  17.183 +	}
  17.184 +		break;
  17.185 +
  17.186 +	case ACPI_MADT_IOSAPIC:
  17.187 +	{
  17.188 +		struct acpi_table_iosapic *p =
  17.189 +			(struct acpi_table_iosapic*) header;
  17.190 +		printk(KERN_INFO PREFIX "IOSAPIC (id[0x%x] global_irq_base[0x%x] address[%p])\n",
  17.191 +			p->id, p->global_irq_base, (void *) (unsigned long) p->address);
  17.192 +	}
  17.193 +		break;
  17.194 +
  17.195 +	case ACPI_MADT_LSAPIC:
  17.196 +	{
  17.197 +		struct acpi_table_lsapic *p =
  17.198 +			(struct acpi_table_lsapic*) header;
  17.199 +		printk(KERN_INFO PREFIX "LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n",
  17.200 +			p->acpi_id, p->id, p->eid, p->flags.enabled?"enabled":"disabled");
  17.201 +	}
  17.202 +		break;
  17.203 +
  17.204 +	case ACPI_MADT_PLAT_INT_SRC:
  17.205 +	{
  17.206 +		struct acpi_table_plat_int_src *p =
  17.207 +			(struct acpi_table_plat_int_src*) header;
  17.208 +		printk(KERN_INFO PREFIX "PLAT_INT_SRC (%s %s type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n",
  17.209 +			mps_inti_flags_polarity[p->flags.polarity],
  17.210 +			mps_inti_flags_trigger[p->flags.trigger],
  17.211 +			p->type, p->id, p->eid, p->iosapic_vector, p->global_irq);
  17.212 +	}
  17.213 +		break;
  17.214 +
  17.215 +	default:
  17.216 +		printk(KERN_WARNING PREFIX "Found unsupported MADT entry (type = 0x%x)\n",
  17.217 +			header->type);
  17.218 +		break;
  17.219 +	}
  17.220 +}
  17.221 +
  17.222 +
  17.223 +static int
  17.224 +acpi_table_compute_checksum (
  17.225 +	void			*table_pointer,
  17.226 +	unsigned long		length)
  17.227 +{
  17.228 +	u8			*p = (u8 *) table_pointer;
  17.229 +	unsigned long		remains = length;
  17.230 +	unsigned long		sum = 0;
  17.231 +
  17.232 +	if (!p || !length)
  17.233 +		return -EINVAL;
  17.234 +
  17.235 +	while (remains--)
  17.236 +		sum += *p++;
  17.237 +
  17.238 +	return (sum & 0xFF);
  17.239 +}
  17.240 +
  17.241 +/*
  17.242 + * acpi_get_table_header_early()
  17.243 + * for acpi_blacklisted(), acpi_table_get_sdt()
  17.244 + */
  17.245 +int __init
  17.246 +acpi_get_table_header_early (
  17.247 +	enum acpi_table_id	id,
  17.248 +	struct acpi_table_header **header)
  17.249 +{
  17.250 +	unsigned int i;
  17.251 +	enum acpi_table_id temp_id;
  17.252 +
  17.253 +	/* DSDT is different from the rest */
  17.254 +	if (id == ACPI_DSDT)
  17.255 +		temp_id = ACPI_FADT;
  17.256 +	else
  17.257 +		temp_id = id;
  17.258 +
  17.259 +	/* Locate the table. */
  17.260 +
  17.261 +	for (i = 0; i < sdt_count; i++) {
  17.262 +		if (sdt_entry[i].id != temp_id)
  17.263 +			continue;
  17.264 +		*header = (void *)
  17.265 +			__acpi_map_table(sdt_entry[i].pa, sdt_entry[i].size);
  17.266 +		if (!*header) {
  17.267 +			printk(KERN_WARNING PREFIX "Unable to map %s\n",
  17.268 +			       acpi_table_signatures[temp_id]);
  17.269 +			return -ENODEV;
  17.270 +		}
  17.271 +		break;
  17.272 +	}
  17.273 +
  17.274 +	if (!*header) {
  17.275 +		printk(KERN_WARNING PREFIX "%s not present\n",
  17.276 +		       acpi_table_signatures[id]);
  17.277 +		return -ENODEV;
  17.278 +	}
  17.279 +
  17.280 +	/* Map the DSDT header via the pointer in the FADT */
  17.281 +	if (id == ACPI_DSDT) {
  17.282 +		struct fadt_descriptor_rev2 *fadt = (struct fadt_descriptor_rev2 *) *header;
  17.283 +
  17.284 +		if (fadt->revision == 3 && fadt->Xdsdt) {
  17.285 +			*header = (void *) __acpi_map_table(fadt->Xdsdt,
  17.286 +					sizeof(struct acpi_table_header));
  17.287 +		} else if (fadt->V1_dsdt) {
  17.288 +			*header = (void *) __acpi_map_table(fadt->V1_dsdt,
  17.289 +					sizeof(struct acpi_table_header));
  17.290 +		} else
  17.291 +			*header = 0;
  17.292 +
  17.293 +		if (!*header) {
  17.294 +			printk(KERN_WARNING PREFIX "Unable to map DSDT\n");
  17.295 +			return -ENODEV;
  17.296 +		}
  17.297 +	}
  17.298 +
  17.299 +	return 0;
  17.300 +}
  17.301 +	 
  17.302 +
  17.303 +int __init
  17.304 +acpi_table_parse_madt_family (
  17.305 +	enum acpi_table_id	id,
  17.306 +	unsigned long		madt_size,
  17.307 +	int			entry_id,
  17.308 +	acpi_madt_entry_handler	handler)
  17.309 +{
  17.310 +	void			*madt = NULL;
  17.311 +	acpi_table_entry_header	*entry = NULL;
  17.312 +	unsigned long		count = 0;
  17.313 +	unsigned long		madt_end = 0;
  17.314 +	unsigned int			i = 0;
  17.315 +
  17.316 +	if (!handler)
  17.317 +		return -EINVAL;
  17.318 +
  17.319 +	/* Locate the MADT (if exists). There should only be one. */
  17.320 +
  17.321 +	for (i = 0; i < sdt_count; i++) {
  17.322 +		if (sdt_entry[i].id != id)
  17.323 +			continue;
  17.324 +		madt = (void *)
  17.325 +			__acpi_map_table(sdt_entry[i].pa, sdt_entry[i].size);
  17.326 +		if (!madt) {
  17.327 +			printk(KERN_WARNING PREFIX "Unable to map %s\n",
  17.328 +			       acpi_table_signatures[id]);
  17.329 +			return -ENODEV;
  17.330 +		}
  17.331 +		break;
  17.332 +	}
  17.333 +
  17.334 +	if (!madt) {
  17.335 +		printk(KERN_WARNING PREFIX "%s not present\n",
  17.336 +		       acpi_table_signatures[id]);
  17.337 +		return -ENODEV;
  17.338 +	}
  17.339 +
  17.340 +	madt_end = (unsigned long) madt + sdt_entry[i].size;
  17.341 +
  17.342 +	/* Parse all entries looking for a match. */
  17.343 +
  17.344 +	entry = (acpi_table_entry_header *)
  17.345 +		((unsigned long) madt + madt_size);
  17.346 +
  17.347 +	while (((unsigned long) entry) < madt_end) {
  17.348 +		if (entry->type == entry_id) {
  17.349 +			count++;
  17.350 +			handler(entry);
  17.351 +		}
  17.352 +		entry = (acpi_table_entry_header *)
  17.353 +			((unsigned long) entry + entry->length);
  17.354 +	}
  17.355 +
  17.356 +	return count;
  17.357 +}
  17.358 +
  17.359 +
  17.360 +int __init
  17.361 +acpi_table_parse_madt (
  17.362 +	enum acpi_madt_entry_id	id,
  17.363 +	acpi_madt_entry_handler	handler)
  17.364 +{
  17.365 +	return acpi_table_parse_madt_family(ACPI_APIC, sizeof(struct acpi_table_madt),
  17.366 +					    id, handler);
  17.367 +}
  17.368 +
  17.369 +
  17.370 +int __init
  17.371 +acpi_table_parse (
  17.372 +	enum acpi_table_id	id,
  17.373 +	acpi_table_handler	handler)
  17.374 +{
  17.375 +	int			count = 0;
  17.376 +	unsigned int		i = 0;
  17.377 +
  17.378 +	if (!handler)
  17.379 +		return -EINVAL;
  17.380 +
  17.381 +	for (i = 0; i < sdt_count; i++) {
  17.382 +		if (sdt_entry[i].id != id)
  17.383 +			continue;
  17.384 +		handler(sdt_entry[i].pa, sdt_entry[i].size);
  17.385 +		count++;
  17.386 +	}
  17.387 +
  17.388 +	return count;
  17.389 +}
  17.390 +
  17.391 +
  17.392 +static int __init
  17.393 +acpi_table_get_sdt (
  17.394 +	struct acpi_table_rsdp	*rsdp)
  17.395 +{
  17.396 +	struct acpi_table_header *header = NULL;
  17.397 +	unsigned int		i, id = 0;
  17.398 +
  17.399 +	if (!rsdp)
  17.400 +		return -EINVAL;
  17.401 +
  17.402 +	/* First check XSDT (but only on ACPI 2.0-compatible systems) */
  17.403 +
  17.404 +	if ((rsdp->revision >= 2) &&
  17.405 +		(((struct acpi20_table_rsdp*)rsdp)->xsdt_address)) {
  17.406 +			
  17.407 +		struct acpi_table_xsdt	*mapped_xsdt = NULL;
  17.408 +
  17.409 +		sdt_pa = ((struct acpi20_table_rsdp*)rsdp)->xsdt_address;
  17.410 +
  17.411 +		/* map in just the header */
  17.412 +		header = (struct acpi_table_header *)
  17.413 +			__acpi_map_table(sdt_pa, sizeof(struct acpi_table_header));
  17.414 +
  17.415 +		if (!header) {
  17.416 +			printk(KERN_WARNING PREFIX "Unable to map XSDT header\n");
  17.417 +			return -ENODEV;
  17.418 +		}
  17.419 +
  17.420 +		/* remap in the entire table before processing */
  17.421 +		mapped_xsdt = (struct acpi_table_xsdt *)
  17.422 +			__acpi_map_table(sdt_pa, header->length);
  17.423 +		if (!mapped_xsdt) {
  17.424 +			printk(KERN_WARNING PREFIX "Unable to map XSDT\n");
  17.425 +			return -ENODEV;
  17.426 +		}
  17.427 +		header = &mapped_xsdt->header;
  17.428 +
  17.429 +		if (strncmp(header->signature, "XSDT", 4)) {
  17.430 +			printk(KERN_WARNING PREFIX "XSDT signature incorrect\n");
  17.431 +			return -ENODEV;
  17.432 +		}
  17.433 +
  17.434 +		if (acpi_table_compute_checksum(header, header->length)) {
  17.435 +			printk(KERN_WARNING PREFIX "Invalid XSDT checksum\n");
  17.436 +			return -ENODEV;
  17.437 +		}
  17.438 +
  17.439 +		sdt_count = (header->length - sizeof(struct acpi_table_header)) >> 3;
  17.440 +		if (sdt_count > ACPI_MAX_TABLES) {
  17.441 +			printk(KERN_WARNING PREFIX "Truncated %lu XSDT entries\n",
  17.442 +				(sdt_count - ACPI_MAX_TABLES));
  17.443 +			sdt_count = ACPI_MAX_TABLES;
  17.444 +		}
  17.445 +
  17.446 +		for (i = 0; i < sdt_count; i++)
  17.447 +			sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i];
  17.448 +	}
  17.449 +
  17.450 +	/* Then check RSDT */
  17.451 +
  17.452 +	else if (rsdp->rsdt_address) {
  17.453 +
  17.454 +		struct acpi_table_rsdt	*mapped_rsdt = NULL;
  17.455 +
  17.456 +		sdt_pa = rsdp->rsdt_address;
  17.457 +
  17.458 +		/* map in just the header */
  17.459 +		header = (struct acpi_table_header *)
  17.460 +			__acpi_map_table(sdt_pa, sizeof(struct acpi_table_header));
  17.461 +		if (!header) {
  17.462 +			printk(KERN_WARNING PREFIX "Unable to map RSDT header\n");
  17.463 +			return -ENODEV;
  17.464 +		}
  17.465 +
  17.466 +		/* remap in the entire table before processing */
  17.467 +		mapped_rsdt = (struct acpi_table_rsdt *)
  17.468 +			__acpi_map_table(sdt_pa, header->length);
  17.469 +		if (!mapped_rsdt) {
  17.470 +			printk(KERN_WARNING PREFIX "Unable to map RSDT\n");
  17.471 +			return -ENODEV;
  17.472 +		}
  17.473 +		header = &mapped_rsdt->header;
  17.474 +
  17.475 +		if (strncmp(header->signature, "RSDT", 4)) {
  17.476 +			printk(KERN_WARNING PREFIX "RSDT signature incorrect\n");
  17.477 +			return -ENODEV;
  17.478 +		}
  17.479 +
  17.480 +		if (acpi_table_compute_checksum(header, header->length)) {
  17.481 +			printk(KERN_WARNING PREFIX "Invalid RSDT checksum\n");
  17.482 +			return -ENODEV;
  17.483 +		}
  17.484 +
  17.485 +		sdt_count = (header->length - sizeof(struct acpi_table_header)) >> 2;
  17.486 +		if (sdt_count > ACPI_MAX_TABLES) {
  17.487 +			printk(KERN_WARNING PREFIX "Truncated %lu RSDT entries\n",
  17.488 +				(sdt_count - ACPI_MAX_TABLES));
  17.489 +			sdt_count = ACPI_MAX_TABLES;
  17.490 +		}
  17.491 +
  17.492 +		for (i = 0; i < sdt_count; i++)
  17.493 +			sdt_entry[i].pa = (unsigned long) mapped_rsdt->entry[i];
  17.494 +	}
  17.495 +
  17.496 +	else {
  17.497 +		printk(KERN_WARNING PREFIX "No System Description Table (RSDT/XSDT) specified in RSDP\n");
  17.498 +		return -ENODEV;
  17.499 +	}
  17.500 +
  17.501 +	acpi_table_print(header, sdt_pa);
  17.502 +
  17.503 +	for (i = 0; i < sdt_count; i++) {
  17.504 +
  17.505 +		/* map in just the header */
  17.506 +		header = (struct acpi_table_header *)
  17.507 +			__acpi_map_table(sdt_entry[i].pa,
  17.508 +				sizeof(struct acpi_table_header));
  17.509 +		if (!header)
  17.510 +			continue;
  17.511 +
  17.512 +		/* remap in the entire table before processing */
  17.513 +		header = (struct acpi_table_header *)
  17.514 +			__acpi_map_table(sdt_entry[i].pa,
  17.515 +				header->length);
  17.516 +		if (!header)
  17.517 +			continue;
  17.518 +	               
  17.519 +		acpi_table_print(header, sdt_entry[i].pa);
  17.520 +
  17.521 +		if (acpi_table_compute_checksum(header, header->length)) {
  17.522 +			printk(KERN_WARNING "  >>> ERROR: Invalid checksum\n");
  17.523 +			continue;
  17.524 +		}
  17.525 +
  17.526 +		sdt_entry[i].size = header->length;
  17.527 +
  17.528 +		for (id = 0; id < ACPI_TABLE_COUNT; id++) {
  17.529 +			if (!strncmp((char *) &header->signature,
  17.530 +				acpi_table_signatures[id],
  17.531 +				sizeof(header->signature))) {
  17.532 +				sdt_entry[i].id = id;
  17.533 +			}
  17.534 +		}
  17.535 +	}
  17.536 +
  17.537 +	/* 
  17.538 +	 * The DSDT is *not* in the RSDT (why not? no idea.) but we want
  17.539 +	 * to print its info, because this is what people usually blacklist
  17.540 +	 * against. Unfortunately, we don't know the phys_addr, so just
  17.541 +	 * print 0. Maybe no one will notice.
  17.542 +	 */
  17.543 +	if(!acpi_get_table_header_early(ACPI_DSDT, &header))
  17.544 +		acpi_table_print(header, 0);
  17.545 +
  17.546 +	return 0;
  17.547 +}
  17.548 +
  17.549 +
  17.550 +int __init
  17.551 +acpi_table_init (void)
  17.552 +{
  17.553 +	struct acpi_table_rsdp	*rsdp = NULL;
  17.554 +	unsigned long		rsdp_phys = 0;
  17.555 +	int			result = 0;
  17.556 +
  17.557 +	/* Locate and map the Root System Description Table (RSDP) */
  17.558 +
  17.559 +	rsdp_phys = acpi_find_rsdp();
  17.560 +	if (!rsdp_phys) {
  17.561 +		printk(KERN_ERR PREFIX "Unable to locate RSDP\n");
  17.562 +		return -ENODEV;
  17.563 +	}
  17.564 +
  17.565 +	rsdp = (struct acpi_table_rsdp *) __va(rsdp_phys);
  17.566 +	if (!rsdp) {
  17.567 +		printk(KERN_WARNING PREFIX "Unable to map RSDP\n");
  17.568 +		return -ENODEV;
  17.569 +	}
  17.570 +
  17.571 +	printk(KERN_INFO PREFIX "RSDP (v%3.3d %6.6s                                    ) @ 0x%p\n",
  17.572 +		rsdp->revision, rsdp->oem_id, (void *) rsdp_phys);
  17.573 +
  17.574 +	if (rsdp->revision < 2)
  17.575 +		result = acpi_table_compute_checksum(rsdp, sizeof(struct acpi_table_rsdp));
  17.576 +	else
  17.577 +		result = acpi_table_compute_checksum(rsdp, ((struct acpi20_table_rsdp *)rsdp)->length);
  17.578 +
  17.579 +	if (result) {
  17.580 +		printk(KERN_WARNING "  >>> ERROR: Invalid checksum\n");
  17.581 +		return -ENODEV;
  17.582 +	}
  17.583 +
  17.584 +	/* Locate and map the System Description table (RSDT/XSDT) */
  17.585 +
  17.586 +	if (acpi_table_get_sdt(rsdp))
  17.587 +		return -ENODEV;
  17.588 +
  17.589 +	return 0;
  17.590 +}
  17.591 +
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/xen/drivers/acpi_ksyms.c	Mon Apr 05 13:12:24 2004 +0000
    18.3 @@ -0,0 +1,157 @@
    18.4 +/*
    18.5 + *  acpi_ksyms.c - ACPI Kernel Symbols ($Revision: 15 $)
    18.6 + *
    18.7 + *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
    18.8 + *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
    18.9 + *
   18.10 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18.11 + *
   18.12 + *  This program is free software; you can redistribute it and/or modify
   18.13 + *  it under the terms of the GNU General Public License as published by
   18.14 + *  the Free Software Foundation; either version 2 of the License, or (at
   18.15 + *  your option) any later version.
   18.16 + *
   18.17 + *  This program is distributed in the hope that it will be useful, but
   18.18 + *  WITHOUT ANY WARRANTY; without even the implied warranty of
   18.19 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   18.20 + *  General Public License for more details.
   18.21 + *
   18.22 + *  You should have received a copy of the GNU General Public License along
   18.23 + *  with this program; if not, write to the Free Software Foundation, Inc.,
   18.24 + *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
   18.25 + *
   18.26 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18.27 + */
   18.28 +
   18.29 +#include <xen/module.h>
   18.30 +#include <xen/acpi.h>
   18.31 +
   18.32 +#ifdef CONFIG_ACPI_INTERPRETER
   18.33 +
   18.34 +/* ACPI Debugger */
   18.35 +
   18.36 +#ifdef ENABLE_DEBUGGER
   18.37 +
   18.38 +extern int			acpi_in_debugger;
   18.39 +
   18.40 +EXPORT_SYMBOL(acpi_in_debugger);
   18.41 +EXPORT_SYMBOL(acpi_db_user_commands);
   18.42 +
   18.43 +#endif /* ENABLE_DEBUGGER */
   18.44 +
   18.45 +/* ACPI Core Subsystem */
   18.46 +
   18.47 +#ifdef ACPI_DEBUG_OUTPUT
   18.48 +EXPORT_SYMBOL(acpi_dbg_layer);
   18.49 +EXPORT_SYMBOL(acpi_dbg_level);
   18.50 +EXPORT_SYMBOL(acpi_ut_debug_print_raw);
   18.51 +EXPORT_SYMBOL(acpi_ut_debug_print);
   18.52 +EXPORT_SYMBOL(acpi_ut_status_exit);
   18.53 +EXPORT_SYMBOL(acpi_ut_value_exit);
   18.54 +EXPORT_SYMBOL(acpi_ut_exit);
   18.55 +EXPORT_SYMBOL(acpi_ut_trace);
   18.56 +#endif /*ACPI_DEBUG_OUTPUT*/
   18.57 +
   18.58 +EXPORT_SYMBOL(acpi_get_handle);
   18.59 +EXPORT_SYMBOL(acpi_get_parent);
   18.60 +EXPORT_SYMBOL(acpi_get_type);
   18.61 +EXPORT_SYMBOL(acpi_get_name);
   18.62 +EXPORT_SYMBOL(acpi_get_object_info);
   18.63 +EXPORT_SYMBOL(acpi_get_next_object);
   18.64 +EXPORT_SYMBOL(acpi_evaluate_object);
   18.65 +EXPORT_SYMBOL(acpi_get_table);
   18.66 +EXPORT_SYMBOL(acpi_get_firmware_table);
   18.67 +EXPORT_SYMBOL(acpi_install_notify_handler);
   18.68 +EXPORT_SYMBOL(acpi_remove_notify_handler);
   18.69 +EXPORT_SYMBOL(acpi_install_gpe_handler);
   18.70 +EXPORT_SYMBOL(acpi_remove_gpe_handler);
   18.71 +EXPORT_SYMBOL(acpi_install_address_space_handler);
   18.72 +EXPORT_SYMBOL(acpi_remove_address_space_handler);
   18.73 +EXPORT_SYMBOL(acpi_install_fixed_event_handler);
   18.74 +EXPORT_SYMBOL(acpi_remove_fixed_event_handler);
   18.75 +EXPORT_SYMBOL(acpi_acquire_global_lock);
   18.76 +EXPORT_SYMBOL(acpi_release_global_lock);
   18.77 +EXPORT_SYMBOL(acpi_install_gpe_block);
   18.78 +EXPORT_SYMBOL(acpi_remove_gpe_block);
   18.79 +EXPORT_SYMBOL(acpi_get_current_resources);
   18.80 +EXPORT_SYMBOL(acpi_get_possible_resources);
   18.81 +EXPORT_SYMBOL(acpi_walk_resources);
   18.82 +EXPORT_SYMBOL(acpi_set_current_resources);
   18.83 +EXPORT_SYMBOL(acpi_enable_event);
   18.84 +EXPORT_SYMBOL(acpi_disable_event);
   18.85 +EXPORT_SYMBOL(acpi_clear_event);
   18.86 +EXPORT_SYMBOL(acpi_get_timer_duration);
   18.87 +EXPORT_SYMBOL(acpi_get_timer);
   18.88 +EXPORT_SYMBOL(acpi_get_sleep_type_data);
   18.89 +EXPORT_SYMBOL(acpi_get_register);
   18.90 +EXPORT_SYMBOL(acpi_set_register);
   18.91 +EXPORT_SYMBOL(acpi_enter_sleep_state);
   18.92 +EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios);
   18.93 +EXPORT_SYMBOL(acpi_get_system_info);
   18.94 +EXPORT_SYMBOL(acpi_get_devices);
   18.95 +
   18.96 +/* ACPI OS Services Layer (acpi_osl.c) */
   18.97 +
   18.98 +EXPORT_SYMBOL(acpi_os_free);
   18.99 +EXPORT_SYMBOL(acpi_os_printf);
  18.100 +EXPORT_SYMBOL(acpi_os_sleep);
  18.101 +EXPORT_SYMBOL(acpi_os_stall);
  18.102 +EXPORT_SYMBOL(acpi_os_signal);
  18.103 +EXPORT_SYMBOL(acpi_os_queue_for_execution);
  18.104 +EXPORT_SYMBOL(acpi_os_signal_semaphore);
  18.105 +EXPORT_SYMBOL(acpi_os_create_semaphore);
  18.106 +EXPORT_SYMBOL(acpi_os_delete_semaphore);
  18.107 +EXPORT_SYMBOL(acpi_os_wait_semaphore);
  18.108 +
  18.109 +EXPORT_SYMBOL(acpi_os_read_pci_configuration);
  18.110 +
  18.111 +/* ACPI Utilities (acpi_utils.c) */
  18.112 +
  18.113 +EXPORT_SYMBOL(acpi_extract_package);
  18.114 +EXPORT_SYMBOL(acpi_evaluate_integer);
  18.115 +EXPORT_SYMBOL(acpi_evaluate_reference);
  18.116 +
  18.117 +#endif /*CONFIG_ACPI_INTERPRETER*/
  18.118 +
  18.119 +
  18.120 +/* ACPI Bus Driver (acpi_bus.c) */
  18.121 +
  18.122 +#ifdef CONFIG_ACPI_BUS
  18.123 +
  18.124 +EXPORT_SYMBOL(acpi_fadt);
  18.125 +EXPORT_SYMBOL(acpi_walk_namespace);
  18.126 +EXPORT_SYMBOL(acpi_root_dir);
  18.127 +EXPORT_SYMBOL(acpi_bus_get_device);
  18.128 +EXPORT_SYMBOL(acpi_bus_get_status);
  18.129 +EXPORT_SYMBOL(acpi_bus_get_power);
  18.130 +EXPORT_SYMBOL(acpi_bus_set_power);
  18.131 +EXPORT_SYMBOL(acpi_bus_generate_event);
  18.132 +EXPORT_SYMBOL(acpi_bus_receive_event);
  18.133 +EXPORT_SYMBOL(acpi_bus_register_driver);
  18.134 +EXPORT_SYMBOL(acpi_bus_unregister_driver);
  18.135 +EXPORT_SYMBOL(acpi_bus_scan);
  18.136 +EXPORT_SYMBOL(acpi_init);
  18.137 +
  18.138 +#endif /*CONFIG_ACPI_BUS*/
  18.139 +
  18.140 +
  18.141 +/* ACPI PCI Driver (pci_irq.c) */
  18.142 +
  18.143 +#ifdef CONFIG_ACPI_PCI
  18.144 +
  18.145 +#include <xen/pci.h>
  18.146 +extern int acpi_pci_irq_enable(struct pci_dev *dev);
  18.147 +EXPORT_SYMBOL(acpi_pci_irq_enable);
  18.148 +extern int acpi_pci_irq_lookup (int segment, int bus, int device, int pin);
  18.149 +EXPORT_SYMBOL(acpi_pci_irq_lookup);
  18.150 +EXPORT_SYMBOL(acpi_pci_register_driver);
  18.151 +EXPORT_SYMBOL(acpi_pci_unregister_driver);
  18.152 +#endif /*CONFIG_ACPI_PCI */
  18.153 +
  18.154 +#ifdef CONFIG_ACPI_EC
  18.155 +/* ACPI EC driver (ec.c) */
  18.156 +
  18.157 +EXPORT_SYMBOL(ec_read);
  18.158 +EXPORT_SYMBOL(ec_write);
  18.159 +#endif
  18.160 +
    19.1 --- a/xen/drivers/ide/ide-probe.c	Mon Apr 05 08:23:33 2004 +0000
    19.2 +++ b/xen/drivers/ide/ide-probe.c	Mon Apr 05 13:12:24 2004 +0000
    19.3 @@ -775,7 +775,7 @@ static int init_irq (ide_hwif_t *hwif)
    19.4  	restore_flags(flags);	/* all CPUs; safe now that hwif->hwgroup is set up */
    19.5  
    19.6  #if !defined(__mc68000__) && !defined(CONFIG_APUS) && !defined(__sparc__)
    19.7 -	printk("%s at 0x%03x-0x%03x,0x%03x on irq %d", hwif->name,
    19.8 +	printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name,
    19.9  		hwif->io_ports[IDE_DATA_OFFSET],
   19.10  		hwif->io_ports[IDE_DATA_OFFSET]+7,
   19.11  		hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq);
    20.1 --- a/xen/drivers/pci/pci.c	Mon Apr 05 08:23:33 2004 +0000
    20.2 +++ b/xen/drivers/pci/pci.c	Mon Apr 05 13:12:24 2004 +0000
    20.3 @@ -907,8 +907,12 @@ pci_set_master(struct pci_dev *dev)
    20.4  	pcibios_set_master(dev);
    20.5  }
    20.6  
    20.7 +#ifndef HAVE_ARCH_PCI_MWI
    20.8 +/* This can be overridden by arch code. */
    20.9 +u8 pci_cache_line_size = L1_CACHE_BYTES >> 2;
   20.10 +
   20.11  /**
   20.12 - * pdev_set_mwi - arch helper function for pcibios_set_mwi
   20.13 + * pci_generic_prep_mwi - helper function for pci_set_mwi
   20.14   * @dev: the PCI device for which MWI is enabled
   20.15   *
   20.16   * Helper function for implementation the arch-specific pcibios_set_mwi
   20.17 @@ -917,35 +921,34 @@ pci_set_master(struct pci_dev *dev)
   20.18   *
   20.19   * RETURNS: An appriopriate -ERRNO error value on eror, or zero for success.
   20.20   */
   20.21 -int
   20.22 -pdev_set_mwi(struct pci_dev *dev)
   20.23 +static int
   20.24 +pci_generic_prep_mwi(struct pci_dev *dev)
   20.25  {
   20.26 -	int rc = 0;
   20.27 -	u8 cache_size;
   20.28 +	u8 cacheline_size;
   20.29 +
   20.30 +	if (!pci_cache_line_size)
   20.31 +		return -EINVAL;		/* The system doesn't support MWI. */
   20.32  
   20.33 -	/*
   20.34 -	 * Looks like this is necessary to deal with on all architectures,
   20.35 -	 * even this %$#%$# N440BX Intel based thing doesn't get it right.
   20.36 -	 * Ie. having two NICs in the machine, one will have the cache
   20.37 -	 * line set at boot time, the other will not.
   20.38 -	 */
   20.39 -	pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &cache_size);
   20.40 -	cache_size <<= 2;
   20.41 -	if (cache_size != SMP_CACHE_BYTES) {
   20.42 -		printk(KERN_WARNING "PCI: %s PCI cache line size set incorrectly (%i bytes) by BIOS/FW.\n",
   20.43 -		       dev->slot_name, cache_size);
   20.44 -		if (cache_size > SMP_CACHE_BYTES) {
   20.45 -			printk("PCI: %s cache line size too large - expecting %i.\n", dev->slot_name, SMP_CACHE_BYTES);
   20.46 -			rc = -EINVAL;
   20.47 -		} else {
   20.48 -			printk("PCI: %s PCI cache line size corrected to %i.\n", dev->slot_name, SMP_CACHE_BYTES);
   20.49 -			pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
   20.50 -					      SMP_CACHE_BYTES >> 2);
   20.51 -		}
   20.52 -	}
   20.53 +	/* Validate current setting: the PCI_CACHE_LINE_SIZE must be
   20.54 +	   equal to or multiple of the right value. */
   20.55 +	pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &cacheline_size);
   20.56 +	if (cacheline_size >= pci_cache_line_size &&
   20.57 +	    (cacheline_size % pci_cache_line_size) == 0)
   20.58 +		return 0;
   20.59  
   20.60 -	return rc;
   20.61 +	/* Write the correct value. */
   20.62 +	pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, pci_cache_line_size);
   20.63 +	/* Read it back. */
   20.64 +	pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &cacheline_size);
   20.65 +	if (cacheline_size == pci_cache_line_size)
   20.66 +		return 0;
   20.67 +
   20.68 +	printk(KERN_WARNING "PCI: cache line size of %d is not supported "
   20.69 +	       "by device %s\n", pci_cache_line_size << 2, dev->slot_name);
   20.70 +
   20.71 +	return -EINVAL;
   20.72  }
   20.73 +#endif /* !HAVE_ARCH_PCI_MWI */
   20.74  
   20.75  /**
   20.76   * pci_set_mwi - enables memory-write-invalidate PCI transaction
   20.77 @@ -966,7 +969,7 @@ pci_set_mwi(struct pci_dev *dev)
   20.78  #ifdef HAVE_ARCH_PCI_MWI
   20.79  	rc = pcibios_set_mwi(dev);
   20.80  #else
   20.81 -	rc = pdev_set_mwi(dev);
   20.82 +	rc = pci_generic_prep_mwi(dev);
   20.83  #endif
   20.84  
   20.85  	if (rc)
   20.86 @@ -1257,10 +1260,6 @@ struct pci_bus * __devinit pci_add_new_b
   20.87  		child->resource[i]->name = child->name;
   20.88  	}
   20.89  
   20.90 -	DBG("pci_add_new_bus(nr=%x,devfn=%02x(%02x:%x),parent=%x)\n",
   20.91 -	    busnr, dev->devfn, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn),
   20.92 -	    parent->number);
   20.93 -
   20.94  	return child;
   20.95  }
   20.96  
   20.97 @@ -1474,17 +1473,22 @@ struct pci_dev * __devinit pci_scan_slot
   20.98  	u8 hdr_type;
   20.99  
  20.100  	for (func = 0; func < 8; func++, temp->devfn++) {
  20.101 -		if (func && !is_multi)		/* not a multi-function device */
  20.102 -			continue;
  20.103  		if (pci_read_config_byte(temp, PCI_HEADER_TYPE, &hdr_type))
  20.104  			continue;
  20.105  		temp->hdr_type = hdr_type & 0x7f;
  20.106  
  20.107  		dev = pci_scan_device(temp);
  20.108 -		if (!dev)
  20.109 -			continue;
  20.110 +		if (!pcibios_scan_all_fns() && func == 0) {
  20.111 +			if (!dev)
  20.112 +				break;
  20.113 +		} else {
  20.114 +			if (!dev)
  20.115 +				continue;
  20.116 +			is_multi = 1;
  20.117 +		}
  20.118 +
  20.119  		pci_name_device(dev);
  20.120 -		if (!func) {
  20.121 +		if (!first_dev) {
  20.122  			is_multi = hdr_type & 0x80;
  20.123  			first_dev = dev;
  20.124  		}
  20.125 @@ -1498,6 +1502,14 @@ struct pci_dev * __devinit pci_scan_slot
  20.126  
  20.127  		/* Fix up broken headers */
  20.128  		pci_fixup_device(PCI_FIXUP_HEADER, dev);
  20.129 +
  20.130 +		/*
  20.131 +		 * If this is a single function device
  20.132 +		 * don't scan past the first function.
  20.133 +		 */
  20.134 +		if (!is_multi)
  20.135 +			break;
  20.136 +
  20.137  	}
  20.138  	return first_dev;
  20.139  }
  20.140 @@ -2114,19 +2126,6 @@ void __devinit  pci_init(void)
  20.141  
  20.142  	pci_for_each_dev(dev) {
  20.143  		pci_fixup_device(PCI_FIXUP_FINAL, dev);
  20.144 -#ifdef DEBUG
  20.145 -		printk("PCI: %p %02x:%02x:%02x\n", dev,
  20.146 -		       dev->bus ? dev->bus->number : 0xffffffff, 
  20.147 -		       PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
  20.148 -		if (dev->bus) {
  20.149 -			printk(" s=%p ", dev->bus->self);
  20.150 -			if ( dev->bus->self )
  20.151 -				printk(" %02x:%02x)",
  20.152 -				       PCI_SLOT(dev->bus->self->devfn),
  20.153 -				       PCI_FUNC(dev->bus->self->devfn));
  20.154 -			printk("\n");
  20.155 -		}
  20.156 -#endif /* DEBUG */
  20.157  	}
  20.158  
  20.159  #ifdef CONFIG_PM
  20.160 @@ -2174,7 +2173,6 @@ EXPORT_SYMBOL(pci_find_subsys);
  20.161  EXPORT_SYMBOL(pci_set_master);
  20.162  EXPORT_SYMBOL(pci_set_mwi);
  20.163  EXPORT_SYMBOL(pci_clear_mwi);
  20.164 -EXPORT_SYMBOL(pdev_set_mwi);
  20.165  EXPORT_SYMBOL(pci_set_dma_mask);
  20.166  EXPORT_SYMBOL(pci_dac_set_dma_mask);
  20.167  EXPORT_SYMBOL(pci_assign_resource);
    21.1 --- a/xen/drivers/pci/pci.ids	Mon Apr 05 08:23:33 2004 +0000
    21.2 +++ b/xen/drivers/pci/pci.ids	Mon Apr 05 13:12:24 2004 +0000
    21.3 @@ -7,7 +7,8 @@
    21.4  #	so if you have anything to contribute, please visit the home page or
    21.5  #	send a diff -u against the most recent pci.ids to pci-ids@ucw.cz.
    21.6  #
    21.7 -#	$Id: pci.ids,v 1.46 2002/08/14 17:38:51 mares Exp $
    21.8 +#	Daily snapshot on Thu 2003-05-29 10:00:04
    21.9 +#	Modded on Fri 2003-05-30 03:13:05
   21.10  #
   21.11  
   21.12  # Vendors, devices and subsystems. Please keep sorted.
   21.13 @@ -21,6 +22,8 @@ 0000  Gammagraphx, Inc.
   21.14  001a  Ascend Communications, Inc.
   21.15  0033  Paradyne corp.
   21.16  003d  Lockheed Martin-Marietta Corp
   21.17 +# Real TJN ID is e159, but they got it wrong several times --mj
   21.18 +0059  Tiger Jet Network Inc. (Wrong ID)
   21.19  0070  Hauppauge computer works Inc.
   21.20  0100  Ncipher Corp Ltd
   21.21  0675  Dynalink
   21.22 @@ -98,7 +101,8 @@ 0e11  Compaq Computer Corporation
   21.23  	f130  NetFlex-3/P ThunderLAN 1.0
   21.24  	f150  NetFlex-3/P ThunderLAN 2.3
   21.25  0e55  HaSoTec GmbH
   21.26 -1000  LSI Logic / Symbios Logic (formerly NCR)
   21.27 +# Formerly NCR
   21.28 +1000  LSI Logic / Symbios Logic
   21.29  	0001  53c810
   21.30  		1000 1000  8100S
   21.31  	0002  53c820
   21.32 @@ -123,7 +127,7 @@ 1000  LSI Logic / Symbios Logic (formerl
   21.33  	0020  53c1010 Ultra3 SCSI Adapter
   21.34  		1de1 1020  DC-390U3W
   21.35  	0021  53c1010 66MHz  Ultra3 SCSI Adapter
   21.36 -	0030  53c1030
   21.37 +	0030  53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
   21.38  		1028 1010  LSI U320 SCSI Controller
   21.39  	0040  53c1035
   21.40  	008f  53c875J
   21.41 @@ -158,9 +162,20 @@ 1001  Kolter Electronic
   21.42  	0017  PROTO-3 PCI Prototyping board
   21.43  	9100  INI-9100/9100W SCSI Host
   21.44  1002  ATI Technologies Inc
   21.45 +	4136  Radeon IGP 320 M
   21.46 +# New support forthcoming in XFree86 4.3.0
   21.47 +	4144  Radeon R300 AD [Radeon 9500 Pro]
   21.48 +# New support forthcoming in XFree86 4.3.0
   21.49 +	4145  Radeon R300 AE [Radeon 9500 Pro]
   21.50 +# New support forthcoming in XFree86 4.3.0
   21.51 +	4146  Radeon R300 AF [Radeon 9500 Pro]
   21.52 +# Update:  Oops, AF was a typo above for 4147, should be AG
   21.53 +	4147  Radeon R300 AG [FireGL Z1/X1]
   21.54  	4158  68800AX [Mach32]
   21.55 -	4242  Radeon 8500 DV
   21.56 +	4242  Radeon R200 BB [Radeon All in Wonder 8500DV]
   21.57  		1002 02aa  Radeon 8500 AIW DV Edition
   21.58 +	4336  Radeon Mobility U1
   21.59 +	4337  Radeon IGP 340M
   21.60  	4354  215CT [Mach64 CT]
   21.61  	4358  210888CX [Mach64 CX]
   21.62  	4554  210888ET [Mach64 ET]
   21.63 @@ -210,6 +225,8 @@ 1002  ATI Technologies Inc
   21.64  	4752  Rage XL
   21.65  		1002 0008  Rage XL
   21.66  		1002 4752  Rage XL
   21.67 +		1002 8008  Rage XL
   21.68 +		1028 00d1  PowerEdge 2550
   21.69  	4753  Rage XC
   21.70  		1002 4753  Rage XC
   21.71  	4754  3D Rage I/II 215GT [Mach64 GT]
   21.72 @@ -227,6 +244,20 @@ 1002  ATI Technologies Inc
   21.73  	475a  3D Rage IIC AGP
   21.74  		1002 0087  Rage 3D IIC
   21.75  		1002 475a  Rage IIC AGP
   21.76 +	4964  Radeon R250 Id [Radeon 9000]
   21.77 +	4965  Radeon R250 Ie [Radeon 9000]
   21.78 +	4966  Radeon R250 If [Radeon 9000]
   21.79 +		10f1 0002  R250 If [Tachyon G9000 PRO]
   21.80 +		148c 2039  R250 If [Radeon 9000 Pro "Evil Commando"]
   21.81 +		1509 9a00  R250 If [Radeon 9000 "AT009"]
   21.82 +# New subdevice - 3D Prophet 9000 PCI by Hercules.  AGP version probably would have same ID, so not specified.
   21.83 +		1681 0040  R250 If [3D prophet 9000]
   21.84 +		174b 7176  R250 If [Sapphire Radeon 9000 Pro]
   21.85 +		174b 7192  R250 If [Radeon 9000 "Atlantis"]
   21.86 +		17af 2005  R250 If [Excalibur Radeon 9000 Pro]
   21.87 +		17af 2006  R250 If [Excalibur Radeon 9000]
   21.88 +	4967  Radeon R250 Ig [Radeon 9000]
   21.89 +	496e  Radeon R250 [Radeon 9000] (Secondary)
   21.90  	4c42  3D Rage LT Pro AGP-133
   21.91  		0e11 b0e8  Rage 3D LT Pro
   21.92  		0e11 b10e  3D Rage LT Pro (Compaq Armada 1750)
   21.93 @@ -245,7 +276,9 @@ 1002  ATI Technologies Inc
   21.94  		1002 0044  Rage LT Pro
   21.95  		1002 4c49  Rage LT Pro
   21.96  	4c4d  Rage Mobility P/M AGP 2x
   21.97 +		0e11 b111  Armada M700
   21.98  		1002 0084  Xpert 98 AGP 2X (Mobility)
   21.99 +		1014 0154  ThinkPad A20m
  21.100  	4c4e  Rage Mobility L AGP 2x
  21.101  	4c50  3D Rage LT Pro
  21.102  		1002 4c50  Rage LT Pro
  21.103 @@ -253,16 +286,39 @@ 1002  ATI Technologies Inc
  21.104  	4c52  Rage Mobility P/M
  21.105  	4c53  Rage Mobility L
  21.106  	4c54  264LT [Mach64 LT]
  21.107 -	4c57  Radeon Mobility M7 LW
  21.108 +	4c57  Radeon Mobility M7 LW [Radeon Mobility 7500]
  21.109 +		1014 0517  ThinkPad T30
  21.110  		1028 00e6  Radeon Mobility M7 LW (Dell Inspiron 8100)
  21.111 -	4c58  Radeon Mobility M7 LX [Radeon Mobility FireGL 7800]
  21.112 +		144d c006  Radeon Mobility M7 LW in vpr Matrix 170B4
  21.113 +# Update:  More correct labelling for this FireGL chipset
  21.114 +	4c58  Radeon RV200 LX [Mobility FireGL 7800 M7]
  21.115  	4c59  Radeon Mobility M6 LY
  21.116  		1014 0235  ThinkPad A30p (2653-64G)
  21.117  		1014 0239  ThinkPad X22/X23/X24
  21.118  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
  21.119  	4c5a  Radeon Mobility M6 LZ
  21.120 +# Update:  Add M9 to product name
  21.121 +	4c64  Radeon R250 Ld [Radeon Mobility 9000 M9]
  21.122 +# Update:  Add M9 to product name
  21.123 +	4c65  Radeon R250 Le [Radeon Mobility 9000 M9]
  21.124 +# Update:  Add M9 to product name
  21.125 +	4c66  Radeon R250 Lf [Radeon Mobility 9000 M9]
  21.126 +# Update:  Add M9 to product name
  21.127 +	4c67  Radeon R250 Lg [Radeon Mobility 9000 M9]
  21.128  	4d46  Rage Mobility M4 AGP
  21.129  	4d4c  Rage Mobility M4 AGP
  21.130 +	4e44  Radeon R300 ND [Radeon 9700 Pro]
  21.131 +	4e45  Radeon R300 NE [Radeon 9500 Pro]
  21.132 +		1002 0002  Radeon R300 NE [Radeon 9500 Pro]
  21.133 +	4e46  Radeon R300 NF [Radeon 9700]
  21.134 +# Update:  This is FireGL X1, not Radeon 9700
  21.135 +	4e47  Radeon R300 NG [FireGL X1]
  21.136 +	4e48  Radeon R350 [Radeon 9800]
  21.137 +	4e64  Radeon R300 [Radeon 9700 Pro] (Secondary)
  21.138 +	4e65  Radeon R300 [Radeon 9500 Pro] (Secondary)
  21.139 +	4e66  Radeon R300 [Radeon 9700] (Secondary)
  21.140 +	4e67  Radeon R300 [FireGL X1] (Secondary)
  21.141 +	4e68  Radeon R350 [Radeon 9800] (Secondary)
  21.142  	5041  Rage 128 PA/PRO
  21.143  	5042  Rage 128 PB/PRO AGP 2x
  21.144  	5043  Rage 128 PC/PRO AGP 4x
  21.145 @@ -289,7 +345,7 @@ 1002  ATI Technologies Inc
  21.146  	504d  Rage 128 PM/PRO
  21.147  	504e  Rage 128 PN/PRO AGP 2x
  21.148  	504f  Rage 128 PO/PRO AGP 4x
  21.149 -	5050  Rage 128 PP/PRO TMDS
  21.150 +	5050  Rage 128 PP/PRO TMDS [Xpert 128]
  21.151  		1002 0008  Xpert 128
  21.152  	5051  Rage 128 PQ/PRO AGP 2x TMDS
  21.153  	5052  Rage 128 PR/PRO AGP 4x TMDS
  21.154 @@ -299,7 +355,8 @@ 1002  ATI Technologies Inc
  21.155  	5056  Rage 128 PV/PRO TMDS
  21.156  	5057  Rage 128 PW/PRO AGP 2x TMDS
  21.157  	5058  Rage 128 PX/PRO AGP 4x TMDS
  21.158 -	5144  Radeon QD
  21.159 +# Update: This same chip is used in all 32Mb and 64Mb SDR/DDR orig Radeons, and is now known as 7200
  21.160 +	5144  Radeon R100 QD [Radeon 7200]
  21.161  		1002 0008  Radeon 7000/Radeon VE
  21.162  		1002 0009  Radeon 7000/Radeon
  21.163  		1002 000a  Radeon 7000/Radeon
  21.164 @@ -313,34 +370,59 @@ 1002  ATI Technologies Inc
  21.165  		1002 028a  Radeon 7000/Radeon
  21.166  		1002 02aa  Radeon AIW
  21.167  		1002 053a  Radeon 7000/Radeon
  21.168 -	5145  Radeon QE
  21.169 -	5146  Radeon QF
  21.170 -	5147  Radeon QG
  21.171 +	5145  Radeon R100 QE
  21.172 +	5146  Radeon R100 QF
  21.173 +	5147  Radeon R100 QG
  21.174  	5148  Radeon R200 QH [Radeon 8500]
  21.175 -		1002 0152  FireGL 8800
  21.176 -		1002 0172  FireGL 8700
  21.177 +		1002 010a  FireGL 8800 64Mb
  21.178 +		1002 0152  FireGL 8800 128Mb
  21.179 +		1002 0162  FireGL 8700 32Mb
  21.180 +		1002 0172  FireGL 8700 64Mb
  21.181  	5149  Radeon R200 QI
  21.182  	514a  Radeon R200 QJ
  21.183  	514b  Radeon R200 QK
  21.184  	514c  Radeon R200 QL [Radeon 8500 LE]
  21.185  		1002 003a  Radeon R200 QL [Radeon 8500 LE]
  21.186  		1002 013a  Radeon 8500
  21.187 -	5157  Radeon 7500 QW
  21.188 +		148c 2026  R200 QL [Radeon 8500 Evil Master II Multi Display Edition]
  21.189 +		174b 7149  Radeon R200 QL [Sapphire Radeon 8500 LE]
  21.190 +# New: Radeon 9100 is basically a Radeon 8500LE branded as 9100 by Sapphire
  21.191 +	514d  Radeon R200 QM [Radeon 9100]
  21.192 +# New: Radeon 8500LE chip
  21.193 +	514e  Radeon R200 QN [Radeon 8500LE]
  21.194 +# New: Radeon 8500LE chip
  21.195 +	514f  Radeon R200 QO [Radeon 8500LE]
  21.196 +	5157  Radeon RV200 QW [Radeon 7500]
  21.197  		1002 013a  Radeon 7500
  21.198 +		1458 4000  RV200 QW [RADEON 7500 PRO MAYA AR]
  21.199 +		148c 2024  RV200 QW [Radeon 7500LE Dual Display]
  21.200 +		148c 2025  RV200 QW [Radeon 7500 Evil Master Multi Display Edition]
  21.201 +		148c 2036  RV200 QW [Radeon 7500 PCI Dual Display]
  21.202 +		174b 7147  RV200 QW [Sapphire Radeon 7500LE]
  21.203  		174b 7161  Radeon RV200 QW [Radeon 7500 LE]
  21.204 -	5158  Radeon 7500 QX
  21.205 -	5159  Radeon VE QY
  21.206 +		17af 0202  RV200 QW [Excalibur Radeon 7500LE]
  21.207 +	5158  Radeon RV200 QX [Radeon 7500]
  21.208 +# Update: More correct name
  21.209 +	5159  Radeon RV100 QY [Radeon 7000/VE]
  21.210  		1002 000a  Radeon 7000/Radeon VE
  21.211 +		1002 000b  Radeon 7000
  21.212  		1002 0038  Radeon 7000/Radeon VE
  21.213  		1002 003a  Radeon 7000/Radeon VE
  21.214  		1002 00ba  Radeon 7000/Radeon VE
  21.215  		1002 013a  Radeon 7000/Radeon VE
  21.216 -		174b 7112  Radeon 7000 64M TVO
  21.217 -	515a  Radeon VE QZ
  21.218 +		1458 4002  RV100 QY [RADEON 7000 PRO MAYA AV Series]
  21.219 +		148c 2003  RV100 QY [Radeon 7000 Multi-Display Edition]
  21.220 +		148c 2023  RV100 QY [Radeon 7000 Evil Master Multi-Display]
  21.221 +		174b 7112  RV100 QY [Sapphire Radeon VE 7000]
  21.222 +		1787 0202  RV100 QY [Excalibur Radeon 7000]
  21.223 +# Update: More correct name
  21.224 +	515a  Radeon RV100 QZ [Radeon 7000/VE]
  21.225  	5168  Radeon R200 Qh
  21.226  	5169  Radeon R200 Qi
  21.227  	516a  Radeon R200 Qj
  21.228  	516b  Radeon R200 Qk
  21.229 +# new: This one is not in ATI documentation, but is in XFree86 source code
  21.230 +	516c  Radeon R200 Ql
  21.231  	5245  Rage 128 RE/SG
  21.232  		1002 0008  Xpert 128
  21.233  		1002 0028  Rage 128 AIW
  21.234 @@ -360,6 +442,7 @@ 1002  ATI Technologies Inc
  21.235  		1002 0088  Xpert 99
  21.236  	5345  Rage 128 SE/4x
  21.237  	5346  Rage 128 SF/4x AGP 2x
  21.238 +		1002 0048  RAGE 128 16MB VGA TVOUT AMC PAL
  21.239  	5347  Rage 128 SG/4x AGP 4x
  21.240  	5348  Rage 128 SH
  21.241  	534b  Rage 128 SK/4x
  21.242 @@ -390,6 +473,9 @@ 1002  ATI Technologies Inc
  21.243  		1002 5654  Mach64VT Reference
  21.244  	5655  264VT3 [Mach64 VT3]
  21.245  	5656  264VT4 [Mach64 VT4]
  21.246 +	700f  PCI Bridge [IGP 320M]
  21.247 +	7010  PCI Bridge [IGP 340M]
  21.248 +	cab2  RS200/RS200M AGP Bridge [IGP 340M]
  21.249  1003  ULSI Systems
  21.250  	0201  US201
  21.251  1004  VLSI Technology Inc
  21.252 @@ -419,7 +505,10 @@ 1004  VLSI Technology Inc
  21.253  		1004 0306  QSound ThunderBird PCI Audio Support Registers
  21.254  		122d 1208  DSP368 Audio Support Registers
  21.255  		1483 5022  XWave Thunder 3D Audio Support Registers
  21.256 +	0307  Thunderbird
  21.257 +	0308  Thunderbird
  21.258  	0702  VAS96011 [Golden Gate II]
  21.259 +	0703  Tollgate
  21.260  1005  Avance Logic Inc. [ALI]
  21.261  	2064  ALG2032/2064
  21.262  	2128  ALG2364A
  21.263 @@ -492,13 +581,14 @@ 1011  Digital Equipment Corporation
  21.264  	0014  DECchip 21041 [Tulip Pass 3]
  21.265  		1186 0100  DE-530+
  21.266  	0016  DGLPB [OPPO]
  21.267 +	0017  PV-PCI Graphics Controller (ZLXp-L)
  21.268  	0019  DECchip 21142/43
  21.269  		1011 500a  DE500A Fast Ethernet
  21.270  		1011 500b  DE500B Fast Ethernet
  21.271  		1014 0001  10/100 EtherJet Cardbus
  21.272  		1025 0315  ALN315 Fast Ethernet
  21.273 -		1033 800c  PC-9821-CS01
  21.274 -		1033 800d  PC-9821NR-B06
  21.275 +		1033 800c  PC-9821-CS01 100BASE-TX Interface Card
  21.276 +		1033 800d  PC-9821NR-B06 100BASE-TX Interface Card
  21.277  		108d 0016  Rapidfire 2327 10/100 Ethernet
  21.278  		108d 0017  GoCard 2250 Ethernet 10/100 Cardbus
  21.279  		10b8 2005  SMC8032DT Extreme Ethernet 10/100
  21.280 @@ -522,6 +612,7 @@ 1011  Digital Equipment Corporation
  21.281  		1374 0002  Cardbus Ethernet Card 10/100
  21.282  		1374 0007  Cardbus Ethernet Card 10/100
  21.283  		1374 0008  Cardbus Ethernet Card 10/100
  21.284 +		1385 2100  FA510
  21.285  		1395 0001  10/100 Ethernet CardBus PC Card
  21.286  		13d1 ab01  EtherFast 10/100 Cardbus (PCMPC200)
  21.287  		8086 0001  EtherExpress PRO/100 Mobile CardBus 32
  21.288 @@ -581,8 +672,8 @@ 1013  Cirrus Logic
  21.289  		1014 1010  CS4610 SoundFusion Audio Accelerator
  21.290  	6003  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]
  21.291  		1013 4280  Crystal SoundFusion PCI Audio Accelerator
  21.292 -		1681 0050  Hercules Game Theater XP
  21.293 -		1681 a011  Hercules Fortissimo III 7.1
  21.294 +		1681 0050  Game Theater XP
  21.295 +		1681 a011  Fortissimo III 7.1
  21.296  	6004  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]
  21.297  	6005  Crystal CS4281 PCI Audio
  21.298  		1013 4281  Crystal CS4281 PCI Audio
  21.299 @@ -608,7 +699,9 @@ 1014  IBM
  21.300  	0020  MCA
  21.301  	0022  IBM27-82351
  21.302  	002d  Python
  21.303 -	002e  ServeRAID-3x
  21.304 +	002e  ServeRAID Controller
  21.305 +		1014 002e  ServeRAID-3x
  21.306 +		1014 022e  ServeRAID-4H
  21.307  	0036  Miami
  21.308  	003a  CPU to PCI Bridge
  21.309  	003e  16/4 Token ring UTP/STP controller
  21.310 @@ -644,18 +737,25 @@ 1014  IBM
  21.311  	00b7  256-bit Graphics Rasterizer [Fire GL1]
  21.312  		1902 00b8  Fire GL1
  21.313  	00be  ATM 622MBPS Controller (1410be00)
  21.314 +	00dc  Advanced Systems Management Adapter (ASMA)
  21.315  	00fc  CPC710 Dual Bridge and Memory Controller (PCI-64)
  21.316  	0105  CPC710 Dual Bridge and Memory Controller (PCI-32)
  21.317 +	010f  Remote Supervisor Adapter (RSA)
  21.318  	0142  Yotta Video Compositor Input
  21.319  		1014 0143  Yotta Input Controller (ytin)
  21.320  	0144  Yotta Video Compositor Output
  21.321  		1014 0145  Yotta Output Controller (ytout)
  21.322  	0156  405GP PLB to PCI Bridge
  21.323  	01a7  PCI-X to PCI-X Bridge
  21.324 -	01bd  Netfinity ServeRAID controller
  21.325 -	01be  ServeRAID-4M
  21.326 -	01bf  ServeRAID-4L
  21.327 -	022e  ServeRAID-4H
  21.328 +	01bd  ServeRAID Controller
  21.329 +		1014 01be  ServeRAID-4M
  21.330 +		1014 01bf  ServeRAID-4L
  21.331 +		1014 0208  ServeRAID-4Mx
  21.332 +		1014 020e  ServeRAID-4Lx
  21.333 +		1014 022e  ServeRAID-4H
  21.334 +		1014 0258  ServeRAID-5i
  21.335 +		1014 0259  ServeRAID-5i
  21.336 +	0302  XA-32 chipset [Summit]
  21.337  	ffff  MPIC-2 interrupt controller
  21.338  1015  LSI Logic Corp of Canada
  21.339  1016  ICL Personal Systems
  21.340 @@ -700,7 +800,11 @@ 101f  PictureTel
  21.341  1020  Hitachi Computer Products
  21.342  1021  OKI Electric Industry Co. Ltd.
  21.343  1022  Advanced Micro Devices [AMD]
  21.344 -	2000  79c970 [PCnet LANCE]
  21.345 +	1100  K8 NorthBridge
  21.346 +	1101  K8 NorthBridge
  21.347 +	1102  K8 NorthBridge
  21.348 +	1103  K8 NorthBridge
  21.349 +	2000  79c970 [PCnet32 LANCE]
  21.350  		1014 2000  NetFinity 10/100 Fast Ethernet
  21.351  		103c 104c  Ethernet with LAN remote power Adapter
  21.352  		103c 1064  Ethernet with LAN remote power Adapter
  21.353 @@ -743,19 +847,23 @@ 1022  Advanced Micro Devices [AMD]
  21.354  	7443  AMD-768 [Opus] ACPI
  21.355  		1043 8044  A7M-D Mainboard
  21.356  	7445  AMD-768 [Opus] Audio
  21.357 +	7446  AMD-768 [Opus] MC97 Modem (Smart Link HAMR5600 compatible)
  21.358  	7448  AMD-768 [Opus] PCI
  21.359  	7449  AMD-768 [Opus] USB
  21.360 +	7450  AMD-8131 PCI-X Bridge
  21.361 +	7451  AMD-8131 PCI-X APIC
  21.362  	7454  AMD-8151 System Controller
  21.363  	7455  AMD-8151 AGP Bridge
  21.364  	7460  AMD-8111 PCI
  21.365  	7461  AMD-8111 USB
  21.366  	7462  AMD-8111 Ethernet
  21.367 +	7464  AMD-8111 USB
  21.368  	7468  AMD-8111 LPC
  21.369  	7469  AMD-8111 IDE
  21.370  	746a  AMD-8111 SMBus 2.0
  21.371  	746b  AMD-8111 ACPI
  21.372  	746d  AMD-8111 AC97 Audio
  21.373 -	756b  AMD-8111 ACPI
  21.374 +	746e  AMD-8111 MC97 Modem
  21.375  1023  Trident Microsystems
  21.376  	0194  82C194
  21.377  	2000  4DWave DX
  21.378 @@ -768,6 +876,8 @@ 1023  Trident Microsystems
  21.379  	8520  CyberBlade i1
  21.380  		0e11 b16e  CyberBlade i1 AGP
  21.381  		1023 8520  CyberBlade i1 AGP
  21.382 +	8620  CyberBlade/i1
  21.383 +		1014 0502  ThinkPad T30
  21.384  	8820  CyberBlade XPAi1
  21.385  	9320  TGUI 9320
  21.386  	9350  GUI Accelerator
  21.387 @@ -876,13 +986,15 @@ 1028  Dell Computer Corporation
  21.388  		1028 00d0  PowerEdge Expandable RAID Controller 3/Si
  21.389  	0005  PowerEdge Expandable RAID Controller 3/Di
  21.390  	0006  PowerEdge Expandable RAID Controller 3/Di
  21.391 -	0007  Remote Assistant Card 3
  21.392 -	0008  PowerEdge Expandable RAID Controller 3/Di
  21.393 +	0007  Remote Access Controller:DRAC III
  21.394 +	0008  Remote Access Controller
  21.395 +	0009  BMC/SMIC device not present
  21.396  	000a  PowerEdge Expandable RAID Controller 3
  21.397 -		1027 0121  PowerEdge Expandable RAID Controller 3/Di
  21.398  		1028 0106  PowerEdge Expandable RAID Controller 3/Di
  21.399  		1028 011b  PowerEdge Expandable RAID Controller 3/Di
  21.400 -	000c  Embedded Systems Management Device 4
  21.401 +		1028 0121  PowerEdge Expandable RAID Controller 3/Di
  21.402 +	000c  Remote Access Controller:ERA or ERA/O
  21.403 +	000d  BMC/SMIC device
  21.404  	000e  PowerEdge Expandable RAID Controller
  21.405  	000f  PowerEdge Expandable RAID Controller 4/Di
  21.406  1029  Siemens Nixdorf IS
  21.407 @@ -892,9 +1004,11 @@ 102a  LSI Logic
  21.408  102b  Matrox Graphics, Inc.
  21.409  # DJ: I've a suspicion that 0010 is a duplicate of 0d10.
  21.410  	0010  MGA-I [Impression?]
  21.411 +	0100  MGA 1064SG [Mystique]
  21.412  	0518  MGA-II [Athena]
  21.413  	0519  MGA 2064W [Millennium]
  21.414  	051a  MGA 1064SG [Mystique]
  21.415 +		102b 0100  MGA-1064SG Mystique
  21.416  		102b 1100  MGA-1084SG Mystique
  21.417  		102b 1200  MGA-1084SG Mystique
  21.418  		1100 102b  MGA-1084SG Mystique
  21.419 @@ -989,10 +1103,10 @@ 102b  Matrox Graphics, Inc.
  21.420  		102b 5f52  4Sight II
  21.421  		102b 9010  Millennium G400 Dual Head
  21.422  		1458 0400  GA-G400
  21.423 -		1705 0001  Digital First Millennium G450 32MB SGRAM
  21.424 -		1705 0002  Digital First Millennium G450 16MB SGRAM
  21.425 -		1705 0003  Digital First Millennium G450 32MB
  21.426 -		1705 0004  Digital First Millennium G450 16MB
  21.427 +		1705 0001  Millennium G450 32MB SGRAM
  21.428 +		1705 0002  Millennium G450 16MB SGRAM
  21.429 +		1705 0003  Millennium G450 32MB
  21.430 +		1705 0004  Millennium G450 16MB
  21.431  		b16f 0e11  MGA-G400 AGP
  21.432  	0527  MGA Parhelia AGP
  21.433  		102b 0840  Parhelia 128Mb
  21.434 @@ -1037,6 +1151,7 @@ 102f  Toshiba America
  21.435  	0009  r4x00
  21.436  	0020  ATM Meteor 155
  21.437  		102f 00f8  ATM Meteor 155
  21.438 +	0180  TX4927
  21.439  1030  TMC Research
  21.440  1031  Miro Computer Products AG
  21.441  	5601  DC20 ASIC
  21.442 @@ -1050,17 +1165,22 @@ 1033  NEC Corporation
  21.443  	0003  ATM Controller
  21.444  	0004  R4000 PCI Bridge
  21.445  	0005  PCI to 486-like bus Bridge
  21.446 -	0006  GUI Accelerator
  21.447 +	0006  PC-9800 Graphic Accelerator
  21.448  	0007  PCI to UX-Bus Bridge
  21.449 -	0008  GUI Accelerator
  21.450 -	0009  GUI Accelerator for W98
  21.451 +	0008  PC-9800 Graphic Accelerator
  21.452 +	0009  PCI to PC9800 Core-Graph Bridge
  21.453 +	0016  PCI to VL Bridge
  21.454  	001a  [Nile II]
  21.455  	0021  Vrc4373 [Nile I]
  21.456  	0029  PowerVR PCX1
  21.457  	002a  PowerVR 3D
  21.458 +	002c  Star Alpha 2
  21.459 +	002d  PCI to C-bus Bridge
  21.460  	0035  USB
  21.461  		1179 0001  USB
  21.462  		12ee 7000  Root Hub
  21.463 +		1799 0001  Root Hub
  21.464 +	003b  PCI to C-bus Bridge
  21.465  	003e  NAPCCARD Cardbus Controller
  21.466  	0046  PowerVR PCX2 [midas]
  21.467  	005a  Vrc5074 [Nile 4]
  21.468 @@ -1077,11 +1197,13 @@ 1033  NEC Corporation
  21.469  	0074  56k Voice Modem
  21.470  		1033 8014  RCV56ACF 56k Voice Modem
  21.471  	009b  Vrc5476
  21.472 +	00a5  VRC4173
  21.473  	00a6  VRC5477 AC97
  21.474  	00cd  IEEE 1394 [OrangeLink] Host Controller
  21.475  		12ee 8011  Root hub
  21.476  	00e0  USB 2.0
  21.477  		12ee 7001  Root hub
  21.478 +		1799 0002  Root Hub
  21.479  1034  Framatome Connectors USA Inc.
  21.480  1035  Comp. & Comm. Research Lab
  21.481  1036  Future Domain Corp.
  21.482 @@ -1089,7 +1211,8 @@ 1036  Future Domain Corp.
  21.483  1037  Hitachi Micro Systems
  21.484  1038  AMP, Inc
  21.485  1039  Silicon Integrated Systems [SiS]
  21.486 -	0001  5591/5592 AGP
  21.487 +# This is what all my tests report. I don't know if this is equivalent to "5591/5592 AGP".
  21.488 +	0001  SiS 530 Virtual PCI-to-PCI bridge (AGP)
  21.489  	0002  SG86C202
  21.490  	0006  85C501/2/3
  21.491  	0008  85C503/5513
  21.492 @@ -1099,8 +1222,12 @@ 1039  Silicon Integrated Systems [SiS]
  21.493  		1039 0000  SiS5597 SVGA (Shared RAM)
  21.494  	0204  82C204
  21.495  	0205  SG86C205
  21.496 -	0300  300/200
  21.497 +	0300  SiS300/305 PCI/AGP VGA Display Adapter
  21.498  		107d 2720  Leadtek WinFast VR300
  21.499 +	0310  SiS315H PCI/AGP VGA Display Adapter
  21.500 +	0315  SiS315 PCI/AGP VGA Display Adapter
  21.501 +	0325  SiS315PRO PCI/AGP VGA Display Adapter
  21.502 +	0330  SiS330 [Xabre] PCI/AGP VGA Display Adapter
  21.503  	0406  85C501/2
  21.504  	0496  85C496
  21.505  	0530  530 Host
  21.506 @@ -1111,23 +1238,30 @@ 1039  Silicon Integrated Systems [SiS]
  21.507  	0630  630 Host
  21.508  	0633  633 Host
  21.509  	0635  635 Host
  21.510 -	0645  645 Host
  21.511 -	0646  645DX Host
  21.512 +	0645  SiS645 Host & Memory & AGP Controller
  21.513 +	0646  SiS645DX Host & Memory & AGP Controller
  21.514 +	0648  SiS 645xx
  21.515  	0650  650 Host
  21.516 +	0651  SiS651 Host
  21.517  	0730  730 Host
  21.518  	0733  733 Host
  21.519  	0735  735 Host
  21.520  	0740  740 Host
  21.521  	0745  745 Host
  21.522 +	0746  746 Host
  21.523 +	0755  SiS 755 Host Bridge
  21.524  	0900  SiS900 10/100 Ethernet
  21.525  		1039 0900  SiS900 10/100 Ethernet Adapter
  21.526  	0961  SiS961 [MuTIOL Media IO]
  21.527 +	0962  SiS962 [MuTIOL Media IO]
  21.528  	3602  83C602
  21.529  	5107  5107
  21.530  	5300  SiS540 PCI Display Adapter
  21.531 +	5315  SiS550 AGP/VGA VGA Display Adapter
  21.532  	5401  486 PCI Chipset
  21.533  	5511  5511/5512
  21.534  	5513  5513 [IDE]
  21.535 +		1019 0970  P6STP-FL motherboard
  21.536  		1039 5513  SiS5513 EIDE Controller (A,B step)
  21.537  	5517  5517
  21.538  	5571  5571
  21.539 @@ -1141,8 +1275,10 @@ 1039  Silicon Integrated Systems [SiS]
  21.540  	6205  VGA Controller
  21.541  	6236  6236 3D-AGP
  21.542  	6300  SiS630 GUI Accelerator+3D
  21.543 -	6306  6306 3D-AGP
  21.544 +		1019 0970  P6STP-FL motherboard
  21.545 +	6306  SiS530 3D PCI/AGP
  21.546  		1039 6306  SiS530,620 GUI Accelerator+3D
  21.547 +	6325  SiS65x/M650/740 PCI/AGP VGA Display Adapter
  21.548  	6326  86C326 5598/6326
  21.549  		1039 6326  SiS6326 GUI Accelerator
  21.550  		1092 0a50  SpeedStar A50
  21.551 @@ -1150,11 +1286,14 @@ 1039  Silicon Integrated Systems [SiS]
  21.552  		1092 4910  SpeedStar A70
  21.553  		1092 4920  SpeedStar A70
  21.554  		1569 6326  SiS6326 GUI Accelerator
  21.555 -	7001  7001
  21.556 +	7001  USB 1.0 Controller
  21.557 +		1039 7000  Onboard USB Controller
  21.558 +	7002  USB 2.0 Controller
  21.559 +		1509 7002  Onboard USB Controller
  21.560  	7007  FireWire Controller
  21.561 -	7012  SiS7012 PCI Audio Accelerator
  21.562 -	7013  56k Winmodem (Smart Link HAMR5600 compatible)
  21.563 -	7016  SiS7016 10/100 Ethernet Adapter
  21.564 +	7012  Sound Controller
  21.565 +	7013  Intel 537 [56k Winmodem]
  21.566 +	7016  10/100 Ethernet Adapter
  21.567  		1039 7016  SiS7016 10/100 Ethernet Adapter
  21.568  	7018  SiS PCI Audio Accelerator
  21.569  		1014 01b6  SiS PCI Audio Accelerator
  21.570 @@ -1211,6 +1350,7 @@ 103c  Hewlett-Packard Company
  21.571  		103c 1226  Keystone SP2
  21.572  		103c 1227  Powerbar SP2
  21.573  		103c 1282  Everest SP2
  21.574 +	1054  PCI Local Bus Adapter
  21.575  	1064  79C970 PCnet Ethernet Controller
  21.576  	108b  Visualize FXe
  21.577  	10c1  NetServer Smart IRQ Router
  21.578 @@ -1222,7 +1362,8 @@ 103c  Hewlett-Packard Company
  21.579  	121c  NetServer PCI COM Port Decoder
  21.580  	1229  zx1 System Bus Adapter
  21.581  	122a  zx1 I/O Controller
  21.582 -	122e  zx1 Local Bus Adapter
  21.583 +	122e  PCI-X/AGP Local Bus Adapter
  21.584 +	127c  sx1000 I/O Controller
  21.585  	1290  Auxiliary Diva Serial Port
  21.586  	2910  E2910A PCIBus Exerciser
  21.587  	2925  E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer
  21.588 @@ -1231,13 +1372,14 @@ 103f  Synopsys/Logic Modeling Group
  21.589  1040  Accelgraphics Inc.
  21.590  1041  Computrend
  21.591  1042  Micron
  21.592 -	1000  FDC 37C665
  21.593 -	1001  37C922
  21.594 +	1000  PC Tech RZ1000
  21.595 +	1001  PC Tech RZ1001
  21.596  	3000  Samurai_0
  21.597  	3010  Samurai_1
  21.598  	3020  Samurai_IDE
  21.599  1043  Asustek Computer, Inc.
  21.600  	0675  ISDNLink P-IN100-ST-D
  21.601 +	4021  v7100 Combo Deluxe [GeForce2 MX + TV tuner]
  21.602  	4057  V8200 GeForce 3
  21.603  1044  Distributed Processing Technology
  21.604  	1012  Domino RAID Engine
  21.605 @@ -1313,6 +1455,9 @@ 1049  Fountain Technologies, Inc.
  21.606  104a  SGS Thomson Microelectronics
  21.607  	0008  STG 2000X
  21.608  	0009  STG 1764X
  21.609 +	0010  STG4000 [3D Prophet Kyro Series]
  21.610 +# From <http://gatekeeper.dec.com/pub/BSD/FreeBSD/FreeBSD-stable/src/share/misc/pci_vendors>
  21.611 +	0210  STPC Atlas ISA Bridge
  21.612  	0981  DEC-Tulip compatible 10/100 Ethernet
  21.613  	1746  STG 1764X
  21.614  	2774  DEC-Tulip compatible 10/100 Ethernet
  21.615 @@ -1325,6 +1470,7 @@ 104c  Texas Instruments
  21.616  	0500  100 MBit LAN Controller
  21.617  	0508  TMS380C2X Compressor Interface
  21.618  	1000  Eagle i/f AS
  21.619 +	104c  PCI1510 PC card Cardbus Controller
  21.620  	3d04  TVP4010 [Permedia]
  21.621  	3d07  TVP4020 [Permedia 2]
  21.622  		1011 4d10  Comet
  21.623 @@ -1368,9 +1514,12 @@ 104c  Texas Instruments
  21.624  	8026  TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
  21.625  	8027  PCI4451 IEEE-1394 Controller
  21.626  		1028 00e6  PCI4451 IEEE-1394 Controller (Dell Inspiron 8100)
  21.627 +	8029  PCI4510 IEEE-1394 Controller
  21.628 +	8400  ACX 100 22Mbps Wireless Interface
  21.629  	a001  TDC1570
  21.630  	a100  TDC1561
  21.631  	a102  TNETA1575 HyperSAR Plus w/PCI Host i/f & UTOPIA i/f
  21.632 +	a106  TMS320C6205
  21.633  	ac10  PCI1050
  21.634  	ac11  PCI1053
  21.635  	ac12  PCI1130
  21.636 @@ -1382,6 +1531,7 @@ 104c  Texas Instruments
  21.637  	ac19  PCI1221
  21.638  	ac1a  PCI1210
  21.639  	ac1b  PCI1450
  21.640 +		0e11 b113  Armada M700
  21.641  	ac1c  PCI1225
  21.642  	ac1d  PCI1251A
  21.643  	ac1e  PCI1211
  21.644 @@ -1396,6 +1546,7 @@ 104c  Texas Instruments
  21.645  	ac41  PCI4410 PC card Cardbus Controller
  21.646  	ac42  PCI4451 PC card Cardbus Controller
  21.647  		1028 00e6  PCI4451 PC card CardBus Controller (Dell Inspiron 8100)
  21.648 +	ac44  PCI4510 PC card Cardbus Controller
  21.649  	ac50  PCI1410 PC card Cardbus Controller
  21.650  	ac51  PCI1420
  21.651  		1014 023b  ThinkPad T23 (2647-4MG)
  21.652 @@ -1404,6 +1555,8 @@ 104c  Texas Instruments
  21.653  	ac52  PCI1451 PC card Cardbus Controller
  21.654  	ac53  PCI1421 PC card Cardbus Controller
  21.655  	ac55  PCI1250 PC card Cardbus Controller
  21.656 +		1014 0512  ThinkPad T30
  21.657 +	ac56  PCI1510 PC card Cardbus Controller
  21.658  	ac60  PCI2040 PCI to DSP Bridge Controller
  21.659  	fe00  FireWire Host Controller
  21.660  	fe03  12C01A FireWire Host Controller
  21.661 @@ -1429,6 +1582,7 @@ 1050  Winbond Electronics Corp
  21.662  		1050 0840  W89C840 Ethernet Adapter
  21.663  	0940  W89C940
  21.664  	5a5a  W89C940F
  21.665 +	6692  W6692
  21.666  	9970  W9970CF
  21.667  1051  Anigma, Inc.
  21.668  1052  ?Young Micro Systems
  21.669 @@ -1445,6 +1599,8 @@ 1057  Motorola
  21.670  	0001  MPC105 [Eagle]
  21.671  	0002  MPC106 [Grackle]
  21.672  	0003  MPC8240 [Kahlua]
  21.673 +	0004  MPC107
  21.674 +	0006  MPC8245 [Unity]
  21.675  	0100  MC145575 [HFC-PCI]
  21.676  	0431  KTI829c 100VG
  21.677  	1801  Audio I/O Controller (MIDI)
  21.678 @@ -1482,6 +1638,8 @@ 105a  Promise Technology, Inc.
  21.679  	0d38  20263
  21.680  		105a 4d39  Fasttrak66
  21.681  	1275  20275
  21.682 +	3376  PDC20376
  21.683 +		1043 809e  A7V8X motherboard
  21.684  	4d30  20267
  21.685  		105a 4d33  Ultra100
  21.686  		105a 4d39  Fasttrak100
  21.687 @@ -1494,12 +1652,14 @@ 105a  Promise Technology, Inc.
  21.688  	4d68  20268
  21.689  		105a 4d68  Ultra100TX2
  21.690  	4d69  20269
  21.691 +		105a 4d68  Ultra133TX2
  21.692  	5275  PDC20276 IDE
  21.693  		105a 0275  SuperTrak SX6000 IDE
  21.694  	5300  DC5300
  21.695  	6268  20268R
  21.696  	6269  PDC20271
  21.697 -		105a 6269  Fasttrack tx2
  21.698 +		105a 6269  FastTrak TX2/TX2000
  21.699 +	6621  PDC20621 [SX4000] 4 Channel IDE RAID Controller
  21.700  	7275  PDC20277
  21.701  105b  Foxconn International, Inc.
  21.702  105c  Wipro Infotech Limited
  21.703 @@ -1537,6 +1697,7 @@ 105d  Number 9 Computer Company
  21.704  		13cc 0009  Barco Metheus 5 Megapixel, Dual Head
  21.705  		13cc 000a  Barco Metheus 5 Megapixel, Dual Head
  21.706  	5348  Revolution 4
  21.707 +		105d 0037  Revolution IV-FP AGP (For SGI 1600SW)
  21.708  105e  Vtech Computers Ltd
  21.709  105f  Infotronic America Inc
  21.710  1060  United Microelectronics [UMC]
  21.711 @@ -1614,6 +1775,11 @@ 106b  Apple Computer Inc.
  21.712  	002e  UniNorth 1.5 PCI
  21.713  	002f  UniNorth 1.5 Internal PCI
  21.714  	0030  UniNorth/Pangea FireWire
  21.715 +	0031  UniNorth 2 FireWire
  21.716 +	0032  UniNorth 2 GMAC (Sun GEM)
  21.717 +	0033  UniNorth 2 ATA/100
  21.718 +	0034  UniNorth 2 AGP
  21.719 +	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)
  21.720  106c  Hyundai Electronics America
  21.721  	8801  Dual Pentium ISA/PCI Motherboard
  21.722  	8802  PowerPC ISA/PCI Motherboard
  21.723 @@ -1670,6 +1836,7 @@ 1077  QLogic Corp.
  21.724  	2100  QLA2100 64-bit Fibre Channel Adapter
  21.725  		1077 0001  QLA2100 64-bit Fibre Channel Adapter
  21.726  	2200  QLA2200
  21.727 +		1077 0002  QLA2200
  21.728  	2300  QLA2300 64-bit FC-AL Adapter
  21.729  	2312  QLA2312 Fibre Channel Adapter
  21.730  1078  Cyrix Corporation
  21.731 @@ -1725,7 +1892,8 @@ 1086  J. Bond Computer Systems
  21.732  1087  Cache Computer
  21.733  1088  Microcomputer Systems (M) Son
  21.734  1089  Data General Corporation
  21.735 -108a  SBS Technologies (formerly Bit3 Computer Corp.)
  21.736 +# Formerly Bit3 Computer Corp.
  21.737 +108a  SBS Technologies
  21.738  	0001  VME Bridge Model 617
  21.739  	0010  VME Bridge Model 618
  21.740  	0040  dataBLIZZARD
  21.741 @@ -1766,6 +1934,7 @@ 108e  Sun Microsystems Computer Corp.
  21.742  	8001  Schizo PCI Bus Module
  21.743  	a000  Ultra IIi
  21.744  	a001  Ultra IIe
  21.745 +	a801  Tomatillo PCI Bus Module
  21.746  108f  Systemsoft
  21.747  1090  Encore Computer Corporation
  21.748  1091  Intergraph Corporation
  21.749 @@ -1817,8 +1986,10 @@ 1093  National Instruments
  21.750  	b081  IMAQ-PXI-1422
  21.751  	b091  IMAQ-PXI-1411
  21.752  	c801  PCI-GPIB
  21.753 +	c831  PCI-GPIB bridge
  21.754  1094  First International Computers [FIC]
  21.755  1095  CMD Technology Inc
  21.756 +	0240  Adaptec AAR-1210SA SATA HostRAID Controller
  21.757  	0640  PCI0640
  21.758  	0643  PCI0643
  21.759  	0646  PCI0646
  21.760 @@ -1833,6 +2004,7 @@ 1095  CMD Technology Inc
  21.761  		1095 0670  USB0670
  21.762  	0673  USB0673
  21.763  	0680  PCI0680
  21.764 +	3112  Silicon Image SiI 3112 SATARaid Controller
  21.765  1096  Alacron
  21.766  1097  Appian Technology
  21.767  1098  Quantum Designs (H.K.) Ltd
  21.768 @@ -1852,8 +2024,10 @@ 109e  Brooktree Corporation
  21.769  	036c  Bt879(??) Video Capture
  21.770  		13e9 0070  Win/TV (Video Section)
  21.771  	036e  Bt878 Video Capture
  21.772 -		0070 13eb  WinTV/GO
  21.773 +		0070 13eb  WinTV Series
  21.774  		0070 ff01  Viewcast Osprey 200
  21.775 +		107d 6606  WinFast TV 2000
  21.776 +		11bd 0012  PCTV pro (TV + FM stereo receiver)
  21.777  		11bd 001c  PCTV Sat (DBC receiver)
  21.778  		127a 0001  Bt878 Mediastream Controller NTSC
  21.779  		127a 0002  Bt878 Mediastream Controller PAL BG
  21.780 @@ -1868,6 +2042,7 @@ 109e  Brooktree Corporation
  21.781  		1851 1850  FlyVideo'98 - Video
  21.782  		1851 1851  FlyVideo II
  21.783  		1852 1852  FlyVideo'98 - Video (with FM Tuner)
  21.784 +		bd11 1200  PCTV pro (TV + FM stereo receiver)
  21.785  	036f  Bt879 Video Capture
  21.786  		127a 0044  Bt879 Video Capture NTSC
  21.787  		127a 0122  Bt879 Video Capture PAL I
  21.788 @@ -1903,10 +2078,11 @@ 109e  Brooktree Corporation
  21.789  		1851 1851  FlyVideo'98 EZ - video
  21.790  		1852 1852  FlyVideo'98 (with FM Tuner)
  21.791  	0878  Bt878 Audio Capture
  21.792 -		0070 13eb  WinTV/GO
  21.793 +		0070 13eb  WinTV Series
  21.794  		0070 ff01  Viewcast Osprey 200
  21.795  		1002 0001  TV-Wonder
  21.796  		1002 0003  TV-Wonder/VE
  21.797 +		11bd 0012  PCTV pro (TV + FM stereo receiver, audio section)
  21.798  		11bd 001c  PCTV Sat (DBC receiver)
  21.799  		127a 0001  Bt878 Video Capture (Audio Section)
  21.800  		127a 0002  Bt878 Video Capture (Audio Section)
  21.801 @@ -1919,6 +2095,7 @@ 109e  Brooktree Corporation
  21.802  		14f1 0002  Bt878 Video Capture (Audio Section)
  21.803  		14f1 0003  Bt878 Video Capture (Audio Section)
  21.804  		14f1 0048  Bt878 Video Capture (Audio Section)
  21.805 +		bd11 1200  PCTV pro (TV + FM stereo receiver, audio section)
  21.806  	0879  Bt879 Audio Capture
  21.807  		127a 0044  Bt879 Video Capture (Audio Section)
  21.808  		127a 0122  Bt879 Video Capture (Audio Section)
  21.809 @@ -1960,7 +2137,9 @@ 10a1  Juko Electronics Ind. Co. Ltd
  21.810  10a2  Quantum Corporation
  21.811  10a3  Everex Systems Inc
  21.812  10a4  Globe Manufacturing Sales
  21.813 -10a5  Racal Interlan
  21.814 +10a5  Smart Link Ltd.
  21.815 +	3052  SmartPCI562 56K Modem
  21.816 +	5449  SmartPCI561 modem
  21.817  10a6  Informtech Industrial Ltd.
  21.818  10a7  Benchmarq Microelectronics
  21.819  10a8  Sierra Semiconductor
  21.820 @@ -1975,6 +2154,7 @@ 10a9  Silicon Graphics, Inc.
  21.821  	0007  RPCEX
  21.822  	0008  DiVO VIP
  21.823  	0009  Alteon Gigabit Ethernet
  21.824 +		10a9 8002  Acenic Gigabit Ethernet
  21.825  	0010  AMP Video I/O
  21.826  	0011  GRIP
  21.827  	0012  SGH PSHAC GSN
  21.828 @@ -1986,6 +2166,7 @@ 10a9  Silicon Graphics, Inc.
  21.829  	1006  Dual JPEG 4
  21.830  	1007  Dual JPEG 5
  21.831  	1008  Cesium
  21.832 +	100a  IOC4 I/O controller
  21.833  	2001  Fibre Channel
  21.834  	2002  ASDE
  21.835  	8001  O2 1394
  21.836 @@ -2026,7 +2207,9 @@ 10b5  PLX Technology, Inc.
  21.837  		15ed 1003  MCCS 16-port Serial Hot Swap
  21.838  	9036  9036
  21.839  	9050  PCI <-> IOBus Bridge
  21.840 +		10b5 2036  SatPak GPS
  21.841  		10b5 2273  SH-ARC SoHard ARCnet card
  21.842 +		10b5 9050  MP9050
  21.843  		1522 0001  RockForce 4 Port V.90 Data/Fax/Voice Modem
  21.844  		1522 0002  RockForce 2 Port V.90 Data/Fax/Voice Modem
  21.845  		1522 0003  RockForce 6 Port V.90 Data/Fax/Voice Modem
  21.846 @@ -2037,6 +2220,7 @@ 10b5  PLX Technology, Inc.
  21.847  		15ed 1001  Macrolink MCCS 16-port Serial
  21.848  		15ed 1002  Macrolink MCCS 8-port Serial Hot Swap
  21.849  		15ed 1003  Macrolink MCCS 16-port Serial Hot Swap
  21.850 +		5654 5634  OpenLine4 Telephony Card
  21.851  		d531 c002  PCIntelliCAN 2xSJA1000 CAN bus
  21.852  		d84d 4006  EX-4006 1P
  21.853  		d84d 4008  EX-4008 1P EPP/ECP
  21.854 @@ -2057,6 +2241,7 @@ 10b5  PLX Technology, Inc.
  21.855  		d84d 4078  EX-4078 2S(16C552) RS-232+1P
  21.856  	9054  PCI <-> IOBus Bridge
  21.857  		10b5 2455  Wessex Techology PHIL-PCI
  21.858 +		12d9 0002  PCI Prosody Card rev 1.5
  21.859  	9060  9060
  21.860  	906d  9060SD
  21.861  		125c 0640  Aries 16000P
  21.862 @@ -2064,8 +2249,7 @@ 10b5  PLX Technology, Inc.
  21.863  	9080  9080
  21.864  		10b5 9080  9080 [real subsystem ID not set]
  21.865  		129d 0002  Aculab PCI Prosidy card
  21.866 -	a001  GTEK Jetport II 2 port serial adaptor
  21.867 -	c001  GTEK Cyclone 16/32 port serial adaptor
  21.868 +		12d9 0002  PCI Prosody Card
  21.869  10b6  Madge Networks
  21.870  	0001  Smart 16/4 PCI Ringnode
  21.871  	0002  Smart 16/4 PCI Ringnode Mk2
  21.872 @@ -2093,9 +2277,13 @@ 10b6  Madge Networks
  21.873  	1001  Collage 155 ATM Server Adapter
  21.874  10b7  3Com Corporation
  21.875  	0001  3c985 1000BaseSX (SX/TX)
  21.876 +	0910  3C910-A01
  21.877  	1006  MINI PCI type 3B Data Fax Modem
  21.878  	1007  Mini PCI 56k Winmodem
  21.879  		10b7 615c  Mini PCI 56K Modem
  21.880 +	1700  Gigabit Ethernet Adapter
  21.881 +		10b7 0010  3Com 3C940 Gigabit LOM Ethernet Adapter
  21.882 +		10b7 0020  3Com 3C941 Gigabit LOM Ethernet Adapter
  21.883  	3390  3c339 TokenLink Velocity
  21.884  	3590  3c359 TokenLink Velocity XL
  21.885  		10b7 3590  TokenLink Velocity XL Adapter (3C359/359B)
  21.886 @@ -2171,19 +2359,28 @@ 10b7  3Com Corporation
  21.887  		1028 0095  Integrated 3C905C-TX Fast Etherlink for PC Management NIC
  21.888  		10b7 1000  3C905C-TX Fast Etherlink for PC Management NIC
  21.889  		10b7 7000  10/100 Mini PCI Ethernet Adapter
  21.890 +	9201  3C920B-EMB Integrated Fast Ethernet Controller
  21.891 +	9300  3CSOHO100B-TX  [910-A01]
  21.892  	9800  3c980-TX [Fast Etherlink XL Server Adapter]
  21.893  		10b7 9800  3c980-TX Fast Etherlink XL Server Adapter
  21.894  	9805  3c980-TX 10/100baseTX NIC [Python-T]
  21.895  		10b7 1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]
  21.896  		10b7 1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]
  21.897  		10b7 9805  3c980 10/100baseTX NIC [Python-T]
  21.898 -	9900  3C990-TX Typhoon
  21.899 -	9902  3CR990-TX-95 56-bit Typhoon Client
  21.900 -	9903  3CR990-TX-97 168-bit Typhoon Client
  21.901 +		10f1 2462  Thunder K7 S2462
  21.902 +	9900  3C990-TX [Typhoon]
  21.903 +	9902  3CR990-TX-95 [Typhoon 56-bit]
  21.904 +	9903  3CR990-TX-97 [Typhoon 168-bit]
  21.905  	9904  3C990B-TX-M/3C990BSVR [Typhoon2]
  21.906 +		10b7 1000  3CR990B-TX-M [Typhoon2]
  21.907 +		10b7 2000  3CR990BSVR [Typhoon2 Server]
  21.908  	9905  3CR990-FX-95/97/95 [Typhon Fiber]
  21.909 -	9908  3CR990SVR95 56-bit Typhoon Server
  21.910 -	9909  3CR990SVR97 Typhoon Server
  21.911 +		10b7 1101  3CR990-FX-95 [Typhoon Fiber 56-bit]
  21.912 +		10b7 1102  3CR990-FX-97 [Typhoon Fiber 168-bit]
  21.913 +		10b7 2101  3CR990-FX-95 Server [Typhoon Fiber 56-bit]
  21.914 +		10b7 2102  3CR990-FX-97 Server [Typhoon Fiber 168-bit]
  21.915 +	9908  3CR990SVR95 [Typhoon Server 56-bit]
  21.916 +	9909  3CR990SVR97 [Typhoon Server 168-bit]
  21.917  	990b  3C990SVR [Typhoon Server]
  21.918  10b8  Standard Microsystems Corp [SMC]
  21.919  	0005  83C170QF
  21.920 @@ -2206,7 +2403,7 @@ 10b8  Standard Microsystems Corp [SMC]
  21.921  	1001  FDC 37C922
  21.922  	a011  83C170QF
  21.923  	b106  SMC34C90
  21.924 -10b9  Acer Laboratories Inc. [ALi]
  21.925 +10b9  ALi Corporation
  21.926  	0111  C-Media CMI8738/C3DX Audio Device (OEM)
  21.927  		10b9 0111  C-Media CMI8738/C3DX Audio Device (OEM)
  21.928  	1435  M1435
  21.929 @@ -2228,6 +2425,7 @@ 10b9  Acer Laboratories Inc. [ALi]
  21.930  	1541  M1541
  21.931  		10b9 1541  ALI M1541 Aladdin V/V+ AGP System Controller
  21.932  	1543  M1543
  21.933 +	1563  M1563 HyperTransport South Bridge
  21.934  	1621  M1621
  21.935  	1631  ALI M1631 PCI North Bridge Aladdin Pro III
  21.936  	1632  M1632M Northbridge+Trident
  21.937 @@ -2236,7 +2434,9 @@ 10b9  Acer Laboratories Inc. [ALi]
  21.938  	1646  M1646 Northbridge+Trident
  21.939  	1647  M1647 Northbridge [MAGiK 1 / MobileMAGiK 1]
  21.940  	1651  M1651/M1651T Northbridge [Aladdin-Pro 5/5M,Aladdin-Pro 5T/5TM]
  21.941 -	1671  M1671 Northbridge [Aladdin-P4]
  21.942 +	1671  M1671 Super P4 Northbridge [AGP4X,PCI and SDR/DDR]
  21.943 +	1681  M1681 P4 Northbridge [AGP8X,HyperTransport and SDR/DDR]
  21.944 +	1687  M1687 K8 Northbridge [AGP8X and HyperTransport]
  21.945  	3141  M3141
  21.946  	3143  M3143
  21.947  	3145  M3145
  21.948 @@ -2257,13 +2457,20 @@ 10b9  Acer Laboratories Inc. [ALi]
  21.949  	5239  USB 2.0 Controller
  21.950  	5243  M1541 PCI to AGP Controller
  21.951  	5247  PCI to AGP Controller
  21.952 +	5249  M5249 HTT to PCI Bridge
  21.953  	5251  M5251 P1394 OHCI 1.0 Controller
  21.954  	5253  M5253 P1394 OHCI 1.1 Controller
  21.955  	5261  M5261 Ethernet Controller
  21.956 +	5450  Lucent Technologies Soft Modem AMR
  21.957  	5451  M5451 PCI AC-Link Controller Audio Device
  21.958 +		1014 0506  ThinkPad R30
  21.959  	5453  M5453 PCI AC-Link Controller Modem Device
  21.960  	5455  M5455 PCI AC-Link Controller Audio Device
  21.961 -	5457  M5457 AC-Link Modem Interface Controller
  21.962 +	5457  Intel 537 [M5457 AC-Link Modem]
  21.963 +# Same but more usefull for driver's lookup
  21.964 +	5459  SmartLink SmartPCI561 56K Modem
  21.965 +# SmartLink PCI SoftModem
  21.966 +	545a  SmartLink SmartPCI563 56K Modem
  21.967  	5471  M5471 Memory Stick Controller
  21.968  	5473  M5473 SD-MMC Controller
  21.969  	7101  M7101 PMU
  21.970 @@ -2286,7 +2493,7 @@ 10c5  Xerox Corporation
  21.971  10c6  Rambus Inc.
  21.972  10c7  Media Vision
  21.973  10c8  Neomagic Corporation
  21.974 -	0001  NM2070 [MagicGraph NM2070]
  21.975 +	0001  NM2070 [MagicGraph 128]
  21.976  	0002  NM2090 [MagicGraph 128V]
  21.977  	0003  NM2093 [MagicGraph 128ZV]
  21.978  	0004  NM2160 [MagicGraph 128XD]
  21.979 @@ -2308,13 +2515,14 @@ 10c8  Neomagic Corporation
  21.980  		10f7 830b  MagicGraph 128XD
  21.981  		10f7 830d  MagicGraph 128XD
  21.982  		10f7 8312  MagicGraph 128XD
  21.983 -	0005  [MagicMedia 256AV]
  21.984 +	0005  NM2200 [MagicGraph 256AV]
  21.985 +		1014 00dd  ThinkPad 570
  21.986  	0006  NM2360 [MagicMedia 256ZX]
  21.987  	0016  NM2380 [MagicMedia 256XL+]
  21.988  		10c8 0016  MagicMedia 256XL+
  21.989 -	0025  [MagicMedia 256AV+]
  21.990 -	0083  [MagicGraph 128ZV Plus]
  21.991 -	8005  [MagicMedia 256AV Audio]
  21.992 +	0025  NM2230 [MagicGraph 256AV+]
  21.993 +	0083  NM2093 [MagicGraph 128ZV+]
  21.994 +	8005  NM2200 [MagicMedia 256AV Audio]
  21.995  		0e11 b0d1  MagicMedia 256AV Audio Device on Discovery
  21.996  		0e11 b126  MagicMedia 256AV Audio Device on Durango
  21.997  		1014 00dd  MagicMedia 256AV Audio Device on BlackTip Thinkpad
  21.998 @@ -2327,7 +2535,7 @@ 10c8  Neomagic Corporation
  21.999  		110a 8005  MagicMedia 256AV Audio Device
 21.1000  		14c0 0004  MagicMedia 256AV Audio Device
 21.1001  	8006  NM2360 [MagicMedia 256ZX Audio]
 21.1002 -	8016  NM2360 [MagicMedia 256ZX Audio]
 21.1003 +	8016  NM2380 [MagicMedia 256XL+ Audio]
 21.1004  10c9  Dataexpert Corporation
 21.1005  10ca  Fujitsu Microelectr., Inc.
 21.1006  10cb  Omron Corporation
 21.1007 @@ -2372,7 +2580,7 @@ 10de  nVidia Corporation
 21.1008  	0008  NV1 [EDGE 3D]
 21.1009  	0009  NV1 [EDGE 3D]
 21.1010  	0010  NV2 [Mutara V08]
 21.1011 -	0020  NV4 [Riva TnT]
 21.1012 +	0020  NV4 [RIVA TNT]
 21.1013  		1043 0200  V3400 TNT
 21.1014  		1048 0c18  Erazor II SGRAM
 21.1015  		1048 0c1b  Erazor II
 21.1016 @@ -2389,15 +2597,17 @@ 10de  nVidia Corporation
 21.1017  		1092 4914  Viper V550
 21.1018  		1092 8225  Viper V550
 21.1019  		10b4 273d  Velocity 4400
 21.1020 +		10b4 273e  Velocity 4400
 21.1021  		10b4 2740  Velocity 4400
 21.1022  		10de 0020  Riva TNT
 21.1023  		1102 1015  Graphics Blaster CT6710
 21.1024  		1102 1016  Graphics Blaster RIVA TNT
 21.1025 -	0028  NV5 [Riva TnT2]
 21.1026 +	0028  NV5 [RIVA TNT2/TNT2 Pro]
 21.1027  		1043 0200  AGP-V3800 SGRAM
 21.1028  		1043 0201  AGP-V3800 SDRAM
 21.1029  		1043 0205  PCI-V3800
 21.1030  		1043 4000  AGP-V3800PRO
 21.1031 +		1048 0c21  Synergy II
 21.1032  		1092 4804  Viper V770
 21.1033  		1092 4a00  Viper V770
 21.1034  		1092 4a02  Viper V770 Ultra
 21.1035 @@ -2409,7 +2619,7 @@ 10de  nVidia Corporation
 21.1036  		1102 1020  3D Blaster RIVA TNT2
 21.1037  		1102 1026  3D Blaster RIVA TNT2 Digital
 21.1038  		14af 5810  Maxi Gamer Xentor
 21.1039 -	0029  NV5 [Riva TnT2 Ultra]
 21.1040 +	0029  NV5 [RIVA TNT2 Ultra]
 21.1041  		1043 0200  AGP-V3800 Deluxe
 21.1042  		1043 0201  AGP-V3800 Ultra SDRAM
 21.1043  		1043 0205  PCI-V3800 Ultra
 21.1044 @@ -2419,16 +2629,18 @@ 10de  nVidia Corporation
 21.1045  		14af 5820  Maxi Gamer Xentor 32
 21.1046  	002a  NV5 [Riva TnT2]
 21.1047  	002b  NV5 [Riva TnT2]
 21.1048 -	002c  NV6 [Vanta]
 21.1049 +	002c  NV6 [Vanta/Vanta LT]
 21.1050  		1043 0200  AGP-V3800 Combat SDRAM
 21.1051  		1043 0201  AGP-V3800 Combat
 21.1052  		1092 6820  Viper V730
 21.1053  		1102 1031  CT6938 VANTA 8MB
 21.1054  		1102 1034  CT6894 VANTA 16MB
 21.1055  		14af 5008  Maxi Gamer Phoenix 2
 21.1056 -	002d  RIVA TNT2 Model 64
 21.1057 +	002d  NV5M64 [RIVA TNT2 Model 64/Model 64 Pro]
 21.1058  		1043 0200  AGP-V3800M
 21.1059  		1043 0201  AGP-V3800M
 21.1060 +		1048 0c3a  Erazor III LT
 21.1061 +		10de 001e  M64 AGP4x
 21.1062  		1102 1023  CT6892 RIVA TNT2 Value
 21.1063  		1102 1024  CT6932 RIVA TNT2 Value 32Mb
 21.1064  		1102 102c  CT6931 RIVA TNT2 Value [Jumper]
 21.1065 @@ -2436,7 +2648,19 @@ 10de  nVidia Corporation
 21.1066  		1554 1041  PixelView RIVA TNT2 M64 32MB
 21.1067  	002e  NV6 [Vanta]
 21.1068  	002f  NV6 [Vanta]
 21.1069 -	00a0  NV5 [Riva TNT2]
 21.1070 +	0060  nForce2 ISA Bridge
 21.1071 +		1043 80ad  A7N8X Mainboard
 21.1072 +	0064  nForce2 SMBus (MCP)
 21.1073 +	0065  nForce2 IDE
 21.1074 +	0066  nForce2 Ethernet Controller
 21.1075 +	0067  nForce2 USB Controller
 21.1076 +		1043 0c11  A7N8X Mainboard
 21.1077 +	0068  nForce2 USB Controller
 21.1078 +		1043 0c11  A7N8X Mainboard
 21.1079 +	006a  nForce2 AC97 Audio Controler (MCP)
 21.1080 +	006b  nForce MultiMedia audio [Via VT82C686B]
 21.1081 +	006e  nForce2 FireWire (IEEE 1394) Controller
 21.1082 +	00a0  NV5 [Aladdin TNT2]
 21.1083  		14af 5810  Maxi Gamer Xentor
 21.1084  	0100  NV10 [GeForce 256 SDR]
 21.1085  		1043 0200  AGP-V6600 SGRAM
 21.1086 @@ -2445,40 +2669,53 @@ 10de  nVidia Corporation
 21.1087  		1043 4009  AGP-V6600 SDRAM
 21.1088  		1102 102d  CT6941 GeForce 256
 21.1089  		14af 5022  3D Prophet SE
 21.1090 -	0101  NV10 [GeForce 256 DDR]
 21.1091 +	0101  NV10DDR [GeForce 256 DDR]
 21.1092  		1043 0202  AGP-V6800 DDR
 21.1093  		1043 400a  AGP-V6800 DDR SGRAM
 21.1094  		1043 400b  AGP-V6800 DDR SDRAM
 21.1095  		1102 102e  CT6971 GeForce 256 DDR
 21.1096  		14af 5021  3D Prophet DDR-DVI
 21.1097 -	0103  NV10 [Quadro]
 21.1098 -	0110  NV11 [GeForce2 MX]
 21.1099 +	0103  NV10GL [Quadro]
 21.1100 +	0110  NV11 [GeForce2 MX/MX 400]
 21.1101  		1043 4015  AGP-V7100 Pro
 21.1102  		1043 4031  V7100 Pro with TV output
 21.1103 +		1462 8817  MSI GeForce2 MX400 Pro32S [MS-8817]
 21.1104 +		14af 7102  3D Prophet II MX
 21.1105  		14af 7103  3D Prophet II MX Dual-Display
 21.1106 -	0111  NV11 [GeForce2 MX DDR]
 21.1107 +	0111  NV11DDR [GeForce2 MX 100 DDR/200 DDR]
 21.1108  	0112  NV11 [GeForce2 Go]
 21.1109 -	0113  NV11 [GeForce2 MXR]
 21.1110 -	0150  NV15 [GeForce2 GTS]
 21.1111 +	0113  NV11GL [Quadro2 MXR/EX]
 21.1112 +	0150  NV15 [GeForce2 GTS/Pro]
 21.1113  		1043 4016  V7700 AGP Video Card
 21.1114  		107d 2840  WinFast GeForce2 GTS with TV output
 21.1115  		1462 8831  Creative GeForce2 Pro
 21.1116 -	0151  NV15 [GeForce2 Ti]
 21.1117 -	0152  NV15 [GeForce2 Ultra, Bladerunner]
 21.1118 +	0151  NV15DDR [GeForce2 Ti]
 21.1119 +		1043 405f  V7700Ti
 21.1120 +	0152  NV15BR [GeForce2 Ultra, Bladerunner]
 21.1121  		1048 0c56  GLADIAC Ultra
 21.1122 -	0153  NV15 [Quadro2 Pro]
 21.1123 -	0170  NV17 [GeForce4 MX460]
 21.1124 -	0171  NV17 [GeForce4 MX440]
 21.1125 -	0172  NV17 [GeForce4 MX420]
 21.1126 -	0173  NV1x
 21.1127 +	0153  NV15GL [Quadro2 Pro]
 21.1128 +	0170  NV17 [GeForce4 MX 460]
 21.1129 +	0171  NV17 [GeForce4 MX 440]
 21.1130 +		10b0 0002  Gainward Pro/600 TV
 21.1131 +		1462 8661  G4MX440-VTP
 21.1132 +		1462 8730  MX440SES-T (MS-8873)
 21.1133 +		147b 8f00  Abit Siluro GeForce4MX440
 21.1134 +	0172  NV17 [GeForce4 MX 420]
 21.1135 +	0173  NV17 [GeForce4 MX 440-SE]
 21.1136  	0174  NV17 [GeForce4 440 Go]
 21.1137  	0175  NV17 [GeForce4 420 Go]
 21.1138  	0176  NV17 [GeForce4 420 Go 32M]
 21.1139 -	0178  Quadro4 500XGL
 21.1140 +	0178  NV17GL [Quadro4 550 XGL]
 21.1141  	0179  NV17 [GeForce4 440 Go 64M]
 21.1142 -	017a  Quadro4 200/400NVS
 21.1143 -	017b  Quadro4 550XGL
 21.1144 -	017c  Quadro4 550 GoGL
 21.1145 +	017a  NV17GL [Quadro4 200/400 NVS]
 21.1146 +	017b  NV17GL [Quadro4 550 XGL]
 21.1147 +	017c  NV17GL [Quadro4 550 GoGL]
 21.1148 +	0181  NV18 [GeForce4 MX 440 AGP 8x]
 21.1149 +	0182  NV18 [GeForce4 MX 440SE AGP 8x]
 21.1150 +	0183  NV18 [GeForce4 MX 420 AGP 8x]
 21.1151 +	0188  NV18GL [Quadro4 580 XGL]
 21.1152 +	018a  NV18GL [Quadro4 NVS]
 21.1153 +	018b  NV18GL [Quadro4 380 XGL]
 21.1154  	01a0  NV15 [GeForce2 - nForce GPU]
 21.1155  	01a4  nForce CPU bridge
 21.1156  	01ab  nForce 420 Memory Controller (DDR)
 21.1157 @@ -2490,31 +2727,54 @@ 10de  nVidia Corporation
 21.1158  	01b7  nForce AGP to PCI Bridge
 21.1159  	01b8  nForce PCI-to-PCI bridge
 21.1160  	01bc  nForce IDE
 21.1161 +	01c1  Intel 537 [nForce MC97 Modem]
 21.1162 +	01c2  nForce USB Controller
 21.1163 +	01c3  nForce Ethernet Controller
 21.1164 +	01e8  nForce2 AGP
 21.1165 +	01f0  NV18 [GeForce4 MX - nForce GPU]
 21.1166  	0200  NV20 [GeForce3]
 21.1167  		1043 402f  AGP-V8200 DDR
 21.1168 -	0201  NV20 [GeForce3 Ti200]
 21.1169 -	0202  NV20 [GeForce3 Ti500]
 21.1170 +	0201  NV20 [GeForce3 Ti 200]
 21.1171 +	0202  NV20 [GeForce3 Ti 500]
 21.1172  		1043 405b  V8200 T5
 21.1173 -	0203  NV20 [Quadro DCC]
 21.1174 -	0250  NV25 [GeForce4 Ti4600]
 21.1175 -	0251  NV25 [GeForce4 Ti4400]
 21.1176 -	0253  NV25 [GeForce4 Ti4200]
 21.1177 -	0258  Quadro4 900XGL
 21.1178 -	0259  Quadro4 750XGL
 21.1179 -	025b  Quadro4 700XGL
 21.1180 +		1545 002f  Xtasy 6964
 21.1181 +	0203  NV20DCC [Quadro DCC]
 21.1182 +	0250  NV25 [GeForce4 Ti 4600]
 21.1183 +	0251  NV25 [GeForce4 Ti 4400]
 21.1184 +	0252  NV25 [GeForce4 Ti]
 21.1185 +	0253  NV25 [GeForce4 Ti 4200]
 21.1186 +		107d 2896  WinFast A250 LE TD (Dual VGA/TV-out/DVI)
 21.1187 +		147b 8f09  Siluro (Dual VGA/TV-out/DVI)
 21.1188 +	0258  NV25GL [Quadro4 900 XGL]
 21.1189 +	0259  NV25GL [Quadro4 750 XGL]
 21.1190 +	025b  NV25GL [Quadro4 700 XGL]
 21.1191 +	0280  NV28 [GeForce4 Ti 4800]
 21.1192 +	0281  NV28 [GeForce4 Ti 4200 AGP 8x]
 21.1193 +	0282  NV28 [GeForce4 Ti 4800 SE]
 21.1194 +	0286  NV28 [GeForce4 Ti 4200 Go AGP 8x]
 21.1195 +	0288  NV28GL [Quadro4 980 XGL]
 21.1196 +	0289  NV28GL [Quadro4 780 XGL]
 21.1197 +	0300  NV30 [GeForce FX]
 21.1198 +	0301  NV30 [GeForce FX 5800 Ultra]
 21.1199 +	0302  NV30 [GeForce FX 5800]
 21.1200 +	0308  NV30GL [Quadro FX 2000]
 21.1201 +	0309  NV30GL [Quadro FX 1000]
 21.1202  10df  Emulex Corporation
 21.1203 -	10df  Light Pulse Fibre Channel Adapter
 21.1204  	1ae5  LP6000 Fibre Channel Host Adapter
 21.1205 +	f085  LP850 Fibre Channel Adapter
 21.1206 +	f095  LP952 Fibre Channel Adapter
 21.1207 +	f098  LP982 Fibre Channel Adapter
 21.1208  	f700  LP7000 Fibre Channel Host Adapter
 21.1209  	f800  LP8000 Fibre Channel Host Adapter
 21.1210  	f900  LP9000 Fibre Channel Host Adapter
 21.1211 +	f980  LP9802 Fibre Channel Adapter
 21.1212  10e0  Integrated Micro Solutions Inc.
 21.1213  	5026  IMS5026/27/28
 21.1214  	5027  IMS5027
 21.1215  	5028  IMS5028
 21.1216  	8849  IMS8849
 21.1217  	8853  IMS8853
 21.1218 -	9128  IMS9129 [Twin turbo 128]
 21.1219 +	9128  IMS9128 [Twin turbo 128]
 21.1220  10e1  Tekram Technology Co.,Ltd.
 21.1221  	0391  TRM-S1040
 21.1222  		10e1 0391  DC-315U SCSI-3 Host Adapter
 21.1223 @@ -2524,6 +2784,7 @@ 10e2  Aptix Corporation
 21.1224  10e3  Tundra Semiconductor Corp.
 21.1225  	0000  CA91C042 [Universe]
 21.1226  	0860  CA91C860 [QSpan]
 21.1227 +	0862  CA91C862A [QSpan-II]
 21.1228  10e4  Tandem Computers
 21.1229  10e5  Micro Industries Corporation
 21.1230  10e6  Gainbery Computer Products Inc.
 21.1231 @@ -2553,6 +2814,7 @@ 10ea  Intergraphics Systems
 21.1232  	2010  CyberPro 2000A
 21.1233  	5000  CyberPro 5000
 21.1234  	5050  CyberPro 5050
 21.1235 +	5202  CyberPro 5202
 21.1236  10eb  Artists Graphics
 21.1237  	0101  3GA
 21.1238  	8111  Twist3 Frame Grabber
 21.1239 @@ -2575,6 +2837,7 @@ 10ec  Realtek Semiconductor Co., Ltd.
 21.1240  		1186 1300  DFE-538TX
 21.1241  		1186 1320  SN5200
 21.1242  		1186 8139  DRN-32TX
 21.1243 +		11f6 8139  FN22-3(A) LinxPRO Ethernet Adapter
 21.1244  		1259 2500  AT-2500TX
 21.1245  		1259 2503  AT-2500TX/ACPI
 21.1246  		1429 d010  ND010
 21.1247 @@ -2590,9 +2853,11 @@ 10ec  Realtek Semiconductor Co., Ltd.
 21.1248  		8e2e 7100  KF-230TX/2
 21.1249  		a0a0 0007  ALN-325C
 21.1250  	8169  RTL-8169
 21.1251 +		1371 434e  ProG-2000L
 21.1252 +	8197  SmartLAN56 56K Modem
 21.1253  10ed  Ascii Corporation
 21.1254  	7310  V7310
 21.1255 -10ee  Xilinx, Inc.
 21.1256 +10ee  Xilinx Corporation
 21.1257  	3fc0  RME Digi96
 21.1258  	3fc1  RME Digi96/8
 21.1259  	3fc2  RME Digi96/8 Pro
 21.1260 @@ -2615,6 +2880,7 @@ 10f9  PC Direct
 21.1261  10fa  Truevision
 21.1262  	000c  TARGA 1000
 21.1263  10fb  Thesys Gesellschaft für Mikroelektronik mbH
 21.1264 +	186f  TH 6255
 21.1265  10fc  I-O Data Device, Inc.
 21.1266  # What's in the cardbus end of a Sony ACR-A01 card, comes with newer Vaio CD-RW drives
 21.1267  	0003  Cardbus IDE Controller
 21.1268 @@ -2646,14 +2912,21 @@ 1102  Creative Labs
 21.1269  		1102 8040  CT4760 SBLive!
 21.1270  		1102 8051  CT4850 SBLive! Value
 21.1271  		1102 8061  SBLive! Player 5.1
 21.1272 +		1102 8064  SB Live! 5.1 Model SB0100
 21.1273 +		1102 8065  SBLive! 5.1 Digital Model SB0220
 21.1274  	0004  SB Audigy
 21.1275  		1102 0051  SB0090 Audigy Player
 21.1276 +		1102 0053  SB0090 Audigy Player/OEM
 21.1277 +	0006  [SB Live! Value] EMU10k1X
 21.1278  	4001  SB Audigy FireWire Port
 21.1279 +		1102 0010  SB Audigy FireWire Port
 21.1280  	7002  SB Live! MIDI/Game Port
 21.1281  		1102 0020  Gameport Joystick
 21.1282  	7003  SB Audigy MIDI/Game port
 21.1283 -		1102 0040  SB Audigy MIDI/Gameport
 21.1284 -	8938  ES1371
 21.1285 +		1102 0040  SB Audigy MIDI/Game Port
 21.1286 +	7004  [SB Live! Value] Input device controller
 21.1287 +	8064  SB0100 [SBLive! 5.1 OEM]
 21.1288 +	8938  Ectiva EV1938
 21.1289  1103  Triones Technologies, Inc.
 21.1290  	0003  HPT343
 21.1291  # Revisions: 01=HPT366, 03=HPT370, 04=HPT370A, 05=HPT372
 21.1292 @@ -2664,23 +2937,32 @@ 1103  Triones Technologies, Inc.
 21.1293  	0006  HPT302
 21.1294  	0007  HPT371
 21.1295  	0008  HPT374
 21.1296 +	0009  HPT372N
 21.1297  1104  RasterOps Corp.
 21.1298  1105  Sigma Designs, Inc.
 21.1299  	1105  REALmagic Xcard MPEG 1/2/3/4 DVD Decoder
 21.1300  	8300  REALmagic Hollywood Plus DVD Decoder
 21.1301  	8400  EM840x REALmagic DVD/MPEG-2 Audio/Video Decoder
 21.1302  1106  VIA Technologies, Inc.
 21.1303 +	0102  Embedded VIA Ethernet Controller
 21.1304  	0130  VT6305 1394.A Controller
 21.1305  	0305  VT8363/8365 [KT133/KM133]
 21.1306  		1043 8033  A7V Mainboard
 21.1307 +		1043 803e  A7V-E Mainboard
 21.1308  		1043 8042  A7V133/A7V133-C Mainboard
 21.1309  		147b a401  KT7/KT7-RAID/KT7A/KT7A-RAID Mainboard
 21.1310  	0391  VT8371 [KX133]
 21.1311  	0501  VT8501 [Apollo MVP4]
 21.1312  	0505  VT82C505
 21.1313 -	0561  VT82C561
 21.1314 -	0571  VT82C586B PIPC Bus Master IDE
 21.1315 -		1458 5002 GA-7VAX Mainboard
 21.1316 +# Shares chip with :0576. The VT82C576M has :1571 instead of :0561.
 21.1317 +	0561  VT82C576MV
 21.1318 +	0571  VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE
 21.1319 +		1019 0985  P6VXA Motherboard
 21.1320 +		1043 8052  VT8233A Bus Master ATA100/66/33 IDE
 21.1321 +		1043 808c  A7V8X motherboard
 21.1322 +		1106 0571  VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE
 21.1323 +		1179 0001  Magnia Z310
 21.1324 +		1458 5002  GA-7VAX Mainboard
 21.1325  	0576  VT82C576 3V [Apollo Master]
 21.1326  	0585  VT82C585VP [Apollo VP1/VPX]
 21.1327  	0586  VT82C586/A/B PCI-to-ISA [Apollo VP]
 21.1328 @@ -2693,24 +2975,35 @@ 1106  VIA Technologies, Inc.
 21.1329  	0598  VT82C598 [Apollo MVP3]
 21.1330  	0601  VT8601 [Apollo ProMedia]
 21.1331  	0605  VT8605 [ProSavage PM133]
 21.1332 +		1043 802c  CUV4X mainboard
 21.1333  	0680  VT82C680 [Apollo P6]
 21.1334  	0686  VT82C686 [Apollo Super South]
 21.1335 +		1019 0985  P6VXA Motherboard
 21.1336 +		1043 802c  CUV4X mainboard
 21.1337  		1043 8033  A7V Mainboard
 21.1338 +		1043 803e  A7V-E Mainboard
 21.1339 +		1043 8040  A7M266 Mainboard
 21.1340  		1043 8042  A7V133/A7V133-C Mainboard
 21.1341  		1106 0000  VT82C686/A PCI to ISA Bridge
 21.1342  		1106 0686  VT82C686/A PCI to ISA Bridge
 21.1343 +		1179 0001  Magnia Z310
 21.1344 +		147b a702  KG7-Lite Mainboard
 21.1345  	0691  VT82C693A/694x [Apollo PRO133x]
 21.1346 +		1019 0985  P6VXA Motherboard
 21.1347 +		1179 0001  Magnia Z310
 21.1348  		1458 0691  VT82C691 Apollo Pro System Controller
 21.1349  	0693  VT82C693 [Apollo Pro Plus]
 21.1350  	0698  VT82C693A [Apollo Pro133 AGP]
 21.1351  	0926  VT82C926 [Amazon]
 21.1352  	1000  VT82C570MV
 21.1353  	1106  VT82C570MV
 21.1354 -	1571  VT82C416MV
 21.1355 +	1571  VT82C576M/VT82C586
 21.1356  	1595  VT82C595/97 [Apollo VP2/97]
 21.1357  	3038  USB
 21.1358  		0925 1234  USB Controller
 21.1359 -		1234 0925  MVP3 USB Controller
 21.1360 +		1019 0985  P6VXA Motherboard
 21.1361 +		1043 808c  A7V8X motherboard
 21.1362 +		1179 0001  Magnia Z310
 21.1363  	3040  VT82C586B ACPI
 21.1364  	3043  VT86C100A [Rhine]
 21.1365  		10bd 0000  VT86C100A Fast Ethernet Adapter
 21.1366 @@ -2720,41 +3013,60 @@ 1106  VIA Technologies, Inc.
 21.1367  	3050  VT82C596 Power Management
 21.1368  	3051  VT82C596 Power Management
 21.1369  	3057  VT82C686 [Apollo Super ACPI]
 21.1370 +		1019 0985  P6VXA Motherboard
 21.1371  		1043 8033  A7V Mainboard
 21.1372 +		1043 803e  A7V-E Mainboard
 21.1373 +		1043 8040  A7M266 Mainboard
 21.1374  		1043 8042  A7V133/A7V133-C Mainboard
 21.1375 +		1179 0001  Magnia Z310
 21.1376  	3058  VT82C686 AC97 Audio Controller
 21.1377  		0e11 b194  Soundmax integrated digital audio
 21.1378 +		1019 0985  P6VXA Motherboard
 21.1379  		1106 4511  Onboard Audio on EP7KXA
 21.1380  		1458 7600  Onboard Audio
 21.1381  		1462 3091  MS-6309 Onboard Audio
 21.1382  		15dd 7609  Onboard Audio
 21.1383 -	3059  VT8233 AC97 Audio Controller
 21.1384 -		1458 a002  GA-7VAX Onboard Audio (Realtek ALC650) 
 21.1385 +	3059  VT8233/A/8235 AC97 Audio Controller
 21.1386 +		1043 8095  A7V8X Motherboard (Realtek ALC650 codec)
 21.1387 +		1458 a002  GA-7VAX Onboard Audio (Realtek ALC650)
 21.1388  	3065  VT6102 [Rhine-II]
 21.1389 +		1106 0102  VT6102 [Rhine II] Embeded Ethernet Controller on VT8235
 21.1390  		1186 1400  DFE-530TX rev A
 21.1391  		1186 1401  DFE-530TX rev B
 21.1392 -	3068  AC97 Modem Controller
 21.1393 +		13b9 1421  LD-10/100AL PCI Fast Ethernet Adapter (rev.B)
 21.1394 +	3068  Intel 537 [AC97 Modem]
 21.1395  	3074  VT8233 PCI to ISA Bridge
 21.1396 +		1043 8052  VT8233A
 21.1397  	3091  VT8633 [Apollo Pro266]
 21.1398 -	3099  VT8367 [KT266]
 21.1399 -		1043 8064  A7V266-E
 21.1400 -		1043 807f  A7V333
 21.1401 +	3099  VT8366/A/7 [Apollo KT266/A/333]
 21.1402 +		1043 8064  A7V266-E Mainboard
 21.1403 +		1043 807f  A7V333 Mainboard
 21.1404  	3101  VT8653 Host Bridge
 21.1405  	3102  VT8662 Host Bridge
 21.1406  	3103  VT8615 Host Bridge
 21.1407  	3104  USB 2.0
 21.1408 +		1043 808c  A7V8X motherboard
 21.1409  		1458 5004  GA-7VAX Mainboard
 21.1410 +	3106  VT6105 [Rhine-III]
 21.1411  	3109  VT8233C PCI to ISA Bridge
 21.1412  	3112  VT8361 [KLE133] Host Bridge
 21.1413 +	3116  VT8375 [KM266/KL266] Host Bridge
 21.1414 +# found on EPIA M6000/9000 mainboard
 21.1415 +	3122  VT8623 [Apollo CLE266] integrated CastleRock graphics
 21.1416 +# found on EPIA M6000/9000 mainboard
 21.1417 +	3123  VT8623 [Apollo CLE266]
 21.1418  	3128  VT8753 [P4X266 AGP]
 21.1419  	3133  VT3133 Host Bridge
 21.1420  	3147  VT8233A ISA Bridge
 21.1421  	3148  P4M266 Host Bridge
 21.1422  	3156  P/KN266 Host Bridge
 21.1423 -	3177  VT8233A ISA Bridge
 21.1424 -		1458 5001 GA-7VAX Mainboard
 21.1425 +	3168  VT8374 P4X400 Host Controller/AGP Bridge
 21.1426 +	3177  VT8235 ISA Bridge
 21.1427 +		1043 808c  A7V8X motherboard
 21.1428 +		1458 5001  GA-7VAX Mainboard
 21.1429  	3189  VT8377 [KT400 AGP] Host Bridge
 21.1430 -		1458 5000 GA-7VAX Mainboard
 21.1431 +		1043 807f  A7V8X motherboard
 21.1432 +		1458 5000  GA-7VAX Mainboard
 21.1433  	5030  VT82C596 ACPI [Apollo PRO]
 21.1434  	6100  VT85C100A [Rhine II]
 21.1435  	8231  VT8231 [PCI-to-ISA Bridge]
 21.1436 @@ -2765,12 +3077,13 @@ 1106  VIA Technologies, Inc.
 21.1437  	8596  VT82C596 [Apollo PRO AGP]
 21.1438  	8597  VT82C597 [Apollo VP3 AGP]
 21.1439  	8598  VT82C598/694x [Apollo MVP3/Pro133x AGP]
 21.1440 +		1019 0985  P6VXA Motherboard
 21.1441  	8601  VT8601 [Apollo ProMedia AGP]
 21.1442  	8605  VT8605 [PM133 AGP]
 21.1443  	8691  VT82C691 [Apollo Pro]
 21.1444  	8693  VT82C693 [Apollo Pro Plus] PCI Bridge
 21.1445  	b091  VT8633 [Apollo Pro266 AGP]
 21.1446 -	b099  VT8367 [KT333 AGP]
 21.1447 +	b099  VT8366/A/7 [Apollo KT266/A/333 AGP]
 21.1448  	b101  VT8653 AGP Bridge
 21.1449  	b102  VT8362 AGP Bridge
 21.1450  	b103  VT8615 AGP Bridge
 21.1451 @@ -2792,6 +3105,12 @@ 1109  Cogent Data Technologies, Inc.
 21.1452  110a  Siemens Nixdorf AG
 21.1453  	0002  Pirahna 2-port
 21.1454  	0005  Tulip controller, power management, switch extender
 21.1455 +	0006  FSC PINC (I/O-APIC)
 21.1456 +	0015  FSC Multiprocessor Interrupt Controller
 21.1457 +	001d  FSC Copernicus Management Controller
 21.1458 +	007b  FSC Remote Service Controller, mailbox device
 21.1459 +	007c  FSC Remote Service Controller, shared memory device
 21.1460 +	007d  FSC Remote Service Controller, SMIC device
 21.1461  	2102  DSCC4 WAN adapter
 21.1462  	4942  FPGA I-Bus Tracer for MBD
 21.1463  	6120  SZB6120
 21.1464 @@ -2806,8 +3125,8 @@ 1110  Powerhouse Systems
 21.1465  	6037  Firepower Powerized SMP I/O ASIC
 21.1466  	6073  Firepower Powerized SMP I/O ASIC
 21.1467  1111  Santa Cruz Operation
 21.1468 -# DJ: Some people say that 0x1112 is Rockwell International
 21.1469 -1112  RNS - Div. of Meret Communications Inc
 21.1470 +# Also claimed to be RNS or Rockwell International, current PCISIG records list Osicom
 21.1471 +1112  Osicom Technologies Inc
 21.1472  	2200  FDDI Adapter
 21.1473  	2300  Fast Ethernet Adapter
 21.1474  	2340  4 Port Fast Ethernet Adapter
 21.1475 @@ -2817,6 +3136,7 @@ 1113  Accton Technology Corporation
 21.1476  		103c 1207  EN-1207D Fast Ethernet Adapter
 21.1477  		1113 1211  EN-1207D Fast Ethernet Adapter
 21.1478  	1216  EN-1216 Ethernet Adapter
 21.1479 +		111a 1020  SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX ?]
 21.1480  	1217  EN-1217 Ethernet Adapter
 21.1481  	5105  10Mbps Network card
 21.1482  	9211  EN-1207D Fast Ethernet Adapter
 21.1483 @@ -2957,9 +3277,14 @@ 112f  Imaging Technology Inc
 21.1484  	0001  MVC IM-PCI Video frame grabber/processor
 21.1485  1130  Computervision
 21.1486  1131  Philips Semiconductors
 21.1487 +	1561  USB 1.1 Host Controller
 21.1488 +	1562  USB 2.0 Host Controller
 21.1489 +	3400  SmartPCI56(UCB1500) 56K Modem
 21.1490  	7130  SAA7130 Video Broadcast Decoder
 21.1491 +	7133  SAA7133 Audio+video broadcast decoder
 21.1492  # PCI audio and video broadcast decoder (http://www.semiconductors.philips.com/pip/saa7134hl)
 21.1493  	7134  SAA7134
 21.1494 +	7135  SAA7135 Audio+video broadcast decoder
 21.1495  	7145  SAA7145
 21.1496  	7146  SAA7146
 21.1497  		114b 2003  DVRaptor Video Edit/Capture Card
 21.1498 @@ -2988,6 +3313,7 @@ 1133  Eicon Technology Corporation
 21.1499  		1133 e004  DIVA 2.0 U
 21.1500  	e005  DIVA LOW
 21.1501  		1133 e005  DIVA 2.01 S/T
 21.1502 +	e00b  DIVA 2.02
 21.1503  	e010  DIVA Server BRI-2M
 21.1504  		1133 e010  DIVA Server BRI-2M
 21.1505  	e012  DIVA Server BRI-8M
 21.1506 @@ -3036,8 +3362,8 @@ 1143  NetPower, Inc
 21.1507  1144  Cincinnati Milacron
 21.1508  	0001  Noservo controller
 21.1509  1145  Workbit Corporation
 21.1510 +	8007  NinjaSCSI-32 Workbit
 21.1511  	f007  NinjaSCSI-32 KME
 21.1512 -	8007  NinjaSCSI-32 Workbit
 21.1513  	f010  NinjaSCSI-32 Workbit
 21.1514  	f012  NinjaSCSI-32 Logitec
 21.1515  	f013  NinjaSCSI-32 Logitec
 21.1516 @@ -3063,28 +3389,50 @@ 1148  Syskonnect (Schneider & Koch)
 21.1517  		1148 5844  FDDI SK-5844 (SK-NET FDDI-LP64 DAS)
 21.1518  	4200  Token Ring adapter
 21.1519  	4300  SK-98xx Gigabit Ethernet Server Adapter
 21.1520 -		1148 9821  SK-9821 Gigabit Ethernet 1000Base-T Server Adapter
 21.1521 -		1148 9822  SK-9822 Gigabit Ethernet 1000Base-T Dual Port Server Adapter
 21.1522 -		1148 9841  SK-9841 Gigabit Ethernet 1000Base-LX Server Adapter
 21.1523 -		1148 9842  SK-9842 Gigabit Ethernet 1000Base-LX Dual Port Server Adapter
 21.1524 -		1148 9843  SK-9843 Gigabit Ethernet 1000Base-SX Server Adapter
 21.1525 -		1148 9844  SK-9844 Gigabit Ethernet 1000Base-SX Dual Port Server Adapter
 21.1526 -		1148 9861  SK-9861 Gigabit Ethernet 1000Base-SX Server Adapter
 21.1527 -		1148 9862  SK-9862 Gigabit Ethernet 1000Base-SX Dual Port Server Adapter
 21.1528 -		1148 9871  SK-9871 Gigabit Ethernet 1000Base-ZX Server Adapter
 21.1529 -		1148 9872  SK-9872 Gigabit Ethernet 1000Base-ZX Dual Port Server Adapter
 21.1530 -	4320  SK-98xx Gigabit Ethernet Server Adapter
 21.1531 -		1148 9521  SK-9521 10/100/1000Base-T Adapter
 21.1532 +		1148 9821  SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)
 21.1533 +		1148 9822  SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)
 21.1534 +		1148 9841  SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)
 21.1535 +		1148 9842  SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)
 21.1536 +		1148 9843  SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)
 21.1537 +		1148 9844  SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)
 21.1538 +		1148 9861  SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)
 21.1539 +		1148 9862  SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)
 21.1540 +# Information got from SysKonnekt
 21.1541 +		1148 9871  SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)
 21.1542 +# Information got from SysKonnekt
 21.1543 +		1148 9872  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)
 21.1544 +		1259 2970  Allied Telesyn AT-2970SX Gigabit Ethernet Adapter
 21.1545 +		1259 2971  Allied Telesyn AT-2970LX Gigabit Ethernet Adapter
 21.1546 +		1259 2972  Allied Telesyn AT-2970TX Gigabit Ethernet Adapter
 21.1547 +		1259 2973  Allied Telesyn AT-2971SX Gigabit Ethernet Adapter
 21.1548 +		1259 2974  Allied Telesyn AT-2971T Gigabit Ethernet Adapter
 21.1549 +		1259 2975  Allied Telesyn AT-2970SX/2SC Gigabit Ethernet Adapter
 21.1550 +		1259 2976  Allied Telesyn AT-2970LX/2SC Gigabit Ethernet Adapter
 21.1551 +		1259 2977  Allied Telesyn AT-2970TX/2TX Gigabit Ethernet Adapter
 21.1552 +	4320  SK-98xx V2.0 Gigabit Ethernet Adapter
 21.1553 +		1148 0121  Marvell RDK-8001 Adapter
 21.1554 +		1148 0221  Marvell RDK-8002 Adapter
 21.1555 +		1148 0321  Marvell RDK-8003 Adapter
 21.1556 +		1148 0421  Marvell RDK-8004 Adapter
 21.1557 +		1148 0621  Marvell RDK-8006 Adapter
 21.1558 +		1148 0721  Marvell RDK-8007 Adapter
 21.1559 +		1148 0821  Marvell RDK-8008 Adapter
 21.1560 +		1148 0921  Marvell RDK-8009 Adapter
 21.1561 +		1148 1121  Marvell RDK-8011 Adapter
 21.1562 +		1148 1221  Marvell RDK-8012 Adapter
 21.1563 +		1148 3221  SK-9521 V2.0 10/100/1000Base-T Adapter
 21.1564  		1148 5021  SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter
 21.1565  		1148 5041  SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter
 21.1566  		1148 5043  SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter
 21.1567  		1148 5051  SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter
 21.1568  		1148 5061  SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter
 21.1569  		1148 5071  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter
 21.1570 -	4400  Gigabit Ethernet
 21.1571 +		1148 9521  SK-9521 10/100/1000Base-T Adapter
 21.1572  1149  Win System Corporation
 21.1573  114a  VMIC
 21.1574  	5579  VMIPCI-5579 (Reflective Memory Card)
 21.1575 +	5587  VMIPCI-5587 (Reflective Memory Card)
 21.1576 +	6504  VMIC PCI 7755 FPGA
 21.1577  	7587  VMIVME-7587
 21.1578  114b  Canopus Co., Ltd
 21.1579  114c  Annabooks
 21.1580 @@ -3195,11 +3543,13 @@ 1165  Imagraph Corporation
 21.1581  	0001  Motion TPEG Recorder/Player with audio
 21.1582  1166  ServerWorks
 21.1583  	0005  CNB20-LE Host Bridge
 21.1584 +	0006  CNB20HE Host Bridge
 21.1585  	0007  CNB20-LE Host Bridge
 21.1586  	0008  CNB20HE Host Bridge
 21.1587  	0009  CNB20LE Host Bridge
 21.1588  	0010  CIOB30
 21.1589  	0011  CMIC-HE
 21.1590 +	0012  CMIC-LE
 21.1591  	0013  CNB20-HE Host Bridge
 21.1592  	0014  CNB20-HE Host Bridge
 21.1593  	0015  CMIC-GC Host Bridge
 21.1594 @@ -3265,7 +3615,9 @@ 1180  Ricoh Co Ltd
 21.1595  	0465  RL5c465
 21.1596  	0466  RL5c466
 21.1597  	0475  RL5c475
 21.1598 +		144d c006  vpr Matrix 170B4 CardBus bridge
 21.1599  	0476  RL5c476 II
 21.1600 +		1014 0185  ThinkPad A/T/X Series
 21.1601  		104d 80df  Vaio PCG-FX403
 21.1602  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.1603  	0477  RL5c477
 21.1604 @@ -3274,7 +3626,9 @@ 1180  Ricoh Co Ltd
 21.1605  	0522  R5C522 IEEE 1394 Controller
 21.1606  		1014 01cf  ThinkPad A30p (2653-64G)
 21.1607  	0551  R5C551 IEEE 1394 Controller
 21.1608 +		144d c006  vpr Matrix 170B4
 21.1609  	0552  R5C552 IEEE 1394 Controller
 21.1610 +		1014 0511  ThinkPad A/T/X Series
 21.1611  1181  Telmatics International
 21.1612  1183  Fujikura Ltd
 21.1613  1184  Forks Inc
 21.1614 @@ -3290,6 +3644,8 @@ 1186  D-Link System Inc
 21.1615  	1340  DFE-690TXD CardBus PC Card
 21.1616  	1561  DRP-32TXD Cardbus PC Card
 21.1617  	4000  DL2K Ethernet
 21.1618 +	4c00  Gigabit Ethernet Adapter
 21.1619 +		1186 4c00  DGE-530T Gigabit Ethernet Adapter
 21.1620  1187  Advanced Technology Laboratories, Inc.
 21.1621  1188  Shima Seiki Manufacturing Ltd.
 21.1622  1189  Matsushita Electronics Co Ltd
 21.1623 @@ -3366,7 +3722,27 @@ 11a9  InnoSys Inc.
 21.1624  	4240  AMCC S933Q Intelligent Serial Card
 21.1625  11aa  Actel
 21.1626  11ab  Galileo Technology Ltd.
 21.1627 -	0146  GT-64010
 21.1628 +	0146  GT-64010/64010A System Controller
 21.1629 +	4146  GT-64011/GT-64111 System Controller
 21.1630 +	4320  Gigabit Ethernet Adapter
 21.1631 +		1019 0f38  Marvell 88E8001 Gigabit LOM Ethernet Adapter (ECS)
 21.1632 +		1019 8001  Marvell 88E8001 Gigabit LOM Ethernet Adapter (ECS)
 21.1633 +		1043 173c  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Asus)
 21.1634 +		1043 811a  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Asus)
 21.1635 +		105b 0c19  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Foxconn)
 21.1636 +		10b8 b452  SMC EZ Card 1000 (SMC9452TXV.2)
 21.1637 +		11ab 0121  Marvell RDK-8001 Adapter
 21.1638 +		11ab 0321  Marvell RDK-8003 Adapter
 21.1639 +		11ab 1021  Marvell RDK-8010 Adapter
 21.1640 +		11ab 5021  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (64 bit)
 21.1641 +		11ab 9521  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (32 bit)
 21.1642 +		1458 e000  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Gigabyte)
 21.1643 +		147b 1406  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Abit)
 21.1644 +		15d4 0047  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Iwill)
 21.1645 +		1695 9025  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Epox)
 21.1646 +		17f2 1c03  Marvell 88E8001 Gigabit LOM Ethernet Adapter (Albatron)
 21.1647 +	4611  GT-64115 System Controller
 21.1648 +	4620  GT-64120/64120A/64121A System Controller
 21.1649  	4801  GT-48001
 21.1650  	f003  GT-64010 Primary Image Piranha Image Generator
 21.1651  11ac  Canon Information Systems Research Aust.
 21.1652 @@ -3462,6 +3838,7 @@ 11c1  Lucent Microelectronics
 21.1653  	0443  LT WinModem
 21.1654  	0444  LT WinModem
 21.1655  	0445  LT WinModem
 21.1656 +		8086 2203  PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)
 21.1657  	0446  LT WinModem
 21.1658  	0447  LT WinModem
 21.1659  	0448  WinModem 56k
 21.1660 @@ -3491,6 +3868,7 @@ 11c1  Lucent Microelectronics
 21.1661  	044e  LT WinModem
 21.1662  	044f  V90 WildWire Modem
 21.1663  	0450  LT WinModem
 21.1664 +		144f 4005  Magnia SG20
 21.1665  	0451  LT WinModem
 21.1666  	0452  LT WinModem
 21.1667  	0453  LT WinModem
 21.1668 @@ -3501,15 +3879,18 @@ 11c1  Lucent Microelectronics
 21.1669  	0458  LT WinModem
 21.1670  	0459  LT WinModem
 21.1671  	045a  LT WinModem
 21.1672 +	045c  LT WinModem
 21.1673  	0461  V90 WildWire Modem
 21.1674  	0462  V90 WildWire Modem
 21.1675  	0480  Venus Modem (V90, 56KFlex)
 21.1676  	5801  USB
 21.1677  	5802  USS-312 USB Controller
 21.1678 +# 4 port PCI USB Controller made by Agere (formely Lucent)
 21.1679 +	5803  USS-344S USB Controller
 21.1680  	5811  FW323
 21.1681  		dead 0800  FireWire Host Bus Adapter
 21.1682  11c2  Sand Microelectronics
 21.1683 -11c3  NEC Corp
 21.1684 +11c3  NEC Corporation
 21.1685  11c4  Document Technologies, Inc
 21.1686  11c5  Shiva Corporation
 21.1687  11c6  Dainippon Screen Mfg. Co. Ltd
 21.1688 @@ -3563,6 +3944,7 @@ 11e0  Cray Communications A/S
 21.1689  11e1  GEC Plessey Semi Inc.
 21.1690  11e2  Samsung Information Systems America
 21.1691  11e3  Quicklogic Corporation
 21.1692 +	5030  PC Watchdog
 21.1693  11e4  Second Wave Inc
 21.1694  11e5  IIX Consulting
 21.1695  11e6  Mitsui-Zosen System Research
 21.1696 @@ -3624,6 +4006,11 @@ 11ff  Scion Corporation
 21.1697  1200  CSS Corporation
 21.1698  1201  Vista Controls Corp
 21.1699  1202  Network General Corp.
 21.1700 +	4300  Gigabit Ethernet Adapter
 21.1701 +		1202 9841  SK-9841 LX
 21.1702 +		1202 9842  SK-9841 LX dual link
 21.1703 +		1202 9843  SK-9843 SX
 21.1704 +		1202 9844  SK-9843 SX dual link
 21.1705  1203  Bayer Corporation, Agfa Division
 21.1706  1204  Lattice Semiconductor Corporation
 21.1707  1205  Array Corporation
 21.1708 @@ -3670,6 +4057,7 @@ 1217  O2 Micro, Inc.
 21.1709  	6933  OZ6933 Cardbus Controller
 21.1710  		1025 1016  Travelmate 612 TX
 21.1711  	6972  OZ6912 Cardbus Controller
 21.1712 +		1179 0001  Magnia Z310
 21.1713  1218  Hybricon Corp.
 21.1714  1219  First Virtual Corporation
 21.1715  121a  3Dfx Interactive, Inc.
 21.1716 @@ -3691,7 +4079,6 @@ 121a  3Dfx Interactive, Inc.
 21.1717  		139c 0016  Raven
 21.1718  		139c 0017  Raven
 21.1719  		14af 0002  Maxi Gamer Phoenix
 21.1720 -		3030 3030  Skywell Magic TwinPower
 21.1721  	0004  Voodoo Banshee [Velocity 100]
 21.1722  	0005  Voodoo 3
 21.1723  		121a 0004  Voodoo3 AGP
 21.1724 @@ -3803,7 +4190,7 @@ 1248  Central Data Corporation
 21.1725  1249  Samsung Electronics Co., Ltd.
 21.1726  124a  AEG Electrocom GmbH
 21.1727  124b  SBS/Greenspring Modular I/O
 21.1728 -	0040  cPCI-200 Four Slot IndustryPack carrier
 21.1729 +	0040  PCI-40A or cPCI-200 Quad IndustryPack carrier
 21.1730  		124b 9080  PCI9080 Bridge
 21.1731  124c  Solitron Technologies, Inc.
 21.1732  124d  Stallion Technologies, Inc.
 21.1733 @@ -3848,6 +4235,7 @@ 125d  ESS Technology
 21.1734  		125d 8888  Solo-1 Audio Adapter
 21.1735  		525f c888  ES1969 SOLO-1 AudioDrive (+ES1938)
 21.1736  	1978  ES1978 Maestro 2E
 21.1737 +		0e11 b112  Armada M700
 21.1738  		1033 803c  ES1978 Maestro-2E Audiodrive
 21.1739  		1033 8058  ES1978 Maestro-2E Audiodrive
 21.1740  		1092 4000  Monster Sound MX400
 21.1741 @@ -3879,6 +4267,10 @@ 125f  Concurrent Technologies, Inc.
 21.1742  1260  Harris Semiconductor
 21.1743  	3873  Prism 2.5 Wavelan chipset
 21.1744  		1186 3501  DWL-520 Wireless PCI Adapter
 21.1745 +		1668 0414  HWP01170-01 802.11b PCI Wireless Adapter
 21.1746 +		1737 3874  WMP11 Wireless 802.11b PCI Adapter
 21.1747 +		8086 2513  Wireless 802.11b MiniPCI Adapter
 21.1748 +	3890  D-Links DWL-g650 A1
 21.1749  	8130  HMP8130 NTSC/PAL Video Decoder
 21.1750  	8131  HMP8131 NTSC/PAL Video Decoder
 21.1751  1261  Matsushita-Kotobuki Electronics Industries, Ltd.
 21.1752 @@ -3914,6 +4306,7 @@ 1272  Telematics International
 21.1753  1273  Hughes Network Systems
 21.1754  	0002  DirecPC
 21.1755  1274  Ensoniq
 21.1756 +	1171  ES1373 [AudioPCI] (also Creative Labs CT5803)
 21.1757  	1371  ES1371 [AudioPCI-97]
 21.1758  		0e11 0024  AudioPCI on Motherboard Compaq Deskpro
 21.1759  		0e11 b1a7  ES1371, ES1373 AudioPCI
 21.1760 @@ -3984,6 +4377,7 @@ 1276  Switched Network Technologies, Inc
 21.1761  1277  Comstream
 21.1762  1278  Transtech Parallel Systems Ltd.
 21.1763  	0701  TPE3/TM3 PowerPC Node
 21.1764 +	0710  TPE5 PowerPC PCI board
 21.1765  1279  Transmeta Corporation
 21.1766  	0295  Northbridge
 21.1767  	0395  LongRun Northbridge
 21.1768 @@ -4117,6 +4511,7 @@ 1282  Davicom Semiconductor, Inc.
 21.1769  	9132  Ethernet 100/10 MBit
 21.1770  1283  Integrated Technology Express, Inc.
 21.1771  	673a  IT8330G
 21.1772 +	8181  IT8181E/F LCD/VGA Controller
 21.1773  	8330  IT8330G
 21.1774  	8888  IT8888F PCI to ISA Bridge with SMB
 21.1775  	8889  IT8889F PCI to ISA Bridge
 21.1776 @@ -4179,6 +4574,7 @@ 12ae  Alteon Networks Inc.
 21.1777  		12ae 0001  Gigabit Ethernet-SX (Universal)
 21.1778  		1410 0104  Gigabit Ethernet-SX PCI Adapter
 21.1779  	0002  AceNIC Gigabit Ethernet (Copper)
 21.1780 +		10a9 8002  Acenic Gigabit Ethernet
 21.1781  		12ae 0002  Gigabit Ethernet-T (3C986-T)
 21.1782  12af  TDK USA Corp
 21.1783  12b0  Jorge Scientific Corp
 21.1784 @@ -4209,7 +4605,7 @@ 12b9  US Robotics/3Com
 21.1785  		12b9 00ab  USR 56k Internal Voice Modem (Model 5609)
 21.1786  		12b9 00ac  USR 56k Internal Voice Modem (Model 3298)
 21.1787  		12b9 00ad  USR 56k Internal FAX Modem (Model 5610)
 21.1788 -12ba  PMC Sierra
 21.1789 +12ba  BittWare, Inc.
 21.1790  12bb  Nippon Unisoft Corporation
 21.1791  12bc  Array Microsystems
 21.1792  12bd  Computerm Corp.
 21.1793 @@ -4273,11 +4669,14 @@ 12d2  NVidia / SGS Thomson (Joint Ventur
 21.1794  	00a0  ITNT2
 21.1795  12d3  Vingmed Sound A/S
 21.1796  12d4  Ulticom (Formerly DGM&S)
 21.1797 +	0200  T1 Card
 21.1798  12d5  Equator Technologies
 21.1799  12d6  Analogic Corp
 21.1800  12d7  Biotronic SRL
 21.1801  12d8  Pericom Semiconductor
 21.1802  12d9  Aculab PLC
 21.1803 +	0002  PCI Prosody
 21.1804 +	0004  cPCI Prosody
 21.1805  12da  True Time Inc.
 21.1806  12db  Annapolis Micro Systems, Inc
 21.1807  12dc  Symicron Computer Communication Ltd.
 21.1808 @@ -4395,6 +4794,7 @@ 1307  Computer Boards
 21.1809  	0036  PCI-DAS64/M2/16
 21.1810  	0037  PCI-DAS64/M3/16
 21.1811  	004c  PCI-DAS1000
 21.1812 +	004d  PCI-QUAD04
 21.1813  1308  Jato Technologies Inc.
 21.1814  	0001  NetCelerator Adapter
 21.1815  		1308 0001  NetCelerator Adapter
 21.1816 @@ -4481,6 +4881,8 @@ 132d  Integrated Silicon Solution, Inc.
 21.1817  1330  MMC Networks
 21.1818  1331  Radisys Corp.
 21.1819  1332  Micro Memory
 21.1820 +	5415  MM-5415CN PCI Memory Module with Battery Backup
 21.1821 +	5425  MM-5425CN PCI 64/66 Memory Module with Battery Backup
 21.1822  1334  Redcreek Communications, Inc
 21.1823  1335  Videomail, Inc
 21.1824  1337  Third Planet Publishing
 21.1825 @@ -4518,7 +4920,11 @@ 134e  CSTI
 21.1826  134f  Algo System Co Ltd
 21.1827  1350  Systec Co. Ltd
 21.1828  1351  Sonix Inc
 21.1829 -1353  Dassault A.T.
 21.1830 +1353  Thales Idatys
 21.1831 +	0002  Proserver
 21.1832 +	0003  PCI-FUT
 21.1833 +	0004  PCI-S0
 21.1834 +	0005  PCI-FUT-S0
 21.1835  1354  Dwave System Inc
 21.1836  1355  Kratos Analytical Ltd
 21.1837  1356  The Logical Co
 21.1838 @@ -4526,7 +4932,19 @@ 1359  Prisa Networks
 21.1839  135a  Brain Boxes
 21.1840  135b  Giganet Inc
 21.1841  135c  Quatech Inc
 21.1842 +	0010  QSC-100
 21.1843 +	0020  DSC-100
 21.1844 +	0030  DSC-200/300
 21.1845 +	0040  QSC-200/300
 21.1846 +	0050  ESC-100D
 21.1847 +	0060  ESC-100M
 21.1848  	00f0  MPAC-100 Syncronous Serial Card (Zilog 85230)
 21.1849 +	0170  QSCLP-100
 21.1850 +	0180  DSCLP-100
 21.1851 +	0190  SSCLP-100
 21.1852 +	01a0  QSCLP-200/300
 21.1853 +	01b0  DSCLP-200/300
 21.1854 +	01c0  SSCLP-200/300
 21.1855  135d  ABB Network Partner AB
 21.1856  135e  Sealevel Systems Inc
 21.1857  	7101  Single Port RS-232/422/485/530
 21.1858 @@ -4554,6 +4972,8 @@ 136d  Gigalabs Inc
 21.1859  136f  Applied Magic Inc
 21.1860  1370  ATL Products
 21.1861  1371  CNet Technology Inc
 21.1862 +	434e  GigaCard Network Adapter
 21.1863 +		1371 434e  N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)
 21.1864  1373  Silicon Vision Inc
 21.1865  1374  Silicom Ltd
 21.1866  1375  Argosystems Inc
 21.1867 @@ -4574,6 +4994,7 @@ 1383  Controlnet Inc
 21.1868  1384  Reality Simulation Systems Inc
 21.1869  1385  Netgear
 21.1870  	4100  802.11b Wireless Adapter (MA301)
 21.1871 +	4105  MA311 802.11b wireless adapter
 21.1872  	620a  GA620
 21.1873  	622a  GA622
 21.1874  	630a  GA630
 21.1875 @@ -4626,6 +5047,10 @@ 13a3  Hifn Inc.
 21.1876  	0006  6500 Public Key Processor
 21.1877  	0007  7811 Security Processor
 21.1878  	0012  7951 Security Processor
 21.1879 +	0014  78XX Security Processor
 21.1880 +	0016  8065 Security Processor
 21.1881 +	0017  8165 Security Processor
 21.1882 +	0018  8154 Security Processor
 21.1883  13a4  Rascom Inc
 21.1884  13a5  Audio Digital Imaging Inc
 21.1885  13a6  Videonics Inc
 21.1886 @@ -4676,7 +5101,10 @@ 13cd  Compatible Systems Corporation
 21.1887  13ce  Cocom A/S
 21.1888  13cf  Studio Audio & Video Ltd
 21.1889  13d0  Techsan Electronics Co Ltd
 21.1890 +# http://www.b2c2inc.com/products/pc-specs.html
 21.1891 +	2103  B2C2 Sky2PC PCI [SkyStar2]
 21.1892  13d1  Abocom Systems Inc
 21.1893 +	ab02  ADMtek Centaur-C rev 17 [D-Link DFE-680TX] CardBus Fast Ethernet Adapter
 21.1894  	ab06  RTL8139 [FE2000VX] CardBus Fast Ethernet Attached Port Adapter
 21.1895  13d2  Shark Multimedia Inc
 21.1896  13d3  IMC Networks
 21.1897 @@ -4703,7 +5131,7 @@ 13e5  Telesoft Design Ltd
 21.1898  13e6  Argosy research Inc
 21.1899  13e7  NAC Incorporated
 21.1900  13e8  Chip Express Corporation
 21.1901 -13e9  Chip Express Corporation
 21.1902 +13e9  Intraserver Technology Inc
 21.1903  13ea  Dallas Semiconductor
 21.1904  13eb  Hauppauge Computer Works Inc
 21.1905  13ec  Zydacron Inc
 21.1906 @@ -4724,9 +5152,11 @@ 13f6  C-Media Electronics Inc
 21.1907  	0101  CM8338B
 21.1908  		13f6 0101  CMI8338-031 PCI Audio Device
 21.1909  	0111  CM8738
 21.1910 +		1019 0970  P6STP-FL motherboard
 21.1911  		1043 8077  CMI8738 6-channel audio controller
 21.1912  		1043 80e2  CMI8738 6ch-MX
 21.1913  		13f6 0111  CMI8738/C3DX PCI Audio Device
 21.1914 +		1681 a000  Gamesurround MUSE XL
 21.1915  	0211  CM8738
 21.1916  13f7  Wildfire Communications
 21.1917  13f8  Ad Lib Multimedia Inc
 21.1918 @@ -4773,6 +5203,7 @@ 1410  Midas lab Inc
 21.1919  1411  Ikos Systems Inc
 21.1920  1412  IC Ensemble Inc
 21.1921  	1712  ICE1712 [Envy24]
 21.1922 +	1724  ICE1724 [Envy24HT]
 21.1923  1413  Addonics
 21.1924  1414  Microsoft Corporation
 21.1925  1415  Oxford Semiconductor Ltd
 21.1926 @@ -4870,7 +5301,7 @@ 145f  Baldor Electric Company
 21.1927  	0001  NextMove PCI
 21.1928  1460  DYNARC INC
 21.1929  1461  Avermedia Technologies Inc
 21.1930 -1462  Micro-star International Co Ltd
 21.1931 +1462  Micro-Star International Co., Ltd.
 21.1932  1463  Fast Corporation
 21.1933  1464  Interactive Circuits & Systems Ltd
 21.1934  1465  GN NETTEST Telecom DIV.
 21.1935 @@ -4881,6 +5312,7 @@ 1469  Cleveland Motion Controls
 21.1936  146a  IFR
 21.1937  146b  Parascan Technologies Ltd
 21.1938  146c  Ruby Tech Corp.
 21.1939 +	1430  FE-1430TX Fast Ethernet PCI Adapter
 21.1940  146d  Tachyon, INC.
 21.1941  146e  Williams Electronics Games, Inc.
 21.1942  146f  Multi Dimensional Consulting Inc
 21.1943 @@ -4931,6 +5363,7 @@ 149a  ANDOR Technology Ltd
 21.1944  149b  SEIKO Instruments Inc
 21.1945  149c  OVISLINK Corp.
 21.1946  149d  NEWTEK Inc
 21.1947 +	0001  Video Toaster for PC
 21.1948  149e  Mapletree Networks Inc.
 21.1949  149f  LECTRON Co Ltd
 21.1950  14a0  SOFTING GmBH
 21.1951 @@ -4949,6 +5382,7 @@ 14ac  Novaweb Technologies Inc
 21.1952  14ad  Time Space Radio AB
 21.1953  14ae  CTI, Inc
 21.1954  14af  Guillemot Corporation
 21.1955 +	7102  3D Prophet II MX
 21.1956  14b0  BST Communication Technology Ltd
 21.1957  14b1  Nextcom K.K.
 21.1958  14b2  ENNOVATE Networks Inc
 21.1959 @@ -4956,6 +5390,14 @@ 14b3  XPEED Inc
 21.1960  	0000  DSL NIC
 21.1961  14b4  PHILIPS Business Electronics B.V.
 21.1962  14b5  Creamware GmBH
 21.1963 +	0200  Scope
 21.1964 +	0300  Pulsar
 21.1965 +	0400  Pulsar2
 21.1966 +	0600  Pulsar2
 21.1967 +	0800  DSP-Board
 21.1968 +	0900  DSP-Board
 21.1969 +	0a00  DSP-Board
 21.1970 +	0b00  DSP-Board
 21.1971  14b6  Quantum Data Corp.
 21.1972  14b7  PROXIM Inc
 21.1973  	0001  Symphony 4110
 21.1974 @@ -4966,6 +5408,7 @@ 14b9  AIRONET Wireless Communications
 21.1975  	0350  PC4800
 21.1976  	4500  PC4500
 21.1977  	4800  PC4800
 21.1978 +	a504  Cisco Aironet Wireless 802.11b
 21.1979  14ba  INTERNIX Inc.
 21.1980  14bb  SEMTECH Corporation
 21.1981  14bc  Globespan Semiconductor Inc.
 21.1982 @@ -5038,40 +5481,44 @@ 14e2  INFOLIBRIA
 21.1983  14e3  AMTELCO
 21.1984  14e4  Broadcom Corporation
 21.1985  	1644  NetXtreme BCM5700 Gigabit Ethernet
 21.1986 -		1014 0277  Broadcom Vigil B5700 1000BaseTX
 21.1987 +		1014 0277  Broadcom Vigil B5700 1000Base-T
 21.1988  		1028 00d1  Broadcom BCM5700
 21.1989  		1028 0106  Broadcom BCM5700
 21.1990 -		1028 0109  Broadcom BCM5700 1000BaseTX
 21.1991 +		1028 0109  Broadcom BCM5700 1000Base-T
 21.1992  		1028 010a  Broadcom BCM5700 1000BaseTX
 21.1993 -		10b7 1000  3C996-T 1000BaseTX
 21.1994 -		10b7 1001  3C996B-T 1000BaseTX
 21.1995 -		10b7 1002  3C996C-T 1000BaseTX
 21.1996 -		10b7 1003  3C997-T 1000BaseTX Dual Port
 21.1997 -		10b7 1004  3C996-SX 1000BaseSX
 21.1998 -		10b7 1005  3C997-SX 1000BaseSX Dual Port
 21.1999 +		10b7 1000  3C996-T 1000Base-T
 21.2000 +		10b7 1001  3C996B-T 1000Base-T
 21.2001 +		10b7 1002  3C996C-T 1000Base-T
 21.2002 +		10b7 1003  3C997-T 1000Base-T Dual Port
 21.2003 +		10b7 1004  3C996-SX 1000Base-SX
 21.2004 +		10b7 1005  3C997-SX 1000Base-SX Dual Port
 21.2005  		10b7 1008  3C942 Gigabit LOM (31X31)
 21.2006 -		14e4 0002  NetXtreme 1000BaseSX
 21.2007 -		14e4 0003  NetXtreme 1000BaseSX
 21.2008 -		14e4 0004  NetXtreme 1000BaseTX
 21.2009 +		14e4 0002  NetXtreme 1000Base-SX
 21.2010 +		14e4 0003  NetXtreme 1000Base-SX
 21.2011 +		14e4 0004  NetXtreme 1000Base-T
 21.2012  		14e4 1028  NetXtreme 1000BaseTX
 21.2013 -		14e4 1644  BCM5700 1000BaseTX
 21.2014 +		14e4 1644  BCM5700 1000Base-T
 21.2015  	1645  NetXtreme BCM5701 Gigabit Ethernet
 21.2016  		0e11 007c  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
 21.2017  		0e11 007d  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)
 21.2018  		0e11 0085  NC7780 Gigabit Server Adapter (embedded, WOL)
 21.2019  		0e11 0099  NC7780 Gigabit Server Adapter (embedded, WOL)
 21.2020  		0e11 009a  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
 21.2021 -		1028 0121  Broadcom BCM5701 1000BaseTX
 21.2022 -		10b7 1004  3C996-SX 1000BaseSX
 21.2023 -		10b7 1006  3C996B-T 1000BaseTX
 21.2024 -		10b7 1007  3C1000-T 1000BaseTX
 21.2025 -		10b7 1008  3C940-BR01 1000BaseTX
 21.2026 -		14e4 0001  BCM5701 1000BaseTX
 21.2027 -		14e4 0005  BCM5701 1000BaseTX
 21.2028 -		14e4 0006  BCM5701 1000BaseTX
 21.2029 -		14e4 0007  BCM5701 1000BaseSX
 21.2030 -		14e4 0008  BCM5701 1000BaseTX
 21.2031 -		14e4 8008  BCM5701 1000BaseTX
 21.2032 +		0e11 00c1  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)
 21.2033 +		1028 0121  Broadcom BCM5701 1000Base-T
 21.2034 +		10a9 8010  SGI IO9 Gigabit Ethernet (Copper)
 21.2035 +		10a9 8011  SGI Gigabit Ethernet (Copper)
 21.2036 +		10a9 8012  SGI Gigabit Ethernet (Fiber)
 21.2037 +		10b7 1004  3C996-SX 1000Base-SX
 21.2038 +		10b7 1006  3C996B-T 1000Base-T
 21.2039 +		10b7 1007  3C1000-T 1000Base-T
 21.2040 +		10b7 1008  3C940-BR01 1000Base-T
 21.2041 +		14e4 0001  BCM5701 1000Base-T
 21.2042 +		14e4 0005  BCM5701 1000Base-T
 21.2043 +		14e4 0006  BCM5701 1000Base-T
 21.2044 +		14e4 0007  BCM5701 1000Base-SX
 21.2045 +		14e4 0008  BCM5701 1000Base-T
 21.2046 +		14e4 8008  BCM5701 1000Base-T
 21.2047  	1646  NetXtreme BCM5702 Gigabit Ethernet
 21.2048  		0e11 00bb  NC7760 1000BaseTX
 21.2049  		1028 0126  Broadcom BCM5702 1000BaseTX
 21.2050 @@ -5079,19 +5526,63 @@ 14e4  Broadcom Corporation
 21.2051  	1647  NetXtreme BCM5703 Gigabit Ethernet
 21.2052  		0e11 0099  NC7780 1000BaseTX
 21.2053  		0e11 009a  NC7770 1000BaseTX
 21.2054 +		10a9 8010  SGI IO9 Gigabit Ethernet (Copper)
 21.2055  		14e4 0009  BCM5703 1000BaseTX
 21.2056  		14e4 000a  BCM5703 1000BaseSX
 21.2057  		14e4 000b  BCM5703 1000BaseTX
 21.2058  		14e4 8009  BCM5703 1000BaseTX
 21.2059  		14e4 800a  BCM5703 1000BaseTX
 21.2060  	1648  NetXtreme BCM5704 Gigabit Ethernet
 21.2061 +		0e11 00cf  NC7772 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
 21.2062 +		0e11 00d0  NC7782 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
 21.2063 +		0e11 00d1  NC7783 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
 21.2064 +		10b7 2000  3C998-T Dual Port 10/100/1000 PCI-X
 21.2065 +		10b7 3000  3C999-T Quad Port 10/100/1000 PCI-X
 21.2066 +		1166 1648  NetXtreme CIOB-E 1000Base-T
 21.2067 +	1649  NetXtreme BCM5704S Gigabit Ethernet
 21.2068  	164d  NetXtreme BCM5702FE Gigabit Ethernet
 21.2069 -	16a6  NetXtreme BCM5702X Gigabit Ethernet
 21.2070 -	16a7  NetXtreme BCM5703X Gigabit Ethernet
 21.2071 +	1653  NetXtreme BCM5705 Gigabit Ethernet
 21.2072 +	1654  NetXtreme BCM5705 Gigabit Ethernet
 21.2073 +	165d  NetXtreme BCM5705M Gigabit Ethernet
 21.2074 +	165e  NetXtreme BCM5705M Gigabit Ethernet
 21.2075 +	166e  NetXtreme BCM5705F Gigabit Ethernet
 21.2076 +	1696  NetXtreme BCM5782 Gigabit Ethernet
 21.2077 +		14e4 000d  NetXtreme BCM5782 1000Base-T
 21.2078 +	169c  NetXtreme BCM5788 Gigabit Ethernet
 21.2079 +	16a6  NetXtreme BCM5702 Gigabit Ethernet
 21.2080 +		0e11 00bb  NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
 21.2081 +		1028 0126  BCM5702 1000Base-T
 21.2082 +		14e4 000c  BCM5702 1000Base-T
 21.2083 +		14e4 8009  BCM5702 1000Base-T
 21.2084 +	16a7  NetXtreme BCM5703 Gigabit Ethernet
 21.2085 +		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
 21.2086 +		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
 21.2087 +		14e4 0009  NetXtreme BCM5703 1000Base-T
 21.2088 +		14e4 000a  NetXtreme BCM5703 1000Base-SX
 21.2089 +		14e4 000b  NetXtreme BCM5703 1000Base-T
 21.2090 +		14e4 800a  NetXtreme BCM5703 1000Base-T
 21.2091  	16a8  NetXtreme BCM5704S Gigabit Ethernet
 21.2092 -	16c6  NetXtreme BCM5702A3 Gigabit Ethernet
 21.2093 -	16c7  NetXtreme BCM5703A3 Gigabit Ethernet
 21.2094 -	4212  BCM v.90 56k modem
 21.2095 +		10b7 2001  3C998-SX Dual Port 1000-SX PCI-X
 21.2096 +	16c6  NetXtreme BCM5702 Gigabit Ethernet
 21.2097 +		10b7 1100  3C1000B-T 10/100/1000 PCI
 21.2098 +		14e4 000c  BCM5702 1000Base-T
 21.2099 +		14e4 8009  BCM5702 1000Base-T
 21.2100 +	16c7  NetXtreme BCM5703 Gigabit Ethernet
 21.2101 +		14e4 0009  NetXtreme BCM5703 1000Base-T
 21.2102 +		14e4 000a  NetXtreme BCM5703 1000Base-SX
 21.2103 +	170d  NetXtreme BCM5901 Gigabit Ethernet
 21.2104 +	170e  NetXtreme BCM5901 Gigabit Ethernet
 21.2105 +	4210  BCM4210 iLine10 HomePNA 2.0
 21.2106 +	4211  BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem
 21.2107 +	4212  BCM4212 v.90 56k modem
 21.2108 +	4301  BCM4301 802.11b
 21.2109 +	4320  BCM94306 802.11g
 21.2110 +	4401  BCM4401 100Base-T
 21.2111 +		1043 80a8  A7V8X motherboard
 21.2112 +	4402  BCM4402 Integrated 10/100BaseT
 21.2113 +	4410  BCM4413 iLine32 HomePNA 2.0
 21.2114 +	4411  BCM4413 V.90 56k modem
 21.2115 +	4412  BCM4413 10/100BaseT
 21.2116  	5820  BCM5820 Crypto Accelerator
 21.2117  	5821  BCM5821 Crypto Accelerator
 21.2118  14e5  Pixelfusion Ltd
 21.2119 @@ -5176,6 +5667,9 @@ 14f1  Conexant
 21.2120  		122d 4302  Dell MP3930V-W(C) MiniPCI
 21.2121  	1610  ADSL AccessRunner PCI Arbitration Device
 21.2122  	1611  AccessRunner PCI ADSL Interface Device
 21.2123 +	1620  ADSL AccessRunner V2 PCI Arbitration Device
 21.2124 +	1621  AccessRunner V2 PCI ADSL Interface Device
 21.2125 +	1622  AccessRunner V2 PCI ADSL Yukon WAN Adapter
 21.2126  	1803  HCF 56k Modem
 21.2127  		0e11 0023  623-LAN Grizzly
 21.2128  		0e11 0043  623-LAN Yogi
 21.2129 @@ -5250,7 +5744,9 @@ 14f8  AUDIOCODES Inc
 21.2130  14f9  AG COMMUNICATIONS
 21.2131  14fa  WANDEL & GOCHERMANN
 21.2132  14fb  TRANSAS MARINE (UK) Ltd
 21.2133 -14fc  QUADRICS Supercomputers World
 21.2134 +14fc  Quadrics Ltd
 21.2135 +	0000  QsNet Cluster Interconnect
 21.2136 +	0001  QsNetII Cluster Interconnect
 21.2137  14fd  JAPAN Computer Industry Inc
 21.2138  14fe  ARCHTEK TELECOM Corp
 21.2139  14ff  TWINHEAD INTERNATIONAL Corp
 21.2140 @@ -5311,8 +5807,14 @@ 1522  MainPine Ltd
 21.2141  		1522 0400  RockForceDUO+ 2 Port V.92/V.44 Data/Fax/Voice Modem
 21.2142  		1522 0500  RockForceQUATRO+ 4 Port V.92/V.44 Data/Fax/Voice Modem
 21.2143  		1522 0600  RockForce+ 2 Port V.90 Data/Fax/Voice Modem
 21.2144 +		1522 0700  RockForce+ 4 Port V.90 Data/Fax/Voice Modem
 21.2145 +		1522 0800  RockForceOCTO+ 8 Port V.92/V.44 Data/Fax/Voice Modem
 21.2146  1523  MUSIC Semiconductors
 21.2147  1524  ENE Technology Inc
 21.2148 +	1211  CB1211 Cardbus Controller
 21.2149 +	1225  CB1225 Cardbus Controller
 21.2150 +	1410  CB1410 Cardbus Controller
 21.2151 +	1420  CB1420 Cardbus Controller
 21.2152  1525  IMPACT Technologies
 21.2153  1526  ISS, Inc
 21.2154  1527  SOLECTRON
 21.2155 @@ -5343,6 +5845,8 @@ 1540  PROVIDEO MULTIMEDIA Co Ltd
 21.2156  1541  MACHONE Communications
 21.2157  1542  VIVID Technology Inc
 21.2158  1543  SILICON Laboratories
 21.2159 +	3052  Intel 537 [Winmodem]
 21.2160 +	4c22  Si3036 MC'97 DAA
 21.2161  1544  DCM DATA Systems
 21.2162  1545  VISIONTEK
 21.2163  1546  IOI Technology Corp
 21.2164 @@ -5540,6 +6044,7 @@ 15e7  Get Engineering Corp
 21.2165  15e8  National Datacomm Corp
 21.2166  	0130  Wireless PCI Card
 21.2167  15e9  Pacific Digital Corp
 21.2168 +	1841  ADMA-100 DiscStaQ ATA Controller
 21.2169  15ea  Tokyo Denshi Sekei K.K.
 21.2170  15eb  Drsearch GmbH
 21.2171  15ec  Beckhoff GmbH
 21.2172 @@ -5572,6 +6077,7 @@ 1606  Europop AG
 21.2173  1607  Lava Semiconductor Manufacturing Inc
 21.2174  1608  Automated Wagering International
 21.2175  1609  Scimetric Instruments Inc
 21.2176 +1612  Telesynergy Research Inc.
 21.2177  1619  FarSite Communications Ltd
 21.2178  	0400  FarSync T2P (2 port X.21/V.35/V.24)
 21.2179  	0440  FarSync T4P (4 port X.21/V.35/V.24)
 21.2180 @@ -5580,22 +6086,46 @@ 1629  Kongsberg Spacetec AS
 21.2181  	2002  Fast Universal Data Output
 21.2182  1638  Standard Microsystems Corp [SMC]
 21.2183  	1100  SMC2602W EZConnect / Addtron AWA-100
 21.2184 +163c  Smart Link Ltd.
 21.2185 +	3052  SmartLink SmartPCI562 56K Modem
 21.2186 +	5449  SmartPCI561 Modem
 21.2187  1657  Brocade Communications Systems, Inc.
 21.2188 +165a  Epix Inc
 21.2189 +	c100  PIXCI(R) CL1 Camera Link Video Capture Board [custom QL5232]
 21.2190 +	d200  PIXCI(R) D2X Digital Video Capture Board [custom QL5232]
 21.2191 +	d300  PIXCI(R) D3X Digital Video Capture Board [custom QL5232]
 21.2192  165d  Hsing Tech. Enterprise Co., Ltd.
 21.2193  1661  Worldspace Corp.
 21.2194 -1668  Action Tec Electronics Inc
 21.2195 +1668  Actiontec Electronics Inc
 21.2196 +1681  Hercules
 21.2197 +16ab  Global Sun Technology Inc
 21.2198 +	1102  PCMCIA-to-PCI Wireless Network Bridge
 21.2199 +16be  Creatix Polymedia GmbH
 21.2200 +16ca  CENATEK Inc
 21.2201 +	0001  Rocket Drive DL
 21.2202  16ec  U.S. Robotics
 21.2203  	3685  Wireless Access PCI Adapter Model 022415
 21.2204  16f6  VideoTele.com, Inc.
 21.2205 +1705  Digital First, Inc.
 21.2206  170b  NetOctave Inc
 21.2207  170c  YottaYotta Inc.
 21.2208 +172a  Accelerated Encryption
 21.2209 +1737  Linksys
 21.2210 +	1032  Gigabit Network Adapter
 21.2211 +		1737 0015  EG1032 v2 Instant Gigabit Network Adapter
 21.2212 +	1064  Gigabit Network Adapter
 21.2213 +		1737 0016  EG1064 v2 Instant Gigabit Network Adapter
 21.2214  173b  Altima (nee Broadcom)
 21.2215  	03e8  AC1000 Gigabit Ethernet
 21.2216 +	03e9  AC1001 Gigabit Ethernet
 21.2217  	03ea  AC9100 Gigabit Ethernet
 21.2218 +		173b 0001  AC1002
 21.2219 +	03eb  AC1003 Gigabit Ethernet
 21.2220  1743  Peppercon AG
 21.2221  	8139  ROL/F-100 Fast Ethernet Adapter with ROL
 21.2222  174b  PC Partner Limited
 21.2223  175e  Sanera Systems, Inc.
 21.2224 +1787  Hightech Information System Ltd.
 21.2225  # also used by Struck Innovative Systeme for joint developments
 21.2226  1796  Research Centre Juelich
 21.2227  	0001  SIS1100 [Gigabit link]
 21.2228 @@ -5604,7 +6134,22 @@ 1796  Research Centre Juelich
 21.2229  	0004  CAMAC Controller
 21.2230  	0005  PROFIBUS
 21.2231  	0006  AMCC HOTlink
 21.2232 +1799  Belkin
 21.2233 +17af  Hightech Information System Ltd.
 21.2234 +17cc  NetChip Technology, Inc
 21.2235 +	2280  USB 2.0
 21.2236  1813  Ambient Technologies Inc
 21.2237 +	4000  HaM controllerless modem
 21.2238 +		16be 0001  V9x HAM Data Fax Modem
 21.2239 +	4100  HaM plus Data Fax Modem
 21.2240 +		16be 0002  V9x HAM 1394
 21.2241 +1851  Microtune, Inc.
 21.2242 +1852  Anritsu Corp.
 21.2243 +1888  Varisys Ltd
 21.2244 +	0301  VMFX1 FPGA PMC module
 21.2245 +	0601  VSM2 dual PMC carrier
 21.2246 +	0710  VS14x series PowerPC PCI board
 21.2247 +	0720  VS24x series PowerPC PCI board
 21.2248  1a08  Sierra semiconductor
 21.2249  	0000  SC15064
 21.2250  1b13  Jaton Corp
 21.2251 @@ -5617,7 +6162,12 @@ 1de1  Tekram Technology Co.,Ltd.
 21.2252  	2020  DC-390
 21.2253  	690c  690c
 21.2254  	dc29  DC290
 21.2255 +1fc0  Tumsan Oy
 21.2256 +	0300  E2200 Dual E1/Rawpipe Card
 21.2257 +2000  Smart Link Ltd.
 21.2258  2001  Temporal Research Ltd
 21.2259 +2003  Smart Link Ltd.
 21.2260 +2004  Smart Link Ltd.
 21.2261  21c3  21st Century Computer Corp.
 21.2262  2348  Racore
 21.2263  	2010  8142 100VG/AnyLAN
 21.2264 @@ -5629,7 +6179,11 @@ 2a15  3D Vision(???)
 21.2265  3000  Hansol Electronics Inc.
 21.2266  3142  Post Impression Systems.
 21.2267  3388  Hint Corp
 21.2268 +	0013  HiNT HC4 PCI to ISDN bridge, Multimedia audio controller
 21.2269 +	0014  HiNT HC4 PCI to ISDN bridge, Network controller
 21.2270  	0021  HB1-SE33 PCI-PCI Bridge
 21.2271 +	101a  E.Band [AudioTrak Inca88]
 21.2272 +	101b  E.Band [AudioTrak Inca88]
 21.2273  	8011  VXPro II Chipset
 21.2274  		3388 8011  VXPro II Chipset CPU to PCI Bridge
 21.2275  	8012  VXPro II Chipset
 21.2276 @@ -5660,6 +6214,8 @@ 3d3d  3DLabs
 21.2277  		3d3d 0127  Permedia3 Create!
 21.2278  	000a  GLINT R3
 21.2279  		3d3d 0121  Oxygen VX1
 21.2280 +	000c  GLINT R3 [Oxygen VX1]
 21.2281 +		3d3d 0144  Oxygen VX1-4X AGP [Permedia 4]
 21.2282  	0100  Permedia II 2D+3D
 21.2283  	1004  Permedia
 21.2284  	3d04  Permedia
 21.2285 @@ -5687,6 +6243,7 @@ 416c  Aladdin Knowledge Systems
 21.2286  	0100  AladdinCARD
 21.2287  	0200  CPC
 21.2288  4444  Internext Compression Inc
 21.2289 +	0803  iTVC15 MPEG-2 Encoder
 21.2290  4468  Bridgeport machines
 21.2291  4594  Cogetec Informatique Inc
 21.2292  45fb  Baldor Electric Company
 21.2293 @@ -5732,6 +6289,7 @@ 5136  S S Technologies
 21.2294  5143  Qualcomm Inc
 21.2295  5145  Ensoniq (Old)
 21.2296  	3031  Concert AudioPCI
 21.2297 +5168  Animation Technologies Inc.
 21.2298  5301  Alliance Semiconductor Corp.
 21.2299  	0001  ProMotion aT3D
 21.2300  5333  S3 Inc.
 21.2301 @@ -5840,7 +6398,9 @@ 5333  S3 Inc.
 21.2302  	8c10  86C270-294 Savage/MX-MV
 21.2303  	8c11  82C270-294 Savage/MX
 21.2304  	8c12  86C270-294 Savage/IX-MV
 21.2305 +		1014 017f  ThinkPad T20
 21.2306  	8c13  86C270-294 Savage/IX
 21.2307 +		1179 0001  Magnia Z310
 21.2308  	8c22  SuperSavage MX/128
 21.2309  	8c24  SuperSavage MX/64
 21.2310  	8c26  SuperSavage MX/64C
 21.2311 @@ -5851,10 +6411,10 @@ 5333  S3 Inc.
 21.2312  	8c2e  SuperSavage IX/C SDR
 21.2313  		1014 01fc  ThinkPad T23 (2647-4MG)
 21.2314  	8c2f  SuperSavage IX/C DDR
 21.2315 -# Integrated in VIA ProSavage PN133 North Bridge
 21.2316 -	8d01  VT8603 [ProSavage PN133] AGP4X VGA Controller (Twister)
 21.2317 +	8d01  86C380 [ProSavageDDR K4M266]
 21.2318  	8d02  VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)
 21.2319 -	8d04  VT8751 [ProSavageDDR P4M266] VGA Controller
 21.2320 +	8d03  VT8751 [ProSavageDDR P4M266]
 21.2321 +	8d04  VT8375 [ProSavage8 KM266/KL266]
 21.2322  	9102  86C410 Savage 2000
 21.2323  		1092 5932  Viper II Z200
 21.2324  		1092 5934  Viper II Z200
 21.2325 @@ -5866,6 +6426,7 @@ 5333  S3 Inc.
 21.2326  		1092 5a57  Viper II Z200
 21.2327  	ca00  SonicVibes
 21.2328  544c  Teralogic Inc
 21.2329 +	0350  TL880-based HDTV/ATSC tuner
 21.2330  5455  Technische University Berlin
 21.2331  	4458  S5933
 21.2332  5519  Cnet Technologies, Inc.
 21.2333 @@ -5873,6 +6434,7 @@ 5544  Dunord Technologies
 21.2334  	0001  I-30xx Scanner Interface
 21.2335  5555  Genroco, Inc
 21.2336  	0003  TURBOstor HFP-832 [HiPPI NIC]
 21.2337 +5654  VoiceTronix Pty Ltd
 21.2338  5700  Netpower
 21.2339  6356  UltraStor
 21.2340  6374  c't Magazin für Computertechnik
 21.2341 @@ -5908,7 +6470,7 @@ 8086  Intel Corp.
 21.2342  		0e11 b123  NC1634 Gigabit Ethernet Adapter (1000-SX)
 21.2343  		1014 0119  Netfinity Gigabit Ethernet SX Adapter
 21.2344  		8086 1000  PRO/1000 Gigabit Server Adapter
 21.2345 -	1001  82543GC Gigabit Ethernet Controller
 21.2346 +	1001  82543GC Gigabit Ethernet Controller (Fiber)
 21.2347  		0e11 004a  NC6136 Gigabit Server Adapter
 21.2348  		1014 01ea  Netfinity Gigabit Ethernet SX Adapter
 21.2349  		8086 1003  PRO/1000 F Server Adapter
 21.2350 @@ -5916,44 +6478,46 @@ 8086  Intel Corp.
 21.2351  		8086 200e  Pro 100 LAN+Modem 56 Cardbus II
 21.2352  		8086 2013  Pro 100 SR Mobile Combo Adapter
 21.2353  		8086 2017  Pro 100 S Combo Mobile Adapter
 21.2354 -	1004  82543GC Gigabit Ethernet Controller
 21.2355 +	1004  82543GC Gigabit Ethernet Controller (Copper)
 21.2356  		0e11 0049  NC7132 Gigabit Upgrade Module
 21.2357  		0e11 b1a4  NC7131 Gigabit Server Adapter
 21.2358  		1014 10f2  Gigabit Ethernet Server Adapter
 21.2359  		8086 1004  PRO/1000 T Server Adapter
 21.2360  		8086 2004  PRO/1000 T Server Adapter
 21.2361 -	1008  82544EI Gigabit Ethernet Controller
 21.2362 +	1008  82544EI Gigabit Ethernet Controller (Copper)
 21.2363  		8086 1107  PRO/1000 XT Server Adapter
 21.2364  		8086 2107  PRO/1000 XT Server Adapter
 21.2365  		8086 2110  PRO/1000 XT Server Adapter
 21.2366 -	1009  82544EI Gigabit Ethernet Controller
 21.2367 +	1009  82544EI Gigabit Ethernet Controller (Fiber)
 21.2368  		8086 1109  PRO/1000 XF Server Adapter
 21.2369  		8086 2109  PRO/1000 XF Server Adapter
 21.2370 -	100c  82544GC Gigabit Ethernet Controller
 21.2371 +	100c  82544GC Gigabit Ethernet Controller (Copper)
 21.2372  		8086 1112  PRO/1000 T Desktop Adapter
 21.2373  		8086 2112  PRO/1000 T Desktop Adapter
 21.2374 -	100d  82544GC Gigabit Ethernet Controller
 21.2375 +	100d  82544GC Gigabit Ethernet Controller (LOM)
 21.2376  	100e  82540EM Gigabit Ethernet Controller
 21.2377  		8086 001e  PRO/1000 MT Desktop Adapter
 21.2378  		8086 002e  PRO/1000 MT Desktop Adapter
 21.2379 -	100f  82545EM Gigabit Ethernet Controller
 21.2380 +	100f  82545EM Gigabit Ethernet Controller (Copper)
 21.2381  		8086 1001  PRO/1000 MT Server Adapter
 21.2382 -	1010  82546EB Gigabit Ethernet Controller
 21.2383 +	1010  82546EB Gigabit Ethernet Controller (Copper)
 21.2384  		8086 1011  PRO/1000 MT Dual Port Server Adapter
 21.2385 -	1011  82545EM Gigabit Ethernet Controller
 21.2386 +	1011  82545EM Gigabit Ethernet Controller (Fiber)
 21.2387  		8086 1002  PRO/1000 MF Server Adapter
 21.2388 -	1012  82546EB Gigabit Ethernet Controller
 21.2389 +	1012  82546EB Gigabit Ethernet Controller (Fiber)
 21.2390  		8086 1012  PRO/1000 MF Dual Port Server Adapter
 21.2391 +	1015  82540EM Gigabit Ethernet Controller (LOM)
 21.2392  	1029  82559 Ethernet Controller
 21.2393  	1030  82559 InBusiness 10/100
 21.2394  	1031  82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller
 21.2395 -		1014 0209  ThinkPad A30p (2653-64G)
 21.2396 +		1014 0209  ThinkPad A/T/X Series
 21.2397  		104d 80e7  Vaio PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2398  		107b 5350  EtherExpress PRO/100 VE
 21.2399  		1179 0001  EtherExpress PRO/100 VE
 21.2400  		144d c000  EtherExpress PRO/100 VE
 21.2401  		144d c001  EtherExpress PRO/100 VE
 21.2402  		144d c003  EtherExpress PRO/100 VE
 21.2403 +		144d c006  vpr Matrix 170B4
 21.2404  	1032  82801CAM (ICH3) PRO/100 VE Ethernet Controller
 21.2405  	1033  82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller
 21.2406  	1034  82801CAM (ICH3) PRO/100 VM Ethernet Controller
 21.2407 @@ -5967,16 +6531,25 @@ 8086  Intel Corp.
 21.2408  	103c  82801BD PRO/100 VM (CNR) Ethernet Controller
 21.2409  	103d  82801BD PRO/100 VE (MOB) Ethernet Controller
 21.2410  	103e  82801BD PRO/100 VM (MOB) Ethernet Controller
 21.2411 +	1040  536EP Data Fax Modem
 21.2412 +		16be 1040  V.9X DSP Data Fax Modem
 21.2413 +	1043  PRO/Wireless LAN 2100 3B Mini PCI Adapter
 21.2414  	1059  82551QM Ethernet Controller
 21.2415  	1130  82815 815 Chipset Host Bridge and Memory Controller Hub
 21.2416 +		1025 1016  Travelmate 612 TX
 21.2417  		1043 8027  TUSL2-C Mainboard
 21.2418  		104d 80df  Vaio PCG-FX403
 21.2419 +		8086 4532  D815EEA2 mainboard
 21.2420 +		8086 4557  D815EGEW Mainboard
 21.2421  	1131  82815 815 Chipset AGP Bridge
 21.2422  	1132  82815 CGC [Chipset Graphics Controller]
 21.2423  		1025 1016  Travelmate 612 TX
 21.2424  		104d 80df  Vaio PCG-FX403
 21.2425 +		8086 4532  D815EEA2 Mainboard
 21.2426 +		8086 4557  D815EGEW Mainboard
 21.2427  	1161  82806AA PCI64 Hub Advanced Programmable Interrupt Controller
 21.2428  		8086 1161  82806AA PCI64 Hub APIC
 21.2429 +	1162  Xscale 80200 Big Endian Companion Chip
 21.2430  	1200  Intel IXP1200 Network Processor
 21.2431  		172a 0000  AEP SSL Accelerator
 21.2432  	1209  82559ER
 21.2433 @@ -6018,13 +6591,16 @@ 8086  Intel Corp.
 21.2434  		1014 01f2  10/100 Ethernet Server Adapter
 21.2435  		1014 0207  Ethernet Pro/100 S
 21.2436  		1014 0232  10/100 Dual Port Server Adapter
 21.2437 +		1014 023a  ThinkPad R30
 21.2438  		1014 105c  Netfinity 10/100
 21.2439 +		1014 2205  ThinkPad A22p
 21.2440  		1014 305c  10/100 EtherJet Management Adapter
 21.2441  		1014 405c  10/100 EtherJet Adapter with Alert on LAN
 21.2442  		1014 505c  10/100 EtherJet Secure Management Adapter
 21.2443  		1014 605c  10/100 EtherJet Secure Management Adapter
 21.2444  		1014 705c  10/100 Netfinity 10/100 Ethernet Security Adapter
 21.2445  		1014 805c  10/100 Netfinity 10/100 Ethernet Security Adapter
 21.2446 +		1028 009b  PowerEdge 2550
 21.2447  		1033 8000  PC-9821X-B06
 21.2448  		1033 8016  PK-UG-X006
 21.2449  		1033 801f  PK-UG-X006
 21.2450 @@ -6155,6 +6731,7 @@ 8086  Intel Corp.
 21.2451  		8086 8000  82806AA PCI64 Hub Controller (HRes)
 21.2452  	1460  82870P2 P64H2 Hub PCI Bridge
 21.2453  	1461  82870P2 P64H2 I/OxAPIC
 21.2454 +		15d9 3480  P4DP6
 21.2455  	1462  82870P2 P64H2 Hot Plug Controller
 21.2456  	1960  80960RP [i960RP Microprocessor]
 21.2457  		101e 0431  MegaRAID 431 RAID Controller
 21.2458 @@ -6206,20 +6783,34 @@ 8086  Intel Corp.
 21.2459  	2428  82801AB PCI Bridge
 21.2460  	2440  82801BA ISA Bridge (LPC)
 21.2461  	2442  82801BA/BAM USB (Hub #1)
 21.2462 +		1014 01c6  Netvista A40/A40p
 21.2463 +		1025 1016  Travelmate 612 TX
 21.2464  		104d 80df  Vaio PCG-FX403
 21.2465  		147b 0507  TH7II-RAID
 21.2466 +		8086 4532  D815EEA2 mainboard
 21.2467 +		8086 4557  D815EGEW Mainboard
 21.2468  	2443  82801BA/BAM SMBus
 21.2469 +		1014 01c6  Netvista A40/A40p
 21.2470 +		1025 1016  Travelmate 612 TX
 21.2471  		1043 8027  TUSL2-C Mainboard
 21.2472  		104d 80df  Vaio PCG-FX403
 21.2473  		147b 0507  TH7II-RAID
 21.2474 +		8086 4532  D815EEA2 mainboard
 21.2475 +		8086 4557  D815EGEW Mainboard
 21.2476  	2444  82801BA/BAM USB (Hub #2)
 21.2477 +		1025 1016  Travelmate 612 TX
 21.2478  		104d 80df  Vaio PCG-FX403
 21.2479  		147b 0507  TH7II-RAID
 21.2480 +		8086 4532  D815EEA2 mainboard
 21.2481  	2445  82801BA/BAM AC'97 Audio
 21.2482 +		1014 01c6  Netvista A40/A40p
 21.2483 +		1025 1016  Travelmate 612 TX
 21.2484  		104d 80df  Vaio PCG-FX403
 21.2485  		1462 3370  STAC9721 AC
 21.2486  		147b 0507  TH7II-RAID
 21.2487 -	2446  82801BA/BAM AC'97 Modem
 21.2488 +		8086 4557  D815EGEW Mainboard
 21.2489 +	2446  Intel 537 [82801BA/BAM AC'97 Modem]
 21.2490 +		1025 1016  Travelmate 612 TX
 21.2491  		104d 80df  Vaio PCG-FX403
 21.2492  	2448  82801BAM/CAM PCI Bridge
 21.2493  	2449  82801BA/BAM/CA/CAM Ethernet Controller
 21.2494 @@ -6236,8 +6827,12 @@ 8086  Intel Corp.
 21.2495  		1014 023d  EtherExpress PRO/100 VE
 21.2496  		1014 0244  EtherExpress PRO/100 VE
 21.2497  		1014 0245  EtherExpress PRO/100 VE
 21.2498 +		1014 0265  PRO/100 VE Desktop Connection
 21.2499 +		1014 0267  PRO/100 VE Desktop Connection
 21.2500 +		1014 026a  PRO/100 VE Desktop Connection
 21.2501  		109f 315d  EtherExpress PRO/100 VE
 21.2502  		109f 3181  EtherExpress PRO/100 VE
 21.2503 +		1179 ff01  PRO/100 VE Network Connection
 21.2504  		1186 7801  EtherExpress PRO/100 VE
 21.2505  		144d 2602  HomePNA 1M CNR
 21.2506  		8086 3010  EtherExpress PRO/100 VE
 21.2507 @@ -6253,10 +6848,13 @@ 8086  Intel Corp.
 21.2508  		1025 1016  Travelmate 612TX
 21.2509  		104d 80df  Vaio PCG-FX403
 21.2510  	244b  82801BA IDE U100
 21.2511 +		1014 01c6  Netvista A40/A40p
 21.2512  		1043 8027  TUSL2-C Mainboard
 21.2513  		147b 0507  TH7II-RAID
 21.2514 +		8086 4532  D815EEA2 mainboard
 21.2515 +		8086 4557  D815EGEW Mainboard
 21.2516  	244c  82801BAM ISA Bridge (LPC)
 21.2517 -	244e  82801BA/CA/DB PCI Bridge
 21.2518 +	244e  82801BA/CA/DB/EB PCI Bridge
 21.2519  	2450  82801E ISA Bridge (LPC)
 21.2520  	2452  82801E USB
 21.2521  	2453  82801E SMBus
 21.2522 @@ -6264,41 +6862,80 @@ 8086  Intel Corp.
 21.2523  	245b  82801E IDE U100
 21.2524  	245d  82801E Ethernet Controller 1
 21.2525  	245e  82801E PCI Bridge
 21.2526 -	2480  82801CA ISA Bridge (LPC)
 21.2527 +	2480  82801CA LPC Interface Controller
 21.2528  	2482  82801CA/CAM USB (Hub #1)
 21.2529 -		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2530 +		1014 0220  ThinkPad A/T/X Series
 21.2531  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2532 -	2483  82801CA/CAM SMBus
 21.2533 -		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2534 +		15d9 3480  P4DP6
 21.2535 +		8086 1958  vpr Matrix 170B4
 21.2536 +	2483  82801CA/CAM SMBus Controller
 21.2537 +		1014 0220  ThinkPad A/T/X Series
 21.2538  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2539 +		15d9 3480  P4DP6
 21.2540 +		8086 1958  vpr Matrix 170B4
 21.2541  	2484  82801CA/CAM USB (Hub #2)
 21.2542 -		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2543 -		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2544 -	2485  82801CA/CAM AC'97 Audio
 21.2545 -		1014 0222  ThinkPad T23 (2647-4MG)
 21.2546 +		1014 0220  ThinkPad A/T/X Series
 21.2547  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2548 -	2486  82801CA/CAM AC'97 Modem
 21.2549 -		1014 0223  ThinkPad A30p (2653-64G)
 21.2550 +		15d9 3480  P4DP6
 21.2551 +		8086 1958  vpr Matrix 170B4
 21.2552 +	2485  82801CA/CAM AC'97 Audio Controller
 21.2553 +		1014 0222  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2554 +		1014 0508  ThinkPad T30
 21.2555 +		1014 051c  ThinkPad A/T/X Series
 21.2556 +		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2557 +		144d c006  vpr Matrix 170B4
 21.2558 +	2486  82801CA/CAM AC'97 Modem Controller
 21.2559 +		1014 0223  ThinkPad A/T/X Series
 21.2560  		1014 0503  ThinkPad R31 2656BBG
 21.2561 +		1014 051a  ThinkPad A/T/X Series
 21.2562  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2563 +		1179 0001  Toshiba Satellite 1110 Z15 internal Modem
 21.2564  		134d 4c21  Dell Inspiron 2100 internal modem
 21.2565 +		144d 2115  vpr Matrix 170B4 internal modem
 21.2566 +		14f1 5421  MD56ORD V.92 MDC Modem
 21.2567  	2487  82801CA/CAM USB (Hub #3)
 21.2568 -		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2569 +		1014 0220  ThinkPad A/T/X Series
 21.2570  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2571 +		15d9 3480  P4DP6
 21.2572 +		8086 1958  vpr Matrix 170B4
 21.2573  	248a  82801CAM IDE U100
 21.2574 -		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2575 +		1014 0220  ThinkPad A/T/X Series
 21.2576  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2577 -	248b  82801CA IDE U100
 21.2578 +		8086 1958  vpr Matrix 170B4
 21.2579 +	248b  82801CA Ultra ATA Storage Controller
 21.2580 +		15d9 3480  P4DP6
 21.2581  	248c  82801CAM ISA Bridge (LPC)
 21.2582 -	24c0  82801DB ISA Bridge (LPC)
 21.2583 +	24c0  82801DB LPC Interface Controller
 21.2584 +		1462 5800  845PE Max (MS-6580)
 21.2585  	24c2  82801DB USB (Hub #1)
 21.2586 -	24c3  82801DB SMBus
 21.2587 +		1462 5800  845PE Max (MS-6580)
 21.2588 +	24c3  82801DB/DBM SMBus Controller
 21.2589 +		1462 5800  845PE Max (MS-6580)
 21.2590  	24c4  82801DB USB (Hub #2)
 21.2591 -	24c5  82801DB AC'97 Audio
 21.2592 -	24c6  82801DB AC'97 Modem
 21.2593 +		1462 5800  845PE Max (MS-6580)
 21.2594 +	24c5  82801DB AC'97 Audio Controller
 21.2595 +		1462 5800  845PE Max (MS-6580)
 21.2596 +	24c6  82801DB AC'97 Modem Controller
 21.2597  	24c7  82801DB USB (Hub #3)
 21.2598 -	24cb  82801DB ICH4 IDE
 21.2599 -	24cd  82801DB USB EHCI Controller
 21.2600 +		1462 5800  845PE Max (MS-6580)
 21.2601 +	24ca  82801DBM Ultra ATA Storage Controller
 21.2602 +	24cb  82801DB Ultra ATA Storage Controller
 21.2603 +		1462 5800  845PE Max (MS-6580)
 21.2604 +	24cc  82801DBM LPC Interface Controller
 21.2605 +	24cd  82801DB USB2
 21.2606 +		1462 3981  845PE Max (MS-6580) Onboard USB EHCI Controller
 21.2607 +	24d0  82801EB LPC Interface Controller
 21.2608 +	24d1  82801EB Ultra ATA Storage Controller
 21.2609 +	24d2  82801EB USB
 21.2610 +	24d3  82801EB SMBus Controller
 21.2611 +	24d4  82801EB USB
 21.2612 +	24d5  82801EB AC'97 Audio Controller
 21.2613 +	24d6  82801EB AC'97 Modem Controller
 21.2614 +	24d7  82801EB USB
 21.2615 +	24db  82801EB Ultra ATA Storage Controller
 21.2616 +	24dc  82801EB LPC Interface Controller
 21.2617 +	24dd  82801EB USB2
 21.2618 +	24de  82801EB USB
 21.2619  	2500  82820 820 (Camino) Chipset Host Bridge (MCH)
 21.2620  		1028 0095  Precision Workstation 220 Chipset
 21.2621  		1043 801c  P3C-2000 system chipset
 21.2622 @@ -6314,24 +6951,48 @@ 8086  Intel Corp.
 21.2623  	2532  82850 850 (Tehama) Chipset AGP Bridge
 21.2624  	2533  82860 860 (Wombat) Chipset AGP Bridge
 21.2625  	2534  82860 860 (Wombat) Chipset PCI Bridge
 21.2626 -	2540  e7500 [Plumas] DRAM Controller
 21.2627 -	2541  e7500 [Plumas] DRAM Controller Error Reporting
 21.2628 -	2543  e7500 [Plumas] HI_B Virtual PCI Bridge (F0)
 21.2629 -	2544  e7500 [Plumas] HI_B Virtual PCI Bridge (F1)
 21.2630 -	2545  e7500 [Plumas] HI_C Virtual PCI Bridge (F0)
 21.2631 -	2546  e7500 [Plumas] HI_C Virtual PCI Bridge (F1)
 21.2632 -	2547  e7500 [Plumas] HI_D Virtual PCI Bridge (F0)
 21.2633 -	2548  e7500 [Plumas] HI_D Virtual PCI Bridge (F1)
 21.2634 +	2540  E7500 Memory Controller Hub
 21.2635 +		15d9 3480  P4DP6
 21.2636 +	2541  E7000 Series Host RASUM Controller
 21.2637 +		15d9 3480  P4DP6
 21.2638 +	2543  E7000 Series Hub Interface B PCI-to-PCI Bridge
 21.2639 +	2544  E7000 Series Hub Interface B RASUM Controller
 21.2640 +	2545  E7000 Series Hub Interface C PCI-to-PCI Bridge
 21.2641 +	2546  E7000 Series Hub Interface C RASUM Controller
 21.2642 +	2547  E7000 Series Hub Interface D PCI-to-PCI Bridge
 21.2643 +	2548  E7000 Series Hub Interface D RASUM Controller
 21.2644 +	254c  E7501 Memory Controller Hub
 21.2645 +	2550  E7505 Memory Controller Hub
 21.2646 +	2551  E7000 Series RAS Controller
 21.2647 +	2552  E7000 Series Processor to AGP Controller
 21.2648 +	2553  E7000 Series Hub Interface B PCI-to-PCI Bridge
 21.2649 +	2554  E7000 Series Hub Interface B PCI-to-PCI Bridge RAS Controller
 21.2650 +	255d  E7205 Memory Controller Hub
 21.2651  	2560  82845G/GL [Brookdale-G] Chipset Host Bridge
 21.2652 +		1462 5800  845PE Max (MS-6580)
 21.2653  	2561  82845G/GL [Brookdale-G] Chipset AGP Bridge
 21.2654  	2562  82845G/GL [Brookdale-G] Chipset Integrated Graphics Device
 21.2655 +	2570  82865G/PE/P Processor to I/O Controller
 21.2656 +	2571  82865G/PE/P Processor to AGP Controller
 21.2657 +	2572  82865G Integrated Graphics Device
 21.2658 +	2573  82865G/PE/P Processor to PCI to CSA Bridge
 21.2659 +	2576  82864G/PE/P Processor to I/O Memory Interface
 21.2660 +	2578  82875P Memory Controller Hub
 21.2661 +	2579  82875P Processor to AGP Controller
 21.2662 +	257b  82875P Processor to PCI to CSA Bridge
 21.2663 +	257e  82875P Processor to I/O Memory Interface
 21.2664  	3092  Integrated RAID
 21.2665 +	3340  82855PM Processor to I/O Controller
 21.2666 +	3341  82855PM Processor to AGP Controller
 21.2667  	3575  82830 830 Chipset Host Bridge
 21.2668 -		1014 021d  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
 21.2669 +		1014 021d  ThinkPad A/T/X Series
 21.2670  		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 21.2671  	3576  82830 830 Chipset AGP Bridge
 21.2672  	3577  82830 CGC [Chipset Graphics Controller]
 21.2673 +		1014 0513  ThinkPad A/T/X Series
 21.2674  	3578  82830 830 Chipset Host Bridge
 21.2675 +	3580  82852/855GM Host Bridge
 21.2676 +	3582  82852/855GM Integrated Graphics Device
 21.2677  	5200  EtherExpress PRO/100 Intelligent Server
 21.2678  	5201  EtherExpress PRO/100 Intelligent Server
 21.2679  		8086 0001  EtherExpress PRO/100 Server Ethernet Adapter
 21.2680 @@ -6347,6 +7008,7 @@ 8086  Intel Corp.
 21.2681  	7113  82371AB/EB/MB PIIX4 ACPI
 21.2682  	7120  82810 GMCH [Graphics Memory Controller Hub]
 21.2683  	7121  82810 CGC [Chipset Graphics Controller]
 21.2684 +		8086 4341  Cayman (CA810) Mainboard
 21.2685  	7122  82810 DC-100 GMCH [Graphics Memory Controller Hub]
 21.2686  	7123  82810 DC-100 CGC [Chipset Graphics Controller]
 21.2687  	7124  82810E DC-133 GMCH [Graphics Memory Controller Hub]
 21.2688 @@ -6358,6 +7020,7 @@ 8086  Intel Corp.
 21.2689  	7181  440LX/EX - 82443LX/EX AGP bridge
 21.2690  	7190  440BX/ZX/DX - 82443BX/ZX/DX Host bridge
 21.2691  		0e11 0500  Armada 1750 Laptop System Chipset
 21.2692 +		0e11 b110  Armada M700
 21.2693  		1179 0001  Toshiba Tecra 8100 Laptop System Chipset
 21.2694  	7191  440BX/ZX/DX - 82443BX/ZX/DX AGP bridge
 21.2695  	7192  440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled)
 21.2696 @@ -6476,6 +7139,8 @@ 9004  Adaptec
 21.2697  	7478  AHA-2944/2944W / AIC-7874
 21.2698  	7578  AHA-3944/3944W / AIC-7875
 21.2699  	7678  AHA-4944W/UW / AIC-7876
 21.2700 +	7710  ANA-7711F Network Accelerator Card (NAC) - Optical
 21.2701 +	7711  ANA-7711C Network Accelerator Card (NAC) - Copper
 21.2702  	7778  AIC-787x
 21.2703  	7810  AIC-7810
 21.2704  	7815  AIC-7815 RAID+Memory Controller IC
 21.2705 @@ -6552,15 +7217,49 @@ 9005  Adaptec
 21.2706  		9005 62a1  19160 Ultra160 SCSI Controller
 21.2707  	0083  AIC-7892D U160/m
 21.2708  	008f  AIC-7892P U160/m
 21.2709 +		1179 0001  Magnia Z310
 21.2710 +		15d9 9005  Onboard SCSI Host Adapter
 21.2711  	00c0  AHA-3960D / AIC-7899A U160/m
 21.2712  		0e11 f620  Compaq 64-Bit/66MHz Dual Channel Wide Ultra3 SCSI Adapter
 21.2713  		9005 f620  AHA-3960D U160/m
 21.2714  	00c1  AIC-7899B U160/m
 21.2715  	00c3  AIC-7899D U160/m
 21.2716  	00c5  RAID subsystem HBA
 21.2717 +		1028 00c5  PowerEdge 2550
 21.2718  	00cf  AIC-7899P U160/m
 21.2719 +		1028 00d1  PowerEdge 2550
 21.2720 +		10f1 2462  Thunder K7 S2462
 21.2721 +		15d9 9005  Onboard SCSI Host Adapter
 21.2722 +	0250  ServeRAID Controller
 21.2723 +		1014 0279  ServeRAID-xx
 21.2724 +		1014 028c  ServeRAID-xx
 21.2725  	0285  AAC-RAID
 21.2726  		1028 0287  PowerEdge Expandable RAID Controller 320/DC
 21.2727 +	8000  ASC-29320A U320
 21.2728 +	800f  AIC-7901 U320
 21.2729 +	8010  ASC-39320 U320
 21.2730 +	8011  ASC-32320D U320
 21.2731 +		0e11 00ac  U320
 21.2732 +		9005 0041  ASC-39320D U320
 21.2733 +	8012  ASC-29320 U320
 21.2734 +	8013  ASC-29320B U320
 21.2735 +	8014  ASC-29320LP U320
 21.2736 +	801e  AIC-7901A U320
 21.2737 +	801f  AIC-7902 U320
 21.2738 +	8080  ASC-29320A U320 w/HostRAID
 21.2739 +	808f  AIC-7901 U320 w/HostRAID
 21.2740 +	8090  ASC-39320 U320 w/HostRAID
 21.2741 +	8091  ASC-39320D U320 w/HostRAID
 21.2742 +	8092  ASC-29320 U320 w/HostRAID
 21.2743 +	8093  ASC-29320B U320 w/HostRAID
 21.2744 +	8094  ASC-29320LP U320 w/HostRAID
 21.2745 +	8095  ASC-39320(B) U320 w/HostRAID
 21.2746 +	8096  ASC-39320A U320 w/HostRAID
 21.2747 +	8097  ASC-29320ALP U320 w/HostRAID
 21.2748 +	809c  ASC-39320D(B) U320 w/HostRAID
 21.2749 +	809d  AIC-7902(B) U320 w/HostRAID
 21.2750 +	809e  AIC-7901A U320 w/HostRAID
 21.2751 +	809f  AIC-7902 U320 w/HostRAID
 21.2752  907f  Atronics
 21.2753  	2015  IDE-2015PL
 21.2754  919a  Gigapixel Corp
 21.2755 @@ -6581,6 +7280,8 @@ a727  3Com Corporation
 21.2756  aa42  Scitex Digital Video
 21.2757  ac1e  Digital Receiver Technology Inc
 21.2758  b1b3  Shiva Europe Limited
 21.2759 +# Pinnacle should be 11bd, but they got it wrong several times --mj
 21.2760 +bd11  Pinnacle Systems, Inc. (Wrong ID)
 21.2761  c001  TSI Telsys
 21.2762  c0a9  Micron/Crucial Technology
 21.2763  c0de  Motorola
 21.2764 @@ -6588,6 +7289,9 @@ c0fe  Motion Engineering, Inc.
 21.2765  ca50  Varian Australia Pty Ltd
 21.2766  cafe  Chrysalis-ITS
 21.2767  cccc  Catapult Communications
 21.2768 +cddd  Tyzx, Inc.
 21.2769 +	0101  DeepSea 1 High Speed Stereo Vision Frame Grabber
 21.2770 +	0200  DeepSea 2 High Speed Stereo Vision Frame Grabber
 21.2771  d4d4  Dy4 Systems Inc
 21.2772  	0601  PCI Mezzanine Card
 21.2773  d531  I+ME ACTIA GmbH
 21.2774 @@ -6596,12 +7300,17 @@ dead  Indigita Corporation
 21.2775  e000  Winbond
 21.2776  	e000  W89C940
 21.2777  e159  Tiger Jet Network Inc.
 21.2778 -	0001  Model 300 128k
 21.2779 +	0001  Intel 537
 21.2780  		0059 0001  128k ISDN-S/T Adapter
 21.2781  		0059 0003  128k ISDN-U Adapter
 21.2782  	0002  Tiger100APC ISDN chipset
 21.2783  e4bf  EKF Elektronik GmbH
 21.2784  ea01  Eagle Technology
 21.2785 +# The main chip of all these devices is by Xilinx -> It could also be a Xilinx ID.
 21.2786 +ea60  RME
 21.2787 +	9896  Digi32
 21.2788 +	9897  Digi32 Pro
 21.2789 +	9898  Digi32/8
 21.2790  eabb  Aashima Technology B.V.
 21.2791  eace  Endace Measurement Systems, Ltd
 21.2792  	3100  DAG 3.10 OC-3/OC-12
 21.2793 @@ -6617,15 +7326,29 @@ eace  Endace Measurement Systems, Ltd
 21.2794  	422e  DAG 4.2E Dual Gigabit Ethernet
 21.2795  ec80  Belkin Corporation
 21.2796  	ec00  F5D6000
 21.2797 -ecc0  Echo Corporation
 21.2798 +ecc0  Echo Digital Audio Corporation
 21.2799 +	0050  Gina24_301
 21.2800 +	0051  Gina24_361
 21.2801 +	0060  Layla24
 21.2802 +	0070  Mona_301_80
 21.2803 +	0071  Mona_301_66
 21.2804 +	0072  Mona_361
 21.2805 +	0080  Mia
 21.2806  edd8  ARK Logic Inc
 21.2807  	a091  1000PV [Stingray]
 21.2808  	a099  2000PV [Stingray]
 21.2809  	a0a1  2000MT
 21.2810  	a0a9  2000MI
 21.2811 +f1d0  AJA Video
 21.2812 +# All boards I have seen have this ID not efac, though all docs say efac...
 21.2813 +	cafe  KONA SD SMPTE 259M I/O
 21.2814 +	efac  KONA SD SMPTE 259M I/O
 21.2815 +	facd  KONA HD SMPTE 292M I/O
 21.2816  fa57  Fast Search & Transfer ASA
 21.2817  febd  Ultraview Corp.
 21.2818 -feda  Epigram Inc
 21.2819 +feda  Broadcom Inc (nee Epigram)
 21.2820 +	a0fa  BCM4210 iLine10 HomePNA 2.0
 21.2821 +	a10e  BCM4230 iLine10 HomePNA 2.0
 21.2822  fffe  VMWare Inc
 21.2823  	0710  Virtual SVGA
 21.2824  ffff  Illegal Vendor ID
    22.1 --- a/xen/drivers/pci/quirks.c	Mon Apr 05 08:23:33 2004 +0000
    22.2 +++ b/xen/drivers/pci/quirks.c	Mon Apr 05 13:12:24 2004 +0000
    22.3 @@ -14,7 +14,7 @@
    22.4  
    22.5  #include <xen/config.h>
    22.6  #include <xen/types.h>
    22.7 -#include <xen/lib.h>
    22.8 +#include <xen/kernel.h>
    22.9  #include <xen/pci.h>
   22.10  #include <xen/init.h>
   22.11  #include <xen/delay.h>
   22.12 @@ -234,7 +234,6 @@ static void __init quirk_io_region(struc
   22.13  static void __devinit quirk_ati_exploding_mce(struct pci_dev *dev)
   22.14  {
   22.15  	printk(KERN_INFO "ATI Northbridge, reserving I/O ports 0x3b0 to 0x3bb.\n");
   22.16 -	/* Mae rhaid in i beidio a edrych ar y lleoliad I/O hyn */
   22.17  	request_region(0x3b0, 0x0C, "RadeonIGP");
   22.18  	request_region(0x3d3, 0x01, "RadeonIGP");
   22.19  }
   22.20 @@ -276,6 +275,22 @@ static void __init quirk_piix4_acpi(stru
   22.21  }
   22.22  
   22.23  /*
   22.24 + * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
   22.25 + *	0x40 (128 bytes of ACPI, GPIO & TCO registers)
   22.26 + *	0x58 (64 bytes of GPIO I/O space)
   22.27 + */
   22.28 +static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev)
   22.29 +{
   22.30 +	u32 region;
   22.31 +
   22.32 +	pci_read_config_dword(dev, 0x40, &region);
   22.33 +	quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES);
   22.34 +
   22.35 +	pci_read_config_dword(dev, 0x58, &region);
   22.36 +	quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1);
   22.37 +}
   22.38 +
   22.39 +/*
   22.40   * VIA ACPI: One IO region pointed to by longword at
   22.41   *	0x48 or 0x20 (256 bytes of ACPI registers)
   22.42   */
   22.43 @@ -316,7 +331,6 @@ static void __init quirk_vt82c686_acpi(s
   22.44  
   22.45  
   22.46  #ifdef CONFIG_X86_IO_APIC 
   22.47 -extern int nr_ioapics;
   22.48  
   22.49  /*
   22.50   * VIA 686A/B: If an IO-APIC is active, we need to route all on-chip
   22.51 @@ -484,6 +498,31 @@ static void __init quirk_amd_ordering(st
   22.52  	}
   22.53  }
   22.54  
   22.55 +#ifdef CONFIG_X86_IO_APIC
   22.56 +
   22.57 +#define AMD8131_revA0        0x01
   22.58 +#define AMD8131_revB0        0x11
   22.59 +#define AMD8131_MISC         0x40
   22.60 +#define AMD8131_NIOAMODE_BIT 0
   22.61 +
   22.62 +static void __init quirk_amd_8131_ioapic(struct pci_dev *dev) 
   22.63 +{ 
   22.64 +	unsigned char revid, tmp;
   22.65 +	
   22.66 +	if (nr_ioapics == 0) 
   22.67 +		return;
   22.68 +
   22.69 +	pci_read_config_byte(dev, PCI_REVISION_ID, &revid);
   22.70 +	if (revid == AMD8131_revA0 || revid == AMD8131_revB0) {
   22.71 +		printk(KERN_INFO "Fixing up AMD8131 IOAPIC mode\n"); 
   22.72 +		pci_read_config_byte( dev, AMD8131_MISC, &tmp);
   22.73 +		tmp &= ~(1 << AMD8131_NIOAMODE_BIT);
   22.74 +		pci_write_config_byte( dev, AMD8131_MISC, tmp);
   22.75 +	}
   22.76 +} 
   22.77 +#endif
   22.78 +
   22.79 +
   22.80  /*
   22.81   *	DreamWorks provided workaround for Dunord I-3000 problem
   22.82   *
   22.83 @@ -573,6 +612,113 @@ static void __devinit quirk_ide_bases(st
   22.84  }
   22.85  
   22.86  /*
   22.87 + *	Ensure C0 rev restreaming is off. This is normally done by
   22.88 + *	the BIOS but in the odd case it is not the results are corruption
   22.89 + *	hence the presence of a Linux check
   22.90 + */
   22.91 + 
   22.92 +static void __init quirk_disable_pxb(struct pci_dev *pdev)
   22.93 +{
   22.94 +	u16 config;
   22.95 +	u8 rev;
   22.96 +	
   22.97 +	pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
   22.98 +	if(rev != 0x04)		/* Only C0 requires this */
   22.99 +		return;
  22.100 +	pci_read_config_word(pdev, 0x40, &config);
  22.101 +	if(config & (1<<6))
  22.102 +	{
  22.103 +		config &= ~(1<<6);
  22.104 +		pci_write_config_word(pdev, 0x40, config);
  22.105 +		printk(KERN_INFO "PCI: C0 revision 450NX. Disabling PCI restreaming.\n");
  22.106 +	}
  22.107 +}
  22.108 +
  22.109 +/*
  22.110 + *	VIA northbridges care about PCI_INTERRUPT_LINE
  22.111 + */
  22.112 + 
  22.113 +int interrupt_line_quirk;
  22.114 +
  22.115 +static void __init quirk_via_bridge(struct pci_dev *pdev)
  22.116 +{
  22.117 +	if(pdev->devfn == 0)
  22.118 +		interrupt_line_quirk = 1;
  22.119 +}
  22.120 +	
  22.121 +/* 
  22.122 + *	Serverworks CSB5 IDE does not fully support native mode
  22.123 + */
  22.124 +static void __init quirk_svwks_csb5ide(struct pci_dev *pdev)
  22.125 +{
  22.126 +	u8 prog;
  22.127 +	pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
  22.128 +	if (prog & 5) {
  22.129 +		prog &= ~5;
  22.130 +		pdev->class &= ~5;
  22.131 +		pci_write_config_byte(pdev, PCI_CLASS_PROG, prog);
  22.132 +		/* need to re-assign BARs for compat mode */
  22.133 +		quirk_ide_bases(pdev);
  22.134 +	}
  22.135 +}
  22.136 +
  22.137 +/*
  22.138 + * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
  22.139 + * is not activated. The myth is that Asus said that they do not want the
  22.140 + * users to be irritated by just another PCI Device in the Win98 device
  22.141 + * manager. (see the file prog/hotplug/README.p4b in the lm_sensors 
  22.142 + * package 2.7.0 for details)
  22.143 + *
  22.144 + * The SMBus PCI Device can be activated by setting a bit in the ICH LPC 
  22.145 + * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
  22.146 + * becomes necessary to do this tweak in two steps -- I've chosen the Host
  22.147 + * bridge as trigger.
  22.148 + */
  22.149 +
  22.150 +static int __initdata asus_hides_smbus = 0;
  22.151 +
  22.152 +static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
  22.153 +{
  22.154 +	if (likely(dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK))
  22.155 +		return;
  22.156 +
  22.157 +	if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB)
  22.158 +		switch(dev->subsystem_device) {
  22.159 +		case 0x8070: /* P4B */
  22.160 +	    	case 0x8088: /* P4B533 */
  22.161 +			asus_hides_smbus = 1;
  22.162 +		}
  22.163 +	if ((dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) &&
  22.164 +	    (dev->subsystem_device == 0x80b2)) /* P4PE */
  22.165 +		asus_hides_smbus = 1;
  22.166 +	if ((dev->device == PCI_DEVICE_ID_INTEL_82850_HB) &&
  22.167 +	    (dev->subsystem_device == 0x8030)) /* P4T533 */
  22.168 +		asus_hides_smbus = 1;
  22.169 +	if ((dev->device == PCI_DEVICE_ID_INTEL_7205_0) &&
  22.170 +	    (dev->subsystem_device == 0x8070)) /* P4G8X Deluxe */
  22.171 +		asus_hides_smbus = 1;
  22.172 +	return;
  22.173 +}
  22.174 +
  22.175 +static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
  22.176 +{
  22.177 +	u16 val;
  22.178 +	
  22.179 +	if (likely(!asus_hides_smbus))
  22.180 +		return;
  22.181 +
  22.182 +	pci_read_config_word(dev, 0xF2, &val);
  22.183 +	if (val & 0x8) {
  22.184 +		pci_write_config_word(dev, 0xF2, val & (~0x8));
  22.185 +		pci_read_config_word(dev, 0xF2, &val);
  22.186 +		if(val & 0x8)
  22.187 +			printk(KERN_INFO "PCI: i801 SMBus device continues to play 'hide and seek'! 0x%x\n", val);
  22.188 +		else
  22.189 +			printk(KERN_INFO "PCI: Enabled i801 SMBus device\n");
  22.190 +	}
  22.191 +}
  22.192 +
  22.193 +/*
  22.194   *  The main table of quirks.
  22.195   */
  22.196  
  22.197 @@ -587,6 +733,7 @@ static struct pci_fixup pci_fixups[] __i
  22.198  	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_0,	quirk_isa_dma_hangs },
  22.199  	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C596,	quirk_isa_dma_hangs },
  22.200  	{ PCI_FIXUP_FINAL,      PCI_VENDOR_ID_INTEL,    PCI_DEVICE_ID_INTEL_82371SB_0,  quirk_isa_dma_hangs },
  22.201 +	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82454NX,	quirk_disable_pxb },
  22.202  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_S3,	PCI_DEVICE_ID_S3_868,		quirk_s3_64M },
  22.203  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_S3,	PCI_DEVICE_ID_S3_968,		quirk_s3_64M },
  22.204  	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_INTEL, 	PCI_DEVICE_ID_INTEL_82437, 	quirk_triton }, 
  22.205 @@ -612,10 +759,12 @@ static struct pci_fixup pci_fixups[] __i
  22.206  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_vt82c586_acpi },
  22.207  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_vt82c686_acpi },
  22.208  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_3,	quirk_piix4_acpi },
  22.209 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_12,	quirk_ich4_lpc_acpi },
  22.210  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_AL,	PCI_DEVICE_ID_AL_M7101,		quirk_ali7101_acpi },
  22.211   	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371SB_2,	quirk_piix3_usb },
  22.212  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_2,	quirk_piix3_usb },
  22.213  	{ PCI_FIXUP_HEADER,     PCI_ANY_ID,             PCI_ANY_ID,                     quirk_ide_bases },
  22.214 +	{ PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,	PCI_ANY_ID,                     quirk_via_bridge },
  22.215  	{ PCI_FIXUP_FINAL,	PCI_ANY_ID,		PCI_ANY_ID,			quirk_cardbus_legacy },
  22.216  
  22.217  #ifdef CONFIG_X86_IO_APIC 
  22.218 @@ -637,9 +786,27 @@ static struct pci_fixup pci_fixups[] __i
  22.219  	 * instead of 0x01.
  22.220  	 */
  22.221  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82380FB,	quirk_transparent_bridge },
  22.222 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_TOSHIBA,	0x605,				quirk_transparent_bridge },
  22.223  
  22.224  	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_CYRIX,	PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master },
  22.225  
  22.226 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, quirk_svwks_csb5ide },
  22.227 +
  22.228 +#ifdef CONFIG_X86_IO_APIC
  22.229 +	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_AMD,      PCI_DEVICE_ID_AMD_8131_APIC, 
  22.230 +	  quirk_amd_8131_ioapic }, 
  22.231 +#endif
  22.232 +
  22.233 +	/*
  22.234 +	 * on Asus P4B boards, the i801SMBus device is disabled at startup.
  22.235 +	 */
  22.236 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82845_HB,	asus_hides_smbus_hostbridge },
  22.237 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82845G_HB,	asus_hides_smbus_hostbridge },
  22.238 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82850_HB,	asus_hides_smbus_hostbridge },
  22.239 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_7205_0,	asus_hides_smbus_hostbridge },
  22.240 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_0,	asus_hides_smbus_lpc },
  22.241 +	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801BA_0,	asus_hides_smbus_lpc },
  22.242 +
  22.243  	{ 0 }
  22.244  };
  22.245  
    23.1 --- a/xen/drivers/pci/setup-bus.c	Mon Apr 05 08:23:33 2004 +0000
    23.2 +++ b/xen/drivers/pci/setup-bus.c	Mon Apr 05 13:12:24 2004 +0000
    23.3 @@ -17,13 +17,13 @@
    23.4   *	     tighter packing. Prefetchable range support.
    23.5   */
    23.6  
    23.7 -#include <xen/init.h>
    23.8 -#include <xen/kernel.h>
    23.9 -#include <xen/pci.h>
   23.10 -#include <xen/errno.h>
   23.11 -#include <xen/ioport.h>
   23.12 -#include <xen/cache.h>
   23.13 -#include <xen/slab.h>
   23.14 +#include <linux/init.h>
   23.15 +#include <linux/kernel.h>
   23.16 +#include <linux/pci.h>
   23.17 +#include <linux/errno.h>
   23.18 +#include <linux/ioport.h>
   23.19 +#include <linux/cache.h>
   23.20 +#include <linux/slab.h>
   23.21  
   23.22  
   23.23  #define DEBUG_CONFIG 1
   23.24 @@ -299,7 +299,7 @@ pbus_size_mem(struct pci_bus *bus, unsig
   23.25  				order = 0;
   23.26  			/* Exclude ranges with size > align from
   23.27  			   calculation of the alignment. */
   23.28 -			if (size == align)
   23.29 +			if (r_size == align)
   23.30  				aligns[order] += align;
   23.31  			if (order > max_order)
   23.32  				max_order = order;
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/xen/drivers/tables.c	Mon Apr 05 13:12:24 2004 +0000
    24.3 @@ -0,0 +1,588 @@
    24.4 +/*
    24.5 + *  acpi_tables.c - ACPI Boot-Time Table Parsing
    24.6 + *
    24.7 + *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
    24.8 + *
    24.9 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   24.10 + *
   24.11 + *  This program is free software; you can redistribute it and/or modify
   24.12 + *  it under the terms of the GNU General Public License as published by
   24.13 + *  the Free Software Foundation; either version 2 of the License, or
   24.14 + *  (at your option) any later version.
   24.15 + *
   24.16 + *  This program is distributed in the hope that it will be useful,
   24.17 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   24.18 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   24.19 + *  GNU General Public License for more details.
   24.20 + *
   24.21 + *  You should have received a copy of the GNU General Public License
   24.22 + *  along with this program; if not, write to the Free Software
   24.23 + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   24.24 + *
   24.25 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   24.26 + *
   24.27 + */
   24.28 +
   24.29 +#include <xen/config.h>
   24.30 +#include <xen/init.h>
   24.31 +#include <xen/kernel.h>
   24.32 +#include <xen/sched.h>
   24.33 +#include <xen/smp.h>
   24.34 +#include <xen/string.h>
   24.35 +#include <xen/types.h>
   24.36 +#include <xen/irq.h>
   24.37 +#include <xen/errno.h>
   24.38 +#include <xen/acpi.h>
   24.39 +/*#include <xen/bootmem.h>*/
   24.40 +
   24.41 +#define PREFIX			"ACPI: "
   24.42 +
   24.43 +#define ACPI_MAX_TABLES		256
   24.44 +
   24.45 +static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
   24.46 +	[ACPI_TABLE_UNKNOWN]	= "????",
   24.47 +	[ACPI_APIC]		= "APIC",
   24.48 +	[ACPI_BOOT]		= "BOOT",
   24.49 +	[ACPI_DBGP]		= "DBGP",
   24.50 +	[ACPI_DSDT]		= "DSDT",
   24.51 +	[ACPI_ECDT]		= "ECDT",
   24.52 +	[ACPI_ETDT]		= "ETDT",
   24.53 +	[ACPI_FADT]		= "FACP",
   24.54 +	[ACPI_FACS]		= "FACS",
   24.55 +	[ACPI_OEMX]		= "OEM",
   24.56 +	[ACPI_PSDT]		= "PSDT",
   24.57 +	[ACPI_SBST]		= "SBST",
   24.58 +	[ACPI_SLIT]		= "SLIT",
   24.59 +	[ACPI_SPCR]		= "SPCR",
   24.60 +	[ACPI_SRAT]		= "SRAT",
   24.61 +	[ACPI_SSDT]		= "SSDT",
   24.62 +	[ACPI_SPMI]		= "SPMI",
   24.63 +	[ACPI_HPET]		= "HPET",
   24.64 +};
   24.65 +
   24.66 +static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
   24.67 +static char *mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
   24.68 +
   24.69 +/* System Description Table (RSDT/XSDT) */
   24.70 +struct acpi_table_sdt {
   24.71 +	unsigned long		pa;
   24.72 +	enum acpi_table_id	id;
   24.73 +	unsigned long		size;
   24.74 +} __attribute__ ((packed));
   24.75 +
   24.76 +static unsigned long		sdt_pa;		/* Physical Address */
   24.77 +static unsigned long		sdt_count;	/* Table count */
   24.78 +
   24.79 +static struct acpi_table_sdt	sdt_entry[ACPI_MAX_TABLES];
   24.80 +
   24.81 +void
   24.82 +acpi_table_print (
   24.83 +	struct acpi_table_header *header,
   24.84 +	unsigned long		phys_addr)
   24.85 +{
   24.86 +	char			*name = NULL;
   24.87 +
   24.88 +	if (!header)
   24.89 +		return;
   24.90 +
   24.91 +	/* Some table signatures aren't good table names */
   24.92 +
   24.93 +	if (!strncmp((char *) &header->signature,
   24.94 +		acpi_table_signatures[ACPI_APIC],
   24.95 +		sizeof(header->signature))) {
   24.96 +		name = "MADT";
   24.97 +	}
   24.98 +	else if (!strncmp((char *) &header->signature,
   24.99 +		acpi_table_signatures[ACPI_FADT],
  24.100 +		sizeof(header->signature))) {
  24.101 +		name = "FADT";
  24.102 +	}
  24.103 +	else
  24.104 +		name = header->signature;
  24.105 +
  24.106 +	printk(KERN_INFO PREFIX "%.4s (v%3.3d %6.6s %8.8s 0x%08x %.4s 0x%08x) @ 0x%p\n",
  24.107 +		name, header->revision, header->oem_id,
  24.108 +		header->oem_table_id, header->oem_revision,
  24.109 +		header->asl_compiler_id, header->asl_compiler_revision,
  24.110 +		(void *) phys_addr);
  24.111 +}
  24.112 +
  24.113 +
  24.114 +void
  24.115 +acpi_table_print_madt_entry (
  24.116 +	acpi_table_entry_header	*header)
  24.117 +{
  24.118 +	if (!header)
  24.119 +		return;
  24.120 +
  24.121 +	switch (header->type) {
  24.122 +
  24.123 +	case ACPI_MADT_LAPIC:
  24.124 +	{
  24.125 +		struct acpi_table_lapic *p =
  24.126 +			(struct acpi_table_lapic*) header;
  24.127 +		printk(KERN_INFO PREFIX "LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n",
  24.128 +			p->acpi_id, p->id, p->flags.enabled?"enabled":"disabled");
  24.129 +	}
  24.130 +		break;
  24.131 +
  24.132 +	case ACPI_MADT_IOAPIC:
  24.133 +	{
  24.134 +		struct acpi_table_ioapic *p =
  24.135 +			(struct acpi_table_ioapic*) header;
  24.136 +		printk(KERN_INFO PREFIX "IOAPIC (id[0x%02x] address[0x%08x] global_irq_base[0x%x])\n",
  24.137 +			p->id, p->address, p->global_irq_base);
  24.138 +	}
  24.139 +		break;
  24.140 +
  24.141 +	case ACPI_MADT_INT_SRC_OVR:
  24.142 +	{
  24.143 +		struct acpi_table_int_src_ovr *p =
  24.144 +			(struct acpi_table_int_src_ovr*) header;
  24.145 +		printk(KERN_INFO PREFIX "INT_SRC_OVR (bus %d bus_irq %d global_irq %d %s %s)\n",
  24.146 +			p->bus, p->bus_irq, p->global_irq,
  24.147 +			mps_inti_flags_polarity[p->flags.polarity],
  24.148 +			mps_inti_flags_trigger[p->flags.trigger]);
  24.149 +		if(p->flags.reserved)
  24.150 +			printk(KERN_INFO PREFIX "INT_SRC_OVR unexpected reserved flags: 0x%x\n",
  24.151 +				p->flags.reserved);
  24.152 +
  24.153 +	}
  24.154 +		break;
  24.155 +
  24.156 +	case ACPI_MADT_NMI_SRC:
  24.157 +	{
  24.158 +		struct acpi_table_nmi_src *p =
  24.159 +			(struct acpi_table_nmi_src*) header;
  24.160 +		printk(KERN_INFO PREFIX "NMI_SRC (%s %s global_irq %d)\n",
  24.161 +			mps_inti_flags_polarity[p->flags.polarity],
  24.162 +			mps_inti_flags_trigger[p->flags.trigger], p->global_irq);
  24.163 +	}
  24.164 +		break;
  24.165 +
  24.166 +	case ACPI_MADT_LAPIC_NMI:
  24.167 +	{
  24.168 +		struct acpi_table_lapic_nmi *p =
  24.169 +			(struct acpi_table_lapic_nmi*) header;
  24.170 +		printk(KERN_INFO PREFIX "LAPIC_NMI (acpi_id[0x%02x] %s %s lint[0x%x])\n",
  24.171 +			p->acpi_id,
  24.172 +			mps_inti_flags_polarity[p->flags.polarity],
  24.173 +			mps_inti_flags_trigger[p->flags.trigger], p->lint);
  24.174 +	}
  24.175 +		break;
  24.176 +
  24.177 +	case ACPI_MADT_LAPIC_ADDR_OVR:
  24.178 +	{
  24.179 +		struct acpi_table_lapic_addr_ovr *p =
  24.180 +			(struct acpi_table_lapic_addr_ovr*) header;
  24.181 +		printk(KERN_INFO PREFIX "LAPIC_ADDR_OVR (address[%p])\n",
  24.182 +			(void *) (unsigned long) p->address);
  24.183 +	}
  24.184 +		break;
  24.185 +
  24.186 +	case ACPI_MADT_IOSAPIC:
  24.187 +	{
  24.188 +		struct acpi_table_iosapic *p =
  24.189 +			(struct acpi_table_iosapic*) header;
  24.190 +		printk(KERN_INFO PREFIX "IOSAPIC (id[0x%x] global_irq_base[0x%x] address[%p])\n",
  24.191 +			p->id, p->global_irq_base, (void *) (unsigned long) p->address);
  24.192 +	}
  24.193 +		break;
  24.194 +
  24.195 +	case ACPI_MADT_LSAPIC:
  24.196 +	{
  24.197 +		struct acpi_table_lsapic *p =
  24.198 +			(struct acpi_table_lsapic*) header;
  24.199 +		printk(KERN_INFO PREFIX "LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n",
  24.200 +			p->acpi_id, p->id, p->eid, p->flags.enabled?"enabled":"disabled");
  24.201 +	}
  24.202 +		break;
  24.203 +
  24.204 +	case ACPI_MADT_PLAT_INT_SRC:
  24.205 +	{
  24.206 +		struct acpi_table_plat_int_src *p =
  24.207 +			(struct acpi_table_plat_int_src*) header;
  24.208 +		printk(KERN_INFO PREFIX "PLAT_INT_SRC (%s %s type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n",
  24.209 +			mps_inti_flags_polarity[p->flags.polarity],
  24.210 +			mps_inti_flags_trigger[p->flags.trigger],
  24.211 +			p->type, p->id, p->eid, p->iosapic_vector, p->global_irq);
  24.212 +	}
  24.213 +		break;
  24.214 +
  24.215 +	default:
  24.216 +		printk(KERN_WARNING PREFIX "Found unsupported MADT entry (type = 0x%x)\n",
  24.217 +			header->type);
  24.218 +		break;
  24.219 +	}
  24.220 +}
  24.221 +
  24.222 +
  24.223 +static int
  24.224 +acpi_table_compute_checksum (
  24.225 +	void			*table_pointer,
  24.226 +	unsigned long		length)
  24.227 +{
  24.228 +	u8			*p = (u8 *) table_pointer;
  24.229 +	unsigned long		remains = length;
  24.230 +	unsigned long		sum = 0;
  24.231 +
  24.232 +	if (!p || !length)
  24.233 +		return -EINVAL;
  24.234 +
  24.235 +	while (remains--)
  24.236 +		sum += *p++;
  24.237 +
  24.238 +	return (sum & 0xFF);
  24.239 +}
  24.240 +
  24.241 +/*
  24.242 + * acpi_get_table_header_early()
  24.243 + * for acpi_blacklisted(), acpi_table_get_sdt()
  24.244 + */
  24.245 +int __init
  24.246 +acpi_get_table_header_early (
  24.247 +	enum acpi_table_id	id,
  24.248 +	struct acpi_table_header **header)
  24.249 +{
  24.250 +	unsigned int i;
  24.251 +	enum acpi_table_id temp_id;
  24.252 +
  24.253 +	/* DSDT is different from the rest */
  24.254 +	if (id == ACPI_DSDT)
  24.255 +		temp_id = ACPI_FADT;
  24.256 +	else
  24.257 +		temp_id = id;
  24.258 +
  24.259 +	/* Locate the table. */
  24.260 +
  24.261 +	for (i = 0; i < sdt_count; i++) {
  24.262 +		if (sdt_entry[i].id != temp_id)
  24.263 +			continue;
  24.264 +		*header = (void *)
  24.265 +			__acpi_map_table(sdt_entry[i].pa, sdt_entry[i].size);
  24.266 +		if (!*header) {
  24.267 +			printk(KERN_WARNING PREFIX "Unable to map %s\n",
  24.268 +			       acpi_table_signatures[temp_id]);
  24.269 +			return -ENODEV;
  24.270 +		}
  24.271 +		break;
  24.272 +	}
  24.273 +
  24.274 +	if (!*header) {
  24.275 +		printk(KERN_WARNING PREFIX "%s not present\n",
  24.276 +		       acpi_table_signatures[id]);
  24.277 +		return -ENODEV;
  24.278 +	}
  24.279 +
  24.280 +	/* Map the DSDT header via the pointer in the FADT */
  24.281 +	if (id == ACPI_DSDT) {
  24.282 +		struct fadt_descriptor_rev2 *fadt = (struct fadt_descriptor_rev2 *) *header;
  24.283 +
  24.284 +		if (fadt->revision == 3 && fadt->Xdsdt) {
  24.285 +			*header = (void *) __acpi_map_table(fadt->Xdsdt,
  24.286 +					sizeof(struct acpi_table_header));
  24.287 +		} else if (fadt->V1_dsdt) {
  24.288 +			*header = (void *) __acpi_map_table(fadt->V1_dsdt,
  24.289 +					sizeof(struct acpi_table_header));
  24.290 +		} else
  24.291 +			*header = 0;
  24.292 +
  24.293 +		if (!*header) {
  24.294 +			printk(KERN_WARNING PREFIX "Unable to map DSDT\n");
  24.295 +			return -ENODEV;
  24.296 +		}
  24.297 +	}
  24.298 +
  24.299 +	return 0;
  24.300 +}
  24.301 +	 
  24.302 +
  24.303 +int __init
  24.304 +acpi_table_parse_madt_family (
  24.305 +	enum acpi_table_id	id,
  24.306 +	unsigned long		madt_size,
  24.307 +	int			entry_id,
  24.308 +	acpi_madt_entry_handler	handler)
  24.309 +{
  24.310 +	void			*madt = NULL;
  24.311 +	acpi_table_entry_header	*entry = NULL;
  24.312 +	unsigned long		count = 0;
  24.313 +	unsigned long		madt_end = 0;
  24.314 +	unsigned int			i = 0;
  24.315 +
  24.316 +	if (!handler)
  24.317 +		return -EINVAL;
  24.318 +
  24.319 +	/* Locate the MADT (if exists). There should only be one. */
  24.320 +
  24.321 +	for (i = 0; i < sdt_count; i++) {
  24.322 +		if (sdt_entry[i].id != id)
  24.323 +			continue;
  24.324 +		madt = (void *)
  24.325 +			__acpi_map_table(sdt_entry[i].pa, sdt_entry[i].size);
  24.326 +		if (!madt) {
  24.327 +			printk(KERN_WARNING PREFIX "Unable to map %s\n",
  24.328 +			       acpi_table_signatures[id]);
  24.329 +			return -ENODEV;
  24.330 +		}
  24.331 +		break;
  24.332 +	}
  24.333 +
  24.334 +	if (!madt) {
  24.335 +		printk(KERN_WARNING PREFIX "%s not present\n",
  24.336 +		       acpi_table_signatures[id]);
  24.337 +		return -ENODEV;
  24.338 +	}
  24.339 +
  24.340 +	madt_end = (unsigned long) madt + sdt_entry[i].size;
  24.341 +
  24.342 +	/* Parse all entries looking for a match. */
  24.343 +
  24.344 +	entry = (acpi_table_entry_header *)
  24.345 +		((unsigned long) madt + madt_size);
  24.346 +
  24.347 +	while (((unsigned long) entry) < madt_end) {
  24.348 +		if (entry->type == entry_id) {
  24.349 +			count++;
  24.350 +			handler(entry);
  24.351 +		}
  24.352 +		entry = (acpi_table_entry_header *)
  24.353 +			((unsigned long) entry + entry->length);
  24.354 +	}
  24.355 +
  24.356 +	return count;
  24.357 +}
  24.358 +
  24.359 +
  24.360 +int __init
  24.361 +acpi_table_parse_madt (
  24.362 +	enum acpi_madt_entry_id	id,
  24.363 +	acpi_madt_entry_handler	handler)
  24.364 +{
  24.365 +	return acpi_table_parse_madt_family(ACPI_APIC, sizeof(struct acpi_table_madt),
  24.366 +					    id, handler);
  24.367 +}
  24.368 +
  24.369 +
  24.370 +int __init
  24.371 +acpi_table_parse (
  24.372 +	enum acpi_table_id	id,
  24.373 +	acpi_table_handler	handler)
  24.374 +{
  24.375 +	int			count = 0;
  24.376 +	unsigned int		i = 0;
  24.377 +
  24.378 +	if (!handler)
  24.379 +		return -EINVAL;
  24.380 +
  24.381 +	for (i = 0; i < sdt_count; i++) {
  24.382 +		if (sdt_entry[i].id != id)
  24.383 +			continue;
  24.384 +		handler(sdt_entry[i].pa, sdt_entry[i].size);
  24.385 +		count++;
  24.386 +	}
  24.387 +
  24.388 +	return count;
  24.389 +}
  24.390 +
  24.391 +
  24.392 +static int __init
  24.393 +acpi_table_get_sdt (
  24.394 +	struct acpi_table_rsdp	*rsdp)
  24.395 +{
  24.396 +	struct acpi_table_header *header = NULL;
  24.397 +	unsigned int		i, id = 0;
  24.398 +
  24.399 +	if (!rsdp)
  24.400 +		return -EINVAL;
  24.401 +
  24.402 +	/* First check XSDT (but only on ACPI 2.0-compatible systems) */
  24.403 +
  24.404 +	if ((rsdp->revision >= 2) &&
  24.405 +		(((struct acpi20_table_rsdp*)rsdp)->xsdt_address)) {
  24.406 +			
  24.407 +		struct acpi_table_xsdt	*mapped_xsdt = NULL;
  24.408 +
  24.409 +		sdt_pa = ((struct acpi20_table_rsdp*)rsdp)->xsdt_address;
  24.410 +
  24.411 +		/* map in just the header */
  24.412 +		header = (struct acpi_table_header *)
  24.413 +			__acpi_map_table(sdt_pa, sizeof(struct acpi_table_header));
  24.414 +
  24.415 +		if (!header) {
  24.416 +			printk(KERN_WARNING PREFIX "Unable to map XSDT header\n");
  24.417 +			return -ENODEV;
  24.418 +		}
  24.419 +
  24.420 +		/* remap in the entire table before processing */
  24.421 +		mapped_xsdt = (struct acpi_table_xsdt *)
  24.422 +			__acpi_map_table(sdt_pa, header->length);
  24.423 +		if (!mapped_xsdt) {
  24.424 +			printk(KERN_WARNING PREFIX "Unable to map XSDT\n");
  24.425 +			return -ENODEV;
  24.426 +		}
  24.427 +		header = &mapped_xsdt->header;
  24.428 +
  24.429 +		if (strncmp(header->signature, "XSDT", 4)) {
  24.430 +			printk(KERN_WARNING PREFIX "XSDT signature incorrect\n");
  24.431 +			return -ENODEV;
  24.432 +		}
  24.433 +
  24.434 +		if (acpi_table_compute_checksum(header, header->length)) {
  24.435 +			printk(KERN_WARNING PREFIX "Invalid XSDT checksum\n");
  24.436 +			return -ENODEV;
  24.437 +		}
  24.438 +
  24.439 +		sdt_count = (header->length - sizeof(struct acpi_table_header)) >> 3;
  24.440 +		if (sdt_count > ACPI_MAX_TABLES) {
  24.441 +			printk(KERN_WARNING PREFIX "Truncated %lu XSDT entries\n",
  24.442 +				(sdt_count - ACPI_MAX_TABLES));
  24.443 +			sdt_count = ACPI_MAX_TABLES;
  24.444 +		}
  24.445 +
  24.446 +		for (i = 0; i < sdt_count; i++)
  24.447 +			sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i];
  24.448 +	}
  24.449 +
  24.450 +	/* Then check RSDT */
  24.451 +
  24.452 +	else if (rsdp->rsdt_address) {
  24.453 +
  24.454 +		struct acpi_table_rsdt	*mapped_rsdt = NULL;
  24.455 +
  24.456 +		sdt_pa = rsdp->rsdt_address;
  24.457 +
  24.458 +		/* map in just the header */
  24.459 +		header = (struct acpi_table_header *)
  24.460 +			__acpi_map_table(sdt_pa, sizeof(struct acpi_table_header));
  24.461 +		if (!header) {
  24.462 +			printk(KERN_WARNING PREFIX "Unable to map RSDT header\n");
  24.463 +			return -ENODEV;
  24.464 +		}
  24.465 +
  24.466 +		/* remap in the entire table before processing */
  24.467 +		mapped_rsdt = (struct acpi_table_rsdt *)
  24.468 +			__acpi_map_table(sdt_pa, header->length);
  24.469 +		if (!mapped_rsdt) {
  24.470 +			printk(KERN_WARNING PREFIX "Unable to map RSDT\n");
  24.471 +			return -ENODEV;
  24.472 +		}
  24.473 +		header = &mapped_rsdt->header;
  24.474 +
  24.475 +		if (strncmp(header->signature, "RSDT", 4)) {
  24.476 +			printk(KERN_WARNING PREFIX "RSDT signature incorrect\n");
  24.477 +			return -ENODEV;
  24.478 +		}
  24.479 +
  24.480 +		if (acpi_table_compute_checksum(header, header->length)) {
  24.481 +			printk(KERN_WARNING PREFIX "Invalid RSDT checksum\n");
  24.482 +			return -ENODEV;
  24.483 +		}
  24.484 +
  24.485 +		sdt_count = (header->length - sizeof(struct acpi_table_header)) >> 2;
  24.486 +		if (sdt_count > ACPI_MAX_TABLES) {
  24.487 +			printk(KERN_WARNING PREFIX "Truncated %lu RSDT entries\n",
  24.488 +				(sdt_count - ACPI_MAX_TABLES));
  24.489 +			sdt_count = ACPI_MAX_TABLES;
  24.490 +		}
  24.491 +
  24.492 +		for (i = 0; i < sdt_count; i++)
  24.493 +			sdt_entry[i].pa = (unsigned long) mapped_rsdt->entry[i];
  24.494 +	}
  24.495 +
  24.496 +	else {
  24.497 +		printk(KERN_WARNING PREFIX "No System Description Table (RSDT/XSDT) specified in RSDP\n");
  24.498 +		return -ENODEV;
  24.499 +	}
  24.500 +
  24.501 +	acpi_table_print(header, sdt_pa);
  24.502 +
  24.503 +	for (i = 0; i < sdt_count; i++) {
  24.504 +
  24.505 +		/* map in just the header */
  24.506 +		header = (struct acpi_table_header *)
  24.507 +			__acpi_map_table(sdt_entry[i].pa,
  24.508 +				sizeof(struct acpi_table_header));
  24.509 +		if (!header)
  24.510 +			continue;
  24.511 +
  24.512 +		/* remap in the entire table before processing */
  24.513 +		header = (struct acpi_table_header *)
  24.514 +			__acpi_map_table(sdt_entry[i].pa,
  24.515 +				header->length);
  24.516 +		if (!header)
  24.517 +			continue;
  24.518 +	               
  24.519 +		acpi_table_print(header, sdt_entry[i].pa);
  24.520 +
  24.521 +		if (acpi_table_compute_checksum(header, header->length)) {
  24.522 +			printk(KERN_WARNING "  >>> ERROR: Invalid checksum\n");
  24.523 +			continue;
  24.524 +		}
  24.525 +
  24.526 +		sdt_entry[i].size = header->length;
  24.527 +
  24.528 +		for (id = 0; id < ACPI_TABLE_COUNT; id++) {
  24.529 +			if (!strncmp((char *) &header->signature,
  24.530 +				acpi_table_signatures[id],
  24.531 +				sizeof(header->signature))) {
  24.532 +				sdt_entry[i].id = id;
  24.533 +			}
  24.534 +		}
  24.535 +	}
  24.536 +
  24.537 +	/* 
  24.538 +	 * The DSDT is *not* in the RSDT (why not? no idea.) but we want
  24.539 +	 * to print its info, because this is what people usually blacklist
  24.540 +	 * against. Unfortunately, we don't know the phys_addr, so just
  24.541 +	 * print 0. Maybe no one will notice.
  24.542 +	 */
  24.543 +	if(!acpi_get_table_header_early(ACPI_DSDT, &header))
  24.544 +		acpi_table_print(header, 0);
  24.545 +
  24.546 +	return 0;
  24.547 +}
  24.548 +
  24.549 +
  24.550 +int __init
  24.551 +acpi_table_init (void)
  24.552 +{
  24.553 +	struct acpi_table_rsdp	*rsdp = NULL;
  24.554 +	unsigned long		rsdp_phys = 0;
  24.555 +	int			result = 0;
  24.556 +
  24.557 +	/* Locate and map the Root System Description Table (RSDP) */
  24.558 +
  24.559 +	rsdp_phys = acpi_find_rsdp();
  24.560 +	if (!rsdp_phys) {
  24.561 +		printk(KERN_ERR PREFIX "Unable to locate RSDP\n");
  24.562 +		return -ENODEV;
  24.563 +	}
  24.564 +
  24.565 +	rsdp = (struct acpi_table_rsdp *) __va(rsdp_phys);
  24.566 +	if (!rsdp) {
  24.567 +		printk(KERN_WARNING PREFIX "Unable to map RSDP\n");
  24.568 +		return -ENODEV;
  24.569 +	}
  24.570 +
  24.571 +	printk(KERN_INFO PREFIX "RSDP (v%3.3d %6.6s                                    ) @ 0x%p\n",
  24.572 +		rsdp->revision, rsdp->oem_id, (void *) rsdp_phys);
  24.573 +
  24.574 +	if (rsdp->revision < 2)
  24.575 +		result = acpi_table_compute_checksum(rsdp, sizeof(struct acpi_table_rsdp));
  24.576 +	else
  24.577 +		result = acpi_table_compute_checksum(rsdp, ((struct acpi20_table_rsdp *)rsdp)->length);
  24.578 +
  24.579 +	if (result) {
  24.580 +		printk(KERN_WARNING "  >>> ERROR: Invalid checksum\n");
  24.581 +		return -ENODEV;
  24.582 +	}
  24.583 +
  24.584 +	/* Locate and map the System Description table (RSDT/XSDT) */
  24.585 +
  24.586 +	if (acpi_table_get_sdt(rsdp))
  24.587 +		return -ENODEV;
  24.588 +
  24.589 +	return 0;
  24.590 +}
  24.591 +
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/xen/include/acpi/acconfig.h	Mon Apr 05 13:12:24 2004 +0000
    25.3 @@ -0,0 +1,202 @@
    25.4 +/******************************************************************************
    25.5 + *
    25.6 + * Name: acconfig.h - Global configuration constants
    25.7 + *
    25.8 + *****************************************************************************/
    25.9 +
   25.10 +/*
   25.11 + * Copyright (C) 2000 - 2004, R. Byron Moore
   25.12 + * All rights reserved.
   25.13 + *
   25.14 + * Redistribution and use in source and binary forms, with or without
   25.15 + * modification, are permitted provided that the following conditions
   25.16 + * are met:
   25.17 + * 1. Redistributions of source code must retain the above copyright
   25.18 + *    notice, this list of conditions, and the following disclaimer,
   25.19 + *    without modification.
   25.20 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   25.21 + *    substantially similar to the "NO WARRANTY" disclaimer below
   25.22 + *    ("Disclaimer") and any redistribution must be conditioned upon
   25.23 + *    including a substantially similar Disclaimer requirement for further
   25.24 + *    binary redistribution.
   25.25 + * 3. Neither the names of the above-listed copyright holders nor the names
   25.26 + *    of any contributors may be used to endorse or promote products derived
   25.27 + *    from this software without specific prior written permission.
   25.28 + *
   25.29 + * Alternatively, this software may be distributed under the terms of the
   25.30 + * GNU General Public License ("GPL") version 2 as published by the Free
   25.31 + * Software Foundation.
   25.32 + *
   25.33 + * NO WARRANTY
   25.34 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   25.35 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   25.36 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   25.37 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   25.38 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   25.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   25.42 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   25.43 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   25.44 + * POSSIBILITY OF SUCH DAMAGES.
   25.45 + */
   25.46 +
   25.47 +#ifndef _ACCONFIG_H
   25.48 +#define _ACCONFIG_H
   25.49 +
   25.50 +
   25.51 +/******************************************************************************
   25.52 + *
   25.53 + * Configuration options
   25.54 + *
   25.55 + *****************************************************************************/
   25.56 +
   25.57 +/*
   25.58 + * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
   25.59 + *                        ACPI subsystem.  This includes the DEBUG_PRINT output
   25.60 + *                        statements.  When disabled, all DEBUG_PRINT
   25.61 + *                        statements are compiled out.
   25.62 + *
   25.63 + * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
   25.64 + *                        at the application level.
   25.65 + *
   25.66 + */
   25.67 +
   25.68 +/* Version string */
   25.69 +
   25.70 +#define ACPI_CA_VERSION                 0x20040116
   25.71 +
   25.72 +/* Maximum objects in the various object caches */
   25.73 +
   25.74 +#define ACPI_MAX_STATE_CACHE_DEPTH      64          /* State objects for stacks */
   25.75 +#define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
   25.76 +#define ACPI_MAX_EXTPARSE_CACHE_DEPTH   64          /* Parse tree objects */
   25.77 +#define ACPI_MAX_OBJECT_CACHE_DEPTH     64          /* Interpreter operand objects */
   25.78 +#define ACPI_MAX_WALK_CACHE_DEPTH       4           /* Objects for parse tree walks */
   25.79 +
   25.80 +/*
   25.81 + * Should the subystem abort the loading of an ACPI table if the
   25.82 + * table checksum is incorrect?
   25.83 + */
   25.84 +#define ACPI_CHECKSUM_ABORT             FALSE
   25.85 +
   25.86 +
   25.87 +/******************************************************************************
   25.88 + *
   25.89 + * Subsystem Constants
   25.90 + *
   25.91 + *****************************************************************************/
   25.92 +
   25.93 +/* Version of ACPI supported */
   25.94 +
   25.95 +#define ACPI_CA_SUPPORT_LEVEL           2
   25.96 +
   25.97 +/* String size constants */
   25.98 +
   25.99 +#define ACPI_MAX_STRING_LENGTH          512
  25.100 +#define ACPI_PATHNAME_MAX               256         /* A full namespace pathname */
  25.101 +
  25.102 +/* Maximum count for a semaphore object */
  25.103 +
  25.104 +#define ACPI_MAX_SEMAPHORE_COUNT        256
  25.105 +
  25.106 +/* Max reference count (for debug only) */
  25.107 +
  25.108 +#define ACPI_MAX_REFERENCE_COUNT        0x400
  25.109 +
  25.110 +/* Size of cached memory mapping for system memory operation region */
  25.111 +
  25.112 +#define ACPI_SYSMEM_REGION_WINDOW_SIZE  4096
  25.113 +
  25.114 +
  25.115 +/******************************************************************************
  25.116 + *
  25.117 + * ACPI Specification constants (Do not change unless the specification changes)
  25.118 + *
  25.119 + *****************************************************************************/
  25.120 +
  25.121 +/* Number of distinct GPE register blocks and register width */
  25.122 +
  25.123 +#define ACPI_MAX_GPE_BLOCKS             2
  25.124 +#define ACPI_GPE_REGISTER_WIDTH         8
  25.125 +
  25.126 +/*
  25.127 + * Method info (in WALK_STATE), containing local variables and argumetns
  25.128 + */
  25.129 +#define ACPI_METHOD_NUM_LOCALS          8
  25.130 +#define ACPI_METHOD_MAX_LOCAL           7
  25.131 +
  25.132 +#define ACPI_METHOD_NUM_ARGS            7
  25.133 +#define ACPI_METHOD_MAX_ARG             6
  25.134 +
  25.135 +/* Maximum length of resulting string when converting from a buffer */
  25.136 +
  25.137 +#define ACPI_MAX_STRING_CONVERSION      200
  25.138 +
  25.139 +/* Length of _HID, _UID, and _CID values */
  25.140 +
  25.141 +#define ACPI_DEVICE_ID_LENGTH           0x09
  25.142 +#define ACPI_MAX_CID_LENGTH             48
  25.143 +
  25.144 +/*
  25.145 + * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
  25.146 + */
  25.147 +#define ACPI_OBJ_NUM_OPERANDS           8
  25.148 +#define ACPI_OBJ_MAX_OPERAND            7
  25.149 +
  25.150 +/* Names within the namespace are 4 bytes long */
  25.151 +
  25.152 +#define ACPI_NAME_SIZE                  4
  25.153 +#define ACPI_PATH_SEGMENT_LENGTH        5           /* 4 chars for name + 1 char for separator */
  25.154 +#define ACPI_PATH_SEPARATOR             '.'
  25.155 +
  25.156 +/* Constants used in searching for the RSDP in low memory */
  25.157 +
  25.158 +#define ACPI_LO_RSDP_WINDOW_BASE        0           /* Physical Address */
  25.159 +#define ACPI_HI_RSDP_WINDOW_BASE        0xE0000     /* Physical Address */
  25.160 +#define ACPI_LO_RSDP_WINDOW_SIZE        0x400
  25.161 +#define ACPI_HI_RSDP_WINDOW_SIZE        0x20000
  25.162 +#define ACPI_RSDP_SCAN_STEP             16
  25.163 +
  25.164 +/* Operation regions */
  25.165 +
  25.166 +#define ACPI_NUM_PREDEFINED_REGIONS     8
  25.167 +#define ACPI_USER_REGION_BEGIN          0x80
  25.168 +
  25.169 +/* Maximum space_ids for Operation Regions */
  25.170 +
  25.171 +#define ACPI_MAX_ADDRESS_SPACE          255
  25.172 +
  25.173 +/* Array sizes.  Used for range checking also */
  25.174 +
  25.175 +#define ACPI_NUM_ACCESS_TYPES           6
  25.176 +#define ACPI_NUM_UPDATE_RULES           3
  25.177 +#define ACPI_NUM_LOCK_RULES             2
  25.178 +#define ACPI_NUM_MATCH_OPS              6
  25.179 +#define ACPI_NUM_OPCODES                256
  25.180 +#define ACPI_NUM_FIELD_NAMES            2
  25.181 +
  25.182 +/* RSDP checksums */
  25.183 +
  25.184 +#define ACPI_RSDP_CHECKSUM_LENGTH       20
  25.185 +#define ACPI_RSDP_XCHECKSUM_LENGTH      36
  25.186 +
  25.187 +/* SMBus bidirectional buffer size */
  25.188 +
  25.189 +#define ACPI_SMBUS_BUFFER_SIZE          34
  25.190 +
  25.191 +
  25.192 +/******************************************************************************
  25.193 + *
  25.194 + * ACPI AML Debugger
  25.195 + *
  25.196 + *****************************************************************************/
  25.197 +
  25.198 +#define ACPI_DEBUGGER_MAX_ARGS          8  /* Must be max method args + 1 */
  25.199 +
  25.200 +#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
  25.201 +#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
  25.202 +
  25.203 +
  25.204 +#endif /* _ACCONFIG_H */
  25.205 +
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/xen/include/acpi/acdebug.h	Mon Apr 05 13:12:24 2004 +0000
    26.3 @@ -0,0 +1,469 @@
    26.4 +/******************************************************************************
    26.5 + *
    26.6 + * Name: acdebug.h - ACPI/AML debugger
    26.7 + *
    26.8 + *****************************************************************************/
    26.9 +
   26.10 +/*
   26.11 + * Copyright (C) 2000 - 2004, R. Byron Moore
   26.12 + * All rights reserved.
   26.13 + *
   26.14 + * Redistribution and use in source and binary forms, with or without
   26.15 + * modification, are permitted provided that the following conditions
   26.16 + * are met:
   26.17 + * 1. Redistributions of source code must retain the above copyright
   26.18 + *    notice, this list of conditions, and the following disclaimer,
   26.19 + *    without modification.
   26.20 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   26.21 + *    substantially similar to the "NO WARRANTY" disclaimer below
   26.22 + *    ("Disclaimer") and any redistribution must be conditioned upon
   26.23 + *    including a substantially similar Disclaimer requirement for further
   26.24 + *    binary redistribution.
   26.25 + * 3. Neither the names of the above-listed copyright holders nor the names
   26.26 + *    of any contributors may be used to endorse or promote products derived
   26.27 + *    from this software without specific prior written permission.
   26.28 + *
   26.29 + * Alternatively, this software may be distributed under the terms of the
   26.30 + * GNU General Public License ("GPL") version 2 as published by the Free
   26.31 + * Software Foundation.
   26.32 + *
   26.33 + * NO WARRANTY
   26.34 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   26.35 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   26.36 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   26.37 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   26.38 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   26.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   26.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   26.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   26.42 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   26.43 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   26.44 + * POSSIBILITY OF SUCH DAMAGES.
   26.45 + */
   26.46 +
   26.47 +#ifndef __ACDEBUG_H__
   26.48 +#define __ACDEBUG_H__
   26.49 +
   26.50 +
   26.51 +#define ACPI_DEBUG_BUFFER_SIZE  4196
   26.52 +
   26.53 +struct command_info
   26.54 +{
   26.55 +	char                            *name;          /* Command Name */
   26.56 +	u8                              min_args;       /* Minimum arguments required */
   26.57 +};
   26.58 +
   26.59 +
   26.60 +struct argument_info
   26.61 +{
   26.62 +	char                            *name;          /* Argument Name */
   26.63 +};
   26.64 +
   26.65 +
   26.66 +#define PARAM_LIST(pl)                  pl
   26.67 +
   26.68 +#define DBTEST_OUTPUT_LEVEL(lvl)        if (acpi_gbl_db_opt_verbose)
   26.69 +
   26.70 +#define VERBOSE_PRINT(fp)               DBTEST_OUTPUT_LEVEL(lvl) {\
   26.71 +			  acpi_os_printf PARAM_LIST(fp);}
   26.72 +
   26.73 +#define EX_NO_SINGLE_STEP               1
   26.74 +#define EX_SINGLE_STEP                  2
   26.75 +
   26.76 +
   26.77 +/* Prototypes */
   26.78 +
   26.79 +
   26.80 +/*
   26.81 + * dbxface - external debugger interfaces
   26.82 + */
   26.83 +
   26.84 +acpi_status
   26.85 +acpi_db_initialize (
   26.86 +	void);
   26.87 +
   26.88 +void
   26.89 +acpi_db_terminate (
   26.90 +	void);
   26.91 +
   26.92 +acpi_status
   26.93 +acpi_db_single_step (
   26.94 +	struct acpi_walk_state          *walk_state,
   26.95 +	union acpi_parse_object         *op,
   26.96 +	u32                             op_type);
   26.97 +
   26.98 +acpi_status
   26.99 +acpi_db_start_command (
  26.100 +	struct acpi_walk_state          *walk_state,
  26.101 +	union acpi_parse_object         *op);
  26.102 +
  26.103 +void
  26.104 +acpi_db_method_end (
  26.105 +	struct acpi_walk_state          *walk_state);
  26.106 +
  26.107 +
  26.108 +/*
  26.109 + * dbcmds - debug commands and output routines
  26.110 + */
  26.111 +
  26.112 +void
  26.113 +acpi_db_display_table_info (
  26.114 +	char                            *table_arg);
  26.115 +
  26.116 +void
  26.117 +acpi_db_unload_acpi_table (
  26.118 +	char                            *table_arg,
  26.119 +	char                            *instance_arg);
  26.120 +
  26.121 +void
  26.122 +acpi_db_set_method_breakpoint (
  26.123 +	char                            *location,
  26.124 +	struct acpi_walk_state          *walk_state,
  26.125 +	union acpi_parse_object         *op);
  26.126 +
  26.127 +void
  26.128 +acpi_db_set_method_call_breakpoint (
  26.129 +	union acpi_parse_object         *op);
  26.130 +
  26.131 +void
  26.132 +acpi_db_disassemble_aml (
  26.133 +	char                            *statements,
  26.134 +	union acpi_parse_object         *op);
  26.135 +
  26.136 +void
  26.137 +acpi_db_dump_namespace (
  26.138 +	char                            *start_arg,
  26.139 +	char                            *depth_arg);
  26.140 +
  26.141 +void
  26.142 +acpi_db_dump_namespace_by_owner (
  26.143 +	char                            *owner_arg,
  26.144 +	char                            *depth_arg);
  26.145 +
  26.146 +void
  26.147 +acpi_db_send_notify (
  26.148 +	char                            *name,
  26.149 +	u32                             value);
  26.150 +
  26.151 +void
  26.152 +acpi_db_set_method_data (
  26.153 +	char                            *type_arg,
  26.154 +	char                            *index_arg,
  26.155 +	char                            *value_arg);
  26.156 +
  26.157 +acpi_status
  26.158 +acpi_db_display_objects (
  26.159 +	char                            *obj_type_arg,
  26.160 +	char                            *display_count_arg);
  26.161 +
  26.162 +acpi_status
  26.163 +acpi_db_find_name_in_namespace (
  26.164 +	char                            *name_arg);
  26.165 +
  26.166 +void
  26.167 +acpi_db_set_scope (
  26.168 +	char                            *name);
  26.169 +
  26.170 +void
  26.171 +acpi_db_find_references (
  26.172 +	char                            *object_arg);
  26.173 +
  26.174 +void
  26.175 +acpi_db_display_locks (void);
  26.176 +
  26.177 +
  26.178 +void
  26.179 +acpi_db_display_resources (
  26.180 +	char                            *object_arg);
  26.181 +
  26.182 +void
  26.183 +acpi_db_display_gpes (void);
  26.184 +
  26.185 +void
  26.186 +acpi_db_check_integrity (
  26.187 +	void);
  26.188 +
  26.189 +acpi_status
  26.190 +acpi_db_integrity_walk (
  26.191 +	acpi_handle                     obj_handle,
  26.192 +	u32                             nesting_level,
  26.193 +	void                            *context,
  26.194 +	void                            **return_value);
  26.195 +
  26.196 +acpi_status
  26.197 +acpi_db_walk_and_match_name (
  26.198 +	acpi_handle                     obj_handle,
  26.199 +	u32                             nesting_level,
  26.200 +	void                            *context,
  26.201 +	void                            **return_value);
  26.202 +
  26.203 +acpi_status
  26.204 +acpi_db_walk_for_references (
  26.205 +	acpi_handle                     obj_handle,
  26.206 +	u32                             nesting_level,
  26.207 +	void                            *context,
  26.208 +	void                            **return_value);
  26.209 +
  26.210 +acpi_status
  26.211 +acpi_db_walk_for_specific_objects (
  26.212 +	acpi_handle                     obj_handle,
  26.213 +	u32                             nesting_level,
  26.214 +	void                            *context,
  26.215 +	void                            **return_value);
  26.216 +
  26.217 +void
  26.218 +acpi_db_generate_gpe (
  26.219 +	char                            *gpe_arg,
  26.220 +	char                            *block_arg);
  26.221 +
  26.222 +/*
  26.223 + * dbdisply - debug display commands
  26.224 + */
  26.225 +
  26.226 +void
  26.227 +acpi_db_display_method_info (
  26.228 +	union acpi_parse_object         *op);
  26.229 +
  26.230 +void
  26.231 +acpi_db_decode_and_display_object (
  26.232 +	char                            *target,
  26.233 +	char                            *output_type);
  26.234 +
  26.235 +void
  26.236 +acpi_db_display_result_object (
  26.237 +	union acpi_operand_object       *obj_desc,
  26.238 +	struct acpi_walk_state          *walk_state);
  26.239 +
  26.240 +acpi_status
  26.241 +acpi_db_display_all_methods (
  26.242 +	char                            *display_count_arg);
  26.243 +
  26.244 +void
  26.245 +acpi_db_display_arguments (
  26.246 +	void);
  26.247 +
  26.248 +void
  26.249 +acpi_db_display_locals (
  26.250 +	void);
  26.251 +
  26.252 +void
  26.253 +acpi_db_display_results (
  26.254 +	void);
  26.255 +
  26.256 +void
  26.257 +acpi_db_display_calling_tree (
  26.258 +	void);
  26.259 +
  26.260 +void
  26.261 +acpi_db_display_object_type (
  26.262 +	char                            *object_arg);
  26.263 +
  26.264 +void
  26.265 +acpi_db_display_argument_object (
  26.266 +	union acpi_operand_object       *obj_desc,
  26.267 +	struct acpi_walk_state          *walk_state);
  26.268 +
  26.269 +void
  26.270 +acpi_db_dump_parser_descriptor (
  26.271 +	union acpi_parse_object         *op);
  26.272 +
  26.273 +void *
  26.274 +acpi_db_get_pointer (
  26.275 +	void                            *target);
  26.276 +
  26.277 +
  26.278 +/*
  26.279 + * dbexec - debugger control method execution
  26.280 + */
  26.281 +
  26.282 +void
  26.283 +acpi_db_execute (
  26.284 +	char                            *name,
  26.285 +	char                            **args,
  26.286 +	u32                             flags);
  26.287 +
  26.288 +void
  26.289 +acpi_db_create_execution_threads (
  26.290 +	char                            *num_threads_arg,
  26.291 +	char                            *num_loops_arg,
  26.292 +	char                            *method_name_arg);
  26.293 +
  26.294 +acpi_status
  26.295 +acpi_db_execute_method (
  26.296 +	struct acpi_db_method_info      *info,
  26.297 +	struct acpi_buffer              *return_obj);
  26.298 +
  26.299 +void
  26.300 +acpi_db_execute_setup (
  26.301 +	struct acpi_db_method_info      *info);
  26.302 +
  26.303 +u32
  26.304 +acpi_db_get_outstanding_allocations (
  26.305 +	void);
  26.306 +
  26.307 +void ACPI_SYSTEM_XFACE
  26.308 +acpi_db_method_thread (
  26.309 +	void                            *context);
  26.310 +
  26.311 +acpi_status
  26.312 +acpi_db_execution_walk (
  26.313 +	acpi_handle                     obj_handle,
  26.314 +	u32                             nesting_level,
  26.315 +	void                            *context,
  26.316 +	void                            **return_value);
  26.317 +
  26.318 +
  26.319 +/*
  26.320 + * dbfileio - Debugger file I/O commands
  26.321 + */
  26.322 +
  26.323 +acpi_object_type
  26.324 +acpi_db_match_argument (
  26.325 +	char                            *user_argument,
  26.326 +	struct argument_info            *arguments);
  26.327 +
  26.328 +acpi_status
  26.329 +ae_local_load_table (
  26.330 +	struct acpi_table_header        *table_ptr);
  26.331 +
  26.332 +void
  26.333 +acpi_db_close_debug_file (
  26.334 +	void);
  26.335 +
  26.336 +void
  26.337 +acpi_db_open_debug_file (
  26.338 +	char                            *name);
  26.339 +
  26.340 +acpi_status
  26.341 +acpi_db_load_acpi_table (
  26.342 +	char                            *filename);
  26.343 +
  26.344 +acpi_status
  26.345 +acpi_db_get_table_from_file (
  26.346 +	char                            *filename,
  26.347 +	struct acpi_table_header        **table);
  26.348 +
  26.349 +acpi_status
  26.350 +acpi_db_read_table_from_file (
  26.351 +	char                            *filename,
  26.352 +	struct acpi_table_header        **table);
  26.353 +
  26.354 +/*
  26.355 + * dbhistry - debugger HISTORY command
  26.356 + */
  26.357 +
  26.358 +void
  26.359 +acpi_db_add_to_history (
  26.360 +	char                            *command_line);
  26.361 +
  26.362 +void
  26.363 +acpi_db_display_history (void);
  26.364 +
  26.365 +char *
  26.366 +acpi_db_get_from_history (
  26.367 +	char                            *command_num_arg);
  26.368 +
  26.369 +
  26.370 +/*
  26.371 + * dbinput - user front-end to the AML debugger
  26.372 + */
  26.373 +
  26.374 +acpi_status
  26.375 +acpi_db_command_dispatch (
  26.376 +	char                            *input_buffer,
  26.377 +	struct acpi_walk_state          *walk_state,
  26.378 +	union acpi_parse_object         *op);
  26.379 +
  26.380 +void ACPI_SYSTEM_XFACE
  26.381 +acpi_db_execute_thread (
  26.382 +	void                            *context);
  26.383 +
  26.384 +acpi_status
  26.385 +acpi_db_user_commands (
  26.386 +	char                            prompt,
  26.387 +	union acpi_parse_object         *op);
  26.388 +
  26.389 +void
  26.390 +acpi_db_display_help (
  26.391 +	char                            *help_type);
  26.392 +
  26.393 +char *
  26.394 +acpi_db_get_next_token (
  26.395 +	char                            *string,
  26.396 +	char                            **next);
  26.397 +
  26.398 +u32
  26.399 +acpi_db_get_line (
  26.400 +	char                            *input_buffer);
  26.401 +
  26.402 +u32
  26.403 +acpi_db_match_command (
  26.404 +	char                            *user_command);
  26.405 +
  26.406 +void
  26.407 +acpi_db_single_thread (
  26.408 +	void);
  26.409 +
  26.410 +
  26.411 +/*
  26.412 + * dbstats - Generation and display of ACPI table statistics
  26.413 + */
  26.414 +
  26.415 +void
  26.416 +acpi_db_generate_statistics (
  26.417 +	union acpi_parse_object         *root,
  26.418 +	u8                              is_method);
  26.419 +
  26.420 +
  26.421 +acpi_status
  26.422 +acpi_db_display_statistics (
  26.423 +	char                            *type_arg);
  26.424 +
  26.425 +acpi_status
  26.426 +acpi_db_classify_one_object (
  26.427 +	acpi_handle                     obj_handle,
  26.428 +	u32                             nesting_level,
  26.429 +	void                            *context,
  26.430 +	void                            **return_value);
  26.431 +
  26.432 +void
  26.433 +acpi_db_count_namespace_objects (
  26.434 +	void);
  26.435 +
  26.436 +void
  26.437 +acpi_db_enumerate_object (
  26.438 +	union acpi_operand_object       *obj_desc);
  26.439 +
  26.440 +
  26.441 +/*
  26.442 + * dbutils - AML debugger utilities
  26.443 + */
  26.444 +
  26.445 +void
  26.446 +acpi_db_set_output_destination (
  26.447 +	u32                             where);
  26.448 +
  26.449 +void
  26.450 +acpi_db_dump_buffer (
  26.451 +	u32                             address);
  26.452 +
  26.453 +void
  26.454 +acpi_db_dump_object (
  26.455 +	union acpi_object               *obj_desc,
  26.456 +	u32                             level);
  26.457 +
  26.458 +void
  26.459 +acpi_db_prep_namestring (
  26.460 +	char                            *name);
  26.461 +
  26.462 +
  26.463 +acpi_status
  26.464 +acpi_db_second_pass_parse (
  26.465 +	union acpi_parse_object         *root);
  26.466 +
  26.467 +struct acpi_namespace_node *
  26.468 +acpi_db_local_ns_lookup (
  26.469 +	char                            *name);
  26.470 +
  26.471 +
  26.472 +#endif  /* __ACDEBUG_H__ */
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/xen/include/acpi/acdisasm.h	Mon Apr 05 13:12:24 2004 +0000
    27.3 @@ -0,0 +1,402 @@
    27.4 +/******************************************************************************
    27.5 + *
    27.6 + * Name: acdisasm.h - AML disassembler
    27.7 + *
    27.8 + *****************************************************************************/
    27.9 +
   27.10 +/*
   27.11 + * Copyright (C) 2000 - 2004, R. Byron Moore
   27.12 + * All rights reserved.
   27.13 + *
   27.14 + * Redistribution and use in source and binary forms, with or without
   27.15 + * modification, are permitted provided that the following conditions
   27.16 + * are met:
   27.17 + * 1. Redistributions of source code must retain the above copyright
   27.18 + *    notice, this list of conditions, and the following disclaimer,
   27.19 + *    without modification.
   27.20 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   27.21 + *    substantially similar to the "NO WARRANTY" disclaimer below
   27.22 + *    ("Disclaimer") and any redistribution must be conditioned upon
   27.23 + *    including a substantially similar Disclaimer requirement for further
   27.24 + *    binary redistribution.
   27.25 + * 3. Neither the names of the above-listed copyright holders nor the names
   27.26 + *    of any contributors may be used to endorse or promote products derived
   27.27 + *    from this software without specific prior written permission.
   27.28 + *
   27.29 + * Alternatively, this software may be distributed under the terms of the
   27.30 + * GNU General Public License ("GPL") version 2 as published by the Free
   27.31 + * Software Foundation.
   27.32 + *
   27.33 + * NO WARRANTY
   27.34 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   27.35 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   27.36 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   27.37 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   27.38 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   27.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   27.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   27.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   27.42 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   27.43 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   27.44 + * POSSIBILITY OF SUCH DAMAGES.
   27.45 + */
   27.46 +
   27.47 +#ifndef __ACDISASM_H__
   27.48 +#define __ACDISASM_H__
   27.49 +
   27.50 +#include "amlresrc.h"
   27.51 +
   27.52 +
   27.53 +#define BLOCK_NONE              0
   27.54 +#define BLOCK_PAREN             1
   27.55 +#define BLOCK_BRACE             2
   27.56 +#define BLOCK_COMMA_LIST        4
   27.57 +
   27.58 +extern const char                       *acpi_gbl_io_decode[2];
   27.59 +extern const char                       *acpi_gbl_word_decode[4];
   27.60 +extern const char                       *acpi_gbl_consume_decode[2];
   27.61 +extern const char                       *acpi_gbl_min_decode[2];
   27.62 +extern const char                       *acpi_gbl_max_decode[2];
   27.63 +extern const char                       *acpi_gbl_DECdecode[2];
   27.64 +extern const char                       *acpi_gbl_RNGdecode[4];
   27.65 +extern const char                       *acpi_gbl_MEMdecode[4];
   27.66 +extern const char                       *acpi_gbl_RWdecode[2];
   27.67 +extern const char                       *acpi_gbl_irq_decode[2];
   27.68 +extern const char                       *acpi_gbl_HEdecode[2];
   27.69 +extern const char                       *acpi_gbl_LLdecode[2];
   27.70 +extern const char                       *acpi_gbl_SHRdecode[2];
   27.71 +extern const char                       *acpi_gbl_TYPdecode[4];
   27.72 +extern const char                       *acpi_gbl_BMdecode[2];
   27.73 +extern const char                       *acpi_gbl_SIZdecode[4];
   27.74 +extern const char                       *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES];
   27.75 +extern const char                       *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES];
   27.76 +extern const char                       *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES];
   27.77 +extern const char                       *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS];
   27.78 +
   27.79 +
   27.80 +struct acpi_op_walk_info
   27.81 +{
   27.82 +	u32                             level;
   27.83 +	u32                             bit_offset;
   27.84 +};
   27.85 +
   27.86 +typedef
   27.87 +acpi_status (*asl_walk_callback) (
   27.88 +	union acpi_parse_object             *op,
   27.89 +	u32                                 level,
   27.90 +	void                                *context);
   27.91 +
   27.92 +
   27.93 +/*
   27.94 + * dmwalk
   27.95 + */
   27.96 +
   27.97 +void
   27.98 +acpi_dm_walk_parse_tree (
   27.99 +	union acpi_parse_object         *op,
  27.100 +	asl_walk_callback               descending_callback,
  27.101 +	asl_walk_callback               ascending_callback,
  27.102 +	void                            *context);
  27.103 +
  27.104 +acpi_status
  27.105 +acpi_dm_descending_op (
  27.106 +	union acpi_parse_object         *op,
  27.107 +	u32                             level,
  27.108 +	void                            *context);
  27.109 +
  27.110 +acpi_status
  27.111 +acpi_dm_ascending_op (
  27.112 +	union acpi_parse_object         *op,
  27.113 +	u32                             level,
  27.114 +	void                            *context);
  27.115 +
  27.116 +
  27.117 +/*
  27.118 + * dmopcode
  27.119 + */
  27.120 +
  27.121 +void
  27.122 +acpi_dm_validate_name (
  27.123 +	char                            *name,
  27.124 +	union acpi_parse_object         *op);
  27.125 +
  27.126 +u32
  27.127 +acpi_dm_dump_name (
  27.128 +	char                            *name);
  27.129 +
  27.130 +void
  27.131 +acpi_dm_unicode (
  27.132 +	union acpi_parse_object         *op);
  27.133 +
  27.134 +void
  27.135 +acpi_dm_disassemble (
  27.136 +	struct acpi_walk_state          *walk_state,
  27.137 +	union acpi_parse_object         *origin,
  27.138 +	u32                             num_opcodes);
  27.139 +
  27.140 +void
  27.141 +acpi_dm_namestring (
  27.142 +	char                            *name);
  27.143 +
  27.144 +void
  27.145 +acpi_dm_display_path (
  27.146 +	union acpi_parse_object         *op);
  27.147 +
  27.148 +void
  27.149 +acpi_dm_disassemble_one_op (
  27.150 +	struct acpi_walk_state          *walk_state,
  27.151 +	struct acpi_op_walk_info        *info,
  27.152 +	union acpi_parse_object         *op);
  27.153 +
  27.154 +void
  27.155 +acpi_dm_decode_internal_object (
  27.156 +	union acpi_operand_object       *obj_desc);
  27.157 +
  27.158 +u32
  27.159 +acpi_dm_block_type (
  27.160 +	union acpi_parse_object         *op);
  27.161 +
  27.162 +u32
  27.163 +acpi_dm_list_type (
  27.164 +	union acpi_parse_object         *op);
  27.165 +
  27.166 +acpi_status
  27.167 +acpi_ps_display_object_pathname (
  27.168 +	struct acpi_walk_state          *walk_state,
  27.169 +	union acpi_parse_object         *op);
  27.170 +
  27.171 +void
  27.172 +acpi_dm_method_flags (
  27.173 +	union acpi_parse_object         *op);
  27.174 +
  27.175 +void
  27.176 +acpi_dm_field_flags (
  27.177 +	union acpi_parse_object         *op);
  27.178 +
  27.179 +void
  27.180 +acpi_dm_address_space (
  27.181 +	u8                              space_id);
  27.182 +
  27.183 +void
  27.184 +acpi_dm_region_flags (
  27.185 +	union acpi_parse_object         *op);
  27.186 +
  27.187 +void
  27.188 +acpi_dm_match_op (
  27.189 +	union acpi_parse_object         *op);
  27.190 +
  27.191 +void
  27.192 +acpi_dm_match_keyword (
  27.193 +	union acpi_parse_object         *op);
  27.194 +
  27.195 +u8
  27.196 +acpi_dm_comma_if_list_member (
  27.197 +	union acpi_parse_object         *op);
  27.198 +
  27.199 +void
  27.200 +acpi_dm_comma_if_field_member (
  27.201 +	union acpi_parse_object         *op);
  27.202 +
  27.203 +
  27.204 +/*
  27.205 + * dmobject
  27.206 + */
  27.207 +
  27.208 +void
  27.209 +acpi_dm_decode_node (
  27.210 +	struct acpi_namespace_node      *node);
  27.211 +
  27.212 +void
  27.213 +acpi_dm_display_internal_object (
  27.214 +	union acpi_operand_object       *obj_desc,
  27.215 +	struct acpi_walk_state          *walk_state);
  27.216 +
  27.217 +void
  27.218 +acpi_dm_display_arguments (
  27.219 +	struct acpi_walk_state          *walk_state);
  27.220 +
  27.221 +void
  27.222 +acpi_dm_display_locals (
  27.223 +	struct acpi_walk_state          *walk_state);
  27.224 +
  27.225 +void
  27.226 +acpi_dm_dump_method_info (
  27.227 +	acpi_status                     status,
  27.228 +	struct acpi_walk_state          *walk_state,
  27.229 +	union acpi_parse_object         *op);
  27.230 +
  27.231 +
  27.232 +/*
  27.233 + * dmbuffer
  27.234 + */
  27.235 +
  27.236 +void
  27.237 +acpi_is_eisa_id (
  27.238 +	union acpi_parse_object         *op);
  27.239 +
  27.240 +void
  27.241 +acpi_dm_eisa_id (
  27.242 +	u32                             encoded_id);
  27.243 +
  27.244 +u8
  27.245 +acpi_dm_is_unicode_buffer (
  27.246 +	union acpi_parse_object         *op);
  27.247 +
  27.248 +u8
  27.249 +acpi_dm_is_string_buffer (
  27.250 +	union acpi_parse_object         *op);
  27.251 +
  27.252 +
  27.253 +/*
  27.254 + * dmresrc
  27.255 + */
  27.256 +
  27.257 +void
  27.258 +acpi_dm_disasm_byte_list (
  27.259 +	u32                             level,
  27.260 +	u8                              *byte_data,
  27.261 +	u32                             byte_count);
  27.262 +
  27.263 +void
  27.264 +acpi_dm_byte_list (
  27.265 +	struct acpi_op_walk_info        *info,
  27.266 +	union acpi_parse_object         *op);
  27.267 +
  27.268 +void
  27.269 +acpi_dm_resource_descriptor (
  27.270 +	struct acpi_op_walk_info        *info,
  27.271 +	u8                              *byte_data,
  27.272 +	u32                             byte_count);
  27.273 +
  27.274 +u8
  27.275 +acpi_dm_is_resource_descriptor (
  27.276 +	union acpi_parse_object         *op);
  27.277 +
  27.278 +void
  27.279 +acpi_dm_indent (
  27.280 +	u32                             level);
  27.281 +
  27.282 +void
  27.283 +acpi_dm_bit_list (
  27.284 +	u16                             mask);
  27.285 +
  27.286 +void
  27.287 +acpi_dm_decode_attribute (
  27.288 +	u8                              attribute);
  27.289 +
  27.290 +/*
  27.291 + * dmresrcl
  27.292 + */
  27.293 +
  27.294 +void
  27.295 +acpi_dm_io_flags (
  27.296 +		u8                          flags);
  27.297 +
  27.298 +void
  27.299 +acpi_dm_memory_flags (
  27.300 +	u8                              flags,
  27.301 +	u8                              specific_flags);
  27.302 +
  27.303 +void
  27.304 +acpi_dm_word_descriptor (
  27.305 +	struct asl_word_address_desc    *resource,
  27.306 +	u32                             length,
  27.307 +	u32                             level);
  27.308 +
  27.309 +void
  27.310 +acpi_dm_dword_descriptor (
  27.311 +	struct asl_dword_address_desc   *resource,
  27.312 +	u32                             length,
  27.313 +	u32                             level);
  27.314 +
  27.315 +void
  27.316 +acpi_dm_qword_descriptor (
  27.317 +	struct asl_qword_address_desc   *resource,
  27.318 +	u32                             length,
  27.319 +	u32                             level);
  27.320 +
  27.321 +void
  27.322 +acpi_dm_memory24_descriptor (
  27.323 +	struct asl_memory_24_desc       *resource,
  27.324 +	u32                             length,
  27.325 +	u32                             level);
  27.326 +
  27.327 +void
  27.328 +acpi_dm_memory32_descriptor (
  27.329 +	struct asl_memory_32_desc       *resource,
  27.330 +	u32                             length,
  27.331 +	u32                             level);
  27.332 +
  27.333 +void
  27.334 +acpi_dm_fixed_mem32_descriptor (
  27.335 +	struct asl_fixed_memory_32_desc *resource,
  27.336 +	u32                             length,
  27.337 +	u32                             level);
  27.338 +
  27.339 +void
  27.340 +acpi_dm_generic_register_descriptor (
  27.341 +	struct asl_general_register_desc *resource,
  27.342 +	u32                             length,
  27.343 +	u32                             level);
  27.344 +
  27.345 +void
  27.346 +acpi_dm_interrupt_descriptor (
  27.347 +	struct asl_extended_xrupt_desc *resource,
  27.348 +	u32                             length,
  27.349 +	u32                             level);
  27.350 +
  27.351 +void
  27.352 +acpi_dm_vendor_large_descriptor (
  27.353 +	struct asl_large_vendor_desc    *resource,
  27.354 +	u32                             length,
  27.355 +	u32                             level);
  27.356 +
  27.357 +
  27.358 +/*
  27.359 + * dmresrcs
  27.360 + */
  27.361 +
  27.362 +void
  27.363 +acpi_dm_irq_descriptor (
  27.364 +	struct asl_irq_format_desc      *resource,
  27.365 +	u32                             length,
  27.366 +	u32                             level);
  27.367 +
  27.368 +void
  27.369 +acpi_dm_dma_descriptor (
  27.370 +	struct asl_dma_format_desc      *resource,
  27.371 +	u32                             length,
  27.372 +	u32                             level);
  27.373 +
  27.374 +void
  27.375 +acpi_dm_io_descriptor (
  27.376 +	struct asl_io_port_desc         *resource,
  27.377 +	u32                             length,
  27.378 +	u32                             level);
  27.379 +
  27.380 +void
  27.381 +acpi_dm_fixed_io_descriptor (
  27.382 +	struct asl_fixed_io_port_desc   *resource,
  27.383 +	u32                             length,
  27.384 +	u32                             level);
  27.385 +
  27.386 +void
  27.387 +acpi_dm_start_dependent_descriptor (
  27.388 +	struct asl_start_dependent_desc *resource,
  27.389 +	u32                             length,
  27.390 +	u32                             level);
  27.391 +
  27.392 +void
  27.393 +acpi_dm_end_dependent_descriptor (
  27.394 +	struct asl_start_dependent_desc *resource,
  27.395 +	u32                             length,
  27.396 +	u32                             level);
  27.397 +
  27.398 +void
  27.399 +acpi_dm_vendor_small_descriptor (
  27.400 +	struct asl_small_vendor_desc    *resource,
  27.401 +	u32                             length,
  27.402 +	u32                             level);
  27.403 +
  27.404 +
  27.405 +#endif  /* __ACDISASM_H__ */
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/xen/include/acpi/acdispat.h	Mon Apr 05 13:12:24 2004 +0000
    28.3 @@ -0,0 +1,513 @@
    28.4 +/******************************************************************************
    28.5 + *
    28.6 + * Name: acdispat.h - dispatcher (parser to interpreter interface)
    28.7 + *
    28.8 + *****************************************************************************/
    28.9 +
   28.10 +/*
   28.11 + * Copyright (C) 2000 - 2004, R. Byron Moore
   28.12 + * All rights reserved.
   28.13 + *
   28.14 + * Redistribution and use in source and binary forms, with or without
   28.15 + * modification, are permitted provided that the following conditions
   28.16 + * are met:
   28.17 + * 1. Redistributions of source code must retain the above copyright
   28.18 + *    notice, this list of conditions, and the following disclaimer,
   28.19 + *    without modification.
   28.20 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   28.21 + *    substantially similar to the "NO WARRANTY" disclaimer below
   28.22 + *    ("Disclaimer") and any redistribution must be conditioned upon
   28.23 + *    including a substantially similar Disclaimer requirement for further
   28.24 + *    binary redistribution.
   28.25 + * 3. Neither the names of the above-listed copyright holders nor the names
   28.26 + *    of any contributors may be used to endorse or promote products derived
   28.27 + *    from this software without specific prior written permission.
   28.28 + *
   28.29 + * Alternatively, this software may be distributed under the terms of the
   28.30 + * GNU General Public License ("GPL") version 2 as published by the Free
   28.31 + * Software Foundation.
   28.32 + *
   28.33 + * NO WARRANTY
   28.34 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   28.35 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   28.36 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   28.37 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   28.38 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   28.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   28.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   28.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   28.42 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   28.43 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   28.44 + * POSSIBILITY OF SUCH DAMAGES.
   28.45 + */
   28.46 +
   28.47 +
   28.48 +#ifndef _ACDISPAT_H_
   28.49 +#define _ACDISPAT_H_
   28.50 +
   28.51 +
   28.52 +#define NAMEOF_LOCAL_NTE    "__L0"
   28.53 +#define NAMEOF_ARG_NTE      "__A0"
   28.54 +
   28.55 +
   28.56 +/* Common interfaces */
   28.57 +
   28.58 +acpi_status
   28.59 +acpi_ds_obj_stack_push (
   28.60 +	void                            *object,
   28.61 +	struct acpi_walk_state          *walk_state);
   28.62 +
   28.63 +acpi_status
   28.64 +acpi_ds_obj_stack_pop (
   28.65 +	u32                             pop_count,
   28.66 +	struct acpi_walk_state          *walk_state);
   28.67 +
   28.68 +void *
   28.69 +acpi_ds_obj_stack_get_value (
   28.70 +	u32                             index,
   28.71 +	struct acpi_walk_state          *walk_state);
   28.72 +
   28.73 +acpi_status
   28.74 +acpi_ds_obj_stack_pop_object (
   28.75 +	union acpi_operand_object       **object,
   28.76 +	struct acpi_walk_state          *walk_state);
   28.77 +
   28.78 +
   28.79 +/* dsopcode - support for late evaluation */
   28.80 +
   28.81 +acpi_status
   28.82 +acpi_ds_execute_arguments (
   28.83 +	struct acpi_namespace_node      *node,
   28.84 +	struct acpi_namespace_node      *scope_node,
   28.85 +	u32                             aml_length,
   28.86 +	u8                              *aml_start);
   28.87 +
   28.88 +acpi_status
   28.89 +acpi_ds_get_buffer_field_arguments (
   28.90 +	union acpi_operand_object       *obj_desc);
   28.91 +
   28.92 +acpi_status
   28.93 +acpi_ds_get_region_arguments (
   28.94 +	union acpi_operand_object       *rgn_desc);
   28.95 +
   28.96 +acpi_status
   28.97 +acpi_ds_get_buffer_arguments (
   28.98 +	union acpi_operand_object       *obj_desc);
   28.99 +
  28.100 +acpi_status
  28.101 +acpi_ds_get_package_arguments (
  28.102 +	union acpi_operand_object       *obj_desc);
  28.103 +
  28.104 +acpi_status
  28.105 +acpi_ds_init_buffer_field (
  28.106 +	u16                             aml_opcode,
  28.107 +	union acpi_operand_object       *obj_desc,
  28.108 +	union acpi_operand_object       *buffer_desc,
  28.109 +	union acpi_operand_object       *offset_desc,
  28.110 +	union acpi_operand_object       *length_desc,
  28.111 +	union acpi_operand_object       *result_desc);
  28.112 +
  28.113 +acpi_status
  28.114 +acpi_ds_eval_buffer_field_operands (
  28.115 +	struct acpi_walk_state          *walk_state,
  28.116 +	union acpi_parse_object         *op);
  28.117 +
  28.118 +acpi_status
  28.119 +acpi_ds_eval_region_operands (
  28.120 +	struct acpi_walk_state          *walk_state,
  28.121 +	union acpi_parse_object         *op);
  28.122 +
  28.123 +acpi_status
  28.124 +acpi_ds_eval_data_object_operands (
  28.125 +	struct acpi_walk_state          *walk_state,
  28.126 +	union acpi_parse_object         *op,
  28.127 +	union acpi_operand_object       *obj_desc);
  28.128 +
  28.129 +acpi_status
  28.130 +acpi_ds_initialize_region (
  28.131 +	acpi_handle                     obj_handle);
  28.132 +
  28.133 +
  28.134 +/* dsctrl - Parser/Interpreter interface, control stack routines */
  28.135 +
  28.136 +
  28.137 +acpi_status
  28.138 +acpi_ds_exec_begin_control_op (
  28.139 +	struct acpi_walk_state          *walk_state,
  28.140 +	union acpi_parse_object         *op);
  28.141 +
  28.142 +acpi_status
  28.143 +acpi_ds_exec_end_control_op (
  28.144 +	struct acpi_walk_state          *walk_state,
  28.145 +	union acpi_parse_object         *op);
  28.146 +
  28.147 +
  28.148 +/* dsexec - Parser/Interpreter interface, method execution callbacks */
  28.149 +
  28.150 +
  28.151 +acpi_status
  28.152 +acpi_ds_get_predicate_value (
  28.153 +	struct acpi_walk_state          *walk_state,
  28.154 +	union acpi_operand_object       *result_obj);
  28.155 +
  28.156 +acpi_status
  28.157 +acpi_ds_exec_begin_op (
  28.158 +	struct acpi_walk_state          *walk_state,
  28.159 +	union acpi_parse_object         **out_op);
  28.160 +
  28.161 +acpi_status
  28.162 +acpi_ds_exec_end_op (
  28.163 +	struct acpi_walk_state          *state);
  28.164 +
  28.165 +
  28.166 +/* dsfield - Parser/Interpreter interface for AML fields */
  28.167 +
  28.168 +acpi_status
  28.169 +acpi_ds_get_field_names (
  28.170 +	struct acpi_create_field_info   *info,
  28.171 +	struct acpi_walk_state          *walk_state,
  28.172 +	union acpi_parse_object         *arg);
  28.173 +
  28.174 +acpi_status
  28.175 +acpi_ds_create_field (
  28.176 +	union acpi_parse_object         *op,
  28.177 +	struct acpi_namespace_node      *region_node,
  28.178 +	struct acpi_walk_state          *walk_state);
  28.179 +
  28.180 +acpi_status
  28.181 +acpi_ds_create_bank_field (
  28.182 +	union acpi_parse_object         *op,
  28.183 +	struct acpi_namespace_node      *region_node,
  28.184 +	struct acpi_walk_state          *walk_state);
  28.185 +
  28.186 +acpi_status
  28.187 +acpi_ds_create_index_field (
  28.188 +	union acpi_parse_object         *op,
  28.189 +	struct acpi_namespace_node      *region_node,
  28.190 +	struct acpi_walk_state          *walk_state);
  28.191 +
  28.192 +acpi_status
  28.193 +acpi_ds_create_buffer_field (
  28.194 +	union acpi_parse_object         *op,
  28.195 +	struct acpi_walk_state          *walk_state);
  28.196 +
  28.197 +acpi_status
  28.198 +acpi_ds_init_field_objects (
  28.199 +	union acpi_parse_object         *op,
  28.200 +	struct acpi_walk_state          *walk_state);
  28.201 +
  28.202 +
  28.203 +/* dsload - Parser/Interpreter interface, namespace load callbacks */
  28.204 +
  28.205 +acpi_status
  28.206 +acpi_ds_load1_begin_op (
  28.207 +	struct acpi_walk_state          *walk_state,
  28.208 +	union acpi_parse_object         **out_op);
  28.209 +
  28.210 +acpi_status
  28.211 +acpi_ds_load1_end_op (
  28.212 +	struct acpi_walk_state          *walk_state);
  28.213 +
  28.214 +acpi_status
  28.215 +acpi_ds_load2_begin_op (
  28.216 +	struct acpi_walk_state          *walk_state,
  28.217 +	union acpi_parse_object         **out_op);
  28.218 +
  28.219 +acpi_status
  28.220 +acpi_ds_load2_end_op (
  28.221 +	struct acpi_walk_state          *walk_state);
  28.222 +
  28.223 +acpi_status
  28.224 +acpi_ds_init_callbacks (
  28.225 +	struct acpi_walk_state          *walk_state,
  28.226 +	u32                             pass_number);
  28.227 +
  28.228 +
  28.229 +/* dsmthdat - method data (locals/args) */
  28.230 +
  28.231 +
  28.232 +acpi_status
  28.233 +acpi_ds_store_object_to_local (
  28.234 +	u16                             opcode,
  28.235 +	u32                             index,
  28.236 +	union acpi_operand_object       *src_desc,
  28.237 +	struct acpi_walk_state          *walk_state);
  28.238 +
  28.239 +acpi_status
  28.240 +acpi_ds_method_data_get_entry (
  28.241 +	u16                             opcode,
  28.242 +	u32                             index,
  28.243 +	struct acpi_walk_state          *walk_state,
  28.244 +	union acpi_operand_object       ***node);
  28.245 +
  28.246 +void
  28.247 +acpi_ds_method_data_delete_all (
  28.248 +	struct acpi_walk_state          *walk_state);
  28.249 +
  28.250 +u8
  28.251 +acpi_ds_is_method_value (
  28.252 +	union acpi_operand_object       *obj_desc);
  28.253 +
  28.254 +acpi_object_type
  28.255 +acpi_ds_method_data_get_type (
  28.256 +	u16                             opcode,
  28.257 +	u32                             index,
  28.258 +	struct acpi_walk_state          *walk_state);
  28.259 +
  28.260 +acpi_status
  28.261 +acpi_ds_method_data_get_value (
  28.262 +	u16                             opcode,
  28.263 +	u32                             index,
  28.264 +	struct acpi_walk_state          *walk_state,
  28.265 +	union acpi_operand_object       **dest_desc);
  28.266 +
  28.267 +void
  28.268 +acpi_ds_method_data_delete_value (
  28.269 +	u16                             opcode,
  28.270 +	u32                             index,
  28.271 +	struct acpi_walk_state          *walk_state);
  28.272 +
  28.273 +acpi_status
  28.274 +acpi_ds_method_data_init_args (
  28.275 +	union acpi_operand_object       **params,
  28.276 +	u32                             max_param_count,
  28.277 +	struct acpi_walk_state          *walk_state);
  28.278 +
  28.279 +acpi_status
  28.280 +acpi_ds_method_data_get_node (
  28.281 +	u16                             opcode,
  28.282 +	u32                             index,
  28.283 +	struct acpi_walk_state          *walk_state,
  28.284 +	struct acpi_namespace_node      **node);
  28.285 +
  28.286 +void
  28.287 +acpi_ds_method_data_init (
  28.288 +	struct acpi_walk_state          *walk_state);
  28.289 +
  28.290 +acpi_status
  28.291 +acpi_ds_method_data_set_value (
  28.292 +	u16                             opcode,
  28.293 +	u32                             index,
  28.294 +	union acpi_operand_object       *object,
  28.295 +	struct acpi_walk_state          *walk_state);
  28.296 +
  28.297 +
  28.298 +/* dsmethod - Parser/Interpreter interface - control method parsing */
  28.299 +
  28.300 +acpi_status
  28.301 +acpi_ds_parse_method (
  28.302 +	acpi_handle                     obj_handle);
  28.303 +
  28.304 +acpi_status
  28.305 +acpi_ds_call_control_method (
  28.306 +	struct acpi_thread_state        *thread,
  28.307 +	struct acpi_walk_state          *walk_state,
  28.308 +	union acpi_parse_object         *op);
  28.309 +
  28.310 +acpi_status
  28.311 +acpi_ds_restart_control_method (
  28.312 +	struct acpi_walk_state          *walk_state,
  28.313 +	union acpi_operand_object       *return_desc);
  28.314 +
  28.315 +acpi_status
  28.316 +acpi_ds_terminate_control_method (
  28.317 +	struct acpi_walk_state          *walk_state);
  28.318 +
  28.319 +acpi_status
  28.320 +acpi_ds_begin_method_execution (
  28.321 +	struct acpi_namespace_node      *method_node,
  28.322 +	union acpi_operand_object       *obj_desc,
  28.323 +	struct acpi_namespace_node      *calling_method_node);
  28.324 +
  28.325 +
  28.326 +/* dsobj - Parser/Interpreter interface - object initialization and conversion */
  28.327 +
  28.328 +acpi_status
  28.329 +acpi_ds_init_one_object (
  28.330 +	acpi_handle                     obj_handle,
  28.331 +	u32                             level,
  28.332 +	void                            *context,
  28.333 +	void                            **return_value);
  28.334 +
  28.335 +acpi_status
  28.336 +acpi_ds_initialize_objects (
  28.337 +	struct acpi_table_desc          *table_desc,
  28.338 +	struct acpi_namespace_node      *start_node);
  28.339 +
  28.340 +acpi_status
  28.341 +acpi_ds_build_internal_buffer_obj (
  28.342 +	struct acpi_walk_state          *walk_state,
  28.343 +	union acpi_parse_object         *op,
  28.344 +	u32                             buffer_length,
  28.345 +	union acpi_operand_object       **obj_desc_ptr);
  28.346 +
  28.347 +acpi_status
  28.348 +acpi_ds_build_internal_package_obj (
  28.349 +	struct acpi_walk_state          *walk_state,
  28.350 +	union acpi_parse_object         *op,
  28.351 +	u32                             package_length,
  28.352 +	union acpi_operand_object       **obj_desc);
  28.353 +
  28.354 +acpi_status
  28.355 +acpi_ds_build_internal_object (
  28.356 +	struct acpi_walk_state          *walk_state,
  28.357 +	union acpi_parse_object         *op,
  28.358 +	union acpi_operand_object       **obj_desc_ptr);
  28.359 +
  28.360 +acpi_status
  28.361 +acpi_ds_init_object_from_op (
  28.362 +	struct acpi_walk_state          *walk_state,
  28.363 +	union acpi_parse_object         *op,
  28.364 +	u16                             opcode,
  28.365 +	union acpi_operand_object       **obj_desc);
  28.366 +
  28.367 +acpi_status
  28.368 +acpi_ds_create_node (
  28.369 +	struct acpi_walk_state          *walk_state,
  28.370 +	struct acpi_namespace_node      *node,
  28.371 +	union acpi_parse_object         *op);
  28.372 +
  28.373 +
  28.374 +/* dsutils - Parser/Interpreter interface utility routines */
  28.375 +
  28.376 +u8
  28.377 +acpi_ds_is_result_used (
  28.378 +	union acpi_parse_object         *op,
  28.379 +	struct acpi_walk_state          *walk_state);
  28.380 +
  28.381 +void
  28.382 +acpi_ds_delete_result_if_not_used (
  28.383 +	union acpi_parse_object         *op,
  28.384 +	union acpi_operand_object       *result_obj,
  28.385 +	struct acpi_walk_state          *walk_state);
  28.386 +
  28.387 +acpi_status
  28.388 +acpi_ds_create_operand (
  28.389 +	struct acpi_walk_state          *walk_state,
  28.390 +	union acpi_parse_object         *arg,
  28.391 +	u32                             args_remaining);
  28.392 +
  28.393 +acpi_status
  28.394 +acpi_ds_create_operands (
  28.395 +	struct acpi_walk_state          *walk_state,
  28.396 +	union acpi_parse_object         *first_arg);
  28.397 +
  28.398 +acpi_status
  28.399 +acpi_ds_resolve_operands (
  28.400 +	struct acpi_walk_state          *walk_state);
  28.401 +
  28.402 +void
  28.403 +acpi_ds_clear_operands (
  28.404 +	struct acpi_walk_state          *walk_state);
  28.405 +
  28.406 +
  28.407 +/*
  28.408 + * dswscope - Scope Stack manipulation
  28.409 + */
  28.410 +
  28.411 +acpi_status
  28.412 +acpi_ds_scope_stack_push (
  28.413 +	struct acpi_namespace_node      *node,
  28.414 +	acpi_object_type                type,
  28.415 +	struct acpi_walk_state          *walk_state);
  28.416 +
  28.417 +
  28.418 +acpi_status
  28.419 +acpi_ds_scope_stack_pop (
  28.420 +	struct acpi_walk_state          *walk_state);
  28.421 +
  28.422 +void
  28.423 +acpi_ds_scope_stack_clear (
  28.424 +	struct acpi_walk_state          *walk_state);
  28.425 +
  28.426 +
  28.427 +/* dswstate - parser WALK_STATE management routines */
  28.428 +
  28.429 +struct acpi_walk_state *
  28.430 +acpi_ds_create_walk_state (
  28.431 +	acpi_owner_id                   owner_id,
  28.432 +	union acpi_parse_object         *origin,
  28.433 +	union acpi_operand_object       *mth_desc,
  28.434 +	struct acpi_thread_state        *thread);
  28.435 +
  28.436 +acpi_status
  28.437 +acpi_ds_init_aml_walk (
  28.438 +	struct acpi_walk_state          *walk_state,
  28.439 +	union acpi_parse_object         *op,
  28.440 +	struct acpi_namespace_node      *method_node,
  28.441 +	u8                              *aml_start,
  28.442 +	u32                             aml_length,
  28.443 +	union acpi_operand_object       **params,
  28.444 +	union acpi_operand_object       **return_obj_desc,
  28.445 +	u32                             pass_number);
  28.446 +
  28.447 +acpi_status
  28.448 +acpi_ds_obj_stack_delete_all (
  28.449 +	struct acpi_walk_state          *walk_state);
  28.450 +
  28.451 +acpi_status
  28.452 +acpi_ds_obj_stack_pop_and_delete (
  28.453 +	u32                             pop_count,
  28.454 +	struct acpi_walk_state          *walk_state);
  28.455 +
  28.456 +void
  28.457 +acpi_ds_delete_walk_state (
  28.458 +	struct acpi_walk_state          *walk_state);
  28.459 +
  28.460 +struct acpi_walk_state *
  28.461 +acpi_ds_pop_walk_state (
  28.462 +	struct acpi_thread_state        *thread);
  28.463 +
  28.464 +void
  28.465 +acpi_ds_push_walk_state (
  28.466 +	struct acpi_walk_state          *walk_state,
  28.467 +	struct acpi_thread_state        *thread);
  28.468 +
  28.469 +acpi_status
  28.470 +acpi_ds_result_stack_pop (
  28.471 +	struct acpi_walk_state          *walk_state);
  28.472 +
  28.473 +acpi_status
  28.474 +acpi_ds_result_stack_push (
  28.475 +	struct acpi_walk_state          *walk_state);
  28.476 +
  28.477 +acpi_status
  28.478 +acpi_ds_result_stack_clear (
  28.479 +	struct acpi_walk_state          *walk_state);
  28.480 +
  28.481 +struct acpi_walk_state *
  28.482 +acpi_ds_get_current_walk_state (
  28.483 +	struct acpi_thread_state        *thread);
  28.484 +
  28.485 +void
  28.486 +acpi_ds_delete_walk_state_cache (
  28.487 +	void);
  28.488 +
  28.489 +acpi_status
  28.490 +acpi_ds_result_insert (
  28.491 +	void                            *object,
  28.492 +	u32                             index,
  28.493 +	struct acpi_walk_state          *walk_state);
  28.494 +
  28.495 +acpi_status
  28.496 +acpi_ds_result_remove (
  28.497 +	union acpi_operand_object       **object,
  28.498 +	u32                             index,
  28.499 +	struct acpi_walk_state          *walk_state);
  28.500 +
  28.501 +acpi_status
  28.502 +acpi_ds_result_pop (
  28.503 +	union acpi_operand_object       **object,
  28.504 +	struct acpi_walk_state          *walk_state);
  28.505 +
  28.506 +acpi_status
  28.507 +acpi_ds_result_push (
  28.508 +	union acpi_operand_object       *object,
  28.509 +	struct acpi_walk_state          *walk_state);
  28.510 +
  28.511 +acpi_status
  28.512 +acpi_ds_result_pop_from_bottom (
  28.513 +	union acpi_operand_object       **object,
  28.514 +	struct acpi_walk_state          *walk_state);
  28.515 +
  28.516 +#endif /* _ACDISPAT_H_ */
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/xen/include/acpi/acevents.h	Mon Apr 05 13:12:24 2004 +0000
    29.3 @@ -0,0 +1,274 @@
    29.4 +/******************************************************************************
    29.5 + *
    29.6 + * Name: acevents.h - Event subcomponent prototypes and defines
    29.7 + *
    29.8 + *****************************************************************************/
    29.9 +
   29.10 +/*
   29.11 + * Copyright (C) 2000 - 2004, R. Byron Moore
   29.12 + * All rights reserved.
   29.13 + *
   29.14 + * Redistribution and use in source and binary forms, with or without
   29.15 + * modification, are permitted provided that the following conditions
   29.16 + * are met:
   29.17 + * 1. Redistributions of source code must retain the above copyright
   29.18 + *    notice, this list of conditions, and the following disclaimer,
   29.19 + *    without modification.
   29.20 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   29.21 + *    substantially similar to the "NO WARRANTY" disclaimer below
   29.22 + *    ("Disclaimer") and any redistribution must be conditioned upon
   29.23 + *    including a substantially similar Disclaimer requirement for further
   29.24 + *    binary redistribution.
   29.25 + * 3. Neither the names of the above-listed copyright holders nor the names
   29.26 + *    of any contributors may be used to endorse or promote products derived
   29.27 + *    from this software without specific prior written permission.
   29.28 + *
   29.29 + * Alternatively, this software may be distributed under the terms of the
   29.30 + * GNU General Public License ("GPL") version 2 as published by the Free
   29.31 + * Software Foundation.
   29.32 + *
   29.33 + * NO WARRANTY
   29.34 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   29.35 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   29.36 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   29.37 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   29.38 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   29.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   29.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   29.42 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   29.43 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   29.44 + * POSSIBILITY OF SUCH DAMAGES.
   29.45 + */
   29.46 +
   29.47 +#ifndef __ACEVENTS_H__
   29.48 +#define __ACEVENTS_H__
   29.49 +
   29.50 +
   29.51 +acpi_status
   29.52 +acpi_ev_initialize (
   29.53 +	void);
   29.54 +
   29.55 +acpi_status
   29.56 +acpi_ev_handler_initialize (
   29.57 +	void);
   29.58 +
   29.59 +
   29.60 +/*
   29.61 + * Evfixed - Fixed event handling
   29.62 + */
   29.63 +
   29.64 +acpi_status
   29.65 +acpi_ev_fixed_event_initialize (
   29.66 +	void);
   29.67 +
   29.68 +u32
   29.69 +acpi_ev_fixed_event_detect (
   29.70 +	void);
   29.71 +
   29.72 +u32
   29.73 +acpi_ev_fixed_event_dispatch (
   29.74 +	u32                             event);
   29.75 +
   29.76 +
   29.77 +/*
   29.78 + * Evmisc
   29.79 + */
   29.80 +
   29.81 +u8
   29.82 +acpi_ev_is_notify_object (
   29.83 +	struct acpi_namespace_node      *node);
   29.84 +
   29.85 +acpi_status
   29.86 +acpi_ev_acquire_global_lock(
   29.87 +	u16                             timeout);
   29.88 +
   29.89 +acpi_status
   29.90 +acpi_ev_release_global_lock(
   29.91 +	void);
   29.92 +
   29.93 +acpi_status
   29.94 +acpi_ev_init_global_lock_handler (
   29.95 +	void);
   29.96 +
   29.97 +u32
   29.98 +acpi_ev_get_gpe_number_index (
   29.99 +	u32                             gpe_number);
  29.100 +
  29.101 +acpi_status
  29.102 +acpi_ev_queue_notify_request (
  29.103 +	struct acpi_namespace_node      *node,
  29.104 +	u32                             notify_value);
  29.105 +
  29.106 +void ACPI_SYSTEM_XFACE
  29.107 +acpi_ev_notify_dispatch (
  29.108 +	void                            *context);
  29.109 +
  29.110 +
  29.111 +/*
  29.112 + * Evgpe - GPE handling and dispatch
  29.113 + */
  29.114 +
  29.115 +acpi_status
  29.116 +acpi_ev_walk_gpe_list (
  29.117 +	ACPI_GPE_CALLBACK       gpe_walk_callback);
  29.118 +
  29.119 +u8
  29.120 +acpi_ev_valid_gpe_event (
  29.121 +	struct acpi_gpe_event_info      *gpe_event_info);
  29.122 +
  29.123 +struct acpi_gpe_event_info *
  29.124 +acpi_ev_get_gpe_event_info (
  29.125 +	acpi_handle                     gpe_device,
  29.126 +	u32                             gpe_number);
  29.127 +
  29.128 +acpi_status
  29.129 +acpi_ev_gpe_initialize (
  29.130 +	void);
  29.131 +
  29.132 +acpi_status
  29.133 +acpi_ev_create_gpe_block (
  29.134 +	struct acpi_namespace_node      *gpe_device,
  29.135 +	struct acpi_generic_address     *gpe_block_address,
  29.136 +	u32                             register_count,
  29.137 +	u8                              gpe_block_base_number,
  29.138 +	u32                             interrupt_level,
  29.139 +	struct acpi_gpe_block_info      **return_gpe_block);
  29.140 +
  29.141 +acpi_status
  29.142 +acpi_ev_delete_gpe_block (
  29.143 +	struct acpi_gpe_block_info      *gpe_block);
  29.144 +
  29.145 +u32
  29.146 +acpi_ev_gpe_dispatch (
  29.147 +	struct acpi_gpe_event_info      *gpe_event_info,
  29.148 +	u32                             gpe_number);
  29.149 +
  29.150 +u32
  29.151 +acpi_ev_gpe_detect (
  29.152 +	struct acpi_gpe_xrupt_info      *gpe_xrupt_list);
  29.153 +
  29.154 +/*
  29.155 + * Evregion - Address Space handling
  29.156 + */
  29.157 +
  29.158 +acpi_status
  29.159 +acpi_ev_init_address_spaces (
  29.160 +	void);
  29.161 +
  29.162 +acpi_status
  29.163 +acpi_ev_address_space_dispatch (
  29.164 +	union acpi_operand_object      *region_obj,
  29.165 +	u32                             function,
  29.166 +	acpi_physical_address           address,
  29.167 +	u32                             bit_width,
  29.168 +	void                            *value);
  29.169 +
  29.170 +acpi_status
  29.171 +acpi_ev_install_handler (
  29.172 +	acpi_handle                     obj_handle,
  29.173 +	u32                             level,
  29.174 +	void                            *context,
  29.175 +	void                            **return_value);
  29.176 +
  29.177 +acpi_status
  29.178 +acpi_ev_attach_region (
  29.179 +	union acpi_operand_object       *handler_obj,
  29.180 +	union acpi_operand_object       *region_obj,
  29.181 +	u8                              acpi_ns_is_locked);
  29.182 +
  29.183 +void
  29.184 +acpi_ev_detach_region (
  29.185 +	union acpi_operand_object      *region_obj,
  29.186 +	u8                              acpi_ns_is_locked);
  29.187 +
  29.188 +acpi_status
  29.189 +acpi_ev_execute_reg_method (
  29.190 +	union acpi_operand_object      *region_obj,
  29.191 +	u32                             function);
  29.192 +
  29.193 +acpi_status
  29.194 +acpi_ev_reg_run (
  29.195 +	acpi_handle                     obj_handle,
  29.196 +	u32                             level,
  29.197 +	void                            *context,
  29.198 +	void                            **return_value);
  29.199 +
  29.200 +/*
  29.201 + * Evregini - Region initialization and setup
  29.202 + */
  29.203 +
  29.204 +acpi_status
  29.205 +acpi_ev_system_memory_region_setup (
  29.206 +	acpi_handle                     handle,
  29.207 +	u32                             function,
  29.208 +	void                            *handler_context,
  29.209 +	void                            **region_context);
  29.210 +
  29.211 +acpi_status
  29.212 +acpi_ev_io_space_region_setup (
  29.213 +	acpi_handle                     handle,
  29.214 +	u32                             function,
  29.215 +	void                            *handler_context,
  29.216 +	void                            **region_context);
  29.217 +
  29.218 +acpi_status
  29.219 +acpi_ev_pci_config_region_setup (
  29.220 +	acpi_handle                     handle,
  29.221 +	u32                             function,
  29.222 +	void                            *handler_context,
  29.223 +	void                            **region_context);
  29.224 +
  29.225 +acpi_status
  29.226 +acpi_ev_cmos_region_setup (
  29.227 +	acpi_handle                     handle,
  29.228 +	u32                             function,
  29.229 +	void                            *handler_context,
  29.230 +	void                            **region_context);
  29.231 +
  29.232 +acpi_status
  29.233 +acpi_ev_pci_bar_region_setup (
  29.234 +	acpi_handle                     handle,
  29.235 +	u32                             function,
  29.236 +	void                            *handler_context,
  29.237 +	void                            **region_context);
  29.238 +
  29.239 +acpi_status
  29.240 +acpi_ev_default_region_setup (
  29.241 +	acpi_handle                     handle,
  29.242 +	u32                             function,
  29.243 +	void                            *handler_context,
  29.244 +	void                            **region_context);
  29.245 +
  29.246 +acpi_status
  29.247 +acpi_ev_initialize_region (
  29.248 +	union acpi_operand_object       *region_obj,
  29.249 +	u8                              acpi_ns_locked);
  29.250 +
  29.251 +
  29.252 +/*
  29.253 + * Evsci - SCI (System Control Interrupt) handling/dispatch
  29.254 + */
  29.255 +
  29.256 +u32 ACPI_SYSTEM_XFACE
  29.257 +acpi_ev_gpe_xrupt_handler (
  29.258 +	void                            *context);
  29.259 +
  29.260 +u32
  29.261 +acpi_ev_install_sci_handler (
  29.262 +	void);
  29.263 +
  29.264 +acpi_status
  29.265 +acpi_ev_remove_sci_handler (
  29.266 +	void);
  29.267 +
  29.268 +u32
  29.269 +acpi_ev_initialize_sCI (
  29.270 +	u32                             program_sCI);
  29.271 +
  29.272 +void
  29.273 +acpi_ev_terminate (
  29.274 +	void);
  29.275 +
  29.276 +
  29.277 +#endif  /* __ACEVENTS_H__  */
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/xen/include/acpi/acexcep.h	Mon Apr 05 13:12:24 2004 +0000
    30.3 @@ -0,0 +1,306 @@
    30.4 +/******************************************************************************
    30.5 + *
    30.6 + * Name: acexcep.h - Exception codes returned by the ACPI subsystem
    30.7 + *
    30.8 + *****************************************************************************/
    30.9 +
   30.10 +/*
   30.11 + * Copyright (C) 2000 - 2004, R. Byron Moore
   30.12 + * All rights reserved.
   30.13 + *
   30.14 + * Redistribution and use in source and binary forms, with or without
   30.15 + * modification, are permitted provided that the following conditions
   30.16 + * are met:
   30.17 + * 1. Redistributions of source code must retain the above copyright
   30.18 + *    notice, this list of conditions, and the following disclaimer,
   30.19 + *    without modification.
   30.20 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   30.21 + *    substantially similar to the "NO WARRANTY" disclaimer below
   30.22 + *    ("Disclaimer") and any redistribution must be conditioned upon
   30.23 + *    including a substantially similar Disclaimer requirement for further
   30.24 + *    binary redistribution.
   30.25 + * 3. Neither the names of the above-listed copyright holders nor the names
   30.26 + *    of any contributors may be used to endorse or promote products derived
   30.27 + *    from this software without specific prior written permission.
   30.28 + *
   30.29 + * Alternatively, this software may be distributed under the terms of the
   30.30 + * GNU General Public License ("GPL") version 2 as published by the Free
   30.31 + * Software Foundation.
   30.32 + *
   30.33 + * NO WARRANTY
   30.34 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   30.35 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   30.36 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   30.37 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   30.38 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   30.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   30.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   30.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   30.42 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   30.43 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   30.44 + * POSSIBILITY OF SUCH DAMAGES.
   30.45 + */
   30.46 +
   30.47 +#ifndef __ACEXCEP_H__
   30.48 +#define __ACEXCEP_H__
   30.49 +
   30.50 +
   30.51 +/*
   30.52 + * Exceptions returned by external ACPI interfaces
   30.53 + */
   30.54 +
   30.55 +#define AE_CODE_ENVIRONMENTAL           0x0000
   30.56 +#define AE_CODE_PROGRAMMER              0x1000
   30.57 +#define AE_CODE_ACPI_TABLES             0x2000
   30.58 +#define AE_CODE_AML                     0x3000
   30.59 +#define AE_CODE_CONTROL                 0x4000
   30.60 +#define AE_CODE_MASK                    0xF000
   30.61 +
   30.62 +
   30.63 +#define ACPI_SUCCESS(a)                 (!(a))
   30.64 +#define ACPI_FAILURE(a)                 (a)
   30.65 +
   30.66 +
   30.67 +#define AE_OK                           (acpi_status) 0x0000
   30.68 +
   30.69 +/*