Rev 80 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/* Project: HARTIK 3.0 Network Library */
/* Description: Hard Real TIme Kernel for 8086 compatible */
/* Author: Luca Abeni */
/* Date: 14/4/1997 */
/* File: PCI.H */
/* Revision: 1.02 */
#ifndef __PCI_H__
#define __PCI_H__
#include "ll/sys/cdefs.h"
__BEGIN_DECLS
#define N_MAX_DEVS 10
typedef struct pci_regs {
WORD VendorId;
WORD DeviceId;
WORD PciCommand;
WORD PciStatus;
BYTE reserved1;
BYTE dummy;
WORD ClassCode;
BYTE reserved2;
BYTE LatencyTimer;
BYTE HeaderType;
BYTE reserved3;
DWORD IoBaseAddress;
DWORD reserved4;
DWORD reserved5;
DWORD reserved6;
DWORD reserved7;
DWORD reserved8;
DWORD reserved9;
DWORD reserved10;
DWORD BiosRomControl;
DWORD reserved11;
DWORD reserver12;
BYTE InterruptLine;
BYTE InterruptPin;
BYTE MinGnt;
BYTE MaxLat;
DWORD InternalConfig;
} PCI_REGS;
typedef struct pci_des {
BYTE bus;
BYTE dev;
BYTE mem[256];
} PCI_DES;
/*
* Error values that may be returned by the PCI bios. Use
* pcibios_strerror() to convert to a printable string.
*/
#define PCIBIOS_SUCCESSFUL 0x00
#define PCIBIOS_FUNC_NOT_SUPPORTED 0x81
#define PCIBIOS_BAD_VENDOR_ID 0x83
#define PCIBIOS_DEVICE_NOT_FOUND 0x86
#define PCIBIOS_BAD_REGISTER_NUMBER 0x87
#define PCIBIOS_SET_FAILED 0x88
#define PCIBIOS_BUFFER_TOO_SMALL 0x89
/*int pci_detect(struct pci_des *p_des);
void pci_show(struct pci_des *PCIdes, int n);*/
int pci_init(void);
void pci_show(void);
int scan_bus(struct pci_des *p_des);
struct pci_regs *pci_class(DWORD class_code, WORD index, BYTE *bus, BYTE *dev);
struct pci_regs *pci_device(WORD vendor, WORD device, WORD index, BYTE *bus, BYTE *dev);
__END_DECLS
#endif