diff options
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/sys_machdep.c | 23 | ||||
-rw-r--r-- | sys/arm/include/sysarch.h | 3 |
2 files changed, 25 insertions, 1 deletions
diff --git a/sys/arm/arm/sys_machdep.c b/sys/arm/arm/sys_machdep.c index ed8960c..16ec846 100644 --- a/sys/arm/arm/sys_machdep.c +++ b/sys/arm/arm/sys_machdep.c @@ -81,6 +81,22 @@ arm32_drain_writebuf(struct thread *td, void *args) return(0); } +static int +arm32_set_tp(struct thread *td, void *args) +{ + + td->td_md.md_tp = args; + return (0); +} + +static int +arm32_get_tp(struct thread *td, void *args) +{ + + td->td_retval[0] = (uint32_t)td->td_md.md_tp; + return (0); +} + int sysarch(td, uap) struct thread *td; @@ -96,7 +112,12 @@ sysarch(td, uap) case ARM_DRAIN_WRITEBUF : error = arm32_drain_writebuf(td, uap->parms); break; - + case ARM_SET_TP: + error = arm32_set_tp(td, uap->parms); + break; + case ARM_GET_TP: + error = arm32_get_tp(td, uap->parms); + break; default: error = EINVAL; break; diff --git a/sys/arm/include/sysarch.h b/sys/arm/include/sysarch.h index 6a8a6d7..d0c0c47 100644 --- a/sys/arm/include/sysarch.h +++ b/sys/arm/include/sysarch.h @@ -50,6 +50,8 @@ #define ARM_SYNC_ICACHE 0 #define ARM_DRAIN_WRITEBUF 1 +#define ARM_SET_TP 2 +#define ARM_GET_TP 3 struct arm_sync_icache_args { uintptr_t addr; /* Virtual start address */ @@ -60,6 +62,7 @@ struct arm_sync_icache_args { __BEGIN_DECLS int arm_sync_icache (u_int addr, int len); int arm_drain_writebuf (void); +int sysarch(int, void *); __END_DECLS #endif |