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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
/*
* Copyright (C) 1993, 1994 by
* Digital Equipment Corporation, Maynard, Massachusetts.
* All rights reserved.
*
* This software is furnished under a license and may be used and copied
* only in accordance of the terms of such license and with the
* inclusion of the above copyright notice. This software or any other
* copies thereof may not be provided or otherwise made available to any
* other person. No title to and ownership of the software is hereby
* transferred.
*
* The information in this software is subject to change without notice
* and should not be construed as a commitment by Digital Equipment
* Corporation.
*
* Digital assumes no responsibility for the use or reliability of its
* software on equipment which is not supplied by Digital.
*
*/
#include "alpha-regdef.h"
#define LEAF_ENTRY(NAME) .text ; .align 4 ; .globl NAME ; .ent NAME, 0 ; NAME: ; .frame sp, 0, ra ; .prologue 0 ;
LEAF_ENTRY(flush_i_cache)
call_pal 0x86 /* IMB */
ret zero, (ra) /* return */
.end flush_i_cache
/* ++
*
* VOID
* outVti(
* ULONG Port
* ULONG Data
* )
*
* Routine Description:
*
* This Function Uses The 64-Bit Super-Page To Write Data To A Port
* Of The On-Board VTI Combo Chip For JENSEN.
*
* Arguments:
*
* Port (A0) - Port Number On VTI Chip To Which To Write Data
* data (a1) - data to write to the port, only low byte is significant
* To The VTI
*
* Return Value:
*
* None.
*
*/
LEAF_ENTRY(outVti)
/*
* generate super-page address of vti, base address
* N.B. - Upper Bits Must Be Sign Extension Of Bit 42
* va<42:41> = 10 (binary) for super-page address
*/
lda t0, 0xc01c(zero) /* t0 = ffff ffff ffff c01c */
sll t0, 28, t0 /* t0 = ffff fc01 c000 0000 */
/*
* Shift In The Port Number To Generate The Port Address We
* wish to access
* N.B. - Access Width Is Always Zero = Byte Access For VTI
*/
sll a0, 9, a0 /* a0 << 9 */
bis t0, a0, t0 /* T0 = Address Of VTI Port */
/*
* Do The Port Write, Guarantee That Subsequent Writes (And Reads)
* are ordered with respect to this write and return to caller
*/
stl a1, 0(t0) /* write data to port */
mb /* guarantee write ordering */
ret zero, (ra) /* return */
.end outVti
/*
*
* ULONG
* inVti(
* ULONG Port
* )
*
* Routine Description:
*
* This Function Uses The 64-Bit Super-Page To Read Data From A Port
* Of The On-Board VTI Combo Chip For JENSEN.
*
* Arguments:
*
* Port (A0) - Port Number On VTI Chip To Which To Write Data
*
* Return Value:
*
* Data (V0) - The Data Read From The VTI Chip, Only The Low Byte Will
* be valid
*
*/
LEAF_ENTRY(inVti)
/*
* generate super-page address of vti, base address
* N.B. - Upper Bits Must Be Sign Extension Of Bit 42
* va<42:41> = 10 (binary) for super-page address
*/
lda t0, 0xc01c(zero) /* t0 = ffff ffff ffff c01c */
sll t0, 28, t0 /* t0 = ffff fc01 c000 0000 */
/*
* Shift In The Port Number To Generate The Port Address We
* wish to access
* N.B. - Access Width For VTI Is Always 0 = Byte Access
*/
sll a0, 9, a0 /* a0 << 9 */
bis t0, a0, t0 /* T0 = Address Of VTI Port */
/*
* Do The Super-Page I/O Access And Return Data To Caller
*/
ldl v0, 0(t0) /* read data from port */
and v0, 0xff, v0
ret zero, (ra) /* return */
.end inVti
|