pci_regs.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010 Lenka Trochtova
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * - Redistributions of source code must retain the above copyright
00010  *   notice, this list of conditions and the following disclaimer.
00011  * - Redistributions in binary form must reproduce the above copyright
00012  *   notice, this list of conditions and the following disclaimer in the
00013  *   documentation and/or other materials provided with the distribution.
00014  * - The name of the author may not be used to endorse or promote products
00015  *   derived from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00018  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00019  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00020  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00021  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00022  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00023  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00024  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00028 
00035 #ifndef PCI_REGS_H_
00036 #define PCI_REGS_H_
00037 
00038 /* Header types */
00039 #define PCI_HEADER_TYPE_DEV     0
00040 #define PCI_HEADER_TYPE_BRIDGE  1
00041 #define PCI_HEADER_TYPE_CARDBUS 2
00042 
00043 /* Header type 0 and 1 */
00044 #define PCI_VENDOR_ID           0x00
00045 #define PCI_DEVICE_ID           0x02
00046 #define PCI_COMMAND             0x04
00047 #define PCI_STATUS              0x06
00048 #define PCI_REVISION_ID         0x08
00049 #define PCI_PROG_IF             0x09
00050 #define PCI_SUB_CLASS           0x0A
00051 #define PCI_BASE_CLASS          0x0B
00052 #define PCI_CACHE_LINE_SIZE     0x0C
00053 #define PCI_LATENCY_TIMER       0x0D
00054 #define PCI_HEADER_TYPE         0x0E
00055 #define PCI_BIST                0x0F
00056 
00057 #define PCI_BASE_ADDR_0         0x10
00058 #define PCI_BASE_ADDR_1         0x14
00059 
00060 /* Header type 0 */
00061 #define PCI_BASE_ADDR_2                 0x18
00062 #define PCI_BASE_ADDR_3                 0x1B
00063 #define PCI_BASE_ADDR_4                 0x20
00064 #define PCI_BASE_ADDR_5                 0x24
00065 
00066 #define PCI_CARDBUS_CIS_PTR             0x28
00067 #define PCI_SUBSYSTEM_VENDOR_ID         0x2C
00068 #define PCI_SUBSYSTEM_ID                0x2E
00069 #define PCI_EXP_ROM_BASE                0x30
00070 #define PCI_CAP_PTR                     0x34
00071 #define PCI_INT_LINE                    0x3C
00072 #define PCI_INT_PIN                     0x3D
00073 #define PCI_MIN_GNT                     0x3E
00074 #define PCI_MAX_LAT                     0x3F
00075 
00076 /* Header type 1 */
00077 #define PCI_BRIDGE_PRIM_BUS_NUM         0x18
00078 #define PCI_BRIDGE_SEC_BUS_NUM          0x19
00079 #define PCI_BRIDGE_SUBORD_BUS_NUM       0x1A
00080 #define PCI_BRIDGE_SEC_LATENCY_TIMER    0x1B
00081 #define PCI_BRIDGE_IO_BASE              0x1C
00082 #define PCI_BRIDGE_IO_LIMIT             0x1D
00083 #define PCI_BRIDGE_SEC_STATUS           0x1E
00084 #define PCI_BRIDGE_MEMORY_BASE          0x20
00085 #define PCI_BRIDGE_MEMORY_LIMIT         0x22
00086 #define PCI_BRIDGE_PREF_MEMORY_BASE     0x24
00087 #define PCI_BRIDGE_PREF_MEMORY_LIMIT    0x26
00088 #define PCI_BRIDGE_PREF_MEMORY_BASE_UP  0x28
00089 #define PCI_BRIDGE_PREF_MEMORY_LIMIT_UP 0x2C
00090 #define PCI_BRIDGE_IO_BASE_UP           0x30
00091 #define PCI_BRIDGE_IO_LIMIT_UP          0x32
00092 #define PCI_BRIDGE_EXP_ROM_BASE         0x38
00093 #define PCI_BRIDGE_INT_LINE             0x3C
00094 #define PCI_BRIDGE_INT_PIN              0x3D
00095 #define PCI_BRIDGE_CTL                  0x3E
00096 
00097 #endif
00098 

Generated on Thu Jun 2 07:45:44 2011 for HelenOS/USB by  doxygen 1.4.7