Subversion Repositories HelenOS

Rev

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

Rev 4046 Rev 4109
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>
59
#include <arch/drivers/msim.h>
62
#include <arch/drivers/msim.h>
Line 131... Line 134...
131
}
134
}
132
 
135
 
133
void arch_post_mm_init(void)
136
void arch_post_mm_init(void)
134
{
137
{
135
    interrupt_init();
138
    interrupt_init();
136
    msim_console(device_assign_devno());
-
 
-
 
139
   
137
#ifdef CONFIG_FB
140
#ifdef CONFIG_FB
138
    /* GXemul framebuffer */
141
    /* GXemul framebuffer */
139
    fb_properties_t gxemul_prop = {
142
    fb_properties_t gxemul_prop = {
140
        .addr = 0x12000000,
143
        .addr = 0x12000000,
141
        .offset = 0,
144
        .offset = 0,
Line 143... Line 146...
143
        .y = 480,
146
        .y = 480,
144
        .scan = 1920,
147
        .scan = 1920,
145
        .visual = VISUAL_BGR_8_8_8,
148
        .visual = VISUAL_BGR_8_8_8,
146
    };
149
    };
147
    fb_init(&gxemul_prop);
150
    fb_init(&gxemul_prop);
148
#endif
151
#else
149
 
-
 
150
#ifdef MACHINE_msim
-
 
151
    sysinfo_set_item_val("machine.msim", NULL, 1);
-
 
152
#endif
-
 
153
 
-
 
154
#ifdef MACHINE_simics
152
#ifdef CONFIG_MIPS_PRN
155
    sysinfo_set_item_val("machine.simics", NULL, 1);
153
    dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS);
156
#endif
-
 
157
 
-
 
158
#ifdef MACHINE_bgxemul
154
#endif /* CONFIG_MIPS_PRN */
159
    sysinfo_set_item_val("machine.bgxemul", NULL, 1);
-
 
160
#endif
-
 
161
 
-
 
162
#ifdef MACHINE_lgxemul
155
#endif /* CONFIG_FB */
163
    sysinfo_set_item_val("machine.lgxemul", NULL, 1);
-
 
164
#endif
-
 
165
}
156
}
166
 
157
 
167
void arch_post_cpu_init(void)
158
void arch_post_cpu_init(void)
168
{
159
{
169
}
160
}
Line 172... Line 163...
172
{
163
{
173
}
164
}
174
 
165
 
175
void arch_post_smp_init(void)
166
void arch_post_smp_init(void)
176
{
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
177
}
190
}
178
 
191
 
179
void calibrate_delay_loop(void)
192
void calibrate_delay_loop(void)
180
{
193
{
181
}
194
}
Line 220... Line 233...
220
}
233
}
221
 
234
 
222
void arch_reboot(void)
235
void arch_reboot(void)
223
{
236
{
224
    ___halt();
237
    ___halt();
225
   
-
 
226
    while (1);
238
    while (1);
227
}
239
}
228
 
240
 
229
/** Construct function pointer
241
/** Construct function pointer
230
 *
242
 *