/branches/arm/kernel/arch/arm32/include/machine.h |
---|
39,6 → 39,7 |
#include <console/console.h> |
#include <arch/types.h> |
#include <arch/exception.h> |
#include <arch/drivers/gxemul.h> |
/** Initializes console. |
87,7 → 88,22 |
extern uintptr_t machine_get_fb_address(void); |
#ifdef MACHINE_GXEMUL_TESTARM |
# define machine_console_init(devno) gxemul_console_init(devno) |
# define machine_grab_console gxemul_grab_console |
# define machine_release_console gxemul_release_console |
# define machine_hw_map_init gxemul_hw_map_init |
# define machine_timer_irq_start gxemul_timer_irq_start |
# define machine_cpu_halt gxemul_cpu_halt |
# define machine_get_memory_size gxemul_get_memory_size |
# define machine_debug_putc(ch) gxemul_debug_putc(ch) |
# define machine_irq_exception(exc_no, istate) gxemul_irq_exception(exc_no, istate) |
# define machine_get_fb_address gxemul_get_fb_address |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/drivers/gxemul.h |
---|
57,6 → 57,18 |
} gxemul_hw_map_t; |
extern void gxemul_hw_map_init(void); |
extern void gxemul_console_init(devno_t devno); |
extern void gxemul_release_console(void); |
extern void gxemul_grab_console(void); |
extern void gxemul_timer_irq_start(void); |
extern void gxemul_debug_putc(char ch); |
extern void gxemul_cpu_halt(void); |
extern void gxemul_irq_exception(int exc_no, istate_t *istate); |
extern size_t gxemul_get_memory_size(void); |
extern uintptr_t gxemul_get_fb_address(void); |
#endif |
/** @} |
/branches/arm/kernel/arch/arm32/Makefile.inc |
---|
38,12 → 38,16 |
KERNEL_LOAD_ADDRESS = 0x80200000 |
ifeq ($(MACHINE), gxemul_testarm) |
DMACHINE = MACHINE_GXEMUL_TESTARM |
endif |
CFLAGS += -fno-zero-initialized-in-bss |
DEFS += -D__32_BITS__ -DKERNEL_LOAD_ADDRESS=$(KERNEL_LOAD_ADDRESS) |
DEFS += -D__32_BITS__ -DKERNEL_LOAD_ADDRESS=$(KERNEL_LOAD_ADDRESS) -D$(DMACHINE) |
#CONFIG_FB = y |
#DEFS += -DCONFIG_FB |
CONFIG_FB = y |
DEFS += -DCONFIG_FB |
## Compile with hierarchical page tables support. |
# |
/branches/arm/kernel/arch/arm32/src/drivers/gxemul.c |
---|
112,7 → 112,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); |
197,7 → 197,7 |
} |
void machine_grab_console(void) |
void gxemul_grab_console(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&gxemul_irq.lock); |
207,7 → 207,7 |
} |
void machine_release_console(void) |
void gxemul_release_console(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&gxemul_irq.lock); |
223,7 → 223,7 |
* |
* @param Console device number. |
*/ |
void machine_console_init(devno_t devno) |
void gxemul_console_init(devno_t devno) |
{ |
chardev_initialize("gxemul_console", &console, &gxemul_ops); |
stdin = &console; |
317,7 → 317,7 |
* Initiates regular timer interrupts after initializing |
* corresponding interrupt handler. |
*/ |
void machine_timer_irq_start() |
void gxemul_timer_irq_start() |
{ |
gxemul_timer_irq_init(); |
gxemul_timer_start(GXEMUL_TIMER_FREQ); |
328,13 → 328,13 |
* |
* @return Size in bytes. |
*/ |
size_t machine_get_memory_size(void) |
size_t gxemul_get_memory_size(void) |
{ |
return *((int*)(GXEMUL_MP + GXEMUL_MP_MEMSIZE_OFFSET)); |
} |
void machine_debug_putc(char ch) |
void gxemul_debug_putc(char ch) |
{ |
char * addr = 0; |
if (!hw_map_init_called) { |
348,7 → 348,7 |
/** Stops gxemul. */ |
void machine_cpu_halt(void) |
void gxemul_cpu_halt(void) |
{ |
char * addr = 0; |
if (!hw_map_init_called) { |
369,7 → 369,7 |
* @param exc_no Interrupt exception number. |
* @param istate Saved processor state. |
*/ |
void machine_irq_exception(int exc_no, istate_t *istate) |
void gxemul_irq_exception(int exc_no, istate_t *istate) |
{ |
uint32_t sources = gxemul_irqc_get_sources(); |
int i = 0; |
389,7 → 389,7 |
} |
uintptr_t machine_get_fb_address(void) |
uintptr_t gxemul_get_fb_address(void) |
{ |
return gxemul_hw_map.fb; |
} |