cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

tsc.c (224B)


      1// SPDX-License-Identifier: GPL-2.0
      2#include <linux/types.h>
      3
      4#include "../../../util/tsc.h"
      5
      6u64 rdtsc(void)
      7{
      8	unsigned int low, high;
      9
     10	asm volatile("rdtsc" : "=a" (low), "=d" (high));
     11
     12	return low | ((u64)high) << 32;
     13}