Subversion Repositories HelenOS

Rev

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

Rev 1945 Rev 2064
Line 48... Line 48...
48
#include <userspace.h>
48
#include <userspace.h>
49
#include <console/console.h>
49
#include <console/console.h>
50
#include <proc/uarg.h>
50
#include <proc/uarg.h>
51
#include <syscall/syscall.h>
51
#include <syscall/syscall.h>
52
#include <ddi/irq.h>
52
#include <ddi/irq.h>
-
 
53
#include <arch/simics/ega.h>
53
 
54
 
54
void arch_pre_main(void)
55
void arch_pre_main(void)
55
{
56
{
56
    /* Setup usermode init tasks. */
57
    /* Setup usermode init tasks. */
57
    init.cnt = 8;
58
    init.cnt = 8;
Line 79... Line 80...
79
    iva_write((uintptr_t) &ivt);
80
    iva_write((uintptr_t) &ivt);
80
    srlz_d();
81
    srlz_d();
81
   
82
   
82
}
83
}
83
 
84
 
-
 
85
 
-
 
86
 
84
void arch_post_mm_init(void)
87
void arch_post_mm_init(void)
85
{
88
{
86
    irq_init(INR_COUNT, INR_COUNT);
89
    irq_init(INR_COUNT, INR_COUNT);
-
 
90
#ifdef SKI
87
    ski_init_console();
91
    ski_init_console();
-
 
92
#else   
-
 
93
    ega_init();
-
 
94
#endif  
88
    it_init(); 
95
    it_init(); 
89
}
96
}
90
 
97
 
91
void arch_post_cpu_init(void)
98
void arch_post_cpu_init(void)
92
{
99
{
Line 96... Line 103...
96
{
103
{
97
}
104
}
98
 
105
 
99
void arch_post_smp_init(void)
106
void arch_post_smp_init(void)
100
{
107
{
101
    thread_t *t;
-
 
102
 
108
 
103
    if (config.cpu_active == 1) {
109
    if (config.cpu_active == 1) {
104
        /*
110
        /*
105
         * Create thread that polls keyboard.
111
         * Create thread that polls keyboard.
106
         */
112
         */
-
 
113
#ifdef SKI
-
 
114
        thread_t *t;
107
        t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll");
115
        t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
108
        if (!t)
116
        if (!t)
109
            panic("cannot create kkbdpoll\n");
117
            panic("cannot create kkbdpoll\n");
110
        thread_ready(t);
118
        thread_ready(t);
-
 
119
#endif      
111
    }
120
    }
112
}
121
}
113
 
122
 
114
/** Enter userspace and never return. */
123
/** Enter userspace and never return. */
115
void userspace(uspace_arg_t *kernel_uarg)
124
void userspace(uspace_arg_t *kernel_uarg)
Line 153... Line 162...
153
/** Acquire console back for kernel
162
/** Acquire console back for kernel
154
 *
163
 *
155
 */
164
 */
156
void arch_grab_console(void)
165
void arch_grab_console(void)
157
{
166
{
-
 
167
#ifdef SKI
158
    ski_kbd_grab();
168
    ski_kbd_grab();
-
 
169
#endif  
159
}
170
}
160
/** Return console to userspace
171
/** Return console to userspace
161
 *
172
 *
162
 */
173
 */
163
void arch_release_console(void)
174
void arch_release_console(void)
164
{
175
{
-
 
176
#ifdef SKI
165
    ski_kbd_release();
177
    ski_kbd_release();
-
 
178
#endif
166
}
179
}
167
 
180
 
168
/** @}
181
/** @}
169
 */
182
 */