OSDev.org

The Place to Start for Operating System Developers
It is currently Fri May 03, 2024 6:18 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: bochs and mp tables
PostPosted: Tue Oct 14, 2008 11:27 am 
Offline
Member
Member

Joined: Sat Dec 01, 2007 1:36 pm
Posts: 70
Been a while since I have been here..

I am having a problem with the mp tables from bochs and locating the PCI busses. When I boot my os and have it print the busses it from the mp tables it says it only finds 1 ISA bus, but I have configured all the pci support for bochs.

My options during ./configure were:

"--enable-smp --enable-apic --enable-ne2000 --enable-acpi --enable-pci --enable-pnic --enable-usb --enable-large-pages --enable-pae --enable-mtrr --enable-show-ips --enable-debugger --enable-disasm --enable-readline --enable-logging --enable-x86-debugger --with-x11"

and my config file I boot with is:
"
megs: 64
romimage: file="/home/blound/os32/bochs-build/share/bochs/BIOS-bochs-latest"
vgaromimage: file="/home/blound/os32/bochs-build/share/bochs/VGABIOS-elpin-2.40"
floppya: 1_44=/dev/loop0, status=inserted
boot: a
log: bochsout.txt
mouse: enabled=0
clock: sync=realtime
cpu: count=2, ips=700000
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
pass: action=fatal
i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k
ne2k: enabled=1, ioaddr=0x300, irq=9, mac=b0:c4:20:aa:bb:cc, ethmod=linux, ethdev=wlan0
usb1: enabled=1, port1=mouse, port2=keypad
"

is there no way to get bochs to populate the mp tables with info about the pci busses? or am I missing something I need to do with bochs to get it to use pci?


Top
 Profile  
 
 Post subject: Re: bochs and mp tables
PostPosted: Tue Oct 14, 2008 1:28 pm 
Offline
Member
Member

Joined: Fri Jul 11, 2008 5:15 am
Posts: 342
Location: Hungary
I don't know about the MP tables, but I was able to scan the PCI buses after I recompiled Bochs. I passed --enable-pci to the configure script, and PCI worked as expected.

On the other hand, I was only able to locate devices on PCI bus zero only. Although the scan indicated a PCI->PCI (or PCI->AGP) bridge, I was not able to scan it. I presume the emulated PCI graphics card would be located there, but I might be doing something the wrong way.


Top
 Profile  
 
 Post subject: Re: bochs and mp tables
PostPosted: Tue Oct 14, 2008 3:14 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 22, 2007 12:47 pm
Posts: 1598
Location: New Hampshire, USA
I believe the "--enable-pcidev" option allows for devices found by Linux to be used in the emulation environment... I think.

_________________
Website: https://Joscor.com


Top
 Profile  
 
 Post subject: Re: bochs and mp tables
PostPosted: Tue Oct 14, 2008 7:45 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

blound wrote:
I am having a problem with the mp tables from bochs and locating the PCI busses.


I took a look at the source code that generates the MP specification tables (in the Bochs BIOS), and it'll only ever generate one entry for one ISA bus, and that ISA bus will be "bus_ID = 0" (where "bus_ID = 0" is always the first PCI bus in PCI systems).

That only gives you 2 choices - write a patch for the Bochs BIOS to correct it's MP tables, or modify your OS so that it scans PCI buses itself instead of getting this information from the MP specification tables.

To be honest, you probably should scan the PCI buses yourself anyway, because it's possible for real computers to have no MP tables (either because they don't support multi-CPU or because they support ACPI only).


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: bochs and mp tables
PostPosted: Tue Oct 14, 2008 7:55 pm 
Offline
Member
Member

Joined: Sat Dec 01, 2007 1:36 pm
Posts: 70
Brendan wrote:
Hi,

blound wrote:
I am having a problem with the mp tables from bochs and locating the PCI busses.


I took a look at the source code that generates the MP specification tables (in the Bochs BIOS), and it'll only ever generate one entry for one ISA bus, and that ISA bus will be "bus_ID = 0" (where "bus_ID = 0" is always the first PCI bus in PCI systems).

That only gives you 2 choices - write a patch for the Bochs BIOS to correct it's MP tables, or modify your OS so that it scans PCI buses itself instead of getting this information from the MP specification tables.

To be honest, you probably should scan the PCI buses yourself anyway, because it's possible for real computers to have no MP tables (either because they don't support multi-CPU or because they support ACPI only).


Cheers,

Brendan



thanks for the replies. I will just have it scan the pci buses for the info.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], SemrushBot [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