Module Name: src Committed By: cliff Date: Mon Nov 9 10:14:54 UTC 2009
Added Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixls_subr.S Log Message: this is a temporary place to park some trivial .S stuff until they can find a better home To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/rmi/rmixls_subr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/sys/arch/mips/rmi/rmixls_subr.S diff -u /dev/null src/sys/arch/mips/rmi/rmixls_subr.S:1.1.2.1 --- /dev/null Mon Nov 9 10:14:54 2009 +++ src/sys/arch/mips/rmi/rmixls_subr.S Mon Nov 9 10:14:54 2009 @@ -0,0 +1,55 @@ +/* $NetBSD: rmixls_subr.S,v 1.1.2.1 2009/11/09 10:14:54 cliff Exp $ */ + +#include "opt_cputype.h" + +#include <sys/cdefs.h> + +#include <mips/asm.h> +#include <mips/cpuregs.h> + +#include "assym.h" + + .set noreorder + .set mips3 + .text + +/* + * some useful labels for debugging + */ +.global mips_kseg0 +.equiv mips_kseg0, MIPS_KSEG0_START +.global mips_kseg1 +.equiv mips_kseg1, MIPS_KSEG1_START +.global mips_kseg2 +.equiv mips_kseg2, MIPS_KSEG2_START +.global mips_xkphys +.global mips_xkphys_u +.global mips_xkphys_cca3 +.global mips_xkphys_cca4 +.global mips_xkseg + +.equiv mips_xkphys, MIPS_XKPHYS_START +.equiv mips_xkphys_u, MIPS_XKPHYS_UNCACHED +.equiv mips_xkphys_cca3, MIPS_XKPHYS_CCA3 +.equiv mips_xkphys_cca4, MIPS_XKPHYS_CCA4 +.equiv mips_xkseg, MIPS_XKSEG_START + +/* + * read XLS Processor Control register + * + * uint64_t rmixls_mfcr(u_int cr); + */ +LEAF(rmixls_mfcr) + j ra + .word 0x70820018 /* mfcr v0, a0 */ +END(rmixls_mfcr) + +/* + * write XLS Processor Control register + * + * void rmixls_mtcr(u_int cr, uint64_t val); + */ +LEAF(rmixls_mtcr) + j ra + .word 0x70850019 /* mtcr a1, a0 */ +END(rmixls_mtcr)