Rev 352 | Rev 356 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 352 | Rev 353 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | 40 | ||
41 | extern __u8 inb(int port); |
41 | extern __u8 inb(int port); |
42 | extern __u16 inw(int port); |
42 | extern __u16 inw(int port); |
43 | extern __u32 inl(int port); |
43 | extern __u32 inl(int port); |
44 | 44 | ||
45 | extern void outw(int port, __u16 w); |
- | |
46 | extern void outl(int port, __u32 l); |
- | |
47 | - | ||
48 | extern void enable_l_apic_in_msr(void); |
45 | extern void enable_l_apic_in_msr(void); |
49 | 46 | ||
50 | 47 | ||
51 | void asm_delay_loop(__u32 t); |
48 | void asm_delay_loop(__u32 t); |
52 | void asm_fake_loop(__u32 t); |
49 | void asm_fake_loop(__u32 t); |
Line 90... | Line 87... | ||
90 | * @param port Port to write to |
87 | * @param port Port to write to |
91 | * @param val Value to write |
88 | * @param val Value to write |
92 | */ |
89 | */ |
93 | static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); } |
90 | static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); } |
94 | 91 | ||
- | 92 | /** Word to port |
|
- | 93 | * |
|
- | 94 | * Output word to port |
|
- | 95 | * |
|
- | 96 | * @param port Port to write to |
|
- | 97 | * @param val Value to write |
|
- | 98 | */ |
|
- | 99 | static inline void outw(__u16 port, __u16 val) { __asm__ volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); } |
|
- | 100 | ||
- | 101 | ||
- | 102 | ||
- | 103 | /** Double word to port |
|
- | 104 | * |
|
- | 105 | * Output double word to port |
|
- | 106 | * |
|
- | 107 | * @param port Port to write to |
|
- | 108 | * @param val Value to write |
|
- | 109 | */ |
|
- | 110 | static inline void outl(__u16 port, __u32 val) { __asm__ volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); } |
|
95 | 111 | ||
96 | /** Set priority level low |
112 | /** Set priority level low |
97 | * |
113 | * |
98 | * Enable interrupts and return previous |
114 | * Enable interrupts and return previous |
99 | * value of EFLAGS. |
115 | * value of EFLAGS. |