Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mach/testarm/testarm.c

    reff1f033 ra71c158  
    5656static irq_t gxemul_timer_irq;
    5757
    58 struct arm_machine_ops gxemul_machine_ops = {
     58struct arm_machine_ops machine_ops = {
    5959        gxemul_init,
    6060        gxemul_timer_irq_start,
    6161        gxemul_cpu_halt,
    62         gxemul_get_memory_extents,
     62        gxemul_get_memory_size,
    6363        gxemul_irq_exception,
    6464        gxemul_frame_init,
    6565        gxemul_output_init,
    66         gxemul_input_init,
    67         gxemul_get_irq_count,
    68         gxemul_get_platform_name
     66        gxemul_input_init
    6967};
    7068
     
    124122        sysinfo_set_item_val("kbd", NULL, true);
    125123        sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ);
    126         sysinfo_set_item_val("kbd.address.virtual", NULL, (sysarg_t) gxemul_kbd);
     124        sysinfo_set_item_val("kbd.address.virtual", NULL, (unative_t) gxemul_kbd);
    127125#endif
    128 }
    129 
    130 size_t gxemul_get_irq_count(void)
    131 {
    132         return GXEMUL_IRQ_COUNT;
    133 }
    134 
    135 const char *gxemul_get_platform_name(void)
    136 {
    137         return "gxemul";
    138126}
    139127
     
    197185}
    198186
    199 /** Get extents of available memory.
    200  *
    201  * @param start         Place to store memory start address.
    202  * @param size          Place to store memory size.
    203  */
    204 void gxemul_get_memory_extents(uintptr_t *start, uintptr_t *size)
    205 {
    206         *start = 0;
    207         *size = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));
    208 }
     187/** Returns the size of emulated memory.
     188 *
     189 * @return Size in bytes.
     190 */
     191uintptr_t gxemul_get_memory_size(void)
     192{
     193        return  *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));
     194}
     195
    209196
    210197/** Returns the mask of active interrupts. */
     
    218205 * Determines the sources of interrupt and calls their handlers.
    219206 */
    220 void gxemul_irq_exception(unsigned int exc_no, istate_t *istate)
     207void gxemul_irq_exception(int exc_no, istate_t *istate)
    221208{
    222209        uint32_t sources = gxemul_irqc_get_sources();
    223210        unsigned int i;
    224211
    225         for (i = 0; i < GXEMUL_IRQ_COUNT; i++) {
     212        for (i = 0; i < GXEMUL_IRQC_MAX_IRQ; i++) {
    226213                if (sources & (1 << i)) {
    227214                        irq_t *irq = irq_dispatch_and_lock(i);
Note: See TracChangeset for help on using the changeset viewer.