Blackfin arch: Allow ptrace to peek and poke application data in L1 data SRAM.
Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
This commit is contained in:
parent
2cfebf2bce
commit
6546eae4fd
|
@ -219,6 +219,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||
safe_dma_memcpy (&tmp, (const void *)(addr + add), sizeof(tmp));
|
||||
copied = sizeof(tmp);
|
||||
} else
|
||||
#endif
|
||||
#if L1_DATA_A_LENGTH != 0
|
||||
if (addr + add >= L1_DATA_A_START
|
||||
&& addr + add + sizeof(tmp) <= L1_DATA_A_START + L1_DATA_A_LENGTH) {
|
||||
memcpy(&tmp, (const void *)(addr + add), sizeof(tmp));
|
||||
copied = sizeof(tmp);
|
||||
} else
|
||||
#endif
|
||||
#if L1_DATA_B_LENGTH != 0
|
||||
if (addr + add >= L1_DATA_B_START
|
||||
&& addr + add + sizeof(tmp) <= L1_DATA_B_START + L1_DATA_B_LENGTH) {
|
||||
memcpy(&tmp, (const void *)(addr + add), sizeof(tmp));
|
||||
copied = sizeof(tmp);
|
||||
} else
|
||||
#endif
|
||||
if (addr + add >= FIXED_CODE_START
|
||||
&& addr + add + sizeof(tmp) <= FIXED_CODE_END) {
|
||||
|
@ -289,6 +303,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||
safe_dma_memcpy ((void *)(addr + add), &data, sizeof(data));
|
||||
copied = sizeof(data);
|
||||
} else
|
||||
#endif
|
||||
#if L1_DATA_A_LENGTH != 0
|
||||
if (addr + add >= L1_DATA_A_START
|
||||
&& addr + add + sizeof(data) <= L1_DATA_A_START + L1_DATA_A_LENGTH) {
|
||||
memcpy((void *)(addr + add), &data, sizeof(data));
|
||||
copied = sizeof(data);
|
||||
} else
|
||||
#endif
|
||||
#if L1_DATA_B_LENGTH != 0
|
||||
if (addr + add >= L1_DATA_B_START
|
||||
&& addr + add + sizeof(data) <= L1_DATA_B_START + L1_DATA_B_LENGTH) {
|
||||
memcpy((void *)(addr + add), &data, sizeof(data));
|
||||
copied = sizeof(data);
|
||||
} else
|
||||
#endif
|
||||
if (addr + add >= FIXED_CODE_START
|
||||
&& addr + add + sizeof(data) <= FIXED_CODE_END) {
|
||||
|
|
Loading…
Reference in a new issue