OSDev.org
https://forum.osdev.org/

PageManager usable Memory
https://forum.osdev.org/viewtopic.php?f=1&t=24334
Page 1 of 1

Author:  skandalOS [ Tue Oct 25, 2011 10:07 pm ]
Post subject:  PageManager usable Memory

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...

Author:  gerryg400 [ Tue Oct 25, 2011 10:40 pm ]
Post subject:  Re: PageManager usable Memory

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.

Author:  egos [ Tue Oct 25, 2011 10:41 pm ]
Post subject:  Re: PageManager usable Memory

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.

Author:  megatron23 [ Thu Oct 27, 2011 4:14 am ]
Post subject:  Re: PageManager usable Memory

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.

Author:  Combuster [ Thu Oct 27, 2011 4:38 am ]
Post subject:  Re: PageManager usable Memory

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/