summaryrefslogtreecommitdiffstats
path: root/private/ntos/boot/veneer/vrbat.h
blob: 696a7dede281d2d932d0b8552ef633f6b2f9c833 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
 * Copyright (c) 1995 FirmWorks, Mountain View CA USA. All rights reserved.
 * Copyright (c) 1996 FirePower, Inc.
 *
 * $RCSfile: vrbat.h $
 * $Revision: 1.2 $
 * $Date: 1996/01/16 18:05:24 $
 * $Locker:  $
 */

#ifndef VRBAT_H
#define VRBAT_H

/*
 ***********************************************************************
 *
 * MSR bit definitions
 *
 ***********************************************************************
 */
#define INSTR_ADDR_XLATE	0x00000020	// Instruction Addr xlate
#define DATA_ADDR_XLATE 	0x00000010	// Data Addr xlate
#define EXTRNL_INT_ENABL	0x00008000	// EE bit
#define PRIVILEDGES		0x00004000	// PR bit for supervisor/user
						// mode.  Setting this bit to 1
						// restricts access to user only
#define XCPT_LE_MODE		0x00010000	// take exceptions in little 
						// endian mode.
#define LITTLE_ENDIAN		0x00000001	// run little endian mode
#define MCHNE_CHK_EN		0x00001000	// Machine Check Enable
#define FLOAT_PNT_EN		0x00002000

/*
************************************************************************
**
**	Block Address Translation registers
**
************************************************************************
*/
//
// Here are defines for the UPPER 32 bit bat register:
//
#define PAGE_INDEX_BITS		0xfffe0000
#define BEPI(x)			( x & PAGE_INDEX_BITS )

#define A_128K_BLOCK_SIZE	0x00000000
#define A_256K_BLOCK_SIZE	0x00000004
#define A_512K_BLOCK_SIZE	0x0000000c
#define A_1MEG_BLOCK_SIZE	0x0000001c
#define A_2MEG_BLOCK_SIZE	0x0000003c
#define A_4MEG_BLOCK_SIZE	0x0000007c
#define AN_8MEG_BLOCK_SIZE	0x000000fc
#define A_16MB_BLOCK_SIZE	0x000001fc
#define A_32MB_BLOCK_SIZE	0x000003fc
#define A_64MB_BLOCK_SIZE	0x000007fc
#define A_128M_BLOCK_SIZE	0x00000ffc
#define A_256M_BLOCK_SIZE	0x00001ffc

#define SUPERVISOR_ONLY		0x00000002
#define USER_ACCESS     	0x00000001

//
// The Lower BAT Register
//
#define BRPN(x)	( (x >> 8) & PAGE_INDEX_BITS)

//
//	WIMG: VIMVENDERS BITS:
//
#define WRITE_THROUGH	0x00000040
#define CACHE_INHIBIT	0x00000020
#define MEMORY_COHRNCY	0x00000010
#define GUARDED_BLOCK	0x00000008	// for IBAT use only....

#define	PAGE_RW_ACCESS	0x00000002
#define	PAGE_RO_ACCESS	0x00000001
#define	PAGE_UNAVAILBL	0x00000000


//
// define the special purpose register values for 
// use with the "mfspr, mtspr" instructions
//
#define SDR1		25
#define IBAT0_UPPER	528
#define IBAT0_LOWER	529
#define IBAT1_UPPER	530
#define IBAT1_LOWER	531
#define IBAT2_UPPER	532
#define IBAT2_LOWER	533
#define IBAT3_UPPER	534
#define IBAT3_LOWER	535

#define DBAT0_UPPER	536
#define DBAT0_LOWER	537
#define DBAT1_UPPER	538
#define DBAT1_LOWER	539
#define DBAT2_UPPER	540
#define DBAT2_LOWER	541
#define DBAT3_UPPER	542
#define DBAT3_LOWER	543

//
// data which written to the BAT's upper register
// will turn off it's translation abilities
//
#define INVALIDATE	0x00000000
#define KSEG0		0x80000000
#define LDW(x,y)	addi x, 0, (y&0xffff)	;\
			addis x, 0, (y>>16) 

#endif	//VRBAT_H