⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pci_cfg.h

📁 eCos1.31版
💻 H
📖 第 1 页 / 共 5 页
字号:
#ifndef CYGONCE_PCI_CFG_H#define CYGONCE_PCI_CFG_H//=============================================================================////      pci_cfg.h////      PCI configuration definitions////=============================================================================//####COPYRIGHTBEGIN####//                                                                          // -------------------------------------------                              // The contents of this file are subject to the Red Hat eCos Public License // Version 1.1 (the "License"); you may not use this file except in         // compliance with the License.  You may obtain a copy of the License at    // http://www.redhat.com/                                                   //                                                                          // Software distributed under the License is distributed on an "AS IS"      // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the // License for the specific language governing rights and limitations under // the License.                                                             //                                                                          // The Original Code is eCos - Embedded Configurable Operating System,      // released September 30, 1998.                                             //                                                                          // The Initial Developer of the Original Code is Red Hat.                   // Portions created by Red Hat are                                          // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             // All Rights Reserved.                                                     // -------------------------------------------                              //                                                                          //####COPYRIGHTEND####//=============================================================================//#####DESCRIPTIONBEGIN####//// Author(s):    jskov// Contributors: jskov// Date:         1999-08-09// Purpose:      Provides PCI configuration information//               (common structure layout & defined vendor/class codes)// Usage://              #include <cyg/io/pci_cfg.h>////####DESCRIPTIONEND####////=============================================================================//----------------------------------------------------------------------// PCI Configuration structure offsets#define CYG_PCI_CFG_VENDOR                      0x00#define CYG_PCI_CFG_DEVICE                      0x02#define CYG_PCI_CFG_COMMAND                     0x04#define CYG_PCI_CFG_STATUS                      0x06#define CYG_PCI_CFG_CLASS_REV                   0x08#define CYG_PCI_CFG_CACHE_LINE_SIZE             0x0c#define CYG_PCI_CFG_LATENCY_TIMER               0x0d#define CYG_PCI_CFG_HEADER_TYPE                 0x0e#define CYG_PCI_CFG_BIST                        0x0f#define CYG_PCI_CFG_BAR_BASE                    0x10#define CYG_PCI_CFG_BAR_0                       0x10#define CYG_PCI_CFG_BAR_1                       0x14#define CYG_PCI_CFG_BAR_2                       0x18#define CYG_PCI_CFG_BAR_3                       0x1c#define CYG_PCI_CFG_BAR_4                       0x20#define CYG_PCI_CFG_BAR_5                       0x14#define CYG_PCI_CFG_CARDBUS_CIS                 0x28#define CYG_PCI_CFG_SUB_VENDOR                  0x2c#define CYG_PCI_CFG_SUB_ID                      0x2e#define CYG_PCI_CFG_ROM_ADDRESS                 0x30#define CYG_PCI_CFG_CAP_LIST                    0x34#define CYG_PCI_CFG_INT_LINE                    0x3c#define CYG_PCI_CFG_INT_PIN                     0x3d#define CYG_PCI_CFG_MIN_GNT                     0x3e#define CYG_PCI_CFG_MAX_LAT                     0x3f//-----------------------------------------------------------------// PCI Control bits// Command#define CYG_PCI_CFG_COMMAND_IO                    0x0001#define CYG_PCI_CFG_COMMAND_MEMORY                0x0002#define CYG_PCI_CFG_COMMAND_MASTER                0x0004#define CYG_PCI_CFG_COMMAND_SPECIAL               0x0008#define CYG_PCI_CFG_COMMAND_INVALIDATE            0x0010#define CYG_PCI_CFG_COMMAND_VGA_SNOOP             0x0020#define CYG_PCI_CFG_COMMAND_PARITY                0x0040#define CYG_PCI_CFG_COMMAND_WAIT                  0x0080#define CYG_PCI_CFG_COMMAND_SERR                  0x0100#define CYG_PCI_CFG_COMMAND_FAST_BACK             0x0200// Consider the device active if any of these bits are set.#define CYG_PCI_CFG_COMMAND_ACTIVE \    (CYG_PCI_CFG_COMMAND_IO        \     |CYG_PCI_CFG_COMMAND_MEMORY   \     |CYG_PCI_CFG_COMMAND_MASTER)// Header type#define CYG_PCI_CFG_HEADER_TYPE_MASK              0x7f#define CYG_PCI_CFG_HEADER_TYPE_MF                0x80// BAR#define CYG_PCI_CFG_BAR_SPACE_MASK                0x00000001#define CYG_PCI_CFG_BAR_SPACE_MEM                 0x00000000#define CYG_PCI_CFG_BAR_SPACE_IO                  0x00000001#define CYG_PRI_CFG_BAR_MEM_TYPE_MASK             0x00000006#define CYG_PRI_CFG_BAR_MEM_TYPE_32               0x00000000#define CYG_PRI_CFG_BAR_MEM_TYPE_1M               0x00000002#define CYG_PRI_CFG_BAR_MEM_TYPE_64               0x00000004#define CYG_PRI_CFG_BAR_MEM_PREFETCH              0x00000008#define CYG_PRI_CFG_BAR_MEM_MASK                  0xfffffff0#define CYG_PRI_CFG_BAR_IO_MASK                   0xfffffffc//----------------------------------------------------------------------// PCI Vendor IDs/***********************************************************************   Can be extracted from the PCICODE List at http://www.yourvote.com/pci   maintained by Jib Boemler. Use the below Perl script and fix any   bad vendor names by hand.#!/usr/bin/perlwhile(<>) {    if (/PCI_VENTABLE/) {	%mvendors = {};	@vendors = ();	@codes = ();	while(<>) {	    # Collect vendor names and codes.	    if (m!.*0x([0-9A-F]{4}), \"([^\"]*)\".*!) {		$c = lc($1);		$v = uc($2);		$v =~ tr/-+ \/&.!/______ /;		$v =~ s/__/_/g;		$v =~ s/_$//;		push @vendors, $v;		push @codes, $c;		# Count occurences of vendor name.		$mvendors{$v} += 1;	    }	    last if (/;/);	}	# Ouput definitions.	while ($#vendors >= 0) {	    $v = shift @vendors;	    $c = shift @codes;	    $o = "#define CYG_PCI_VENDOR_$v";	    # If a vendor name occurs more than once, append code	    # to get unique definitions.	    if ($mvendors{$v} > 1) {		$o .= "_0x$c";	    }	    print $o . " " x (60-length($o)) . "0x$c\n";	}    }}***********************************************************************///---------------------- AUTO GENERATED START --------------------------#define CYG_PCI_VENDOR_LOCKHEED_MARTIN                      0x003d#define CYG_PCI_VENDOR_COMPAQ_0x0e11                        0x0e11#define CYG_PCI_VENDOR_SYM                                  0x1000#define CYG_PCI_VENDOR_ATI                                  0x1002#define CYG_PCI_VENDOR_ULSI                                 0x1003#define CYG_PCI_VENDOR_VLSI                                 0x1004#define CYG_PCI_VENDOR_AVANCE_0x1005                        0x1005#define CYG_PCI_VENDOR_REPLY                                0x1006#define CYG_PCI_VENDOR_NETFRAME                             0x1007#define CYG_PCI_VENDOR_EPSON                                0x1008#define CYG_PCI_VENDOR_PHOENIX                              0x100a#define CYG_PCI_VENDOR_NSC                                  0x100b#define CYG_PCI_VENDOR_TSENG_0x100c                         0x100c#define CYG_PCI_VENDOR_AST                                  0x100d#define CYG_PCI_VENDOR_WEITEK                               0x100e#define CYG_PCI_VENDOR_VLOGIC                               0x1010#define CYG_PCI_VENDOR_DEC_0x1011                           0x1011#define CYG_PCI_VENDOR_MICRONICS                            0x1012#define CYG_PCI_VENDOR_CIRRUS                               0x1013#define CYG_PCI_VENDOR_IBM                                  0x1014#define CYG_PCI_VENDOR_LSIL                                 0x1015#define CYG_PCI_VENDOR_FUJITSU_ICL                          0x1016#define CYG_PCI_VENDOR_SPEA                                 0x1017#define CYG_PCI_VENDOR_UNISYS                               0x1018#define CYG_PCI_VENDOR_ECS                                  0x1019#define CYG_PCI_VENDOR_NCR                                  0x101a#define CYG_PCI_VENDOR_VITESSE                              0x101b#define CYG_PCI_VENDOR_WD                                   0x101c#define CYG_PCI_VENDOR_AMI                                  0x101e#define CYG_PCI_VENDOR_PICTURETEL                           0x101f#define CYG_PCI_VENDOR_HITACHI_0x1020                       0x1020#define CYG_PCI_VENDOR_OKI                                  0x1021#define CYG_PCI_VENDOR_AMD                                  0x1022#define CYG_PCI_VENDOR_TRIDENT                              0x1023#define CYG_PCI_VENDOR_ZENITH_0x1024                        0x1024#define CYG_PCI_VENDOR_ACER                                 0x1025#define CYG_PCI_VENDOR_DELL                                 0x1028#define CYG_PCI_VENDOR_SIEM_NIX                             0x1029#define CYG_PCI_VENDOR_LSI                                  0x102a#define CYG_PCI_VENDOR_MATROX                               0x102b#define CYG_PCI_VENDOR_C_T                                  0x102c#define CYG_PCI_VENDOR_WYSE                                 0x102d#define CYG_PCI_VENDOR_OLIVETTI                             0x102e#define CYG_PCI_VENDOR_TOSHIBA_0x102f                       0x102f

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -