I don't get this error, When my kernel get's to much code, It starts making weird error.
I've just recently added some code for fetching the time in my kernel.
I don't even call it..., but I get absolutely no output from my kernel after the clear screen... except that the text cursor turns red...
I know it gets to the end of my kernel, the EIP that bochs gives me corresponds to where the loop is.
I also looked at a few of the printfs and the address for the text passed to them are correct, I really don't get it...
If I comment out the #include for the time header, it works again, so it's definitely something to do with the size, I also checked quite a few calls and they all point to the right address, so I don't see what it could be....
Any suggestions as to what it could be?
Thanks in advance,
Jules
kernel size causes error.
Re: kernel size causes error.
Hmm, aren't you overwriting something in memory? Try setting the stack if you don't have one, or set it bigger. Or set it somewhere else.
What bootloader are you using? If your kernel is loaded from real mode, be sure the file size is under 64 kB, if you are using second stage bootloader or GRUB, it doesn't matter.
What bootloader are you using? If your kernel is loaded from real mode, be sure the file size is under 64 kB, if you are using second stage bootloader or GRUB, it doesn't matter.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English
)
Derrick operating system: http://derrick.xf.cz (Slovak and English
Re: kernel size causes error.
My stack is fine, it's nearly 1Kb long (1000 bytes).
I don't think its a problem with that.
My bootloader is custom, but it passes to the kernel loaded at 0x100000 in protected mode, but anyway, my kernel is still well under 64K, (just over 20K).
But I looked through the memory with bochs, and the strings aren't where they should be...
So it's either a bootloader problem or something is writing where it shouldn't be....
Thanks,
Jules
I don't think its a problem with that.
My bootloader is custom, but it passes to the kernel loaded at 0x100000 in protected mode, but anyway, my kernel is still well under 64K, (just over 20K).
But I looked through the memory with bochs, and the strings aren't where they should be...
So it's either a bootloader problem or something is writing where it shouldn't be....
Thanks,
Jules
- piranha
- Member

- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Re: kernel size causes error.
Try booting with GRUB. Then you'll know better where the problem lies.
-JL
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: kernel size causes error.
I checked where certain strings where meant to be in memory as soon as my kernel loaded and they weren't present, seems like my loader is buggy...
Oh God, save my soul...
Jules
Oh God, save my soul...
Jules
Re: kernel size causes error.
Its not a problem, I just wrote originally to only load 35 sectors...
35 * 512 = 17.5K...
My kernel is just over 20K and the string are at then end of the kernel, so their not loaded by the bootloader...
obvious error, but I couldn't figure it out because I hadn't looked at it in ages and had sort of forgotten about it existence...
I'll work on it tomorrow...
Thanks for the help (without it, I would have looked through every single instruction generated by my kernel to figure out hat was going wrong, then probably blamed grub, then maybe in a week thought of looking at the bootloader
)
Thanks,
Jules
35 * 512 = 17.5K...
My kernel is just over 20K and the string are at then end of the kernel, so their not loaded by the bootloader...
obvious error, but I couldn't figure it out because I hadn't looked at it in ages and had sort of forgotten about it existence...
I'll work on it tomorrow...
Thanks for the help (without it, I would have looked through every single instruction generated by my kernel to figure out hat was going wrong, then probably blamed grub, then maybe in a week thought of looking at the bootloader
Thanks,
Jules
Re: kernel size causes error.
Thanks, fixed it this morning, no problems now...
Thanks,
Jules
Thanks,
Jules
-
pcmattman
- Member

- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: kernel size causes error.
You might want to write your bootloader to load the kernel some other way, or load sectors until it reads a sector that has some magic value or something, or else you're going to have a lot of fun updating your kernel in the future
.
Re: kernel size causes error.
That's exactly what I'm working on doing right now
Thanks,
Jules
Thanks,
Jules
