Hey OS developers,
I’ve just started to develop a small kernel to advance my coding skills. I thought that it would be a good start to take a look at the Linux kernel sources. This helped me to get familiar with the basic parts of a kernel. After some weeks of reading articles, forum posts, etc. and of course writing code my kernel will just print a “Hello worldâ€
Call initialization functions automatically
-
- Posts: 3
- Joined: Tue Mar 04, 2008 10:52 am
-
- Posts: 3
- Joined: Tue Mar 04, 2008 10:52 am
Hey JamesM,
Thanks a lot,
Tim
I put some kprintfs into one of my initialization functions. As soon as I've booted the kernel, the same problem appears. I have to wait about 6 minutes until the function will return and the next one will be called. All kprintfs will appear at the same time. So I cannot localize the problem inside my initialization function. I have no idea where I should search for this problem .JamesM wrote:Try putting kprintfs in certain places to see where the time is being spent.
But would the emulation software not write something to the log, that a exception appeared or even also shows up the same strange behavior than a real computer? I also have set up the IDT (interrupt handlers) and it seems that no handler will be called. If the CPU caused an exception, one of the handlers should be called, or am I wrong?JamesM wrote:Maybe seven thousand exceptions/resolutions are taking place?
Thanks a lot,
Tim
-
- Posts: 3
- Joined: Tue Mar 04, 2008 10:52 am
Ok, thanks for this information. I thought that bochs would log the exceptions anyway.
But back to the topic: It seems that the bug was in the code which called the initialization functions. Particularly in the kdebug function which tried to write some debugging stuff to the serial port. It seems that this method took a long time to execute. After removing the function calls, the initialization stuff works great.
Thanks for taking a look on my problem.
Regards,
Tim
But back to the topic: It seems that the bug was in the code which called the initialization functions. Particularly in the kdebug function which tried to write some debugging stuff to the serial port. It seems that this method took a long time to execute. After removing the function calls, the initialization stuff works great.
Thanks for taking a look on my problem.
Regards,
Tim