diff options
author | Sanjit Bhat <[email protected]> | 2023-10-30 14:39:28 -0500 |
---|---|---|
committer | Sanjit Bhat <[email protected]> | 2023-10-30 14:39:28 -0500 |
commit | 3808f903625f42f58aa95e43e3caca3efaa4d118 (patch) | |
tree | ad8f5a0e376c246cb60c7cd0940517ea834e610e /kernel/start.c | |
parent | 74c1eba516fdb0ec1a17b16be7e76613ccba92bf (diff) | |
download | xv6-labs-3808f903625f42f58aa95e43e3caca3efaa4d118.tar.gz xv6-labs-3808f903625f42f58aa95e43e3caca3efaa4d118.tar.bz2 xv6-labs-3808f903625f42f58aa95e43e3caca3efaa4d118.zip |
lock: release lab
Diffstat (limited to 'kernel/start.c')
-rw-r--r-- | kernel/start.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/start.c b/kernel/start.c index e16f18a..bf03bc0 100644 --- a/kernel/start.c +++ b/kernel/start.c @@ -38,6 +38,11 @@ start() w_mideleg(0xffff); w_sie(r_sie() | SIE_SEIE | SIE_STIE | SIE_SSIE); +#ifdef KCSAN + // allow supervisor to read cycle counter register + w_mcounteren(r_mcounteren()|0x3); +#endif + // configure Physical Memory Protection to give supervisor mode // access to all of physical memory. w_pmpaddr0(0x3fffffffffffffull); |