OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 4:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: (Solved) Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 5:23 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
I have a massive massive problem. When I run Bochs on Windows it is as smooth as ****, but when I run it on Linux it is as slow as ****. This is driving me crazy since I can't do any of debugging. I am running the latest Ubuntu 16.10, also I have an SSD. Like what could be the problem? When I run Bochs it all starts to blink, my computer freezes, I can't press any of the buttons on it (Bochs buttons), it takes 10 seconds for 1 character to print. Imagine something being as slow as **** and then imagine it again and then square it and then square it again with the square you got -> extremely slow, painfully slow. I tried reinstalling it, but no help.

P.S Sorry if I posted inside a wrong forum section. Didn't know where to put it, fits in here the most.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Last edited by Octacone on Sat Feb 11, 2017 6:23 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 5:24 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
Attach your bochsrc file.
What version of Bochs is it, too? Did you compile it yourself? If so, what configure options did you use?

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 5:39 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
omarrx024 wrote:
Attach your bochsrc file.
What version of Bochs is it, too? Did you compile it yourself? If so, what configure options did you use?


I didn't compile it myself.
Here is my configuration file:
Code:
log: xxx_hidden
memory: guest=512, host=512
cpu: count=1, ips=50000000, reset_on_triple_fault=0, cpuid_limit_winnt=0
cpuid: mmx=1, sep=1, sse=sse2, aes=0, movbe=0, xsave=0
port_e9_hack: enabled=1
romimage: file="/usr/share/bochs/BIOS-bochs-latest", address=0xfffe0000
vgaromimage: file="/usr/share/bochs/VGABIOS-lgpl-latest"
vga_update_interval: 25000
mouse: enabled=1, toggle=f12
panic: action=ask
error: action=report
info: action=report
debug: action=report
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata0-slave:  type=cdrom, path="xxx_hidden", status=inserted
boot: cdrom

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 5:45 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
Maybe replace "vga_update_interval" line with this:
Code:
vga: extension=vbe, update_freq=5, realtime=1


Adding this line may speed it up too, although the time emulation will not be accurate:
Code:
clock: sync=none, time0=local, rtc_sync=0

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: (Solved) Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 6:05 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
omarrx024 wrote:
Maybe replace "vga_update_interval" line with this:
Code:
vga: extension=vbe, update_freq=5, realtime=1


Adding this line may speed it up too, although the time emulation will not be accurate:
Code:
clock: sync=none, time0=local, rtc_sync=0


Thanks! I guess it was because of it. I also modified some other parameters and now my configuration file looks like this:
Code:
ata0-master: type=cdrom, path="xxx", status=inserted
boot: cdrom
display_library: sdl
cpu: count=1 ips=200000000, reset_on_triple_fault=0
memory: guest=512, host=512
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
romimage: file=$BXSHARE/BIOS-bochs-legacy, address=0xffff0000
vga: extension=vbe, update_freq=5
log: xxx
port_e9_hack: enabled=1
mouse: enabled=1, toggle=f12
cpuid: mmx=1, sep=1, sse=sse4_2
clock: sync=none, time0=local, rtc_sync=1


Now it is even faster than Windows. It loads instantly.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: (Solved) Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 6:29 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
Talking from the point of view of someone who is doing OS development, this problem shouldn't need to be posted in a forum asking for help. Instead, you should have compared the bochsrc on Windows and Linux, and determined the problem yourself. All I did was compare your bochsrc with mine. ;)

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: (Solved) Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 6:52 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
omarrx024 wrote:
this problem shouldn't need to be posted in a forum asking for help. Instead, you should have compared the bochsrc on Windows and Linux, and determined the problem yourself.


For that one needs to be certain that the same configuration file has the same (or nearly the same) effect on both systems and isn't hiding some important implementation detail behind the abstraction of the options contained in the file. Clearly, the OS APIs that bochs ends up calling are different in different OSes and they may not be sufficiently equivalent in terms of performance or ease of use, which may result in different user experience.


Top
 Profile  
 
 Post subject: (Solved) Slow Bochs on Linux
PostPosted: Sat Feb 11, 2017 6:56 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
omarrx024 wrote:
Talking from the point of view of someone who is doing OS development, this problem shouldn't need to be posted in a forum asking for help. Instead, you should have compared the bochsrc on Windows and Linux, and determined the problem yourself. All I did was compare your bochsrc with mine. ;)


I guess so, but I couldn't compare it. Windows one was auto generated and had like 100 more options that I didn't need. It is all solved now. It is hard to haunt when you don't know what to haunt. :wink:

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 885 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