Hifi_dsp: add hikey970 memmap and fix a bug about memory overflow

Signed-off-by: houxiaoyong <houxiaoyong1@huawei.com>
This commit is contained in:
houxiaoyong
2018-03-05 15:43:15 +08:00
committed by Guodong Xu
parent 5ec9e7ade8
commit 08c3eee43a
2 changed files with 18 additions and 4 deletions
+14
View File
@@ -0,0 +1,14 @@
#ifndef _HI_GLOBAL_MEM_MAP_INCLUDE_H_
#define _HI_GLOBAL_MEM_MAP_INCLUDE_H_
#define HISI_RESERVED_HIFI_PHYMEM_BASE 0x8D500000
#define HISI_RESERVED_HIFI_PHYMEM_SIZE (0xC00000)
#ifdef CONFIG_HISI_FAMA
#define HISI_RESERVED_HIFI_DATA_PHYMEM_BASE_FAMA 0x5AE300000
#endif
#define HISI_RESERVED_HIFI_DATA_PHYMEM_BASE 0x8E300000
#define HISI_RESERVED_HIFI_DATA_PHYMEM_SIZE (0x500000)
#endif
Regular → Executable
+4 -4
View File
@@ -790,10 +790,10 @@ int hikey_ap_mailbox_read(struct hikey_msg_with_content *hikey_msg)
hikey_msg->msg_info.msg_len);
return -1;
}
hikey_ap_mailbox_read_queue(hikey_msg_head, hikey_msg->msg_info.msg_content,
hikey_msg->msg_info.msg_len - offsetof(struct hikey_ap2dsp_msg_body, msg_content));
if(hikey_msg->msg_info.msg_len > offsetof(struct hikey_ap2dsp_msg_body, msg_content)){
hikey_ap_mailbox_read_queue(hikey_msg_head, hikey_msg->msg_info.msg_content,
hikey_msg->msg_info.msg_len - offsetof(struct hikey_ap2dsp_msg_body, msg_content));
}
return 0;
}