6/01/2012

How to apply 1GB SDRAM (two 512MB LPDDR2 devices) for Gingerbread on MSM7x30/8x55-0.

HIGHMEM is not available while SPARSEMEM enabled on M7x30 kernel.

Therefore we have only two choices like




1. Disable SPARSEMEM (DMM as well) + Enable HIGHMEM : but not possible if considering the power optimization with DMM.




2. Use 2G/2G virtual split : currently this is the only one solution.



Gingerbread only provides 3G/1G virtual memory split while the former Android builds up to Froyo supported both virtual memory splits of 3G/1G as well as 2G/2G.

Here is how to apply 2G/2G virtual memory split for the Gingerbread users who wants to install the physical 1GB SDRAM devices on top of M7x30/8x55-0.





1. Kernel



a) Source

kernel/arch/arm/configs/xxx_defconfig

arch/arm/mach-msm/include/mach/vmalloc.h



b) Configuration



- CONFIG_VMSPLIT_3G=y

- #CONFIG_VMSPLIT_2G is not set

- # CONFIG_VMSPLIT_1G is not set

- CONFIG_PAGE_OFFSET=0xC0000000



+ # CONFIG_VMSPLIT_3G is not set

+ CONFIG_VMSPLIT_2G=y

+ # CONFIG_VMSPLIT_1G is not set

+ CONFIG_PAGE_OFFSET=0x80000000



2. Compiler

M7x30 PL takes the appropriate map along with selected configuration listed in BoardConfig.mk and select.mk.



a) Source

device/*.BoardConfig.mk

build/core/combo/select.mk



b) Configuration

BoardConfig.mk

+ TARGET_USES_2G_VM_SPLIT := true



select.mk

+ ifneq ($(TARGET_USES_2G_VM_SPLIT),true)

$(combo_target)PRELINKER_MAP := $(BUILD_SYSTEM)/prelink-$(combo_os_arch).map

+ else

+ $(combo_target)PRELINKER_MAP :=

+ $(BUILD_SYSTEM)/prelink-$(combo_os_arch)-2G.map

+ endif



3. Mapfile



a) Source

build/core/prelink-linux-<arch>*.map



b) Configuration

M7x30 2.x PL provides prelink-linux-arm.map for 3G/1G (user/kernel space) or prelink-linux-arm-2G.map for 2G/2G split.





4. apriori program



a) Source

build/tools/apriori/Android.mk and prelinkmap.c



b) Configuration



Android.mk



+ ifeq ($(TARGET_USES_2G_VM_SPLIT),true) LOCAL_CFLAGS += -DVM_SPLIT_2G

+ endif



prelinkmap.c



+ #ifdef VM_SPLIT_2G

+ #define PRELINK_MIN 0x50000000

+ #define PRELINK_MAX 0x6FFFFFFF

+ #else

#define PRELINK_MIN 0x90000000

#define PRELINK_MAX 0xBFFFFFFF

+

No comments:

Post a Comment