tinit.s
2.11 KB
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
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
*************************************************************************/
/*
* File: tinit.s
* Creator: acorn@sgi.com
* Create Date: 9/22/95
*
* This in the init code for the 'manufacturing tests'
*
*/
############################################################################
#
# Begin task initialization
#
# Register $1 holds the task header address
# format for the task header:
# (see task.h)
#
#
.ent doInit
doInit:
# set RSP yield flags to FALSE (IMPORTANT: don't clear yield flag)
ori $2,zero,(SP_CLR_YIELDED|SP_CLR_TASKDONE)
mtc0 $2, SP_STATUS
# reset output pointers
lw $2, OS_TASK_OFF_OUTBUFF($1)
lw $3, OS_TASK_OFF_OUTBUFF_SZ($1)
#ifdef OUTPUT_DRAM
sw $2, RSP_STATE_DRAM_OUTP(rsp_state)
#else
sw $0, RSP_STATE_DRAM_OUTP(rsp_state)
#endif
sw $3, RSP_STATE_DRAM_OUT_LENP(rsp_state)
#
# important constants:
#
lqv vconst[0], VCONST_OFFSET(zero)
lqv vconst1[0], VCONST1_OFFSET(zero)
# OUTPUT: initialize CP0 registers
# This assumes the DP is idle. We expect the
# host (or boot code) to enforce this.
#ifdef OUTPUT_DRAM
addi $4, zero, DPC_CLR_XBUS_DMEM_DMA
mtc0 $4, CMD_STATUS
addi outp, zero, RSP_OUTPUT_OFFSET
#else
addi $4, zero, DPC_SET_XBUS_DMEM_DMA
# addi outp, zero, 0x1000 # DP initial conditions
addi outp, zero, RSP_OUTPUT_OFFSET # DP initial conditions
mtc0 $4, CMD_STATUS
mtc0 outp, CMD_START
mtc0 outp, CMD_END
#endif
#
#
#
# end of initialization section
#
############################################################################
.end doInit