Ignore:
Timestamp:
2011-04-13T14:45:41Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88634420
Parents:
cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rcefb126 r89c57b6  
    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,
     68        gxemul_get_platform_name
    6769};
    6870
     
    122124        sysinfo_set_item_val("kbd", NULL, true);
    123125        sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ);
    124         sysinfo_set_item_val("kbd.address.virtual", NULL, (unative_t) gxemul_kbd);
     126        sysinfo_set_item_val("kbd.address.virtual", NULL, (sysarg_t) gxemul_kbd);
    125127#endif
     128}
     129
     130size_t gxemul_get_irq_count(void)
     131{
     132        return GXEMUL_IRQ_COUNT;
     133}
     134
     135const char *gxemul_get_platform_name(void)
     136{
     137        return "gxemul";
    126138}
    127139
     
    185197}
    186198
    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 
     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 */
     204void 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}
    196209
    197210/** Returns the mask of active interrupts. */
     
    210223        unsigned int i;
    211224
    212         for (i = 0; i < GXEMUL_IRQC_MAX_IRQ; i++) {
     225        for (i = 0; i < GXEMUL_IRQ_COUNT; i++) {
    213226                if (sources & (1 << i)) {
    214227                        irq_t *irq = irq_dispatch_and_lock(i);
Note: See TracChangeset for help on using the changeset viewer.