Ignore:
File:
1 edited

Legend:

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

    ra71c158 recf083dd  
    5656static irq_t gxemul_timer_irq;
    5757
    58 struct arm_machine_ops machine_ops = {
     58struct arm_machine_ops gxemul_machine_ops = {
    5959        gxemul_init,
    6060        gxemul_timer_irq_start,
    6161        gxemul_cpu_halt,
    62         gxemul_get_memory_size,
     62        gxemul_get_memory_extents,
    6363        gxemul_irq_exception,
    6464        gxemul_frame_init,
    6565        gxemul_output_init,
    66         gxemul_input_init
     66        gxemul_input_init,
     67        gxemul_get_irq_count
    6768};
    6869
     
    126127}
    127128
     129size_t gxemul_get_irq_count(void)
     130{
     131        return GXEMUL_IRQ_COUNT;
     132}
     133
    128134/** Starts gxemul Real Time Clock device, which asserts regular interrupts.
    129135 *
     
    185191}
    186192
    187 /** Returns the size of emulated memory.
    188  *
    189  * @return Size in bytes.
    190  */
    191 uintptr_t gxemul_get_memory_size(void)
    192 {
    193         return  *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));
    194 }
    195 
     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 */
     198void 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}
    196203
    197204/** Returns the mask of active interrupts. */
     
    205212 * Determines the sources of interrupt and calls their handlers.
    206213 */
    207 void gxemul_irq_exception(int exc_no, istate_t *istate)
     214void gxemul_irq_exception(unsigned int exc_no, istate_t *istate)
    208215{
    209216        uint32_t sources = gxemul_irqc_get_sources();
    210217        unsigned int i;
    211218
    212         for (i = 0; i < GXEMUL_IRQC_MAX_IRQ; i++) {
     219        for (i = 0; i < GXEMUL_IRQ_COUNT; i++) {
    213220                if (sources & (1 << i)) {
    214221                        irq_t *irq = irq_dispatch_and_lock(i);
Note: See TracChangeset for help on using the changeset viewer.