mmu_util.s
来自「文件内包含了nuclues的内核代码和针对Power PC的编译器。需要用Vir」· S 代码 · 共 120 行
S
120 行
#/*************************************************************************/
#/* */
#/* Copyright (c) 1993-2001 Accelerated Technology, Inc. */
#/* */
#/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */
#/* subject matter of this material. All manufacturing, reproduction, */
#/* use, and sales rights pertaining to this subject matter are governed */
#/* by the license agreement. The recipient of this software implicitly */
#/* accepts the terms of the license. */
#/* */
#/*************************************************************************/
#/*************************************************************************/
#/* */
#/* FILE NAME VERSION */
#/* */
#/* mmu_util.s Nucleus PLUS\MPC8245\Diab C/C++ 1.13.1 */
#/* */
#/* COMPONENT */
#/* */
#/* User MMU Initialization */
#/* */
#/* DESCRIPTION */
#/* */
#/* This file contains support functions for setting MMU registers. */
#/* */
#/* */
#/* DATA STRUCTURES */
#/* */
#/* None */
#/* */
#/* FUNCTIONS */
#/* */
#/* DEPENDENCIES */
#/* */
#/* None */
#/* */
#/* HISTORY */
#/* */
#/* NAME DATE REMARKS */
#/* */
#/* T. Weller 12\19\2001 Created inital version 1.13.1 */
#/*************************************************************************/
.file "mmu_util.s"
SDR1 .equ 25 # SDR1 SPR25
#/************************************************************************/
#/* */
#/* MMU_Put_SR */
#/* */
#/* Sets up the segment register identified in R3 with the data in R4 */
#/* */
#/************************************************************************/
.text
.align 2
.globl MMU_Put_SR
MMU_Put_SR:
mtsrin r4, r3
blr
#/************************************************************************/
#/* */
#/* MMU_Set_SDR1 */
#/* */
#/* Sets up the SDR1 register */
#/* */
#/************************************************************************/
.text
.align 2
.globl MMU_Set_SDR1
MMU_Set_SDR1:
mtspr SDR1, r3
blr
#/************************************************************************/
#/* */
#/* MMU_Invalidate_TLB */
#/* */
#/* */
#/************************************************************************/
.text
.align 2
.globl MMU_Invalidate_TLB
MMU_Invalidate_TLB:
tlbie r3
blr
#/************************************************************************/
#/* */
#/* MMU_Put_UINT32 */
#/* r3 holds the address */
#/* r4 holds the value */
#/* */
#/************************************************************************/
.text
.align 2
.globl MMU_Put_UINT32
MMU_Put_UINT32:
stw r4,0(r3)
mr r3,r4
blr
#/************************************************************************/
#/* */
#/* MMU_Get_UINT32 */
#/* Gets the byte word at r3 and puts it in r3 */
#/* */
#/************************************************************************/
.text
.align 2
.globl MMU_Get_UINT32
MMU_Get_UINT32:
lwz r3,0(r3)
blr
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?