mrg666/android_kernel_shooter — pull request #3 by sultanxda (2013-10-11 00:23:43+00:00)
Title: Board-shooter & board-shooter_u: remap memory for an extra 79MB of RAM (...

...ICS edition)

Board-shooter.c/board-shooter_u.c changes:
*Removed mem_size_mb variable
*Don't add 0x10000000 to the audio, surfaceflinger, and userspace allocations (the new memory map is much more precise now and this could mess it up)
*Removed ADSP2 allocation (it does nothing)
*Set all addresses in the range of 0x40000000 to 0x80000000 to use MEMTYPE_EBI1 (0x80000000 is the last memory address on the device)

Board-shooter.h changes:
*Completely remapped memory (different base addresses for many allocations now)
*Converted some math equations related to framebuffer to hex (makes life easier)
*Removed the MSM_PMEM_KERNEL_EBI1 allocation (this wasn't even being referenced by anything so it is junk)
*Shrunk ADSP allocation to 0x1500000
*Shrunk SF allocation to 0x20A0000
*Removed the ADSP2 allocation
*There are no longer any allocations that are mapped after the userspace allocation
*Converted MSM_OVERLAY_BLT_SIZE to hex (looks better)
*Shrunk the SMI region by the size of the ADSP allocation
*Moved the ADSP allocation to the SMI region
*Added 0x10000000 to the userspace allocation to offset the removal of the mem_size_mb function
*Increased the userspace allocation to 1MB less than the maximum possible allowed by the physical base address and the end of the usable address space [(0x80000000 - 0x48000000) - 0x100000]
The userspace allocation is 1MB less than the maximum amount possible because the device misbehaves (reboots/lags) when the userspace allocation goes all the way to the end of the usable address space.

Differences from the Jellybean remap:
*Surfaceflinger is smaller (ICS has a lower surfaceflinger memory requirement)
*Framebuffer is larger (needed for HDMI)

This memory remap gives 79MB of more RAM to userspace.

Signed-off-by: Sultanxda