PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   CDMA TP Development (http://forum.ppcgeeks.com/forumdisplay.php?f=68)
-   -   Guide to changing your pagepool (http://forum.ppcgeeks.com/showthread.php?t=50754)

lafester 12-27-2008 02:40 PM

Guide to changing your pagepool
 
1 Attachment(s)
Hopefully this will help some get their pagepools set without too much trouble.

***YOU WILL NEED TO REFLASH YOUR PHONE IN ORDER TO CHANGE PAGEPOOL***

***MODIFYING YOUR PAGEPOOL COULD POSSIBLY DAMAGE YOUR DEVICE***

All credit goes to ruskiyab and his original thread here: http://forum.ppcgeeks.com/showthread...light=pagepool

The first thing you will need is a rom that you would like to modify.
Most likely your rom file will be named RUU_signed.nbh.
There are many differing opinions on what you should change your pagepool to so I will leave that up to debate.
Personally I use a 32mb dynamic pagepool.


http://farm4.static.flickr.com/3217/...60c0501c68.jpg

Next you need to open up your hex editor.
I use XVI32 and it is very easy.
Unzip the attached file and run the .exe. Click on "File" then "Open" and locate the Ruu_signed.nbh file that you would like to modify.
You can see here that I have already renamed the .nbh file to raphimg so that I can flash from my micro sd.

http://farm4.static.flickr.com/3188/...5c9535c473.jpg

After the file is opened you will see a bunch of numbers and letters. Click on the "search" button and then "find".
Copy and paste this string in the field:

03 15 A0 03 06 16 A0 13 00 10 83 e5 3e

http://farm4.static.flickr.com/3214/...99f451a411.jpg

The first two numbers 03 and 15 are the ones that show your pagepool. 3 equals a 12 mb pagepool and 15 is the code for a dynamic pagepool.
If your search does NOT bring up any hits then you do not have a stock pagepool.
Check with the chef to see what pagepool they used.

You can modify your pagepool by changing the first number.
Multiply the number by 4 to get the pagepool amount.

"[PAGEPOOL EXAMPLES]

Below are examples of some possible values for the first two bytes of the pagepool offset.

03 15 - Sprint Diamond WM 6.1 stock rom (1.09) default; 12MB dynamic (When viewed under Settings -> System -> Memory, you should have around 203.84MB of Total Program memory available.)
02 15 - 8MB dynamic
01 15 - 4MB dynamic
18 16 - 24MB static (should give you around 191.84MB Total Program memory)
10 16 - 16MB static (should give you around 199.84MB Total Program memory)

[PAGEPOOL EXPLANATIONS AND CALCULATIONS]


"XX 15" pagepools are dynamic based (first byte value multiplied by 4 to determine pagepool size)
"XX 16" pagepools are static based (first byte value multiplied by 1 to determine pagepool size)

03 15 = 0x03 * 0x400000=0xC00000=decimal 12582912 bytes = 12 MB dynamic pagepool
02 15 = 0x02 * 0x400000=0x800000=decimal 8388608 bytes = 8 MB dynamic pagepool
18 15 = 0x18 * 0x400000=0x6000000=decimal 100663296 bytes = 96 MB dynamic pagepool
18 16 = 0x18 * 0x100000=0x1800000=decimal 25165824 bytes = 24 MB static pagepool
10 16 = 0x10 * 0x100000=0x1000000=decimal 16777216 bytes = 16 MB static pagepool
20 16 = 0X20 * 0x100000=0x2000000=decimal 33554432 bytes = 32 MB static pagepool"

copied from http://forum.ppcgeeks.com/showthread.php?t=43110 Thanks to creedin for posting :)

http://farm4.static.flickr.com/3291/...d433e87a19.jpg

***IMPORTANT***

After you have changed the numbers you want just click on "Search" again and then "Find Next".
The same string should come up once again. Just change it exactly the same as you just did.

Then Click "save" or "save as" and you are done!
Now flash your new .nbh file and see how much faster your phone runs :)

Thanks, Chris

lafester 12-27-2008 02:51 PM

Re: Guide to changing your pagepool
 
Regarding pagepool changers... to my knowledge there is no pagepool changer for the touch pro as of yet. I know someone was working on it but I am not sure where it stands as of now.

A couple chefs have modified their roms in order to use the current pagepool changer however this is not going to work in most cases. feel free to post your experiences with pagepool changers here as well.

Information about the pagepool changer can be found here:
http://forum.xda-developers.com/showthread.php?t=323269

thanks, chris

creedin 12-27-2008 03:03 PM

Re: Guide to changing your pagepool
 
the problem is the page pool changer doesnt work with dynamic values, only static

esqueue 12-27-2008 03:08 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by creedin (Post 602942)
the problem is the page pool changer doesnt work with dynamic values, only static

I have a few questions for you. From it's name I assume that Static pagepool remains the same while dynamic changes. My questions are, how do I check my pagepool? Do I have to set a value for both dynamic and static or Do I have to pick one?

Thank you in advance.

creedin 12-27-2008 03:17 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by esqueue (Post 602952)
I have a few questions for you. From it's name I assume that Static pagepool remains the same while dynamic changes. My questions are, how do I check my pagepool? Do I have to set a value for both dynamic and static or Do I have to pick one?

Thank you in advance.

static = "stays"
dynamic = "dynamite" as in it goes everywhere

just for a little help :)

