Comment by vkoskiv

1 month ago

Nice! My keyboard code is still very bare bones, so I interact with my system using debug commands assigned to individual keys.

Since we're both working on a similar project, I think it could be fun to talk about OS development and share our findings (and weird bugs!) I have this same username just about everywhere, so do reach out if you're interested! Best of luck with your project either way :]

Gladly! Since my last comment I added sound support through an ac97 driver. It was fairly straightforward in hindsight, only had an issue with the interrupt not being handled - turns out my ISR stubs weren't fleshed out to handle IRQs, just the cpu exceptions. Also had a minor bug where addresses outside of the kernel weren't getting translated properly, which I hadn't tested before and assumed to be correct.

I probably could have saved myself 2+ hours of debugging if I had simply stopped working off of assumptions that my driver code was wrong (it was, but that just took reading the spec and checking out some drivers for reference) and doing a root cause analysis with `objdump` or through QEMU. Still surprised how far you can go with vanilla debugging prints - when I started this project, I was sure that I'd become fluent in gdb as a byproduct, but I stopped using it once it would break when the stack became corrupted and haven't tried it since.

Discussion is the reason I made the jump from lurking to having an account on HN. Happy to talk - reached out to you on twitter. And good luck to you as well :^)