Ignore:
File:
1 edited

Legend:

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

    recf083dd 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
     66        gxemul_input_init
    6867};
    6968
     
    127126}
    128127
    129 size_t gxemul_get_irq_count(void)
    130 {
    131         return GXEMUL_IRQ_COUNT;
    132 }
    133 
    134128/** Starts gxemul Real Time Clock device, which asserts regular interrupts.
    135129 *
     
    191185}
    192186
    193 /** Get extents of available memory.
    194  *
    195  * @param start         Place to store memory start address.
    196  * @param size          Place to store memory size.
    197  */
    198 void gxemul_get_memory_extents(uintptr_t *start, uintptr_t *size)
    199 {
    200         *start = 0;
    201         *size = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));
    202 }
     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
    203196
    204197/** Returns the mask of active interrupts. */
     
    212205 * Determines the sources of interrupt and calls their handlers.
    213206 */
    214 void gxemul_irq_exception(unsigned int exc_no, istate_t *istate)
     207void gxemul_irq_exception(int exc_no, istate_t *istate)
    215208{
    216209        uint32_t sources = gxemul_irqc_get_sources();
    217210        unsigned int i;
    218211
    219         for (i = 0; i < GXEMUL_IRQ_COUNT; i++) {
     212        for (i = 0; i < GXEMUL_IRQC_MAX_IRQ; i++) {
    220213                if (sources & (1 << i)) {
    221214                        irq_t *irq = irq_dispatch_and_lock(i);
Note: See TracChangeset for help on using the changeset viewer.