Subversion Repositories HelenOS

Rev

Rev 1853 | Rev 1903 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1853 Rev 1860
Line 31... Line 31...
31
 * @{
31
 * @{
32
 */
32
 */
33
/** @file
33
/** @file
34
 */
34
 */
35
 
35
 
36
#ifndef __sparc64_INTERRUPT_H__
36
#ifndef KERN_sparc64_INTERRUPT_H_
37
#define __sparc64_INTERRUPT_H__
37
#define KERN_sparc64_INTERRUPT_H_
38
 
38
 
39
#include <typedefs.h>
39
#include <typedefs.h>
40
#include <arch/types.h>
40
#include <arch/types.h>
-
 
41
#include <arch/regdef.h>
41
 
42
 
42
#define IRQ_COUNT   1   /* TODO */
43
#define IRQ_COUNT   1   /* TODO */
43
 
44
 
44
#define IVT_ITEMS   15
45
#define IVT_ITEMS   15
45
#define IVT_FIRST   1
46
#define IVT_FIRST   1
Line 50... Line 51...
50
    uint64_t    tstate;
51
    uint64_t    tstate;
51
};
52
};
52
 
53
 
53
static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
54
static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
54
{
55
{
55
    /* TODO */
56
    istate->tpc = retaddr;
56
}
57
}
-
 
58
 
57
static inline int istate_from_uspace(istate_t *istate)
59
static inline int istate_from_uspace(istate_t *istate)
58
{
60
{
59
    /* TODO */
-
 
60
    return 0;
61
    return !(istate->tstate & TSTATE_PRIV_BIT);
61
}
62
}
-
 
63
 
62
static inline unative_t istate_get_pc(istate_t *istate)
64
static inline unative_t istate_get_pc(istate_t *istate)
63
{
65
{
64
    /* TODO */
-
 
65
    return 0;
66
    return istate->tpc;
66
}
67
}
67
 
68
 
68
 
69
 
69
extern void interrupt_register(int n, const char *name, iroutine f);
70
extern void interrupt_register(int n, const char *name, iroutine f);
70
 
71