OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 4:19 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: qemu pci in same vendor id
PostPosted: Thu Oct 27, 2016 9:29 pm 
Offline
Member
Member

Joined: Thu Jun 09, 2016 4:39 am
Posts: 68
I test pci in qemu,but i got the same vendor id,it maybe that i have not set the pci config

how to config pci?

The code is
Code:
#define PCI_BUS_CONFIG(bus,dev,func,reg) 0x80000000|(bus<<16)|(dev&0x1f<<11)|(func&0x07<<8)|(reg&0x3f<<2)|0x00


Code:
    int addr,data;
   char bus,dev,func,reg;
   reg = 0x00;
   int i,j,k;
   int net_mem = 0x40;
   ioaddr = 0xc040;
   
   for(i=0;i<8;i++){
   addr = PCI_BUS_CONFIG(0,i,0,reg);
   io_out32(0xCF8,addr);
   data = io_in32(0xCFC);
   sprintf(ns,"pci %x",data);
   putfonts8_asc(binfo->vram, binfo->scrnx, 0, 16*(i+2), COL8_FFFFFF, ns);
   }


My config is
Quote:
qemu-system-x86_64w.exe -L . -m 32 -localtime -fda fdimage0.bin -hda wood.img -net nic,vlan=0,macaddr=08:62:66:c7:9f:69,model=ne2k_pci,addr=08


Attachments:
pci.JPG
pci.JPG [ 52.43 KiB | Viewed 16361 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group