diff options
author | Regina König | 2021-04-21 02:06:12 +0200 |
---|---|---|
committer | Regina König | 2021-04-21 02:06:12 +0200 |
commit | 36f9935934a8edc6581dc809162d26f337b7861d (patch) | |
tree | a22e76001b479b5f21df815005d1db08b19eb666 | |
parent | Try modified version for cpuspeed which gives the correct result (diff) | |
download | memtest86-36f9935934a8edc6581dc809162d26f337b7861d.tar.gz memtest86-36f9935934a8edc6581dc809162d26f337b7861d.tar.xz memtest86-36f9935934a8edc6581dc809162d26f337b7861d.zip |
Fix assembly code. Now the correct CLK value is computed
-rw-r--r-- | efi_memtest/memtest86+/efi/init.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/efi_memtest/memtest86+/efi/init.c b/efi_memtest/memtest86+/efi/init.c index 2756838..cc7f57d 100644 --- a/efi_memtest/memtest86+/efi/init.c +++ b/efi_memtest/memtest86+/efi/init.c @@ -1240,18 +1240,18 @@ static int cpuspeed(void) :"=a" (end_low), "=d" (end_high) );*/ - /*asm __volatile__ ( + asm __volatile__ ( "rdtsc\n\t" \ - "subl %0, %%eax\n\t" \ - "sbbl %1, %%edx\n\t" \ + "subl %2, %%eax\n\t" \ + "sbbl %3, %%edx\n\t" \ :"=a" (end_low), "=d" (end_high) :"r" (stlow), "r" (sthigh) - );*/ + ); - asm __volatile__ ( + /*asm __volatile__ ( "rdtsc" :"=a" (end_low), "=d" (end_high) - ); + );*/ if (logflag) { char log[28] = "stlow = "; @@ -1281,7 +1281,7 @@ static int cpuspeed(void) print_log(log, length); } - end_low -= stlow; // TODO remember the carry flag + //end_low -= stlow; // TODO remember the carry flag /* Make sure we have a credible result */ if (loops < 4 || end_low < 50000) { |