mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
soc: qcom: Update the dump table region size in imem
Secure world need whole dump memory region size along with start address to map that region in the secure world. Change-Id: Ie3467086b3fb491761b35935f16cc2e7e9d4871b Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This commit is contained in:
parent
2fb25cbc0f
commit
b3f2f0d43c
1 changed files with 7 additions and 2 deletions
|
|
@ -164,7 +164,9 @@ int msm_dump_data_register_nominidump(enum msm_dump_table_ids id,
|
|||
}
|
||||
EXPORT_SYMBOL(msm_dump_data_register_nominidump);
|
||||
|
||||
static int init_memory_dump(void *dump_vaddr, phys_addr_t phys_addr)
|
||||
#define MSM_DUMP_TOTAL_SIZE_OFFSET 0x724
|
||||
static int init_memory_dump(void *dump_vaddr, phys_addr_t phys_addr,
|
||||
size_t size)
|
||||
{
|
||||
struct msm_dump_table *table;
|
||||
struct msm_dump_entry entry;
|
||||
|
|
@ -190,6 +192,9 @@ static int init_memory_dump(void *dump_vaddr, phys_addr_t phys_addr)
|
|||
memdump.table_phys = phys_addr;
|
||||
memcpy_toio(imem_base, &memdump.table_phys,
|
||||
sizeof(memdump.table_phys));
|
||||
memcpy_toio(imem_base + MSM_DUMP_TOTAL_SIZE_OFFSET,
|
||||
&size, sizeof(size_t));
|
||||
|
||||
/* Ensure write to imem_base is complete before unmapping */
|
||||
mb();
|
||||
pr_info("MSM Memory Dump base table set up\n");
|
||||
|
|
@ -292,7 +297,7 @@ static int mem_dump_alloc(struct platform_device *pdev)
|
|||
|
||||
memset(dump_vaddr, 0x0, total_size);
|
||||
|
||||
ret = init_memory_dump(dump_vaddr, phys_addr);
|
||||
ret = init_memory_dump(dump_vaddr, phys_addr, total_size);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Memory Dump table set up is failed\n");
|
||||
qtee_shmbridge_deregister(shm_bridge_handle);
|
||||
|
|
|
|||
Loading…
Reference in a new issue