Changeset ff3b7da7 in mainline
- Timestamp:
- 2008-11-11T22:11:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa8d0f7
- Parents:
- f3c4a26
- Location:
- kernel/arch/sparc64/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/asm.h
rf3c4a26 rff3b7da7 43 43 #include <config.h> 44 44 #include <arch/stack.h> 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 45 #include <arch/barrier.h> 46 47 static inline void outb(ioport_t port, uint8_t v) 48 { 49 *((volatile uint8_t *)(port)) = v; 50 memory_barrier(); 51 } 52 53 static inline void outw(ioport_t port, uint16_t v) 54 { 55 *((volatile uint16_t *)(port)) = v; 56 memory_barrier(); 57 } 58 59 static inline void outl(ioport_t port, uint32_t v) 60 { 61 *((volatile uint32_t *)(port)) = v; 62 memory_barrier(); 63 } 65 64 66 65 static inline uint8_t inb(ioport_t port) 67 66 { 68 return *((uint8_t *)(port)); 67 uint8_t rv; 68 69 rv = *((volatile uint8_t *)(port)); 70 memory_barrier(); 71 72 return rv; 69 73 } 70 74 71 75 static inline uint16_t inw(ioport_t port) 72 76 { 73 return *((uint16_t *)(port)); 77 uint16_t rv; 78 79 rv = *((volatile uint16_t *)(port)); 80 memory_barrier(); 81 82 return rv; 74 83 } 75 84 76 85 static inline uint32_t inl(ioport_t port) 77 86 { 78 return *((uint32_t *)(port)); 79 } 80 81 82 83 87 uint32_t rv; 88 89 rv = *((volatile uint32_t *)(port)); 90 memory_barrier(); 91 92 return rv; 93 } 84 94 85 95 /** Read Processor State register. -
kernel/arch/sparc64/include/types.h
rf3c4a26 rff3b7da7 55 55 typedef uint64_t ipl_t; 56 56 57 typedef uint64_t ioport_t; 58 57 59 typedef uint64_t unative_t; 58 60 typedef int64_t native_t;
Note:
See TracChangeset
for help on using the changeset viewer.