you only have to set one of them, static is what i use, a static 32 mb, gives me 184.13 ram

now to change it you have to get a hex editor and search for...

03 15 A0 03 06 16 A0 13 00 10 83 e5 3e

that key, there will be two occurences, change both values (03 15 only) to

"[PAGEPOOL EXAMPLES]


Below are examples of some possible values for the first two bytes of the pagepool offset.

03 15 - Sprint Diamond WM 6.1 stock rom (1.09) default; 12MB dynamic (When viewed under Settings -> System -> Memory, you should have around 203.84MB of Total Program memory available.)
02 15 - 8MB dynamic
01 15 - 4MB dynamic
18 16 - 24MB static (should give you around 191.84MB Total Program memory)
10 16 - 16MB static (should give you around 199.84MB Total Program memory)

[PAGEPOOL EXPLANATIONS AND CALCULATIONS]


"XX 15" pagepools are dynamic based (first byte value multiplied by 4 to determine pagepool size)
"XX 16" pagepools are static based (first byte value multiplied by 1 to determine pagepool size)

03 15 = 0x03 * 0x400000=0xC00000=decimal 12582912 bytes = 12 MB dynamic pagepool
02 15 = 0x02 * 0x400000=0x800000=decimal 8388608 bytes = 8 MB dynamic pagepool
18 15 = 0x18 * 0x400000=0x6000000=decimal 100663296 bytes = 96 MB dynamic pagepool
18 16 = 0x18 * 0x100000=0x1800000=decimal 25165824 bytes = 24 MB static pagepool
10 16 = 0x10 * 0x100000=0x1000000=decimal 16777216 bytes = 16 MB static pagepool
20 16 = 0X20 * 0x100000=0x2000000=decimal 33554432 bytes = 32 MB static pagepool"

copied from http://forum.ppcgeeks.com/showthread.php?t=43110

ruskiyab 12-27-2008 03:17 PM

Re: Guide to changing your pagepool
 
This didn't work for me with Juicy's rom just so you know

creedin 12-27-2008 03:22 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by ruskiyab (Post 602975)
This didn't work for me with Juicy's rom just so you know

there are multiple occurences of 03 15 so make sure you search for atleast half the string, but also juicy's rom has a 32 mb page pool in it already so search for 20 16 xx xx xx xx, the xx's being the rest of the string

aceracer24 12-27-2008 03:54 PM

Re: Guide to changing your pagepool
 
Page pool changer is working for juicy's rom and Juggalo's. I can't confirm for any others so this post is not needed for those roms. I know some of the other rom cooks are in the process of making the changer work for theirs as well.

raidzero 12-27-2008 03:57 PM

Re: Guide to changing your pagepool
 
Does anyone have any suggestions for the VZW TP as to static/dynamic and what size would be optimal? I guess it probably depends on what you use the device for... But does anyone have any basic guidelines? Right now I am using a static 28mb pagepool. I use Bluefire VPN, mocha telnet, office, opera, google maps mainly.

esqueue 12-27-2008 04:14 PM

Re: Guide to changing your pagepool
 
Credin, thanks for that response.

lafester 12-27-2008 04:18 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by raidzero (Post 603047)
Does anyone have any suggestions for the VZW TP as to static/dynamic and what size would be optimal? I guess it probably depends on what you use the device for... But does anyone have any basic guidelines? Right now I am using a static 28mb pagepool. I use Bluefire VPN, mocha telnet, office, opera, google maps mainly.


