Ignore:
File:
1 edited

Legend:

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

    r7a0359b rc22e964  
    2727 */
    2828
    29 /** @addtogroup mips32
     29/** @addtogroup mips32 
    3030 * @{
    3131 */
     
    3636#define KERN_mips32_ASM_H_
    3737
     38#include <arch/types.h>
    3839#include <typedefs.h>
    3940#include <config.h>
    40 #include <trace.h>
    4141
    42 NO_TRACE static inline void cpu_sleep(void)
     42
     43static inline void cpu_sleep(void)
    4344{
    44         /*
    45          * Unfortunatelly most of the simulators do not support
    46          *
    47          * asm volatile (
    48          *     "wait"
    49          * );
    50          *
    51          */
     45        /* Most of the simulators do not support */
     46/*      asm volatile ("wait"); */
    5247}
    5348
    5449/** Return base address of current stack
    55  *
     50 * 
    5651 * Return the base address of the current stack.
    5752 * The stack is assumed to be STACK_SIZE bytes long.
    5853 * The stack must start on page boundary.
    59  *
    6054 */
    61 NO_TRACE static inline uintptr_t get_stack_base(void)
     55static inline uintptr_t get_stack_base(void)
    6256{
    63         uintptr_t base;
     57        uintptr_t v;
    6458       
    6559        asm volatile (
    66                 "and %[base], $29, %[mask]\n"
    67                 : [base] "=r" (base)
    68                 : [mask] "r" (~(STACK_SIZE - 1))
     60                "and %0, $29, %1\n"
     61                : "=r" (v)
     62                : "r" (~(STACK_SIZE-1))
    6963        );
    7064       
    71         return base;
     65        return v;
    7266}
    7367
    74 NO_TRACE static inline void pio_write_8(ioport8_t *port, uint8_t v)
     68extern void cpu_halt(void);
     69extern void asm_delay_loop(uint32_t t);
     70extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
     71    uintptr_t entry);
     72
     73extern ipl_t interrupts_disable(void);
     74extern ipl_t interrupts_enable(void);
     75extern void interrupts_restore(ipl_t ipl);
     76extern ipl_t interrupts_read(void);
     77extern void asm_delay_loop(uint32_t t);
     78
     79static inline void pio_write_8(ioport8_t *port, uint8_t v)
    7580{
    76         *port = v;
     81        *port = v;     
    7782}
    7883
    79 NO_TRACE static inline void pio_write_16(ioport16_t *port, uint16_t v)
     84static inline void pio_write_16(ioport16_t *port, uint16_t v)
    8085{
    81         *port = v;
     86        *port = v;     
    8287}
    8388
    84 NO_TRACE static inline void pio_write_32(ioport32_t *port, uint32_t v)
     89static inline void pio_write_32(ioport32_t *port, uint32_t v)
    8590{
    86         *port = v;
     91        *port = v;     
    8792}
    8893
    89 NO_TRACE static inline uint8_t pio_read_8(ioport8_t *port)
     94static inline uint8_t pio_read_8(ioport8_t *port)
    9095{
    9196        return *port;
    9297}
    9398
    94 NO_TRACE static inline uint16_t pio_read_16(ioport16_t *port)
     99static inline uint16_t pio_read_16(ioport16_t *port)
    95100{
    96101        return *port;
    97102}
    98103
    99 NO_TRACE static inline uint32_t pio_read_32(ioport32_t *port)
     104static inline uint32_t pio_read_32(ioport32_t *port)
    100105{
    101106        return *port;
    102107}
    103 
    104 extern void cpu_halt(void) __attribute__((noreturn));
    105 extern void asm_delay_loop(uint32_t);
    106 extern void userspace_asm(uintptr_t, uintptr_t, uintptr_t);
    107 
    108 extern ipl_t interrupts_disable(void);
    109 extern ipl_t interrupts_enable(void);
    110 extern void interrupts_restore(ipl_t);
    111 extern ipl_t interrupts_read(void);
    112 extern bool interrupts_disabled(void);
    113108
    114109#endif
Note: See TracChangeset for help on using the changeset viewer.