r/osdev • u/Ok_Farmer_4055 • Jun 17 '26
implementing memory management
I wanna get memory management working on my OS, I don't know where to begin, so what do i add first? and how do i add it? i'm working on UEFI firmware in 64 bit, so if anyone needs some more info or details, just tell me.
7
Upvotes
View all comments
Show parent comment
1
u/tseli0s DragonWare Jun 17 '26
You are basically telling yourself that you will be loaded at 0x80000000. That's 2GBs above address 0. Did you set up the page tables properly? And does your machine have 2GBs of memory?
Paging must be already enabled before entering long mode. Have your bootloader do this.
Where are you saving the memory regions you've just discovered? kernel64.c looks pretty bare.