with vzw you have to be careful with ram use so its a bit trickier.
I think you are on the right track.. you will just have to play with it and see whats best for you.

LilRico 12-27-2008 05:07 PM

Re: Guide to changing your pagepool
 
GREAT WRITE-UP/ GUIDE. The only thing it is missing is how you can check your PP once you modified it and loaded it onto the phone. :D

creedin 12-27-2008 05:14 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by LilRico (Post 603185)
GREAT WRITE-UP/ GUIDE. The only thing it is missing is how you can check your PP once you modified it and loaded it onto the phone. :D

simple, first, it actually flashes, second, the memory will be less, ie instead of seeing about 203 mb of free ram, you would see 184 for 32 mb, 192 for 24mb

LilRico 12-27-2008 05:42 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by creedin (Post 603200)
simple, first, it actually flashes, second, the memory will be less, ie instead of seeing about 203 mb of free ram, you would see 184 for 32 mb, 192 for 24mb

That is correct... I only said something because someone PM'd me about it. Thanks again...

t3yf5g 01-04-2009 04:58 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by creedin (Post 602984)
...also juicy's rom has a 32 mb page pool in it already so search for 20 16 xx xx xx xx, the xx's being the rest of the string

Juicy had 32? I noticed that it is sluggish compared to Yay 4 Juggs ROM and it has 32.

FormerPalmOS 01-14-2009 06:01 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by creedin (Post 602973)
static = "stays"
dynamic = "dynamite" as in it goes everywhere

just for a little help :)

you only have to set one of them, static is what i use, a static 32 mb, gives me 184.13 ram

now to change it you have to get a hex editor and search for...

03 15 A0 03 06 16 A0 13 00 10 83 e5 3e

that key, there will be two occurences, change both values (03 15 only) to

"[PAGEPOOL EXAMPLES]

Below are examples of some possible values for the first two bytes of the pagepool offset.

03 15 - Sprint Diamond WM 6.1 stock rom (1.09) default; 12MB dynamic (When viewed under Settings -> System -> Memory, you should have around 203.84MB of Total Program memory available.)
02 15 - 8MB dynamic
01 15 - 4MB dynamic
18 16 - 24MB static (should give you around 191.84MB Total Program memory)
10 16 - 16MB static (should give you around 199.84MB Total Program memory)

[PAGEPOOL EXPLANATIONS AND CALCULATIONS]

"XX 15" pagepools are dynamic based (first byte value multiplied by 4 to determine pagepool size)
"XX 16" pagepools are static based (first byte value multiplied by 1 to determine pagepool size)

03 15 = 0x03 * 0x400000=0xC00000=decimal 12582912 bytes = 12 MB dynamic pagepool
02 15 = 0x02 * 0x400000=0x800000=decimal 8388608 bytes = 8 MB dynamic pagepool
18 15 = 0x18 * 0x400000=0x6000000=decimal 100663296 bytes = 96 MB dynamic pagepool
18 16 = 0x18 * 0x100000=0x1800000=decimal 25165824 bytes = 24 MB static pagepool
10 16 = 0x10 * 0x100000=0x1000000=decimal 16777216 bytes = 16 MB static pagepool
20 16 = 0X20 * 0x100000=0x2000000=decimal 33554432 bytes = 32 MB static pagepool"

copied from http://forum.ppcgeeks.com/showthread.php?t=43110

There is a bit of misinformation here. The approach you are suggestion will indeed change the pagepool but it will always change it to a static value. There is no concept of an XXX size dynamic page pool. Dynamic means the device can use as much RAM as it wants for a pagepool.

The procedure above is changing the value that gets written into a memory manager structure that defines the pagepool size. In ARM assembly language the two bytes being changed represent a constant and a shift value. If the 2nd byte is 16, then the value is the first byte. If the 2nd byte is 15 then the value is 4x the first byte. Thus 02 15 = 08 16 = 8MB pagepool. If you want a dynamic page pool, use 00 15. This establishes the value of 0 written to the memory manager structure (00 16 will yield the same result). Adventuresome non-Verizon folks could try this and see how it goes. Verizon folks should probably NOT try this.

Write the same value to both occurences of xx 15 or xx 16 - eg 04 15 A0 03 04 15 A0 13 will give you a 16MB page pool.

