Print this page
11844 add rdmsr utility
Reviewed by: Dan McDonald <danmcd@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/cpuid_drv.h
          +++ new/usr/src/uts/common/sys/cpuid_drv.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  /*
  27      - * Copyright (c) 2012, Joyent, Inc.  All rights reserved.
       27 + * Copyright 2019 Joyent, Inc.
  28   28   */
  29   29  
  30   30  #ifndef _SYS_CPUID_DRV_H
  31   31  #define _SYS_CPUID_DRV_H
  32   32  
  33   33  #include <sys/types.h>
  34   34  
  35   35  #ifdef __cplusplus
  36   36  extern "C" {
  37   37  #endif
↓ open down ↓ 19 lines elided ↑ open up ↑
  57   57   * the time we invoke its interfaces.
  58   58   */
  59   59  #define CPUID_SELF_CPUID_MINOR  ((minor_t)0x3fffful)
  60   60  
  61   61  /*
  62   62   * ioctl numbers: not an exported interface
  63   63   */
  64   64  #define CPUID_IOC               (('c'<<24)|('i'<<16)|('d'<<8))
  65   65  
  66   66  #define CPUID_GET_HWCAP         (CPUID_IOC|0)
       67 +#define CPUID_RDMSR             (CPUID_IOC|1)
  67   68  
  68   69  struct cpuid_get_hwcap {
  69   70          char *cgh_archname;
  70   71          uint_t cgh_hwcap[2];
  71   72  };
  72   73  
       74 +struct cpuid_rdmsr {
       75 +        uint64_t cr_msr_nr;
       76 +        uint64_t cr_msr_val;
       77 +};
       78 +
  73   79  #if defined(_SYSCALL32_IMPL)
  74   80  
  75   81  #include <sys/types32.h>
  76   82  
  77   83  struct cpuid_get_hwcap32 {
  78   84          caddr32_t cgh_archname;
  79   85          uint32_t cgh_hwcap[2];
  80   86  };
  81   87  
  82   88  #endif  /* _SYSCALL32_IMPL */
  83   89  
  84   90  #ifdef __cplusplus
  85   91  }
  86   92  #endif
  87   93  
  88   94  #endif  /* _SYS_CPUID_DRV_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX