Changeset 1d6c497 in mainline
- Timestamp:
- 2010-06-12T09:37:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 510bc07
- Parents:
- fd3a631f
- Location:
- kernel/arch/amd64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/cycle.h
rfd3a631f r1d6c497 36 36 #define KERN_amd64_CYCLE_H_ 37 37 38 extern uint64_t get_cycle(void); 38 static inline uint64_t get_cycle(void) 39 { 40 uint32_t lower; 41 uint32_t upper; 42 43 asm volatile ( 44 "rdtsc\n" 45 : "=a" (lower), 46 "=d" (upper) 47 ); 48 49 return ((uint64_t) lower) | (((uint64_t) upper) << 32); 50 } 39 51 40 52 #endif -
kernel/arch/amd64/src/asm_utils.S
rfd3a631f r1d6c497 58 58 .global cpuid 59 59 .global has_cpuid 60 .global get_cycle61 60 .global read_efer_flag 62 61 .global set_efer_flag … … 152 151 ret 153 152 154 get_cycle:155 xorq %rax,%rax156 rdtsc157 ret158 159 153 set_efer_flag: 160 154 movq $0xc0000080, %rcx
Note:
See TracChangeset
for help on using the changeset viewer.