OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 10:17 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Interrupts not working on real hardware
PostPosted: Mon May 15, 2017 1:47 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
Hello all!

Recently, octacontrabass pointed out that there was a bug in which running the AQUA on read hardware would crash and restart the computer after the login screen. That has since been fixed (in a version that I have not yet released). So whilst I was fixing it, I realized that IRQs were not working. Why is that? It works fine in virtual machines.

Thanks in advance!
PS: This is my 100th post! Yay! :D

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Mon May 15, 2017 1:49 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
emulators are creating an ideal environment. meanwhile in real world, the hardware are crapping out from model to model in every variation you can imagine.

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Mon May 15, 2017 2:29 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
crap. isn't there a way to make emulators simulate a crappy environment? ;)

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Mon May 15, 2017 2:32 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
you can buy p2 era computers for $5.

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 12:31 am 
Offline
Member
Member

Joined: Sat Nov 07, 2015 3:12 pm
Posts: 145
Im curious where ?


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 1:43 am 
Offline
Member
Member

Joined: Wed Jun 17, 2015 9:40 am
Posts: 501
Location: Athens, Greece
Hi,


geri wrote:
emulators are creating an ideal environment. meanwhile in real world, the hardware are crapping out from model to model in every variation you can imagine.
Emulators usually strive to execute the guest code as efficiently as possible. For example, in some (if not all) emulators disk reads happen in one instruction. This causes the guest code to be more efficient, but it distracts OS developers from the reality, where disk reads will take a lot more time.

geri wrote:
you can buy p2 era computers for $5.
Do you think there is much point restricting your support to P2 machines and rejecting everything that is newer than that? Because I think there is no point in limiting yourself to older machines (unless you want to ensure your users don't use computers with Intel ME and/or AMD PSP, but then again they will simply choose to use a worse OS (e.g. Windows) that supports their computers to make up for your bad choice of supporting x86 but not actually supporting it)


Regards,
glauxosdever


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 3:04 am 
Offline
Member
Member

Joined: Tue May 13, 2014 3:02 am
Posts: 280
Location: Private, UK
glauxosdever wrote:
Do you think there is much point restricting your support to P2 machines and rejecting everything that is newer than that?


Why would getting an old PC to test on prevent you from supporting newer hardware? I've used an old P4 system for real hardware testing of my OS, one thing that makes it more useful than a newer system is the presence of a serial port, allowing me to see debugging output. I have done basic testing (i.e. booting the OS from CD) on more modern hardware, but I certainly don't have the funds to dedicate expensive hardware to OS testing.

Also, it's a good idea to test on every available emulator/virtualiser before testing on real hardware. They each have their own "quirks" and bugs, just like real systems. I do most of my development with QEMU, but I tested on Bochs, VirtualBox and VMWare before real hardware. The kind of differences you see between emulators are similar to the kinds of differences you see between real systems.

If something as fundamental as IRQs aren't working, you're doing something wrong and it's highly likely you'll be able to replicate the issue on a different emulator/virtualiser.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 3:42 am 
Offline
Member
Member
User avatar

Joined: Wed Aug 17, 2016 4:55 am
Posts: 251
To be fair, telling somebody to buy cheap hardware for testing when they already have one such specimen is... kind of redundant =P The whole point of wanting emulators to allow emulation of buggy hardware is to help making debugging easier after all. In the past I've already had to do blind guesses of how hardware would react (due to inaccurate emulators) and it's certainly not that fun.

Anyway: each computer has its own quirks, so you're going to have to find out yourself what's going on (・~・) And double check absolutely everything, some step that may not seem important and that emulators may not care about could be very well critical on some hardware, for instance.


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 1:58 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
So is there no "perfect code" that works on all systems / emulators? Do I really have to work around the quirks of every computer on the planet?

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 2:21 pm 
Offline
Member
Member

Joined: Tue May 13, 2014 3:02 am
Posts: 280
Location: Private, UK
It's not really about "working around" the bugs/quirks/differences, the goal is to write code that's generic and tolerant enough that they don't matter. Occasionally you'll find situations where you have little choice but to put in a specific workaround, but these are the exception rather than the rule. Even then, most of these "workarounds" will solve a whole class of issues on certain hardware/emulator configurations, rather than being specific to an individual problem on an individual emulator.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Interrupts not working on real hardware
PostPosted: Tue May 16, 2017 2:24 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
glauxosdever wrote:
Hi,
Do you think there is much point restricting your support to P2 machines and rejecting everything that is newer than that?

you obviously cant buy 200 pieces of 2000 usd i7/athlonfx/ryzen configurations
p2 caliber of computers should be a good guinea pig
i have a socket7 computer with plenty of pentium1/mmx/amd k5/cyrix cpus for example, if i need something that runs absolutely everywhere, i use that to test

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


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

All times are UTC - 6 hours


Who is online

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