Subversion Repositories HelenOS

Rev

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

Rev 4345 Rev 4346
Line 50... Line 50...
50
#include <console/chardev.h>
50
#include <console/chardev.h>
51
#include <arch/barrier.h>
51
#include <arch/barrier.h>
52
#include <arch/debugger.h>
52
#include <arch/debugger.h>
53
#include <genarch/fb/fb.h>
53
#include <genarch/fb/fb.h>
54
#include <genarch/fb/visuals.h>
54
#include <genarch/fb/visuals.h>
-
 
55
#include <genarch/drivers/dsrln/dsrlnin.h>
-
 
56
#include <genarch/drivers/dsrln/dsrlnout.h>
-
 
57
#include <genarch/srln/srln.h>
55
#include <macros.h>
58
#include <macros.h>
56
#include <ddi/device.h>
59
#include <ddi/device.h>
57
#include <config.h>
60
#include <config.h>
58
#include <string.h>
61
#include <string.h>
-
 
62
#include <arch/drivers/msim.h>
59
 
63
 
60
#include <arch/asm/regname.h>
64
#include <arch/asm/regname.h>
61
 
65
 
62
/* Size of the code jumping to the exception handler code
66
/* Size of the code jumping to the exception handler code
63
 * - J+NOP
67
 * - J+NOP
Line 130... Line 134...
130
}
134
}
131
 
135
 
132
void arch_post_mm_init(void)
136
void arch_post_mm_init(void)
133
{
137
{
134
    interrupt_init();
138
    interrupt_init();
135
    console_init(device_assign_devno());
-
 
-
 
139
   
136
#ifdef CONFIG_FB
140
#ifdef CONFIG_FB
137
    /* GXemul framebuffer */
141
    /* GXemul framebuffer */
138
    fb_properties_t gxemul_prop = {
142
    fb_properties_t gxemul_prop = {
139
        .addr = 0x12000000,
143
        .addr = 0x12000000,
140
        .offset = 0,
144
        .offset = 0,
Line 142... Line 146...
142
        .y = 480,
146
        .y = 480,
143
        .scan = 1920,
147
        .scan = 1920,
144
        .visual = VISUAL_BGR_8_8_8,
148
        .visual = VISUAL_BGR_8_8_8,
145
    };
149
    };
146
    fb_init(&gxemul_prop);
150
    fb_init(&gxemul_prop);
147
#endif
151
#else
148
 
-
 
149
#ifdef MACHINE_msim
-
 
150
    sysinfo_set_item_val("machine.msim", NULL, 1);
-
 
151
#endif
-
 
152
 
-
 
153
#ifdef MACHINE_simics
152
#ifdef CONFIG_MIPS_PRN
154
    sysinfo_set_item_val("machine.simics", NULL, 1);
153
    dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS);
155
#endif
-
 
156
 
-
 
157
#ifdef MACHINE_bgxemul
154
#endif /* CONFIG_MIPS_PRN */
158
    sysinfo_set_item_val("machine.bgxemul", NULL, 1);
-
 
159
#endif
-
 
160
 
-
 
161
#ifdef MACHINE_lgxemul
155
#endif /* CONFIG_FB */
162
    sysinfo_set_item_val("machine.lgxemul", NULL, 1);
-
 
163
#endif
-
 
164
}
156
}
165
 
157
 
166
void arch_post_cpu_init(void)
158
void arch_post_cpu_init(void)
167
{
159
{
168
}
160
}
Line 171... Line 163...
171
{
163
{
172
}
164
}
173
 
165
 
174
void arch_post_smp_init(void)
166
void arch_post_smp_init(void)
175
{
167
{
-
 
168
#ifdef CONFIG_MIPS_KBD
-
 
169
    devno_t devno = device_assign_devno();
-
 
170
   
-
 
171
    /*
-
 
172
     * Initialize the msim/GXemul keyboard port. Then initialize the serial line
-
 
173
     * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts.
-
 
174
     */
-
 
175
    indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, devno, MSIM_KBD_IRQ);
-
 
176
    if (kbrdin) {
-
 
177
        srln_init(kbrdin);
-
 
178
        cp0_unmask_int(MSIM_KBD_IRQ);
-
 
179
    }
-
 
180
   
-
 
181
    /*
-
 
182
     * This is the necessary evil until the userspace driver is entirely
-
 
183
     * self-sufficient.
-
 
184
     */
-
 
185
    sysinfo_set_item_val("kbd", NULL, true);
-
 
186
    sysinfo_set_item_val("kbd.devno", NULL, devno);
-
 
187
    sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ);
-
 
188
    sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS);
-
 
189
#endif
176
}
190
}
177
 
191
 
178
void calibrate_delay_loop(void)
192
void calibrate_delay_loop(void)
179
{
193
{
180
}
194
}
Line 219... Line 233...
219
}
233
}
220
 
234
 
221
void arch_reboot(void)
235
void arch_reboot(void)
222
{
236
{
223
    ___halt();
237
    ___halt();
224
   
-
 
225
    while (1);
238
    while (1);
226
}
239
}
227
 
240
 
228
/** Construct function pointer
241
/** Construct function pointer
229
 *
242
 *