VGAPIC32

Annotated mips.h

69:aa1ac5755f03
2017-11-07 Paul Boddie Employ a basic CPU priority and keep the timer interrupt enabled (but not at CPU level), guarding priority changes by disabling and re-enabling the interrupt. The timer interrupt should probably be enabled during the active display period for the DMA channels to operate, even though circumstances appear to allow the channels to function in this configuration with the timer interrupt disabled.
paul@0 1
#ifndef __MIPS_H__
paul@0 2
#define __MIPS_H__
paul@0 3
paul@2 4
#define KSEG0_BASE	0x80000000
paul@2 5
#define KSEG1_BASE	0xA0000000
paul@2 6
paul@0 7
#define CP0_INDEX	$0
paul@0 8
#define CP0_ENTRYLO0	$2
paul@0 9
#define CP0_ENTRYLO1	$3
paul@0 10
#define CP0_CONTEXT	$4
paul@0 11
#define CP0_PAGEMASK	$5
paul@0 12
#define CP0_WIRED	$6
paul@9 13
#define CP0_COUNT	$9
paul@0 14
#define CP0_ENTRYHI	$10
paul@9 15
#define CP0_COMPARE	$11
paul@0 16
#define CP0_STATUS	$12
paul@0 17
#define CP0_INTCTL	$12, 1
paul@0 18
#define CP0_CAUSE	$13
paul@0 19
#define CP0_EPC		$14
paul@0 20
#define CP0_EBASE	$15, 1
paul@0 21
#define CP0_CONFIG	$16
paul@0 22
#define CP0_WATCHLO	$18
paul@9 23
#define CP0_DEBUG	$23
paul@0 24
#define CP0_TAGLO	$28
paul@0 25
#define CP0_TAGHI	$29
paul@9 26
#define CP0_ERROREPC	$30, 0
paul@0 27
paul@0 28
#define STATUS_CP0	0x10000000
paul@0 29
#define STATUS_BEV	0x00400000
paul@69 30
paul@0 31
#define STATUS_IRQ	0x0000fc00
paul@69 32
#define STATUS_IRQ_SHIFT	10
paul@69 33
paul@0 34
#define STATUS_UM	0x00000010
paul@0 35
#define STATUS_ERL	0x00000004
paul@0 36
#define STATUS_EXL	0x00000002
paul@0 37
#define STATUS_IE	0x00000001
paul@0 38
paul@0 39
#define CAUSE_IV	0x00800000
paul@0 40
paul@0 41
#define EBASE_MASK	0x3ffff000
paul@0 42
paul@0 43
#define INTCTL_MASK	0x000003e0
paul@0 44
paul@9 45
#define DEBUG_DM	0x40000000
paul@9 46
paul@0 47
#define TLB_CACHED	0x00000018
paul@0 48
#define TLB_UNCACHED	0x00000010
paul@0 49
#define TLB_DIRTY	0x00000004
paul@0 50
#define TLB_VALID	0x00000002
paul@0 51
#define TLB_GLOBAL	0x00000001
paul@0 52
paul@0 53
#define TLB_READ	(TLB_CACHED | TLB_VALID)
paul@0 54
#define TLB_WRITE	(TLB_CACHED | TLB_DIRTY | TLB_VALID)
paul@0 55
#define TLB_ALL_READ	(TLB_CACHED | TLB_VALID | TLB_GLOBAL)
paul@0 56
#define TLB_ALL_WRITE	(TLB_CACHED | TLB_DIRTY | TLB_VALID | TLB_GLOBAL)
paul@0 57
paul@14 58
#define CONFIG_K0	0x00000007
paul@14 59
#define CONFIG_K0_UNCACHED		2
paul@14 60
#define CONFIG_K0_CACHABLE_NONCOHERENT	3
paul@0 61
paul@0 62
#endif /* __MIPS_H__ */