Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
pci.c
Package: tizos.rar [view]
Upload User: qddsws
Upload Date: 2022-06-22
Package Size: 723k
Code Size: 1k
Category:
OS Develop
Development Platform:
C/C++
- #include <pci.h>
- static int x;
- void __init_bus init_pci_bus (struct bus_driver* newbus) {
- struct device* root_device;
- root_device=(struct device*) kmalloc (sizeof(struct device));
- root_device->name=(char*)kmalloc((1+strlen(ROOT_DEV_STR))*sizeof(char));
- strcpy(root_device->name,ROOT_DEV_STR);
- root_device->parent_bus = newbus;
- newbus->dev_root=root_device;
- INIT_LIST_HEAD (&root_device->dev_list);
- kprint ("init Pci bus: ");
- kprint (newbus->name);
- kprint ("n");
- print_PCI_bios_entryp();
- print_bus_enum ();
- pci_scan_the_bus(newbus);
- }
- #include <devices/rtl8029.h>
- void pci_scan_the_bus (struct bus_driver* actbus) {
- struct device* rtl;
- rtl=(struct device*)kmalloc(sizeof(struct device));
- rtl->name=(char*)kmalloc((1+strlen("RTL 8029"))*sizeof(char));
- strcpy(rtl->name,"RTL 8029");
- rtl->parent_bus = actbus;
- rtl->init=(void*)&init_rtl8029;
- pci_add_device(actbus,rtl);
- /* Rutines PCIBOS!!! */
- }
- void pci_add_device (struct bus_driver* actbus, struct device* newdev) {
- list_add (&newdev->dev_list,&actbus->dev_root->dev_list);
- if (newdev->init!=(void*)NULL) newdev->init(newdev);
- }