OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 9:58 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: It's all about Memory
PostPosted: Tue Nov 21, 2017 7:00 pm 
Offline

Joined: Mon Oct 02, 2017 10:36 am
Posts: 2
Hello there, this is my first post and I'm so glad to be here. Reading a story is interesting thing, living one is quite another. My post is about some questions that I can not solve since been involved in OS development and I hope that someone could guide me through the road. Although I have successfully built my tool chain as instructed and managed to boot, gdt, irq, timer, keyboard... But I stuck in memory and how to manage it. Simply could not answer these questions:-

1) how big is my kernel.
2) how to know where is my kernel in physical memory (start - end).
3) how to use grub memory map and not just to know it.
4) how to design a flat memory model.
Furthermore...
5) how to start paging.
6) how to create a memory management system using virtual memory.

I know Memory is a complex concept though four months have passed reading all kind of information I could reach but with no progress, my goal is not just a theory I have read enough but could not understand. I need a practical piece of code to start with.

I hope this is enough to express the problem and forgive my English - still in progress. Thanks in advance.


Top
 Profile  
 
 Post subject: Re: It's all about Memory
PostPosted: Wed Nov 22, 2017 11:37 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5137
1) Subtract the address of the start of your kernel from the address of the end of your kernel.
2) You can define global symbols in your linker script that point to the start and end of your kernel.
3) Write a function that translates the information from the memory map into something your physical memory manager can use.
4) Set all of the segment base addresses to 0.
5) Build your page tables and then enable paging.
6) This page is a good start. Some of the links on that page will also be useful.


Top
 Profile  
 
 Post subject: Re: It's all about Memory
PostPosted: Wed Nov 22, 2017 2:08 pm 
Offline

Joined: Thu Aug 17, 2017 9:47 am
Posts: 2
Location: United States
We also have a page on paging: http://wiki.osdev.org/Paging

_________________
If you do nothing, nothing happens!


Top
 Profile  
 
 Post subject: Re: It's all about Memory
PostPosted: Thu Nov 23, 2017 11:31 am 
Offline

Joined: Mon Oct 02, 2017 10:36 am
Posts: 2
Thanks a lot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 91 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group