You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
511 B
30 lines
511 B
5 months ago
|
/*
|
||
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||
|
*
|
||
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
*
|
||
|
* Change Logs:
|
||
|
* Date Author Notes
|
||
|
* 2021-01-30 lizhirui first version
|
||
|
*/
|
||
|
|
||
|
#include <rthw.h>
|
||
|
#include <rtthread.h>
|
||
|
|
||
|
#include <riscv.h>
|
||
|
#include <stdint.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
#include "riscv_mmu.h"
|
||
|
|
||
|
void mmu_enable_user_page_access(void)
|
||
|
{
|
||
|
set_csr(sstatus, SSTATUS_SUM);
|
||
|
}
|
||
|
|
||
|
void mmu_disable_user_page_access(void)
|
||
|
{
|
||
|
clear_csr(sstatus, SSTATUS_SUM);
|
||
|
}
|