aboutsummaryrefslogtreecommitdiff
path: root/machine/mtrap.h
diff options
context:
space:
mode:
authorWesley W. Terpstra <wesley@sifive.com>2018-03-05 14:59:44 -0800
committerGitHub <noreply@github.com>2018-03-05 14:59:44 -0800
commit2bbd8e1a1bccae13ec87882baf423abfc6ef76fd (patch)
tree95453fbde3440dc2dbc67ba55fc0a9da7fd2555b /machine/mtrap.h
parente5846a2bc707eaa58dc8ab6a8d20a090c6ee8570 (diff)
downloadpk-2bbd8e1a1bccae13ec87882baf423abfc6ef76fd.zip
pk-2bbd8e1a1bccae13ec87882baf423abfc6ef76fd.tar.gz
pk-2bbd8e1a1bccae13ec87882baf423abfc6ef76fd.tar.bz2
mtrap: add a halt IPI used for poweroff (#86)
Otherwise, linux complains the moment an interrupt arrives and wakes up one of the not-looping cores.
Diffstat (limited to 'machine/mtrap.h')
-rw-r--r--machine/mtrap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/machine/mtrap.h b/machine/mtrap.h
index eafdb14..c4d43d0 100644
--- a/machine/mtrap.h
+++ b/machine/mtrap.h
@@ -78,6 +78,7 @@ static inline void wfi()
#define IPI_SOFT 0x1
#define IPI_FENCE_I 0x2
#define IPI_SFENCE_VMA 0x4
+#define IPI_HALT 0x8
#define MACHINE_STACK_SIZE RISCV_PGSIZE
#define MENTRY_HLS_OFFSET (INTEGER_CONTEXT_SIZE + SOFT_FLOAT_CONTEXT_SIZE)