pci.h
来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C头文件 代码 · 共 124 行
H
124 行
/* -*-C-*-
*
* $Revision: 1.1 $
* $Author: jnielsen $
* $Date: 2000/02/09 00:35:22 $
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
* Copyright (c) 1995, 1996, 1997, 1998 Microsoft Corporation
* Copyright (c) 1999 ARM Limited
* All Rights Reserved
*/
/*++
Module Name:
pci.h
Abstract:
Function declarations for high level PCI configuration.
Functions:
Notes:
--*/
#ifndef integrator_pci_h
#define integrator_pci_h
typedef struct tagPCIHostBridgeWindowInfoRec
{
DWORD dwMemWinBase;
DWORD dwMemWinSize;
DWORD dwPCIMemMin;
DWORD dwPCIMemMax;
DWORD dwIOWinBase;
DWORD dwIOWinSize;
DWORD dwPCIIOMin;
DWORD dwPCIIOMax;
BYTE fPCIMemTargetSupported;
} PCIHostBridgeWindowInfoRec;
typedef struct tagPCIMapInfoRec
{
DWORD dwPCIMemBase;
DWORD dwPCIMemLimit;
DWORD dwPCIIOBase;
DWORD dwPCIIOLimit;
} PCIMapInfoRec;
typedef struct tagPCIDevAddrRec
{
BYTE bBusNo;
BYTE bDevNo;
BYTE bFuncNo;
BYTE bParentBusNo;
BYTE bParentDevNo;
BYTE bParentFuncNo;
} PCIDevAddrRec;
typedef struct tagPCIDevIDRec
{
WORD wVendorID;
WORD wDeviceID;
WORD wSubsystemVendorID;
WORD wSubsystemID;
} PCIDevIDRec;
/*
* These error codes are returned as error codes from PCI routines to
* indicate an error condition on the bus. These are generated from the
* PCI configuration space status register for a given device.
*/
#define PCIE_PARITY_ERROR 0x8000 /* Indicates that PERR# was asserted
* on the interface */
#define PCIE_SYSTEM_ERROR 0x4000 /* Indicates that SERR# was asserted
* on the interface */
#define PCIE_MASTER_ABORT 0x2000 /* Indicates that the interface
* terminated the transaction with a
* master abort while acting as
* a master */
#define PCIE_TARGET_ABORT_MASTER 0x1000 /* Indicates that the interface, while
* acting as a master, received a
* target abort */
#define PCIE_TARGET_ABORT_TARGET 0x0800 /* Indicates that the interface, while
* acting as a target, caused a
* target abort */
#define PCIE_MASTER_PARITY_ERROR 0x0100 /* Indicates that a parity error was
* detected while the interface was
* acting as master */
#define PCIE_MASK (PCIE_PARITY_ERROR | \
PCIE_SYSTEM_ERROR | \
PCIE_MASTER_ABORT | \
PCIE_TARGET_ABORT_MASTER | \
PCIE_MASTER_PARITY_ERROR )
/*
* This constant is used to clear PCI errors after they have been read
* by writing 1's to the used bits. It is also used to mask off
* unused bits of the error register when returning errors.
*/
/* Functions called in sdbtest.c */
int ScanNextPCIDevice(PCIDevAddrRec *pPCIDevice);
int FindNextPCIDevice(PCIDevIDRec *pPCIDevID, PCIDevAddrRec *pCurDevice);
int FindPCIParentDevice(PCIDevAddrRec *pTargetDevice);
int EnumeratePCIBuses(PCIDevAddrRec *pCurBridge, BYTE *pbLastBusNo);
int ListPCIDevices(void);
int MapPCIWindows(PCIMapInfoRec *pPCIMapInfo, PCIDevAddrRec *pCurDevice,
PCIDevAddrRec *pTargetDevice);
WORD GetPCIBridgeStatus(PCIDevAddrRec *pPCIDevice);
void ClearPCIBridgeStatus(PCIDevAddrRec *pPCIDevice);
void PrintPCIError(WORD wPCIErrorCode);
int SetPCIBridgeWindows(PCIDevAddrRec *pBridge, PCIMapInfoRec *pPCIMapInfo);
void OEM_DumpPCIHostInternalRegs(void);
#endif /* ndef integrator_pci_h */
/* EOF pci.h */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?