Subversion Repositories HelenOS

Rev

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

Rev 3071 Rev 3577
Line 41... Line 41...
41
#include <align.h>
41
#include <align.h>
42
#include <arch/register.h>
42
#include <arch/register.h>
43
#include <config.h>
43
#include <config.h>
44
#include <arch/stack.h>
44
#include <arch/stack.h>
45
 
45
 
-
 
46
typedef uint64_t ioport_t;
-
 
47
 
-
 
48
 
-
 
49
static inline void  outb(ioport_t port,uint8_t v)
-
 
50
{
-
 
51
    *((uint8_t *)(port)) = v;
-
 
52
}
-
 
53
 
-
 
54
static inline void  outw(ioport_t port,uint16_t v)
-
 
55
{
-
 
56
    *((uint16_t *)(port)) = v;
-
 
57
}
-
 
58
 
-
 
59
static inline void  outl(ioport_t port,uint32_t v)
-
 
60
{
-
 
61
    *((uint32_t *)(port)) = v;
-
 
62
}
-
 
63
 
-
 
64
 
-
 
65
 
-
 
66
static inline uint8_t inb(ioport_t port)
-
 
67
{
-
 
68
    return *((uint8_t *)(port));
-
 
69
}
-
 
70
 
-
 
71
static inline uint16_t inw(ioport_t port)
-
 
72
{
-
 
73
    return *((uint16_t *)(port));
-
 
74
}
-
 
75
 
-
 
76
static inline uint32_t inl(ioport_t port)
-
 
77
{
-
 
78
    return *((uint32_t *)(port));
-
 
79
}
-
 
80
 
-
 
81
 
-
 
82
 
-
 
83
 
-
 
84
 
46
/** Read Processor State register.
85
/** Read Processor State register.
47
 *
86
 *
48
 * @return Value of PSTATE register.
87
 * @return Value of PSTATE register.
49
 */
88
 */
50
static inline uint64_t pstate_read(void)
89
static inline uint64_t pstate_read(void)