Rev 872 | Rev 893 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 872 | Rev 879 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | 48 | ||
49 | stack0: |
49 | stack0: |
50 | kernel_image_start: |
50 | kernel_image_start: |
51 | .auto |
51 | .auto |
52 | 52 | ||
53 | #Fill TR.i and TR.d and enable paging |
53 | #Fill TR.i and TR.d using Region Register #VRN_KERNEL |
54 | - | ||
55 | mov r9=rr[r0] |
- | |
56 | movl r10=(RR_MASK) |
- | |
57 | and r9=r10,r9 |
- | |
58 | movl r10=((ASID2RID(ASID_KERNEL,VRN_KERNEL)<<RID_SHIFT)|(KERNEL_PAGE_WIDTH<<PS_SHIFT)) |
- | |
59 | or r9=r10,r9 |
- | |
60 | mov rr[r0]=r9 |
- | |
61 | - | ||
62 | - | ||
63 | 54 | ||
64 | movl r8=(VRN_KERNEL<<VRN_SHIFT) |
55 | movl r8=(VRN_KERNEL<<VRN_SHIFT) |
65 | mov r9=rr[r8] |
56 | mov r9=rr[r8] |
66 | movl r10=(RR_MASK) |
57 | movl r10=(RR_MASK) |
67 | and r9=r10,r9 |
58 | and r9=r10,r9 |
Line 79... | Line 70... | ||
79 | 70 | ||
80 | movl r10=(KERNEL_TRANSLATION_D) |
71 | movl r10=(KERNEL_TRANSLATION_D) |
81 | itr.d dtr[r0]=r10 |
72 | itr.d dtr[r0]=r10 |
82 | 73 | ||
83 | 74 | ||
84 | - | ||
85 | - | ||
86 | - | ||
87 | - | ||
88 | - | ||
89 | # initialize PSR |
75 | # initialize PSR |
90 | mov psr.l = r0 |
76 | mov psr.l = r0 |
91 | srlz.i |
77 | srlz.i |
92 | srlz.d |
78 | srlz.d |
93 | movl r10=(PSR_DT_MASK|PSR_RT_MASK|PSR_IT_MASK|PSR_IC_MASK) /*Enable paging*/ |
79 | movl r10=(PSR_DT_MASK|PSR_RT_MASK|PSR_IT_MASK|PSR_IC_MASK) /*Enable paging*/ |
Line 98... | Line 84... | ||
98 | movl r8=paging_start |
84 | movl r8=paging_start |
99 | mov cr.iip=r8 |
85 | mov cr.iip=r8 |
100 | srlz.d |
86 | srlz.d |
101 | srlz.i |
87 | srlz.i |
102 | .explicit |
88 | .explicit |
- | 89 | ||
- | 90 | /*Return from interupt is only the way how to fill upper half word of PSR*/ |
|
103 | {rfi;;} |
91 | {rfi;;} |
104 | {nop 0;;} |
92 | {nop 0;;} |
105 | {nop 0;;} |
93 | {nop 0;;} |
106 | {nop 0;;} |
94 | {nop 0;;} |
107 | {nop 0;;} |
95 | {nop 0;;} |
108 | {nop 0;;} |
96 | {nop 0;;} |
109 | {nop 0;;} |
97 | {nop 0;;} |
110 | {nop 0;;} |
98 | {nop 0;;} |
111 | {nop 0;;} |
99 | {nop 0;;} |
- | 100 | ||
- | 101 | .global paging_start |
|
- | 102 | /*Now we are paging*/ |
|
- | 103 | paging_start: |
|
112 | {nop 0;;} |
104 | {nop 0;;} |
113 | {nop 0;;} |
105 | {nop 0;;} |
114 | {nop 0;;} |
106 | {nop 0;;} |
115 | {nop 0;;} |
107 | {nop 0;;} |
116 | {nop 0;;} |
108 | {nop 0;;} |
117 | {nop 0;;} |
109 | {nop 0;;} |
118 | {nop 0;;} |
110 | {nop 0;;} |
119 | {nop 0;;} |
111 | {nop 0;;} |
120 | 112 | ||
121 | .global paging_start |
- | |
122 | paging_start: |
- | |
123 | - | ||
124 | .auto |
113 | .auto |
125 | 114 | ||
126 | # switch to register bank 1 |
115 | # switch to register bank 1 |
127 | bsw.1 |
116 | bsw.1 |
128 | 117 |