Changeset 714675b in mainline
- Timestamp:
- 2005-09-18T09:14:02Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7b43e11
- Parents:
- a5556b4
- Location:
- arch/ia32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/asm.h
ra5556b4 r714675b 42 42 extern __u16 inw(int port); 43 43 extern __u32 inl(int port); 44 45 extern void outw(int port, __u16 w);46 extern void outl(int port, __u32 l);47 44 48 45 extern void enable_l_apic_in_msr(void); … … 93 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 112 /** Set priority level low -
arch/ia32/src/asm.S
ra5556b4 r714675b 41 41 .global inw 42 42 .global inl 43 .global outw44 .global outl45 43 .global memcpy 46 44 .global memsetb … … 190 188 movl 4(%esp),%edx 191 189 inl %dx,%eax 192 ret193 194 195 ## I/O output (word)196 #197 # Send a word to I/O port.198 #199 outw:200 push %eax201 202 movl 8(%esp),%edx203 movl 12(%esp),%eax204 outw %ax,%dx205 206 pop %eax207 ret208 209 210 ## I/O output (dword)211 #212 # Send a dword to I/O port.213 #214 outl:215 push %eax216 217 movl 8(%esp),%edx218 movl 12(%esp),%eax219 outl %eax,%dx220 221 pop %eax222 190 ret 223 191
Note:
See TracChangeset
for help on using the changeset viewer.