mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-05-17 21:10:46 +00:00
Added function to write in the cluster internal return value.
This commit is contained in:
parent
96a6336e8a
commit
ff4921f39f
3 changed files with 7 additions and 0 deletions
|
|
@ -31,8 +31,10 @@
|
|||
#define ARCHI_CLUSTER_CTRL_CLUSTER_CLK_GATE 0x20
|
||||
#define ARCHI_CLUSTER_CTRL_DBG_STATUS 0x28
|
||||
#define ARCHI_CLUSTER_CTRL_DBG_HALT_MASK 0x38
|
||||
#define ARCHI_CLUSTER_CTRL_RETURN 0x100
|
||||
#define ARCHI_CLUSTER_CTRL_BOOTADDR(core) (0x40 + 4*(core))
|
||||
#define ARCHI_CLUSTER_CTRL_BOOTADDR_COREID(offset) (((offset) - ARCHI_CLUSTER_CTRL_BOOTADDR(0)) >> 2)
|
||||
|
||||
#define ARCHI_CLUSTER_CTRL_RETURN_SHIFT_BITS 31
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -67,4 +67,8 @@ static inline unsigned int plp_ctrl_bootaddr_get() {
|
|||
return pulp_read32(ARCHI_CLUSTER_CTRL_ADDR + 0x40);
|
||||
}
|
||||
|
||||
static inline void hal_cluster_ctrl_return_set_remote(int cid, int value){
|
||||
pulp_write32(ARCHI_CLUSTER_PERIPHERALS_GLOBAL_ADDR(cid)+ARCHI_CLUSTER_CTRL_OFFSET+ARCHI_CLUSTER_CTRL_RETURN, value | 1 << ARCHI_CLUSTER_CTRL_RETURN_SHIFT_BITS);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ void cluster_entry_stub()
|
|||
cluster_retval = retval;
|
||||
cluster_running = 0;
|
||||
#ifdef ARCHI_NO_FC
|
||||
hal_cluster_ctrl_return_set_remote(hal_cluster_id(), cluster_retval);
|
||||
hal_cluster_ctrl_eoc_set_remote(hal_cluster_id(), 1);
|
||||
exit(cluster_retval);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue