Changeset 9688513 in mainline
- Timestamp:
- 2009-02-21T17:53:44Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1e23e16
- Parents:
- cecb0789
- Location:
- kernel/arch/amd64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/asm.h
rcecb0789 r9688513 82 82 } 83 83 84 /** Word from port 85 * 86 * Get word from port 87 * 88 * @param port Port to read from 89 * @return Value read 90 */ 91 static inline uint16_t pio_read_16(ioport16_t *port) 92 { 93 uint16_t val; 94 95 asm volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port)); 96 return val; 97 } 98 99 /** Double word from port 100 * 101 * Get double word from port 102 * 103 * @param port Port to read from 104 * @return Value read 105 */ 106 static inline uint32_t pio_read_32(ioport32_t *port) 107 { 108 uint32_t val; 109 110 asm volatile ("inl %w1, %0 \n" : "=a" (val) : "d" (port)); 111 return val; 112 } 113 84 114 /** Byte to port 85 115 * … … 92 122 { 93 123 asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port)); 124 } 125 126 /** Word to port 127 * 128 * Output word to port 129 * 130 * @param port Port to write to 131 * @param val Value to write 132 */ 133 static inline void pio_write_16(ioport16_t *port, uint16_t val) 134 { 135 asm volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port)); 136 } 137 138 /** Double word to port 139 * 140 * Output double word to port 141 * 142 * @param port Port to write to 143 * @param val Value to write 144 */ 145 static inline void pio_write_32(ioport32_t *port, uint32_t val) 146 { 147 asm volatile ("outl %0, %w1\n" : : "a" (val), "d" (port)); 94 148 } 95 149 -
kernel/arch/amd64/src/amd64.c
rcecb0789 r9688513 215 215 ega_redraw(); 216 216 #endif 217 218 i8042_grab();219 217 } 220 218 … … 224 222 void arch_release_console(void) 225 223 { 226 i8042_release();227 224 } 228 225
Note:
See TracChangeset
for help on using the changeset viewer.