You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

自定义OS内核超过17KB时在真实硬件中启动卡死或无限重启问题求助

Kernel stops booting on real hardware when size exceeds 17KB (works in Bochs)

I'm building a custom OS to run on real hardware, following a popular OS development tutorial (I’ve copied nearly 99% of the code from it). I got up to the demo15 section (page 20) which covers floppy disk reading, but since my laptop only has a hard drive, I shifted to implementing AHCI and PCI drivers instead—things were going smoothly at first.

Then a bizarre issue cropped up: once my kernel’s size crosses 17KB, the system fails to run properly on real hardware. I’ve spent 5 straight days troubleshooting this and can’t pin down the cause. Through testing, I’ve confirmed it’s strictly a size-related problem, not an issue with the code logic itself. The kernel runs flawlessly in the Bochs emulator, and on real hardware it works perfectly as long as it stays under 17KB. But cross that threshold, and either the system freezes when jumping to the kernel entry point, or it enters an infinite reboot loop.

Sorry for rambling instead of keeping it concise. Anyway, any guesses about what’s causing this or potential fixes would be a massive help. I know you can’t test this on my specific laptop, but even a starting point would make a huge difference. My code is hosted on a GitHub repository, and I’m using VS C++ 2010 Express as my development environment.

Thanks to everyone who takes the time to help or even just read this!


内容的提问来源于stack exchange,提问作者Tal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 19:58:12