Subversion Repositories HelenOS

Rev

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

Rev 3618 Rev 3664
Line 25... Line 25...
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
27
#
28
 
28
 
29
#include <arch/arch.h>
29
#include <arch/arch.h>
-
 
30
#include <arch/cpu.h>
30
#include <arch/regdef.h>
31
#include <arch/regdef.h>
31
#include <arch/boot/boot.h>
32
#include <arch/boot/boot.h>
32
#include <arch/stack.h>
33
#include <arch/stack.h>
33
 
34
 
34
#include <arch/mm/mmu.h>
35
#include <arch/mm/mmu.h>
Line 295... Line 296...
295
0:
296
0:
296
	ba 0b
297
	ba 0b
297
	nop
298
	nop
298
 
299
 
299
 
300
 
-
 
301
1:
-
 
302
#ifdef CONFIG_SMP
-
 
303
	/*
-
 
304
	 * Determine the width of the MID and save its mask to %g3. The width
-
 
305
	 * is
-
 
306
	 * 	* 5 for US and US-IIIi,
-
 
307
	 * 	* 10 for US3 except US-IIIi.
-
 
308
	 */
-
 
309
#if defined(US)
-
 
310
	mov 0x1f, %g3
-
 
311
#elif defined(US3)
-
 
312
	mov 0x3ff, %g3
-
 
313
	rdpr %ver, %g2
-
 
314
	sllx %g2, 16, %g2
-
 
315
	srlx %g2, 48, %g2
-
 
316
	cmp %g2, IMPL_ULTRASPARCIII_I
-
 
317
	move %xcc, 0x1f, %g3
-
 
318
#endif
-
 
319
 
300
	/*
320
	/*
301
	 * Read MID from the processor.
321
	 * Read MID from the processor.
302
	 */
322
	 */
303
1:
-
 
304
	ldxa [%g0] ASI_ICBUS_CONFIG, %g1
323
	ldxa [%g0] ASI_ICBUS_CONFIG, %g1
305
	srlx %g1, ICBUS_CONFIG_MID_SHIFT, %g1
324
	srlx %g1, ICBUS_CONFIG_MID_SHIFT, %g1
306
	and %g1, ICBUS_CONFIG_MID_MASK, %g1
325
	and %g1, %g3, %g1
307
 
326
 
308
#ifdef CONFIG_SMP
-
 
309
	/*
327
	/*
310
	 * Active loop for APs until the BSP picks them up. A processor cannot
328
	 * Active loop for APs until the BSP picks them up. A processor cannot
311
	 * leave the loop until the global variable 'waking_up_mid' equals its
329
	 * leave the loop until the global variable 'waking_up_mid' equals its
312
	 * MID.
330
	 * MID.
313
	 */
331
	 */