/* Reads and returns the current value of TSC. This function is only available on IA-32 and X64. */
UINT64 EFIAPI AsmReadTsc(VOID)
/* Reads and returns the current value of TSC. This function is only available on IA-32 and X64. */
UINT64 EFIAPI AsmReadTsc(VOID)
{
  UINT32  LowData;
  UINT32  HiData;
  __asm__ __volatile__ (
    "rdtsc"
    : "=a" (LowData),
      "=d" (HiData)
  );
  return (((UINT64)HiData) << 32) | LowData;
}