arch/mips/include/asm/mipsregs.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/mipsregs.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/mipsregs.h
Extension
.h
Size
100234 bytes
Lines
3103
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_MIPSREGS_H
#define _ASM_MIPSREGS_H

#include <linux/linkage.h>
#include <linux/types.h>
#include <asm/hazards.h>
#include <asm/isa-rev.h>

/*
 * The following macros are especially useful for __asm__
 * inline assembler.
 */
#ifndef __STR
#define __STR(x) #x
#endif
#ifndef STR
#define STR(x) __STR(x)
#endif

/*
 *  Configure language
 */
#ifdef __ASSEMBLER__
#define _ULCAST_
#define _U64CAST_
#else
#define _ULCAST_ (unsigned long)
#define _U64CAST_ (u64)
#endif

/*
 * Coprocessor 0 register names
 *
 * CP0_REGISTER variant is meant to be used in assembly code, C0_REGISTER
 * variant is meant to be used in C (uasm) code.
 */
#define CP0_INDEX		$0
#define C0_INDEX		0, 0

#define CP0_RANDOM		$1
#define C0_RANDOM		1, 0

#define CP0_ENTRYLO0		$2
#define C0_ENTRYLO0		2, 0

#define CP0_ENTRYLO1		$3
#define C0_ENTRYLO1		3, 0

#define CP0_CONF		$3
#define C0_CONF			3, 0

#define CP0_GLOBALNUMBER	$3, 1
#define C0_GLOBALNUMBER		3, 1

#define CP0_CONTEXT		$4
#define C0_CONTEXT		4, 0

#define CP0_PAGEMASK		$5
#define C0_PAGEMASK		5, 0

#define CP0_PAGEGRAIN		$5, 1
#define C0_PAGEGRAIN		5, 1

#define CP0_SEGCTL0		$5, 2
#define C0_SEGCTL0		5, 2

#define CP0_SEGCTL1		$5, 3
#define C0_SEGCTL1		5, 3

#define CP0_SEGCTL2		$5, 4
#define C0_SEGCTL2		5, 4

#define CP0_PWBASE		$5, 5
#define C0_PWBASE		5, 5

#define CP0_PWFIELD		$5, 6
#define C0_PWFIELD		5, 6

#define CP0_PWCTL		$5, 7
#define C0_PWCTL		5, 7

#define CP0_WIRED		$6
#define C0_WIRED		6, 0

#define CP0_INFO		$7
#define C0_INFO			7, 0

#define CP0_HWRENA		$7
#define C0_HWRENA		7, 0

Annotation

Implementation Notes