/* * cps.h * * Created on: May 1, 2012 * Author: MIPS TECHNOLOGIES, INC */ /* Unpublished work (c) MIPS Technologies, Inc. All rights reserved. Unpublished rights reserved under the copyright laws of the United States of America and other countries. This code is confidential and proprietary to MIPS Technologies, Inc. ("MIPS Technologies") and may be disclosed only as permitted in writing by MIPS Technologies or an authorized third party. Any copying, reproducing, modifying, use or disclosure of this code (in whole or in part) that is not expressly permitted in writing by MIPS Technologies or an authorized third party is strictly prohibited. At a minimum, this code is protected under trade secret, unfair competition, and copyright laws. Violations thereof may result in criminal penalties and fines. MIPS Technologies reserves the right to change this code to improve function, design or otherwise. MIPS Technologies does not assume any liability arising out of the application or use of this code, or of any error or omission in such code. Any warranties, whether express, statutory, implied or otherwise, including but not limited to the implied warranties of merchantability or fitness for a particular purpose, are excluded. Except as expressly provided in any written license agreement from MIPS Technologies or an authorized third party, the furnishing of this code does not give recipient any license to any intellectual property rights, including any patent rights, that cover this code. This code shall not be exported, reexported, transferred, or released, directly or indirectly, in violation of the law of any country or international law, regulation, treaty, Executive Order, statute, amendments or supplements thereto. Should a conflict arise regarding the export, reexport, transfer, or release of this code, the laws of the United States of America shall be the governing law. This code may only be disclosed to the United States government ("Government"), or to Government users, with prior written consent from MIPS Technologies or an authorized third party. This code constitutes one or more of the following: commercial computer software, commercial computer software documentation or other commercial items. If the user of this code, or any related documentation of any kind, including related technical data or manuals, is an agency, department, or other entity of the Government, the use, duplication, reproduction, release, modification, disclosure, or transfer of this code, or any related documentation of any kind, is restricted in accordance with Federal Acquisition Regulation 12.212 for civilian agencies and Defense Federal Acquisition Regulation Supplement 227.7202 for military agencies. The use of this code by the Government is further restricted in accordance with the terms of the license agreement(s) and/or applicable contract terms and conditions covering this code from MIPS Technologies or an authorized third party. */ /* * This include file contains #defines for the memory mapped registers in a coherent Processing system * of both single cores and multi threaded cores. It contains registers offset for all the registers, * defines for the fields with in the registers and encodings for some of the fields. * * The fields in the registers are defined by a pair of #defines, one define is the starting bit position of * the field and another, (with a "_S" appended to the name), is the size of the field. Here is an example of * how you would use these #defines in the the extraction of a filed: * * li $5, GIC_BASE_ADDR # load GIC KSEG0 Address * lw $4, GIC_SH_CONFIG($5) # Read the GIC_SH_CONFIG Register * ext $4, NUMINTERRUPTS, NUMINTERRUPTS_S # Extract NUMINTERRUPTS * * The names for the registers and fields are usually the same as used in the Software Users Manual * (SUM). The exceptions occur when the names would conflict with each other in that case the name * is appended with something to make it unique. */ #ifndef CPS_H_ #define CPS_H_ //MIPS32R2 Register /* CP0, MIPS32 R2*/ #define CP0_INTCTL $12,1 #define CP0_SRSCTL $12,2 #define CP0_SRSMAP $12,3 #define CP0_EBASE $15,1 #define CP0_CONFIG0 $16,0 #define CP0_CONFIG1 $16,1 #define CP0_CONFIG2 $16,2 #define CP0_CONFIG3 $16,3 #define CP0_CONFIG7 $16,7 #define CP0_DTAGLO $28,2 #define CP0_TAGLO2 $28,4 #define CP0_DATALO $28,1 #define CP0_IDATALO $28,1 #define CP0_DDATALO $28,3 #define CP0_DATALO2 $28,5 #define CP0_DATAHI $29,1 /* CP0, MIPS32 R2, MT*/ #define CP0_MVPCTL $0, 1 #define CP0_MVPCONF0 $0, 2 #define CP0_VPECTL $1, 1 #define CP0_VPECONF0 $1, 2 #define CP0_TCSTATUS $2, 1 #define CP0_TCBIND $2, 2 #define CP0_TCRESTART $2, 3 #define CP0_TCHALT $2, 4 /* CP0, Others*/ #define CP0_INTCTL $12,1 #define CP0_SRSCTL $12,2 #define CP0_SRSMAP $12,3 #define CP0_EBASE $15,1 #define CP0_CONFIG0 $16,0 #define CP0_CONFIG1 $16,1 #define CP0_CONFIG2 $16,2 #define CP0_CONFIG3 $16,3 #define CP0_CONFIG7 $16,7 #define CP0_DTAGLO $28,2 #define CP0_TAGLO2 $28,4 #define CP0_DATALO $28,1 #define CP0_IDATALO $28,1 #define CP0_DDATALO $28,3 #define CP0_DATALO2 $28,5 #define CP0_DATAHI $29,1 #define CP0_DATAHI2 $29,5 /* * MIPS32 Config1 Register (CP0 Register 16, Select 1) */ #define CFG1_M 0x80000000 /* Config2 implemented */ #define CFG1_MMUSMASK 0x7e000000 /* mmu size - 1 */ #define CFG1_MMUSSHIFT 25 #define CFG1_ISMASK 0x01c00000 /* icache lines 64<