Non-Verizon folks can go for 24MB. Higher is possible but you may reach diminishing returns beyond 24MB. Us poor gimped Verizon folks should go for 8-12 for fully-loaded ROMs, 16MB if stripped down. For every 4MB more of pagepool that's 4MB less of program memory.

Note - the pagepool changer app floating around WILL NOT WORK on Touch Pro ROMs without an additional hex edit. If you are doing hex edits, might as well just make the above change and skip using the pagepool changer.

keaolyen 01-14-2009 11:13 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 638993)
There is a bit of misinformation here. The approach you are suggestion will indeed change the pagepool but it will always change it to a static value. There is no concept of an XXX size dynamic page pool. Dynamic means the device can use as much RAM as it wants for a pagepool.

The procedure above is changing the value that gets written into a memory manager structure that defines the pagepool size. In ARM assembly language the two bytes being changed represent a constant and a shift value. If the 2nd byte is 16, then the value is the first byte. If the 2nd byte is 15 then the value is 4x the first byte. Thus 02 15 = 08 16 = 8MB pagepool. If you want a dynamic page pool, use 00 15. This establishes the value of 0 written to the memory manager structure (00 16 will yield the same result). Adventuresome non-Verizon folks could try this and see how it goes. Verizon folks should probably NOT try this.

Thanks, this makes sense.

I was reading the first part but the values the OP had in his explanation didn't add up, this does.

Admin should sticky this somewhere, there seems to be a lot of confusion out there about how pagepool is calculated.

lafester 01-14-2009 11:12 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 638993)
There is a bit of misinformation here. The approach you are suggestion will indeed change the pagepool but it will always change it to a static value. There is no concept of an XXX size dynamic page pool. Dynamic means the device can use as much RAM as it wants for a pagepool.

The procedure above is changing the value that gets written into a memory manager structure that defines the pagepool size. In ARM assembly language the two bytes being changed represent a constant and a shift value. If the 2nd byte is 16, then the value is the first byte. If the 2nd byte is 15 then the value is 4x the first byte. Thus 02 15 = 08 16 = 8MB pagepool. If you want a dynamic page pool, use 00 15. This establishes the value of 0 written to the memory manager structure (00 16 will yield the same result). Adventuresome non-Verizon folks could try this and see how it goes. Verizon folks should probably NOT try this.

Write the same value to both occurences of xx 15 or xx 16 - eg 04 15 A0 03 04 15 A0 13 will give you a 16MB page pool.

Non-Verizon folks can go for 24MB. Higher is possible but you may reach diminishing returns beyond 24MB. Us poor gimped Verizon folks should go for 8-12 for fully-loaded ROMs, 16MB if stripped down. For every 4MB more of pagepool that's 4MB less of program memory.

Note - the pagepool changer app floating around WILL NOT WORK on Touch Pro ROMs without an additional hex edit. If you are doing hex edits, might as well just make the above change and skip using the pagepool changer.

this sounds reasonable however the information posted here is not new. I'm wondering why nobody has challenged this before now.

regardless i will update the first post to keep everyone informed.

gguruusa 01-14-2009 11:43 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by lafester (Post 640964)
this sounds reasonable however the information posted here is not new. I'm wondering why nobody has challenged this before now.

Can't say I've looked at the assembly instructions, but this explanation doesn't jive particularly well (doesn't mean it's wrong, either) with the settings in a stock rom.

keaolyen 01-15-2009 12:04 AM

Re: Guide to changing your pagepool
 
Thanks for making the update.

lafester 01-15-2009 12:17 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by gguruusa (Post 641073)
Can't say I've looked at the assembly instructions, but this explanation doesn't jive particularly well (doesn't mean it's wrong, either) with the settings in a stock rom.

like why would a stock rom be set to 12mb dynamic?

interesting point :)

keaolyen 01-15-2009 12:21 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 638993)
Write the same value to both occurences of xx 15 or xx 16 - eg 04 15 A0 03 04 15 A0 13 will give you a 16MB page pool.

Is there a typo there (well, something left out)? I follow the first part but I don't think the second part where you state that "04 15 A0 03 04 15 A0 13" will give you a 16MB page pool was all you meant to say...

Shouldn't there have been more? Another string showing "10 16 A0 03 10 16 A0 13" as also giving you a 16MB dynamic page pool?

keaolyen 01-15-2009 12:28 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by lafester (Post 641174)
like why would a stock rom be set to 12mb dynamic?

