41,7 → 41,6 |
#include <print.h> |
#include <ddi/device.h> |
#include <mm/page.h> |
#include <arch/machine.h> |
|
/** Address of devices. */ |
#define GXEMUL_VIDEORAM 0x10000000 |
79,7 → 78,7 |
|
|
/** Initializes #gxemul_hw_map. */ |
void machine_hw_map_init(void) |
void gxemul_hw_map_init(void) |
{ |
gxemul_hw_map.videoram = hw_map(GXEMUL_VIDEORAM, PAGE_SIZE); |
gxemul_hw_map.kbd = hw_map(GXEMUL_KBD, PAGE_SIZE); |
153,7 → 152,7 |
return IRQ_ACCEPT; |
} |
|
void machine_grab_console(void) |
void gxemul_kbd_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&gxemul_irq.lock); |
162,7 → 161,7 |
interrupts_restore(ipl); |
} |
|
void machine_release_console(void) |
void gxemul_kbd_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&gxemul_irq.lock); |
174,7 → 173,7 |
|
|
/** Return console object representing gxemul console */ |
void machine_console_init(devno_t devno) |
void gxemul_console(devno_t devno) |
{ |
chardev_initialize("gxemul_console", &console, &gxemul_ops); |
stdin = &console; |
281,14 → 280,8 |
irq_register(&gxemul_timer_irq); |
} |
|
void machine_timer_irq_start() |
size_t gxemul_get_memory_size(void) |
{ |
gxemul_timer_irq_init(); |
gxemul_timer_start(GXEMUL_TIMER_FREQ); |
} |
|
size_t machine_get_memory_size(void) |
{ |
return *((int*)(GXEMUL_MP + GXEMUL_MP_MEMSIZE_OFFSET)); |
} |
|