pci_cfgreg.h revision 139790
1139790Simp/*- 226159Sse * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 326159Sse * All rights reserved. 426159Sse * 526159Sse * Redistribution and use in source and binary forms, with or without 626159Sse * modification, are permitted provided that the following conditions 726159Sse * are met: 826159Sse * 1. Redistributions of source code must retain the above copyright 926159Sse * notice unmodified, this list of conditions, and the following 1026159Sse * disclaimer. 1126159Sse * 2. Redistributions in binary form must reproduce the above copyright 1226159Sse * notice, this list of conditions and the following disclaimer in the 1326159Sse * documentation and/or other materials provided with the distribution. 1426159Sse * 1526159Sse * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1626159Sse * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1726159Sse * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1826159Sse * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1926159Sse * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2026159Sse * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2126159Sse * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2226159Sse * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2326159Sse * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2426159Sse * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2526159Sse * 2650477Speter * $FreeBSD: head/sys/i386/include/pci_cfgreg.h 139790 2005-01-06 22:18:23Z imp $ 2726159Sse * 2826159Sse */ 2926159Sse 3026159Sse#define CONF1_ADDR_PORT 0x0cf8 3126159Sse#define CONF1_DATA_PORT 0x0cfc 3226159Sse 3326159Sse#define CONF1_ENABLE 0x80000000ul 3426159Sse#define CONF1_ENABLE_CHK 0x80000000ul 35120205Sjhb#define CONF1_ENABLE_MSK 0x7f000000ul 3626159Sse#define CONF1_ENABLE_CHK1 0xff000001ul 3726159Sse#define CONF1_ENABLE_MSK1 0x80000001ul 3826159Sse#define CONF1_ENABLE_RES1 0x80000000ul 3926159Sse 4026159Sse#define CONF2_ENABLE_PORT 0x0cf8 4126159Sse#ifdef PC98 4226159Sse#define CONF2_FORWARD_PORT 0x0cf9 4326159Sse#else 4426159Sse#define CONF2_FORWARD_PORT 0x0cfa 4526159Sse#endif 4626159Sse 4726159Sse#define CONF2_ENABLE_CHK 0x0e 4826159Sse#define CONF2_ENABLE_RES 0x0e 4966529Smsmith 50102932Sjhbint pci_cfgregopen(void); 51102932Sjhbu_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); 52102932Sjhbvoid pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); 53125981Sjhbvoid pci_pir_open(void); 54125981Sjhbint pci_pir_probe(int bus, int require_parse); 55125981Sjhbint pci_pir_route_interrupt(int bus, int device, int func, int pin); 56