When your OS goes crazy - Screenshots

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: When your OS goes crazy - Screenshots

Post by Nessphoro »

ATXcs1372 wrote:How did you come across this? I'm writing a VBE driver and it seems I'm fighting Bochs more than my own code with a very similar issue to your screenshot.
I've had the same issue,

What I found is that this behavior would come up if I used the wrong Resolution:Color Depth.

Just make sure that if your code expects, say 1024x768:32, you are not initializing VBE to 1024:768:24.
ATXcs1372
Member
Member
Posts: 30
Joined: Wed Jun 01, 2011 7:14 pm

Re: When your OS goes crazy - Screenshots

Post by ATXcs1372 »

Nessphoro wrote:
ATXcs1372 wrote:How did you come across this? I'm writing a VBE driver and it seems I'm fighting Bochs more than my own code with a very similar issue to your screenshot.
I've had the same issue,

What I found is that this behavior would come up if I used the wrong Resolution:Color Depth.

Just make sure that if your code expects, say 1024x768:32, you are not initializing VBE to 1024:768:24.
I'll look into it when I get home, but hopefully that isn't part of the issue.
Part of my boot code is to actually poll the available modes (ax=0x4F00, int 0x10) and check if it's available to the current hardware.
Once that's done it uses the get info (ax=0x4F01) and I just look for the closest mode available and my kernel adapts by reading the VBEModeInfoBlock variables...
As long as Bochs is reporting things correctly it should work.
Are you using any BGA (Bochs Graphics Adapter) specific code or just VBE?
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: When your OS goes crazy - Screenshots

Post by Nessphoro »

Just VBE.
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: When your OS goes crazy - Screenshots

Post by Jezze »

My mouse coordinates are messed up... They just travel sideways in a sort of half-random waveish pattern... still to be fixed.

Image

You reckon I could sell this as an art-piece?
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: When your OS goes crazy - Screenshots

Post by Jezze »

Now it has been fixed =)

Image
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
User avatar
GAT
Member
Member
Posts: 75
Joined: Wed Nov 30, 2011 9:51 pm
Contact:

Re: When your OS goes crazy - Screenshots

Post by GAT »

Good news, my crash handler works.
Bad news, woot!
woot.JPG
Look in the second to last line of text, I have NO idea where that came form.
d3: virtualizing kernel in progress
https://github.com/WizardOfHaas/d3/
User avatar
Griwes
Member
Member
Posts: 374
Joined: Sat Jul 30, 2011 10:07 am
Libera.chat IRC: Griwes
Location: Wrocław/Racibórz, Poland
Contact:

Re: When your OS goes crazy - Screenshots

Post by Griwes »

Griwes wrote:I think I will laugh off of myself after fixing this, but this is result of first attempt to VBE mode string printing:

http://i.imgur.com/NdB9G.png (1600x1200, not going to embed it here...)

Not sure where I did something wrong, though.

Edit: my code was lacking one "return;" in function handling single characters, but rest was because of bug (I guess, I don't think that bug could hide somewhere in my code, checked it several times) in bochs' VBE code... it was giving me pitch for 1280x1024 in 1600x1200 mode.
I was completely wrong in my last sentence. The issue was just plainly stupid; after checking every possible mode, I wasn't filling VBE structure with chosen mode's information, so I was basically using last mode's details instead of chosen mode's ones. :facepalm:
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
rdos
Member
Member
Posts: 3232
Joined: Wed Oct 01, 2008 1:55 pm

Re: When your OS goes crazy - Screenshots

Post by rdos »

This is the "blue screen of death" of RDOS (image taken with a camera, as it was run on real hardware):

Image

So, here something bad happened on core 5 of the processor, and the dump shows core's control-registers, GDT/IDT, pending interrupts, general registers, segment registers (including base, limits and descriptor types). In the lower part is an area where any address can be inspected, by typing a selector & offset in the "US" field. It is also possible to switch processor core to display another core's crash-state. The interactive function is only available with a PS/2 keyboard.

This is a real crash in that core 5 attempt to reference the thread control block when it doesn't have an active thread. The whole scenario actually looks power-manangement related as the core also have no TR or LDT loaded, and thus seems to have just rebooted.
TreahBlade
Posts: 9
Joined: Wed Apr 18, 2012 9:32 pm

Re: When your OS goes crazy - Screenshots

Post by TreahBlade »

LOL when testing out my single ISR on my 16bit operating system this happend. I have no idea how it just repeats forever :P

Image
TreahBlade
Posts: 9
Joined: Wed Apr 18, 2012 9:32 pm

Re: When your OS goes crazy - Screenshots

Post by TreahBlade »

Funny, I figured out what I did wrong. This operating system code is quickly turning to spaghetti.
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: When your OS goes crazy - Screenshots

Post by Nessphoro »

By the way you can turn on file compression on c.img, it'll make it like 1mb compared to 200.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: When your OS goes crazy - Screenshots

Post by Combuster »

I see a screen full of bad omens. You'd probably call them "warnings" :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
TreahBlade
Posts: 9
Joined: Wed Apr 18, 2012 9:32 pm

Re: When your OS goes crazy - Screenshots

Post by TreahBlade »

Yeah I might just do that for c.img. All that is on that drive is DOS used for debug to write the boot loader to the floppy, something that I hope I am done with and can just work on the kernel now. Ohh the warnings over there that you see are just warnings about sti and cli and cld and some of the labels that I have setup. I am not using the nasm option to suppress them.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: When your OS goes crazy - Screenshots

Post by bluemoon »

when doing osdev, I recommend -Werror, turn on all possible warnings, fix all warning, and do not suppress anything.
warnings are there for some reasons.
evoex
Member
Member
Posts: 103
Joined: Tue Dec 13, 2011 4:11 pm

Re: When your OS goes crazy - Screenshots

Post by evoex »

bluemoon wrote:when doing osdev, I recommend -Werror, turn on all possible warnings, fix all warning, and do not suppress anything.
warnings are there for some reasons.
I disagree on using -Werror. I started off using it, but during tests I would regularly comment some lines out or somehow test a not fully written function. It would quite often give me warning such as "Unused variable xxx", which I completely didn't care about during testing. However, I didn't want to turn off those warnings because they are useful from time to time - just not during testing.
But -Werror doesn't really help that much anyway imho. Just keep an eye on all warnings and ALWAYS fix them (unless you are aware of one, know why it is, and you're certain you'll fix it later). Why would you need to be *forced* to do so anyway?

Though in general I agree: fix ALL warnings, even if they are purely legal code. It'll save you @$$ more than once.
Post Reply