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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/truss/codes.c
          +++ new/usr/src/cmd/truss/codes.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  25   25   * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  26      - * Copyright 2019, Joyent, Inc.
       26 + * Copyright 2019 Joyent, Inc.
  27   27   * Copyright (c) 2014, OmniTI Computer Consulting, Inc. All rights reserved.
  28   28   */
  29   29  
  30   30  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  31   31  /*        All Rights Reserved   */
  32   32  
  33   33  
  34   34  #include <stdio.h>
  35   35  #include <stdlib.h>
  36   36  #include <unistd.h>
↓ open down ↓ 59 lines elided ↑ open up ↑
  96   96  #include <sys/cdio.h>
  97   97  #include <sys/scsi/impl/uscsi.h>
  98   98  #include <sys/devinfo_impl.h>
  99   99  #include <sys/dumpadm.h>
 100  100  #include <sys/mntio.h>
 101  101  #include <inet/iptun.h>
 102  102  #include <sys/zcons.h>
 103  103  #include <sys/usb/clients/hid/hid.h>
 104  104  #include <sys/pm.h>
 105  105  #include <sys/soundcard.h>
      106 +#include <sys/cpuid_drv.h>
 106  107  
 107  108  #include "ramdata.h"
 108  109  #include "proto.h"
 109  110  
 110  111  #define FCNTLMIN        F_DUPFD
 111  112  #define FCNTLMAX        F_FLOCKW
 112  113  const char *const FCNTLname[] = {
 113  114          "F_DUPFD",
 114  115          "F_GETFD",
 115  116          "F_SETFD",
↓ open down ↓ 1547 lines elided ↑ open up ↑
1663 1664          { (uint_t)PM_GET_TIME_IDLE,             "PM_GET_TIME_IDLE",
1664 1665                  "pm_req_t" },
1665 1666          { (uint_t)PM_ADD_DEPENDENT_PROPERTY,    "PM_ADD_DEPENDENT_PROPERTY",
1666 1667                  "pm_req_t" },
1667 1668          { (uint_t)PM_GET_CMD_NAME,              "PM_GET_CMD_NAME",
1668 1669                  "pm_req_t" },
1669 1670          { (uint_t)PM_SEARCH_LIST,       "PM_SEARCH_LIST",
1670 1671                  "pm_searchargs_t" },
1671 1672  #endif /* _SYSCALL */
1672 1673  
     1674 +        /* cpuid ioctls */
     1675 +        { (uint_t)CPUID_GET_HWCAP,              "CPUID_GET_HWCAP", NULL },
     1676 +#if defined(__i386) || defined(__amd64)
     1677 +        { (uint_t)CPUID_RDMSR,                  "CPUID_RDMSR", NULL },
     1678 +#endif
     1679 +
1673 1680          { (uint_t)0, NULL, NULL }
1674 1681  };
1675 1682  
1676 1683  void
1677 1684  ioctl_ioccom(char *buf, size_t size, uint_t code, int nbytes, int x, int y)
1678 1685  {
1679 1686          const char *inoutstr;
1680 1687  
1681 1688          if (code & IOC_VOID)
1682 1689                  inoutstr = "";
↓ open down ↓ 724 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX