gmarino2048 / 64bit-os-tutorial

This OS Tutorial expands on the fundamental concepts covered in cfenollosa/os-tutorial and covers entering long mode on the x86_64 architecture. It also uses clang rather than relying on an external crosscompiler. I plan on keeping it up to date, so feel free to submit an issue!
MIT License
172 stars 19 forks source link

Some tip or something on Memory detection #3

Open 1vnt opened 3 years ago

1vnt commented 3 years ago

Im relativly lost, searching for a way to get the available physical memory. This article on osdev was what I tried to implement. Running it in the real mode sector, but its infinitly looping, do you have any idea?

gmarino2048 commented 2 years ago

Hi @legendary-cookie, unfortunately I haven't looked much into memory detection for this project. Since we're using an emulator, I figured it was safe to assume that the resources on the "machine" would be more than capable of handling such a simple program. I like the idea of doing memory detection, and might add an extension to the project which includes this in the future. Unfortunately, without more information on your specific implementation I can't figure out exactly what's happening.

For debugging, I would start with exactly what they have in the article and try to add your own logging to see what might be happening. Your "infinite loop" might be a triple fault on the processor which will cause it to reboot. If this happened, you'd see the existing logs sort of flicker forever. A true infinite loop in your code would mean that the code appears to freeze or prints the same thing over forever. I know it's not much, but I hope this helps in the meantime

1vnt commented 2 years ago

Alright, thanks!