When is this feature useful?
- Sometimes it's required to add more feature which bring the increase of code and data size in the application processor's bootloader program, called LK(Little Kernel), but the memory size allocated for both the code and data space of the bootloader program is 1 MByte in default.
- In this case, the memory size allocated for the bootloader(Little Kernel) needs to be resized to make more space to put the bootloader problem within the available memory.
- Consequently, needs to relocate SMEM area and the kernel which are allocated contiguous to each other.
Solution:
- The memory size allocated for the bootloader program can be resized with small amount of code change. but, more changes are required because the SMEM space and the kernel memory are allocated contiguous to each other.
And the SMEM library which was the blocking part(in changing the base address of it) up to recently is no more dependant on the base address of SMEM. Thus, the base address of SMEM can be relocated by customer by the simple change.
If you want to know more technical details, refer to the source code file, smem_ext.c in AMSS/products/76XX/services/mproc/smem directory.
Here below are the changes required.
[ Changes required from Modem code ]
1. AMSS/products/76XX/build/ms/targtsncjnlym.h ( use the file for your target configuration )
#define SCL_APPS_BOOT_SIZE 0x0300000 // was 0x00100000 (1 MB), increase the memory size the allocated for the bootloader to 3 MB.
#define SCL_APPS_CODE_BASE 0x00400000 // was 0x00200000, relocate the base address of kernel to 0x00400000
#define SCL_APPS_TOTAL_SIZE 0x9400000 // was 0x9600000 (150 MB), not effective.
#define SCL_SHARED_RAM_BASE 0x00300000 // was 0x00100000, relocate the base address of SMEM to 0x00300000
** Clean build is required for the change.
[ Changes required from Appl. code ]
1. LINUX/android/bootable/bootloader/lk/platform/msm7k/include/platform/iomap.h
#define MSM_SHARED_BASE 0x00300000 // was 0x00100000
2. LINUX/android/bootable/bootloader/lk/target/msm7627_surf/rules.mk
MEMSIZE := 0x00300000 # was 1MB (0x00100000)
BASE_ADDR := 0x00400000 # was 0x00200000
3. LINUX/android/kernel/arch/arm/mach-msm/io.c
unsigned int msm_shared_ram_phys = 0x00300000; // was 0x00100000
4. LINUX/android/kernel/arch/arm/mach-msm/Makefile.boot
# MSM7x27
zreladdr-$(CONFIG_ARCH_MSM7X27) := 0x00408000 // was 0x00208000
params_phys-$(CONFIG_ARCH_MSM7X27) := 0x00400100 // was 0x00200100
initrd_phys-$(CONFIG_ARCH_MSM7X27) := 0x0A000000
5. LINUX/android/kernel/arch/arm/configs/msm7627-perf_defconfig
CONFIG_PHYS_OFFSET=0x00400000 // was 0x00200000
6. LINUX/android/vendor/qcom/msm7627_surf/BoardConfig.mk
BOARD_KERNEL_BASE := 0x00400000 // was 0x00200000
BOARD_KERNEL_CMDLINE := mem=211M console=ttyDCC0 androidboot.hardware=qcom // was mem=213M, because the bootloader
No comments:
Post a Comment