Subversion Repositories HelenOS

Rev

Rev 3549 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3549 Rev 3582
Line 108... Line 108...
108
	 */
108
	 */
109
 
109
 
110
	/*
110
	/*
111
	 * US3 processors have a write-invalidate cache, so explicitly
111
	 * US3 processors have a write-invalidate cache, so explicitly
112
	 * invalidating it is not required. Whether to invalidate I-cache
112
	 * invalidating it is not required. Whether to invalidate I-cache
113
	 * or not is decided according to the value of the ver.impl bits
113
	 * or not is decided according to the value of the global
114
	 * in the Version register.
114
	 * "subarchitecture" variable (set in the bootstrap).
115
	 */
115
	 */
116
! the lowest/greatest value of ver.impl for US3
-
 
117
#define FIRST_US3_CPU 0x14
116
	set subarchitecture, %g2
118
#define LAST_US3_CPU 0x19
-
 
119
	rdpr %ver, %g2			! autodetect CPU using the Version register
-
 
120
	sllx %g2, 16, %g2		! extract ver.impl bits
-
 
121
	srlx %g2, 48, %g2
117
	ldub [%g2], %g2
122
	addcc %g2, -FIRST_US3_CPU, %g0	! flush if ver.impl < FISRT_US3_CPU
-
 
123
	bl 0f
-
 
124
	nop
-
 
125
	addcc %g2, -LAST_US3_CPU, %g0	! flush if ver.impl > LAST_US3_CPU
-
 
126
	bg 0f
118
	cmp %g2, 3
127
	nop
-
 
128
	ba 1f
119
	be 1f
129
	nop
120
	nop
130
0:
121
0:
131
	call icache_flush
122
	call icache_flush
132
	nop
123
	nop
133
1:
124
1:
134
	
-
 
135
	membar #StoreStore
125
	membar #StoreStore
136
	
126
	
137
	/*
127
	/*
138
	 * Flush the instruction pipeline.
128
	 * Flush the instruction pipeline.
139
	 */
129
	 */