Changeset 134877d in mainline
- Timestamp:
- 2006-12-11T17:40:10Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 319e60e
- Parents:
- 8cd140f2
- Location:
- kernel
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/cpuid.h
r8cd140f2 r134877d 58 58 extern void cpuid(uint32_t cmd, cpu_info_t *info); 59 59 60 61 extern uint64_t rdtsc(void);62 63 60 #endif /* !def __ASM__ */ 64 61 #endif -
kernel/arch/amd64/src/asm_utils.S
r8cd140f2 r134877d 63 63 .global cpuid 64 64 .global has_cpuid 65 .global rdtsc65 .global get_cycle 66 66 .global read_efer_flag 67 67 .global set_efer_flag … … 147 147 ret 148 148 149 rdtsc:149 get_cycle: 150 150 xorq %rax,%rax 151 151 rdtsc -
kernel/arch/ia32/include/asm.h
r8cd140f2 r134877d 229 229 } 230 230 231 static inline uint64_t rdtsc(void)232 {233 uint64_t v;234 235 __asm__ volatile("rdtsc\n" : "=A" (v));236 237 return v;238 }239 240 231 /** Return current IP address */ 241 232 static inline uintptr_t * get_ip() -
kernel/arch/ia32/src/drivers/i8254.c
r8cd140f2 r134877d 40 40 #include <time/clock.h> 41 41 #include <time/delay.h> 42 #include <arch/cycle.h> 42 43 #include <arch/interrupt.h> 43 44 #include <arch/drivers/i8259.h> … … 138 139 CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0); 139 140 140 clk1 = rdtsc();141 delay(1 <<SHIFT);142 clk2 = rdtsc();141 clk1 = get_cycle(); 142 delay(1 << SHIFT); 143 clk2 = get_cycle(); 143 144 144 CPU->frequency_mhz = (clk2 -clk1)>>SHIFT;145 CPU->frequency_mhz = (clk2 - clk1) >> SHIFT; 145 146 146 147 return; -
kernel/arch/ia32xen/include/asm.h
r8cd140f2 r134877d 219 219 } 220 220 221 static inline uint64_t rdtsc(void)222 {223 uint64_t v;224 225 __asm__ volatile("rdtsc\n" : "=A" (v));226 227 return v;228 }229 230 221 /** Return current IP address */ 231 222 static inline uintptr_t * get_ip() -
kernel/kernel.config
r8cd140f2 r134877d 147 147 148 148 # Benchmark test 149 ! [CONFIG_TEST!=] CONFIG_BENCH ( y/n)149 ! [CONFIG_TEST!=] CONFIG_BENCH (n/y)
Note:
See TracChangeset
for help on using the changeset viewer.