interesting point :)

Why couldn't it be set as 12MB? Is it known to be set as something else?

It wouldn't be dynamic though assuming FormerPalmOS is correct; it would be static.

Forgive me if I'm way off base here, I'm new to this stuff...

FormerPalmOS 01-15-2009 03:32 AM

Re: Guide to changing your pagepool
 
I think the issue is with the definition of static vs. dynamic pagepool, and the specific directions how to change the pagepool and to what and why. My particular point of clarification of misinformation was that you can set a "dynamic" pagepool of size xxx. There is no such option. You can either set a static pagepool size of xxx or set a dynamic page pool. Static means the PP is xxx. Dynamic means the PP size is whatever WM6.1 thinks it should be without regard to how much free ram you may need (or have).

Below is an exerpt from the stock Verizon WM6.1 ROM NK.EXE module, disassembled into ARM instructions, referencing the data structure for setting the page pool. The stock Sprint ROM will have a similar sequence but likely at a different address and definitely with different pagepool sizes. Custom ROMs will also have either different sizes, or will replace the last STR instruction with MOV R0, R0 (effectively a NOP).

I've added everything after a semicolon as commentary, everything to the left of ; is pure ARM code disassembly so there is no subjectivity in interpreting the code. The code basically checks something, and based on whatever that something is determines if it shoudl set a static 12MB or 6MB pagepool. Whatever it checks results in it deciding on a 6MB pagepool for my device stock. The patch I recommend sets xxx MB regardless of the outcome of this check.

0005a06c: e59f3758 ldr r3,#0x5a7cc ; = #0xba0810c0 ; Load R3 with 0xba0810c0
0005a070: e59f0750 ldr r0,#0x5a7c8 ; = #0x80006b90 ; Unrelated register load, might be used in called sub
0005a074: e5933000 ldr r3,[r3,#0] ; Load R3 with data at address 0xba0810c0 + 0x00
0005a078: e3530c01 cmp r3,#0x100 ; Compare R3 with value of 0x100
0005a07c: e59f3740 ldr r3,#0x5a7c4 ; = #0x803d6350 ; Load R3 with 0x803d6350 (pointer to PP size constant)
0005a080: 03a01503 moveq r1,#0xc00000 ; If R3 compare was equal, load R1 with value xC00000 (12MB PP size)
0005a084: 13a01606 movne r1,#0x600000 ; If R3 compare was not equal, load R1 with value 0x600000 (6MB PP size)
0005a088: e5831000 str r1,[r3,#0] ; Store R1 at address 0x803D6350 (location of PP size)

FormerPalmOS 01-15-2009 03:37 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by keaolyen (Post 641184)
Is there a typo there (well, something left out)? I follow the first part but I don't think the second part where you state that "04 15 A0 03 04 15 A0 13" will give you a 16MB page pool was all you meant to say...

Shouldn't there have been more? Another string showing "10 16 A0 03 10 16 A0 13" as also giving you a 16MB dynamic page pool?

You are correct - 04 15 will yield the same pagepool size as 10 16. However in either case it will be a static page pool of size = 16MB. There is no concept of a dynamic pagepool of size xxx. Dynamic pagepool size is whatever size Windows Mobile thinks it needs to be up to the limit of available RAM.

keaolyen 01-15-2009 11:36 AM

Re: Guide to changing your pagepool
 
Yeah, while I had already gotten the point it hadn't fully sunk in when I made that post. That took somewhere around 7 more minutes (if you notice my next post pointing that out). ;-)

keaolyen 01-15-2009 11:42 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 641444)
The code basically checks something, and based on whatever that something is determines if it shoudl set a static 12MB or 6MB pagepool. Whatever it checks results in it deciding on a 6MB pagepool for my device stock. The patch I recommend sets xxx MB regardless of the outcome of this check.

So you're using a static page pool. Why wouldn't one always use a dynamic page pool assuming you've got plenty of available RAM?

gguruusa 01-15-2009 12:19 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 641444)
You can either set a static pagepool size of xxx or set a dynamic page pool. Static means the PP is xxx. Dynamic means the PP size is whatever WM6.1 thinks it should be without regard to how much free ram you may need (or have).

Where'd that definition of dynamic come from? I can envision several strategies for dynamic beyond that one.

keaolyen 01-15-2009 02:10 PM

Re: Guide to changing your pagepool
 
i can only think of 1 or 2 other possibilities...

