PageManager usable Memory
Posted: Tue Oct 25, 2011 10:07 pm
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...
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...