OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 11:52 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: PageManager usable Memory
PostPosted: Tue Oct 25, 2011 10:07 pm 
Offline

Joined: Mon Sep 05, 2011 12:05 pm
Posts: 15
Hello, I've questions about the Pagemanager/Paging!
I know the concept of Paging and also understand the translating from virtual addresses and physical addresses....and mapping
But there are some things which I couldnt understand from the framework where I'm currently working on, it is so
complicated that I couldnt get any idea what here is happening.

Here are some debugging statements at the beginning of kernel:
[PM ]++++++:start:0x0, end: 0x0:
[PM ]Ctor: usable memory region from physical 0x0 to 0x9f400 of type 1
[PM ]Ctor: usable memory region from physical 0x9f400 to 0xa0000 of type 2

>>>>Question: here f.example is a large space between f0000 and a0000, which isn't handled or not detected, what is the reason?

[PM ]Ctor: usable memory region from physical 0xf0000 to 0x100000 of type 2
[PM ]Ctor: usable memory region from physical 0x100000 to 0x7fd000 of type 1
[PM ]Ctor: usable memory region from physical 0x7fd000 to 0x800000 of type 2
[PM ]Ctor: usable memory region from physical 0xfffc0000 to 0x0 of type 2
[PM ]Ctor: Number of physical pages: 2045
[PM ]Ctor: Pages used by Grub Modules 0
[PM ]Ctor: Initializing page_usage_table_ with all pages reserved
[PM ]Ctor: usable memory region: start_page: 0, end_page: 159, type: 1
[PM ]Ctor: usable memory region: start_page: 159, end_page: 160, type: 2
[PM ]Ctor: usable memory region: start_page: 240, end_page: 256, type: 2
[PM ]Ctor: usable memory region: start_page: 256, end_page: 2045, type: 1
[PM ]Ctor: usable memory region: start_page: 2045, end_page: 2048, type: 2
[PM ]Ctor: usable memory region: start_page: 1048512, end_page: 0, type: 2
[PM ]Ctor: Marking stuff mapped in above 2 and < 3 gig as used
[PM ]Ctor: Marking GRUB loaded modules as reserved
[PM ]Ctor: find lowest unreserved page
[PM ]Ctor: lowest_unreserved_page_=1280
[PM ]Ctor done

First: What means type1 and type 2?
I guess that one type1 means that areas of physical memory of such type is usable and mapable.
And type2 memory means that it is usable but not able for mapping because it is not suitability for mapping because
of 4kb boundary/size for paging.

for example:
[PM ]Ctor: usable memory region from physical 0x0 to 0x9f400 of type 1
is equivalent to
[PM ]Ctor: usable memory region: start_page: 0, end_page: 159, type: 1
but 9f400 is 159*4096 + 1024, there is a little space which is I think unusable, isn't it true?
How is this 1024 Byte handled or to be handled?

please help me, thanks for your comments...


Top
 Profile  
 
 Post subject: Re: PageManager usable Memory
PostPosted: Tue Oct 25, 2011 10:40 pm 
Offline
Member
Member

Joined: Thu Mar 25, 2010 11:26 pm
Posts: 1801
Location: Melbourne, Australia
I have no idea about your framework. But did you read this wiki page ? http://wiki.osdev.org/Detecting_Memory_%28x86%29 ?

It talks about memory types.

_________________
If a trainstation is where trains stop, what is a workstation ?


Top
 Profile  
 
 Post subject: Re: PageManager usable Memory
PostPosted: Tue Oct 25, 2011 10:41 pm 
Offline
Member
Member

Joined: Fri Nov 16, 2007 1:59 pm
Posts: 612
skandalOS wrote:
>>>>Question: here f.example is a large space between f0000 and a0000, which isn't handled or not detected, what is the reason?
Video buffer, ROM Scan, shadow memory (ROM BIOS)?

Quote:
First: What means type1 and type 2?
Look in ACPI Spec.

_________________
If you have seen bad English in my words, tell me what's wrong, please.


Top
 Profile  
 
 Post subject: Re: PageManager usable Memory
PostPosted: Thu Oct 27, 2011 4:14 am 
Offline

Joined: Sat Oct 22, 2011 3:03 pm
Posts: 19
skandalOS wrote:
>>>>Question: here f.example is a large space between f0000 and a0000, which isn't handled or not detected, what is the reason?

This applies to the OS / "Framework" you are using:
Memory from 0x0000 0000 to 0x0010 0000 is mapped anyway to linear 0xC000 0000 to 0xC010 0000.
Video memory that lies between 0x00A0 0000 and 0x00F0 0000 (actually from 0xB8000 to 0xB8780) is used definitely for all I know.


skandalOS wrote:
First: What means type1 and type 2?

Type 1 means that the region can be used where Type 2 is reserved and cannot be.


skandalOS wrote:
usable memory region from physical 0x100000 to 0x7fd000 of type 1

Thats because the emulator is set to use only 8MiB of memory.


Top
 Profile  
 
 Post subject: Re: PageManager usable Memory
PostPosted: Thu Oct 27, 2011 4:38 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Quote:
here f.example is a large space between f0000 and a0000, which isn't handled or not detected, what is the reason?
Because it isn't memory, its ROM and devices.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], Majestic-12 [Bot] and 28 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group