1) static keeps data in page pool on reset where static doesn't; normally this would be called volatile memory though...
2) static is always in the same physical location while dynamic moves around...

If a dynamic page pool doesn't mean that it changes in size as needed then I would think option 1 would be the most likely definition. But, as I pointed out there's already a term for that...

keaolyen 01-16-2009 01:41 AM

Re: Guide to changing your pagepool
 
bump...

FormerPalmOS 01-16-2009 02:22 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by keaolyen (Post 642266)
i can only think of 1 or 2 other possibilities...

1) static keeps data in page pool on reset where static doesn't; normally this would be called volatile memory though...
2) static is always in the same physical location while dynamic moves around...

If a dynamic page pool doesn't mean that it changes in size as needed then I would think option 1 would be the most likely definition. But, as I pointed out there's already a term for that...

The pagepool is stored in RAM - the whole reason it exists is that you can't run code out of NAND flash storage - you have to copy it to RAM then execute it. If there ain't no room, you have to flush something out to make room. You can always copy it back in later. The amount of flushing and the corresponding performance hit while waiting to re-load something you need is why a bigger pagepool gives you better performance. Of course with a gimped VZW phone, if you have too big of a pagepool you don't have enough room to store the volitale data for whatever application you are running and it crashes. So it's a trade-off.

The physical location of the pagepool in memory doesn't matter - though I have no idea if it does or doesn't move.

Whatever is in the pagepool is lost at power-off. But it doesn't matter - everything in the pagepool got there by being copied from the flash anyway. The pagepool has a one way door. Stuff can be copied from NAND to the PP, but it is never written back - just scrapped.

The volitale data in the program memory (total RAM size minus pagepool size) must be written back to the NAND flash before power-off if it is to be saved.

scrosler 01-16-2009 02:37 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 644042)
The pagepool is stored in RAM - the whole reason it exists is that you can't run code out of NAND flash storage - you have to copy it to RAM then execute it. If there ain't no room, you have to flush something out to make room. You can always copy it back in later. The amount of flushing and the corresponding performance hit while waiting to re-load something you need is why a bigger pagepool gives you better performance. Of course with a gimped VZW phone, if you have too big of a pagepool you don't have enough room to store the volitale data for whatever application you are running and it crashes. So it's a trade-off.

The physical location of the pagepool in memory doesn't matter - though I have no idea if it does or doesn't move.

Whatever is in the pagepool is lost at power-off. But it doesn't matter - everything in the pagepool got there by being copied from the flash anyway. The pagepool has a one way door. Stuff can be copied from NAND to the PP, but it is never written back - just scrapped.

The volitale data in the program memory (total RAM size minus pagepool size) must be written back to the NAND flash before power-off if it is to be saved.

Wow! Great job explaining that!

gguruusa 01-16-2009 05:22 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by keaolyen (Post 642266)
i can only think of 1 or 2 other possibilities...

1) static keeps data in page pool on reset where static doesn't; normally this would be called volatile memory though...
2) static is always in the same physical location while dynamic moves around...

If a dynamic page pool doesn't mean that it changes in size as needed then I would think option 1 would be the most likely definition. But, as I pointed out there's already a term for that...

Nah, we all agree that dynamic means something about allocating on demand. What isn't clear to me is that FormerPalmOS's statement about how it is configured is correct. For example, maybe Dynamic(12) means dynamic, max of 12 MB. Or maybe Dynamic(12) means dynamic, minimum of 12 MB. I haven't seen anything official that says exactly how dynamic works in current kernels. It just doesn't strike me as reasonable that Microsoft would have modified the pagepool configuraton stuff for no apparent gain in flexibility.

FormerPalmOS 01-16-2009 08:27 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by gguruusa (Post 644210)
Nah, we all agree that dynamic means something about allocating on demand. What isn't clear to me is that FormerPalmOS's statement about how it is configured is correct. For example, maybe Dynamic(12) means dynamic, max of 12 MB. Or maybe Dynamic(12) means dynamic, minimum of 12 MB. I haven't seen anything official that says exactly how dynamic works in current kernels. It just doesn't strike me as reasonable that Microsoft would have modified the pagepool configuraton stuff for no apparent gain in flexibility.

Good points - looking at it that way the pagepool is always dynamic in that it doesn't take what it doesn't need. But you don't get back what it isn't using if you have a size set.

