|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
Quote:
__________________
IF SOMEONE HELPS YOU OR YOU THINK THEY DESERVE IT MAKE IT KNOWN BY CLICKING THE THANKS BUTTON.
If I have helped you out or you enjoy my work please feel free to donate. Helpful ROM cooking Info How To: Registry edit to .cab |
This post has been thanked 1 times. |
|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
Here's what I understand about the VM in WM 6.5.x (by the way, anyone have troubles on ppcgeeks with firefox? I had to use IE8 to reply because ffox wouldn't let me type anywhere other than the first row..)
There's a 32 bit address space available - a total of 4GB potential memory (but not in practice as there is always overhead involved) This total 4gb address space is split in half - 2gb to the kernel, 2gb to the user. Kernel address space is only accessible by processes/threads with kernel level access, whereas user address space is accessible by all processes/threads. The user address space is from 0x00000000 to 0x7FFFFFFF, and the kernel address space is from 0x80000000 to 0xFFFFFFFF. The user address space is split into 64 slots of 32mb a piece. (64x32=2048, or 2gb) The first 33 slots (slot 0 and 1-32) are used for processes, and the remaining slots for object store, memory mapped files, and resources. Each slot is easy to visualize in hex, you just increment a digit.. slot 0: 0x00000000 to 0x01FFFFFF, slot 1: 0x02000000 to 0x03FFFFFF, slot 2: 0x04000000 to 0x05FFFFFF, etc. Each process gets assigned it's own slot, and there are 33 total, minus the kernel process which is always running, so that's where you get the 32 process limit (which is always lower in practice, since u have several processes running in windows mobile to support the os) - also why you have a 32mb limit per process - you can see that's all the address space available in one slot. How does that all apply to our situation with modules? When you create a module, you are telling Windows Mobile that you want that module to be memory-mapped, so that each time it loads, it's loading to the same, known area of ram - saving space in slot 0 - this is done on the computer-side, during 'cooking' and is the job of wmreloc, g'reloc, bepe's new kitchen, etc. Virtual allocations are aligned to a 64KB border, so if you memory map a .dll that's only 3Kb large, it's still going to eat up 64KB of memory space. There are also pages that can be allocated to these slots, that are aligned to a 4KB boundry, and process/general allocations that take place during normal operation. The way the system handles this is that modules allocated on rom build-time (modules we allocate with g'reloc et. al.) are allocated from top-down (for slot 1 for example, starting at 0x03FFFFFF for the first module, taking up space to the nearest 64kb boundry, then the next module, in a line down to the 0x02000000 address, which is the beginning of the slot) General allocations that take place during normal system operations are allocated in the remaining space, from the bottom-up (so again with slot 1 as an example, starting at 0x02000000 and ending at 0x03FFFFFF) As you fill up these slots more and more with modules, that leaves less space for windows to dynamically allocate other, general allocations, which can, and does result in out of memory errors (even when the device has plenty of physical memory left, it cannot address this memory when virtual memory is full) Here's where the kicker comes in for the difference between 6.0/6.1/6.5 - There are a total of 4 slots that can be used for module allocation, slot 0, 1, 60, and 61. 63 is also available to modules that contain no code (resource only modules, like .mui's) WinMo 6 could allocate slot 0, 1 - (in order of 1 first, 0 last) for a total of 64mb of vm space (and the running process is always mapped to slot 0, so once you encroach on this memory space, you are removing available memory to each application running) - you can see how tight this is. WinMo 6.1 improved on this by opening up slot 60 and 61 (now the allocation order is 61, 60, 1, 0) - but modules could not be allocated here, only files. So for our relocation tools, this was essentially no change. (st iill only slot 1, 0 for modules) WinMo 6.5 improves on this by opening up slot 60 and 61 to modules - yielding an extra 64mb of potential virtual memory space. (the allocation order is now 1, 61, 60, 0 for modules, 60, 61, 0 for files) In order for the kernel to recognize these new slots as being mappable for modules, it must be updated to the 6.5 codebase. This is where the 6.5 native nk.exe comes in, and why it's so important Profiling Virtual Memory is an important job for an OEM - the less available in slot 0, the sooner a device will kick back out of memory errors (even if it's not truely out of memory) - and the worse the user experience will be. Some ROM's I have seen have less than 20MB available in slot 0 (and the user experience is as bad as you might imagine) There are many more intracacies to the whole process - like balancing the load between services.exe and device.exe to best utilize the 32mb vm space available to each - storing all resource-only dlls as modules so they can be alloced to slot 63, etc. This is also why it's important that the re-alloc tools be updated to support the new slots - g'reloc will not ever try to allocate modules to slot 60/61 because as far as it's aware, this is not possible. For the moment I know of 2 tools that will realloc to slot 60/61, wmreloc 2.0, and bepe's new kitchen (used by ervius vk) The memory addresses defined in .vm - judging from the manual xip porting tutorial, the first value defines the bottom of the allocation in slot 0 (how much space is reserved for dll's) - and the 2nd value defines the top of the allocation for the kernel memory address space.. these values should be dynamically calculated depending on the contents of your NK (XIP) partition. Incidentally, romhdr.bin in ervius vk/bepes kitchen serves the same purpose. And if all that isn't complicated enough, in WM 6.1 the process initvmmap.exe was introduced in the MSXIPKernel, NK partition.. This process draws a map of all virtual memory, and using the following registry key from the boot hive: Code:
[HKEY_LOCAL_MACHINE\System\Loader\ModuleInfo] [HKEY_LOCAL_MACHINE\System\Loader\ModuleInfo\dllname.dll] "filename.exe"=dword:1 "filename2.exe"=dword:1 Quote:
__________________
If you find find my ROMs useful and my posts helpful, I would not turn down a Donation
Last edited by Da_G; 07-15-2009 at 03:56 AM. |
This post has been thanked 10 times. |
|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
23001
Hi can someone post sys and xip here please I can't get it from rapidshare I couldent get anything of rapidshare all weekend the kitchen is here http://forum.xda-developers.com/showthread.php?t=474406 please upload sys xip best regards swampy395 |
|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
Quote:
__________________
|
This post has been thanked 3 times. |
|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
Oh my god, Thanks a lot Da_G for this great explaination, it was very interesting. But can you tell me, If i want my WM 6.1 ROM to fully utilize the changes in 6.1 VM Mapping, what changes i need to do in the XIP/other areas of ROM? As you might know, the HTC P3400i (Gene) phone comes with a WM 6 ROM. I ported the xip to WM 6.1 21051 build. In that process i removed the file encfilt.dll and replaced it with mencflt.dll, added initvmmap.exe to it, and added the following registry settings to boot.rgu :
Quote:
Also, is it possible for us, chefs, to build a WM 6.5 VM model aware nk.exe for our devices, coz over there at the XDAForums, some guys did it for Hermes, Polaris etc which, in my knowledge were not destined to receive 6.5 updates/native kernel. How can we do it for our devices?
__________________
ROM: Today its WM 6.5 build 23519
Blog: http://blog.sumitbhardwaj.co.in Thanks to Da_G, Ankit360, joojoobee666 and many other friends for all the WM6.5 goodness i am getting and sharing |
This post has been thanked 1 times. |
|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
Rhank You joojoobee666 if possible can you also do a titan xip (nuekernal)
__________________
Mathew Smith
HTC Touch Pro Divested Alltel Current ROM 21914 Sense 2.5.2016 |
|
||||
Re: WM 6.5 Kitchen QVGA and VGA Developer Edition
PPCKitchen files. Browsingie and adobeflash have been recmodded. WinCENLS_WWE is in the 0409. IPSECVPN and Enterprise are optional under system. The 96DPI were put together with 218xx.
The CDMA Touch Pro (Herman)XIP is the only one I can verify. The others, well they should be fine. As usual, these were based from Da_G's kitchen, but this IS the developers thread so.... UPDATE: The additional SYS_23001_96DPI_0409.old is here because of a possible messaging issue with the 23001 QVGA files from Da_G. This one will need renamed to use obviously. The IE issue is resolved in this one. SYS_23001_Common http://www.4shared.com/file/11497367...01_Common.html SYS_23001_192DPI_0409 (updated 06/30/09 at 12:35pm EST. Removed _skip files. Sorry bout that. I don't get overwrite warning popups. Only in my log.) http://www.4shared.com/file/11509931...2DPI_0409.html SYS_23001_96DPI_0409 (updated 07/02/09 at 1:20pm EST with Da_G's newest DPI files. This will fix IE as well. Note, two users have reported text messaging issues with these) http://www.4shared.com/file/11514012...6DPI_0409.html SYS_23001_96DPI_0409.old http://www.4shared.com/file/11519785..._0409_old.html Thanks to Da_G for the goods as usual. Last edited by joojoobee666; 07-02-2009 at 01:17 PM. |
This post has been thanked 19 times. |
|
|
|