diff options
author | Ruslan Bukin <br@FreeBSD.org> | 2018-09-05 11:34:58 +0000 |
---|---|---|
committer | Ruslan Bukin <br@FreeBSD.org> | 2018-09-05 11:34:58 +0000 |
commit | 157654d0c494c8eb5927c32ec5b302a62b467d51 (patch) | |
tree | c6b26730a616776304d244a44fc4d9bdcb2b3f11 /sys/riscv/include/asm.h | |
parent | 93952a8b1b5ca9acb209887def36ac54fd2abc90 (diff) | |
download | src-test2-157654d0c494c8eb5927c32ec5b302a62b467d51.tar.gz src-test2-157654d0c494c8eb5927c32ec5b302a62b467d51.zip |
Notes
Diffstat (limited to 'sys/riscv/include/asm.h')
-rw-r--r-- | sys/riscv/include/asm.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/riscv/include/asm.h b/sys/riscv/include/asm.h index 5b517322732c..87736980cdc0 100644 --- a/sys/riscv/include/asm.h +++ b/sys/riscv/include/asm.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> + * Copyright (c) 2015-2018 Ruslan Bukin <br@bsdpad.com> * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -63,4 +63,12 @@ ld tmp, TD_PCB(tmp); /* Load the pcb */ \ sd handler, PCB_ONFAULT(tmp) /* Set the handler */ +#define ENTER_USER_ACCESS(tmp) \ + li tmp, SSTATUS_SUM; \ + csrs sstatus, tmp + +#define EXIT_USER_ACCESS(tmp) \ + li tmp, SSTATUS_SUM; \ + csrc sstatus, tmp + #endif /* _MACHINE_ASM_H_ */ |