Changeset a5556b4 in mainline
- Timestamp:
- 2005-09-17T21:24:40Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 714675b
- Parents:
- 6799505
- Location:
- arch/ia32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/asm.h
r6799505 ra5556b4 43 43 extern __u32 inl(int port); 44 44 45 extern void outb(int port, __u8 b);46 45 extern void outw(int port, __u16 w); 47 46 extern void outl(int port, __u32 l); … … 84 83 */ 85 84 static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0\n" : "=r" (v)); return v; } 85 86 /** Byte to port 87 * 88 * Output byte to port 89 * 90 * @param port Port to write to 91 * @param val Value to write 92 */ 93 static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); } 94 86 95 87 96 /** Set priority level low … … 167 176 } 168 177 178 169 179 #endif -
arch/ia32/src/asm.S
r6799505 ra5556b4 41 41 .global inw 42 42 .global inl 43 .global outb44 43 .global outw 45 44 .global outl … … 191 190 movl 4(%esp),%edx 192 191 inl %dx,%eax 193 ret194 195 196 ## I/O output (byte)197 #198 # Send a byte to I/O port.199 #200 outb:201 push %eax202 203 movl 8(%esp),%edx204 movl 12(%esp),%eax205 outb %al,%dx206 207 pop %eax208 192 ret 209 193
Note:
See TracChangeset
for help on using the changeset viewer.