Interrupts Error Screen?
Interrupts Error Screen?
Hello everyone,
I'm working with Interrupts. In VGA text-mode I sent a message to prove it works. This message appears and very quickly the text-mode disappears and this black screen with orange dots appears.
After a while (~ 3min) the screen is completely black.
PS: I'm using VirtualBox.
Thanks in advance for your help.
Thank you.
I'm working with Interrupts. In VGA text-mode I sent a message to prove it works. This message appears and very quickly the text-mode disappears and this black screen with orange dots appears.
After a while (~ 3min) the screen is completely black.
PS: I'm using VirtualBox.
Thanks in advance for your help.
Thank you.
- Attachments
-
- The black screen with orange dots.
- VirtualBox_My OS_02_09_2020_20_36_23.png (5.27 KiB) Viewed 1475 times
-
- Member
- Posts: 5574
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Interrupts Error Screen?
It's hard to say what's going on without seeing any code.
My crystal ball says your stack is overflowing into the frame buffer.
My crystal ball says your stack is overflowing into the frame buffer.
Re: Interrupts Error Screen?
Hi,
I'm following this: https://www.youtube.com/watch?v=AgeX-U4 ... 6M&index=6
My source is in here: https://github.com/yByonic/MyOS/tree/master/src
What's wrong? I checked my code 3 times and I can't find the mistake.
Thanks for your help.
I'm following this: https://www.youtube.com/watch?v=AgeX-U4 ... 6M&index=6
My source is in here: https://github.com/yByonic/MyOS/tree/master/src
What's wrong? I checked my code 3 times and I can't find the mistake.
Thanks for your help.
Re: Interrupts Error Screen?
Run your code under a debugger and set a watch point on one of the video memory cells that is being overwritten. The stack trace will then show you the code that is causing the problem.
Re: Interrupts Error Screen?
How can I do that? That's possible with VirtualBox?
Thanks.
Thanks.
Re: Interrupts Error Screen?
qemu with gdb is a more versatile combination for debugging. Virtual box does have a built-in debugger, but I don't think it supports watchpoints. On the other hand, yet single-step ping through your code should supply some clues.
As already said, most likely your stack is continually growing (which would indicate that you don't pop all that you push).
As already said, most likely your stack is continually growing (which would indicate that you don't pop all that you push).
Re: Interrupts Error Screen?
I suspect this piece of code:
All code in here: https://github.com/yByonic/MyOS/blob/ma ... uptstubs.s
PS: I was unable to identify the error with the debugger. I was stopped by mistakes that don't even exist.
Thanks.
Code: Select all
int_bottom:
pusha
pushl %ds
pushl %es
pushl %fs
pushl %gs
pushl %esp
push (interruptnumber)
call _ZN16InterruptManager15handleInterruptEhj
movl %eax, %esp
popl %gs
popl %fs
popl %es
popl %ds
popa
_ZN16InterruptManager22IgnoreInterruptRequestEv:
iret
PS: I was unable to identify the error with the debugger. I was stopped by mistakes that don't even exist.
Thanks.
-
- Member
- Posts: 5574
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Interrupts Error Screen?
I suggest you start by adding "-Wall" and "-Wextra" to your compiler parameters. Just browsing around I spotted at least one bug that the compiler will warn you about once you add those options.
You don't have any exception handlers. Setting those up might help you find certain issues, although I'm not sure if they would help in this case.
And finally...
What is this line of code supposed to do?
You don't have any exception handlers. Setting those up might help you find certain issues, although I'm not sure if they would help in this case.
And finally...
Code: Select all
movl %eax, %esp
Re: Interrupts Error Screen?
YEESS!!!
Thanks Octocontrabass, I researched the warning parameters and corrected several other errors.
While researching about what is "movl %eax, %esp" for, I went back in the video and saw that for him to pop %esp and pop (interruptnumber) he would overwrite with the return of the handleInterrupt method (call _ZN16InterruptManager15handleInterruptEhj). When I went to see, this method had no return.
Thank you all.
Thanks Octocontrabass, I researched the warning parameters and corrected several other errors.
While researching about what is "movl %eax, %esp" for, I went back in the video and saw that for him to pop %esp and pop (interruptnumber) he would overwrite with the return of the handleInterrupt method (call _ZN16InterruptManager15handleInterruptEhj). When I went to see, this method had no return.
Thank you all.