Changeset ed166f7 in mainline for kernel/arch/sparc64/src/asm.S
- Timestamp:
- 2006-08-31T18:53:14Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6767c1d
- Parents:
- e0b241f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/asm.S
re0b241f red166f7 29 29 #include <arch/stack.h> 30 30 #include <arch/regdef.h> 31 #include <arch/mm/mmu.h> 31 32 32 33 .text … … 144 145 read_from_ag_g7: 145 146 READ_ALTERNATE_REGISTER %g7, PSTATE_AG_BIT 147 148 149 /** Switch to userspace. 150 * 151 * %o0 Userspace entry address. 152 * %o1 Userspace stack pointer address. 153 */ 154 .global switch_to_userspace 155 switch_to_userspace: 156 flushw 157 wrpr %g0, 0, %cleanwin ! avoid information leak 158 save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp 159 160 clr %i2 161 clr %i3 162 clr %i4 163 clr %i5 164 clr %i6 165 166 wrpr %g0, 1, %tl ! enforce mapping via nucleus 167 168 rdpr %cwp, %g1 169 wrpr %g1, TSTATE_IE_BIT, %tstate 170 wrpr %i0, 0, %tnpc 171 172 /* 173 * Set primary context according to secondary context. 174 * Secondary context has been already installed by 175 * higher-level functions. 176 */ 177 wr %g0, ASI_DMMU, %asi 178 ldxa [VA_SECONDARY_CONTEXT_REG] %asi, %g1 179 stxa %g1, [VA_PRIMARY_CONTEXT_REG] %asi 180 flush %i7 181 182 done ! jump to userspace
Note:
See TracChangeset
for help on using the changeset viewer.