Pineconium / ChoacuryOS

A WIP custom built OS
GNU General Public License v3.0
24 stars 6 forks source link

Add memory detection (and show memory in chstat command) #21

Closed UnmappedStack closed 2 months ago

UnmappedStack commented 2 months ago

This PR uses GRUB to get memory information, and displays the available memory in the chstat command. It pushes memory info from GRUB onto the stack before calling the kernel, then uses GNU GRUB's multiboot.h file for some preprocessing, then finds the address of the last entry in the memory map and adds it's size to get the size in bytes of memory, then it gets converted into bytes. Less importantly, I've added chstat to the help menu.

EDIT: I've also needed to add some new functions to the utils header so that it can convert a uint64_t into a string.

Pineconium commented 2 months ago

Okay, I need to fix a conflict with utils.h first.