/* Reads and returns the current value of performance counter specified by Index. This function is only available on IA-32 and X64. */
UINT64 EFIAPI AsmReadPmc(IN UINT32 Index)
/* Reads and returns the current value of performance counter specified by Index. This function is only available on IA-32 and X64. */
UINT64 EFIAPI AsmReadPmc(IN UINT32 Index)
{
  UINT64  Data;
  __asm__ __volatile__ (
    "rdpmc"
    : "=A" (Data)
    : "c"  (Index)
  );
  return Data;
}