mmu

所属分类:处理器开发
开发工具:C/C++
文件大小:24KB
下载次数:11
上传日期:2009-07-15 10:19:28
上 传 者stanleydingding
说明:  innova card 的usip(mips 4ksd) mmu 示例代码,C和asm
(*==========================================================================*/ /*============================================================================ * * Copyright (c) 2002-2006 Innova Card. * All Rights Reserved. * * This software is the confidential and proprietary information of * Innova Card ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered * into with Innova Card. * * Innova Card makes no representations or warranties about the suitability of * the software, either express or implied, including but not limited to * the implied warranties of merchantability, fitness for a particular purpose, * or non-infrigement. Innova Card shall not be liable for any damages suffered * by licensee as the result of using, modifying or distributing this software * or its derivatives. * *======================================)

文件列表:
mmu\.cdtproject (2035, 2006-06-29)
mmu\.project (2701, 2006-06-20)
mmu\app_kernel.ld (832, 2006-06-20)
mmu\crt0.s (20523, 2007-02-19)
mmu\crt0.s-old (20419, 2006-06-29)
mmu\include\hal_exception_handler.h (1622, 2006-06-20)
mmu\include\kernel.h (1615, 2006-06-20)
mmu\include\tlb.h (2680, 2006-06-20)
mmu\include\user.h (1450, 2006-06-20)
mmu\include (0, 2009-07-06)
mmu\makefile (4432, 2006-06-29)
mmu\src\kernel\hal_exception_handler.c (1657, 2006-06-20)
mmu\src\kernel\main.c (3476, 2006-06-28)
mmu\src\kernel\switch_to_user_mode.S (2431, 2006-06-20)
mmu\src\kernel\usip_init.c (0, 2006-06-20)
mmu\src\kernel (0, 2009-07-06)
mmu\src\user\printf.c (15743, 2006-06-20)
mmu\src\user\user_mode.c (2176, 2006-06-20)
mmu\src\user (0, 2009-07-06)
mmu\src (0, 2009-07-06)
mmu (0, 2009-07-06)

Functionality: -------------- This example shows a basic use of the MMU. It contains two main parts: -the first part implements a code in user mode trying to access (R/W) to kernel data -the second part implements a code trying to execute not executable data. Obviously, these two parts fail thanks to the MMU configuration The goal of this simple example is to show the benefit of the MMU: * Kernel code/data are protected from user application access * Data can be none-executable to avoid the buffer-overflow attacks But the MMU can also: * Isolate differents applications * Make data write(or read) only !!! Warning !!! This is not a complete example! In order to implement a real application which will use the user mode you will have to respect the following recommandations: * The kernel code has to save its context before launching the user code * When an exception occurs in user mode: - The kernel code saves the user context - The kernel code restores the kernel context - The kernel code processes the exception + Critical exception + Others # The kernel code saves its context # The kernel code restores the user context # The kernel code returns to user code * The user code accesses the peripherals via syscall (Only the kernel code can use the HAL)

近期下载者

相关文件


收藏者