Subversion Repositories HelenOS

Rev

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

Rev 3863 Rev 3993
Line 30... Line 30...
30
#include <arch/regdef.h>
30
#include <arch/regdef.h>
31
#include <arch/stack.h>
31
#include <arch/stack.h>
32
 
32
 
33
.text
33
.text
34
 
34
 
35
/* TODO: remove it as soon as there is a scheduler for sun4v. It is here only to make the code compilable/ */
-
 
36
 
-
 
37
.global write_to_ag_g6
-
 
38
write_to_ag_g6:
-
 
39
 
-
 
40
.global write_to_ag_g7
-
 
41
write_to_ag_g7:
-
 
42
 
-
 
43
.global write_to_ig_g6
-
 
44
write_to_ig_g6:
-
 
45
 
-
 
46
.global read_from_ag_g7
-
 
47
read_from_ag_g7:
-
 
48
 
-
 
49
/** Switch to userspace.
35
/** Switch to userspace.
50
 *
36
 *
51
 * %o0	Userspace entry address.
37
 * %o0	Userspace entry address.
52
 * %o1	Userspace stack pointer address.
38
 * %o1	Userspace stack pointer address.
53
 * %o2  Userspace address of uarg structure.
39
 * %o2  Userspace address of uarg structure.
54
 */
40
 */
55
.global switch_to_userspace
41
.global switch_to_userspace
56
switch_to_userspace:
42
switch_to_userspace:
57
#if 0
-
 
58
	save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
43
	save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
59
	flushw
44
	flushw
60
	wrpr %g0, 0, %cleanwin		! avoid information leak
45
	wrpr %g0, 0, %cleanwin		! avoid information leak
61
 
46
 
62
	mov %i2, %o0			! uarg
47
	mov %i2, %o0			! uarg
Line 88... Line 73...
88
	 * Spills and fills will be handled by the userspace handlers.
73
	 * Spills and fills will be handled by the userspace handlers.
89
	 */
74
	 */
90
	wrpr %g0, WSTATE_OTHER(0) | WSTATE_NORMAL(1), %wstate
75
	wrpr %g0, WSTATE_OTHER(0) | WSTATE_NORMAL(1), %wstate
91
 
76
 
92
	done				! jump to userspace
77
	done				! jump to userspace
93
#endif
-