All I've looked at so-far is the code for the Verizon TP. Before modification it checks some value and based on that value writes either 0xC0000 or 0x60000 to an address that everyone seems to agree sets the pagepool size. On my phone it ends up getting set to 6 so by changing the 0x60000 in the code to 0xC0000 in the code, I get 0xC0000 no matter what.

What the phone does after that, I have no idea. It could very well be what you are saying - dynamic up to 12MB. But with this value at 12MB, even if only 4MB has been allocated, I don't get the other 8MB back for program memory. But it will never go past 12MB. My understanding is that with a size of 0MB, I get whatever it isn't using as program memory, but there is no limit to how much it may use.

Again - my observations and comments are limited to a study of one device. I assume you have looked at many more devices than I have.

gguruusa 01-16-2009 11:46 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 644284)
Again - my observations and comments are limited to a study of one device. I assume you have looked at many more devices than I have.

All I can really tell you is that things changed between vogue and kaiser releases and vzw touch pro is an odd animal.

keaolyen 01-16-2009 03:07 PM

Re: Guide to changing your pagepool
 
I don't think this is a hardware issue as much as an OS memory allocation issue, I.E. just because this is a new hardware platform I wouldn't think the way the OS handles pagepool would change.

I'll take a look through Technet to see if there's any articles there that address this...

Isriam 01-29-2009 11:27 AM

Re: Guide to changing your pagepool
 
So what static number would I use to set 48mb on a rom already coded at 32mb? I can find the string in the OP in 2 places, and verified it says 20 16 but I want to set it to 48mb static.

keaolyen 01-29-2009 11:59 AM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by FormerPalmOS (Post 644042)
The pagepool is stored in RAM - the whole reason it exists is that you can't run code out of NAND flash storage - you have to copy it to RAM then execute it. If there ain't no room, you have to flush something out to make room. You can always copy it back in later. The amount of flushing and the corresponding performance hit while waiting to re-load something you need is why a bigger pagepool gives you better performance. Of course with a gimped VZW phone, if you have too big of a pagepool you don't have enough room to store the volitale data for whatever application you are running and it crashes. So it's a trade-off.

The physical location of the pagepool in memory doesn't matter - though I have no idea if it does or doesn't move.

Whatever is in the pagepool is lost at power-off. But it doesn't matter - everything in the pagepool got there by being copied from the flash anyway. The pagepool has a one way door. Stuff can be copied from NAND to the PP, but it is never written back - just scrapped.

The volitale data in the program memory (total RAM size minus pagepool size) must be written back to the NAND flash before power-off if it is to be saved.

Exactly, but I think this discussion was about how static vs dynamic pagepool worked. Whether or not you could set the size of the dynamic pagepool as you do with static or if the OS simply allocated more to the dynamic as needed. I believe there were two camps of thinking as to how it worked and I was trying to rationalize how it would work assuming it worked the way gguruusa thought it did.

I suppose it could be that you can set the limit of your dynamic pagepool then the OS would use what it needed up to that point but I don't think that makes sense as it would quickly fill up to that limit. There's really no good reason that I can think of that it would work that way.

I agree with you that setting a static pagepool size would be like (in a PC) overriding the system defaults and fixing your pagefile size so that it's always the same size; never shrinking or growing. Assuming you still think this way, I think that a dynamic pagepool works more like your pagefile in a Windows OS; that it grows and shrinks as needed.

Before, when PPC's had less memory to work with I believe that you would have needed to set a static size. With today's devices that have much more memory to work with I'm thinking that setting dynamic might be the way to go...

BTW, haven't had a chance to check Tech Net yet. I'm too busy with product launches right now but I will dig into it as soon as I get the chance.

keaolyen 01-29-2009 12:01 PM

Re: Guide to changing your pagepool
 
Quote:

Originally Posted by Isriam (Post 676120)
So what static number would I use to set 48mb on a rom already coded at 32mb? I can find the string in the OP in 2 places, and verified it says 20 16 but I want to set it to 48mb static.

You would use 0C 15 to get 48MB but there's some discussion as to whether this results in a static or dynamic pagepool.

I believe everyone agrees that 30 16 would give you a 48MB static pagepool.

*edit - not enough coffee yet, added a better explanation...

Isriam 01-29-2009 12:05 PM

Re: Guide to changing your pagepool
 
so 0C 16 for static 48mb correct?


All times are GMT -4. The time now is 07:40 PM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0