Add RTOS memory read/write functions.
If not implemented, these specify to regular target read/write. However, if individual threads in an RTOS can have different address translation configured then the RTOS support can use this to do the right thing. Use this in hwthread, where of course address translation can be set up differently for different real cores. Change-Id: I62c501cff1f863d855ee197dee7b73204ea8885a Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/6327 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de> Reviewed-by: Jan Matyas <matyas@codasip.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
c8e643fd9f
commit
6ad89d61af
@@ -679,3 +679,19 @@ void rtos_free_threadlist(struct rtos *rtos)
|
||||
rtos->current_thread = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int rtos_read_buffer(struct target *target, target_addr_t address,
|
||||
uint32_t size, uint8_t *buffer)
|
||||
{
|
||||
if (target->rtos->type->read_buffer)
|
||||
return target->rtos->type->read_buffer(target->rtos, address, size, buffer);
|
||||
return ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
int rtos_write_buffer(struct target *target, target_addr_t address,
|
||||
uint32_t size, const uint8_t *buffer)
|
||||
{
|
||||
if (target->rtos->type->write_buffer)
|
||||
return target->rtos->type->write_buffer(target->rtos, address, size, buffer);
|
||||
return ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user