Shell 7450ef6c4d
[rt-smart] kernel virtual memory management layer (#6809)
synchronize virtual memory system works.
adding kernel virtual memory management layer for page-based MMU enabled architecture
porting libcpu MMU codes
porting lwp memory related codes
2023-01-08 21:08:55 -05:00

30 lines
503 B
C

/*
* 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()
{
set_csr(sstatus, SSTATUS_SUM);
}
void mmu_disable_user_page_access()
{
clear_csr(sstatus, SSTATUS_SUM);
}