]>
git.saurik.com Git - apple/boot.git/blob - i386/libsaio/pci.h
4561a3e8d3037e6b9746e88c5ff3d2a28ecf5de0
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Copyright 1994 NeXT Computer, Inc.
27 * All rights reserved.
30 #ifndef __LIBSAIO_PCI_H
31 #define __LIBSAIO_PCI_H
33 typedef struct _pci_slot_info
{
34 unsigned long int pid
, sid
;
40 extern _pci_slot_info_t
*PCISlotInfo
;
42 /* The IOPCIConfigSpace structure can be used to decode the 256 byte
43 * configuration space presented by each PCI device. This structure
44 * is based on the PCI LOCAL BUS SPECIFICATION, rev 2.1, section 6.1
47 typedef struct _IOPCIConfigSpace
{
48 unsigned short VendorID
;
49 unsigned short DeviceID
;
50 unsigned short Command
;
51 unsigned short Status
;
52 unsigned long RevisionID
:8;
53 unsigned long ClassCode
:24;
54 unsigned char CacheLineSize
;
55 unsigned char LatencyTimer
;
56 unsigned char HeaderType
;
57 unsigned char BuiltInSelfTest
;
58 unsigned long BaseAddress
[6];
59 unsigned long CardbusCISpointer
;
60 unsigned short SubVendorID
;
61 unsigned short SubDeviceID
;
62 unsigned long ROMBaseAddress
;
63 unsigned long reserved3
;
64 unsigned long reserved4
;
65 unsigned char InterruptLine
;
66 unsigned char InterruptPin
;
67 unsigned char MinGrant
;
68 unsigned char MaxLatency
;
69 unsigned long VendorUnique
[48];
73 /* PCI_DEFAULT_DATA is the value resulting from a read to a non-existent
74 * PCI device's configuration space.
77 #define PCI_DEFAULT_DATA 0xffffffff
80 /* PCI_INVALID_VENDOR_ID is a Vendor ID reserved by the PCI/SIG and is
81 * guaranteed not to be assigned to any vendor.
84 #define PCI_INVALID_VENDOR_ID 0xffff
86 #endif /* !__LIBSAIO_PCI_H */