Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/include/asm.h

    rc22e964 r7a0359b  
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup mips32
    3030 * @{
    3131 */
     
    3636#define KERN_mips32_ASM_H_
    3737
    38 #include <arch/types.h>
    3938#include <typedefs.h>
    4039#include <config.h>
     40#include <trace.h>
    4141
    42 
    43 static inline void cpu_sleep(void)
     42NO_TRACE static inline void cpu_sleep(void)
    4443{
    45         /* Most of the simulators do not support */
    46 /*      asm volatile ("wait"); */
     44        /*
     45         * Unfortunatelly most of the simulators do not support
     46         *
     47         * asm volatile (
     48         *     "wait"
     49         * );
     50         *
     51         */
    4752}
    4853
    4954/** Return base address of current stack
    50  * 
     55 *
    5156 * Return the base address of the current stack.
    5257 * The stack is assumed to be STACK_SIZE bytes long.
    5358 * The stack must start on page boundary.
     59 *
    5460 */
    55 static inline uintptr_t get_stack_base(void)
     61NO_TRACE static inline uintptr_t get_stack_base(void)
    5662{
    57         uintptr_t v;
     63        uintptr_t base;
    5864       
    5965        asm volatile (
    60                 "and %0, $29, %1\n"
    61                 : "=r" (v)
    62                 : "r" (~(STACK_SIZE-1))
     66                "and %[base], $29, %[mask]\n"
     67                : [base] "=r" (base)
     68                : [mask] "r" (~(STACK_SIZE - 1))
    6369        );
    6470       
    65         return v;
     71        return base;
    6672}
    6773
    68 extern void cpu_halt(void);
    69 extern void asm_delay_loop(uint32_t t);
    70 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
    71     uintptr_t entry);
    72 
    73 extern ipl_t interrupts_disable(void);
    74 extern ipl_t interrupts_enable(void);
    75 extern void interrupts_restore(ipl_t ipl);
    76 extern ipl_t interrupts_read(void);
    77 extern void asm_delay_loop(uint32_t t);
    78 
    79 static inline void pio_write_8(ioport8_t *port, uint8_t v)
     74NO_TRACE static inline void pio_write_8(ioport8_t *port, uint8_t v)
    8075{
    81         *port = v;     
     76        *port = v;
    8277}
    8378
    84 static inline void pio_write_16(ioport16_t *port, uint16_t v)
     79NO_TRACE static inline void pio_write_16(ioport16_t *port, uint16_t v)
    8580{
    86         *port = v;     
     81        *port = v;
    8782}
    8883
    89 static inline void pio_write_32(ioport32_t *port, uint32_t v)
     84NO_TRACE static inline void pio_write_32(ioport32_t *port, uint32_t v)
    9085{
    91         *port = v;     
     86        *port = v;
    9287}
    9388
    94 static inline uint8_t pio_read_8(ioport8_t *port)
     89NO_TRACE static inline uint8_t pio_read_8(ioport8_t *port)
    9590{
    9691        return *port;
    9792}
    9893
    99 static inline uint16_t pio_read_16(ioport16_t *port)
     94NO_TRACE static inline uint16_t pio_read_16(ioport16_t *port)
    10095{
    10196        return *port;
    10297}
    10398
    104 static inline uint32_t pio_read_32(ioport32_t *port)
     99NO_TRACE static inline uint32_t pio_read_32(ioport32_t *port)
    105100{
    106101        return *port;
    107102}
     103
     104extern void cpu_halt(void) __attribute__((noreturn));
     105extern void asm_delay_loop(uint32_t);
     106extern void userspace_asm(uintptr_t, uintptr_t, uintptr_t);
     107
     108extern ipl_t interrupts_disable(void);
     109extern ipl_t interrupts_enable(void);
     110extern void interrupts_restore(ipl_t);
     111extern ipl_t interrupts_read(void);
     112extern bool interrupts_disabled(void);
    108113
    109114#endif
Note: See TracChangeset for help on using the changeset viewer.