Subversion Repositories HelenOS

Rev

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

Rev 2286 Rev 2290
Line 63... Line 63...
63
static gxemul_hw_map_t gxemul_hw_map;
63
static gxemul_hw_map_t gxemul_hw_map;
64
static chardev_t console;
64
static chardev_t console;
65
static irq_t gxemul_irq;
65
static irq_t gxemul_irq;
66
static irq_t gxemul_timer_irq;
66
static irq_t gxemul_timer_irq;
67
 
67
 
-
 
68
static bool hw_map_init_called = false;
-
 
69
 
68
static void gxemul_write(chardev_t *dev, const char ch);
70
static void gxemul_write(chardev_t *dev, const char ch);
69
static void gxemul_enable(chardev_t *dev);
71
static void gxemul_enable(chardev_t *dev);
70
static void gxemul_disable(chardev_t *dev);
72
static void gxemul_disable(chardev_t *dev);
71
static char gxemul_do_read(chardev_t *dev);
73
static char gxemul_do_read(chardev_t *dev);
72
 
74
 
Line 89... Line 91...
89
    gxemul_hw_map.rtc_freq = gxemul_hw_map.rtc + GXEMUL_RTC_FREQ_OFFSET;
91
    gxemul_hw_map.rtc_freq = gxemul_hw_map.rtc + GXEMUL_RTC_FREQ_OFFSET;
90
    gxemul_hw_map.rtc_ack = gxemul_hw_map.rtc + GXEMUL_RTC_ACK_OFFSET;
92
    gxemul_hw_map.rtc_ack = gxemul_hw_map.rtc + GXEMUL_RTC_ACK_OFFSET;
91
    gxemul_hw_map.irqc_mask = gxemul_hw_map.irqc + GXEMUL_IRQC_MASK_OFFSET;
93
    gxemul_hw_map.irqc_mask = gxemul_hw_map.irqc + GXEMUL_IRQC_MASK_OFFSET;
92
    gxemul_hw_map.irqc_unmask = gxemul_hw_map.irqc + GXEMUL_IRQC_UNMASK_OFFSET;
94
    gxemul_hw_map.irqc_unmask = gxemul_hw_map.irqc + GXEMUL_IRQC_UNMASK_OFFSET;
93
 
95
 
-
 
96
    hw_map_init_called = true;
94
}
97
}
95
 
98
 
96
/** Putchar that works with gxemul */
99
/** Putchar that works with gxemul */
97
void gxemul_write(chardev_t *dev, const char ch)
100
void gxemul_write(chardev_t *dev, const char ch)
98
{
101
{
Line 288... Line 291...
288
size_t machine_get_memory_size(void)
291
size_t machine_get_memory_size(void)
289
{
292
{
290
    return  *((int*)(GXEMUL_MP + GXEMUL_MP_MEMSIZE_OFFSET));
293
    return  *((int*)(GXEMUL_MP + GXEMUL_MP_MEMSIZE_OFFSET));
291
}
294
}
292
 
295
 
293
void gxemul_debug_putc(char ch) {
296
void machine_debug_putc(char ch) {
-
 
297
    if (!hw_map_init_called) {
294
//  *((volatile char *) GXEMUL_KBD) = ch;
298
        *((volatile char *) GXEMUL_KBD) = ch;
295
//TODO commented version doesn't work, don't know why (as ??
299
    } else {
296
    *((char *) gxemul_hw_map.videoram) = ch;
300
        *((char *) gxemul_hw_map.videoram) = ch;
-
 
301
    }
297
}
302
}
298
 
303
 
299
/** @}
304
/** @}
300
 */
305
 */