OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Jul 24, 2021 10:37 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: problem with kernel
PostPosted: Fri Jun 18, 2021 7:40 am 
Offline

Joined: Fri Jun 18, 2021 7:33 am
Posts: 1
Long story short, I am tring to run an custom os on REAL hardware. I am using http://www.brokenthorn.com/Resources/OSDevIndex.html this tutorial as guild line(more like copy 99% of there code there). I made it to page 20 there (demo15) and there i got into a problem, its explained there how to read from a flopy, and I have a hard drive in the laptop! so i started working on a ahci and pci driver and it was going pretty well. But then somthing wired happend I discoved that when the kernel size is more than 17kb is doesnt work. I have no idea to why and i have been stuck on it for 5 days now working on it every day. I know its the size that matter and not the code through my experiments with it. But it runs ok in Bochs only not on read hardwear.

Everything works as long as the kernel is less than 17kb and if its not than when its jump to the kernel entry point is stops or start a infinit loop where it restarts itself for some reason. Well wasnt very short story in the end sorry.

Anyway It will be realy helpful if someone has any idea to why its like that or how to fix it.
I know you dont have my laptop so you cant realy test anything but even an idea to why will help my.

my code is on github https://github.com/xXvilckoXx/os, here.
I am working on VS C++ 2010 express.

Sorry for my bad english and thank to everyone who takes his time to try help me or even just reading this post! You can ask me questions in the comments and I will answer them as soon as I can.


Top
 Profile  
 
 Post subject: Re: problem with kernel
PostPosted: Fri Jun 18, 2021 10:19 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 3203
Does it do the same thing when you boot it in a virtual machine, such as QEMU? Problems like this are difficult to debug on bare metal.


Top
 Profile  
 
 Post subject: Re: problem with kernel
PostPosted: Sat Jun 19, 2021 12:57 am 
Offline
Member
Member
User avatar

Joined: Sun Feb 18, 2007 7:28 pm
Posts: 1517
Hi,

Are you sure you pushed all source files?

_________________
OS Development Series | Project Neptune | Repository | Wiki
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}


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

All times are UTC - 6 hours


Who is online

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