Print this page
3408 detect socket type of newer AMD CPUs
Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/sys/x86_archext.h
          +++ new/usr/src/uts/intel/sys/x86_archext.h
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  /*
  22   22   * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2011 by Delphix. All rights reserved.
  24   24   */
  25   25  /*
  26   26   * Copyright (c) 2010, Intel Corporation.
  27   27   * All rights reserved.
  28   28   */
  29   29  /*
  30   30   * Copyright (c) 2011, Joyent, Inc. All rights reserved.
       31 + * Copyright 2012 Jens Elkner <jel+illumos@cs.uni-magdeburg.de>
       32 + * Copyright 2012 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
  31   33   */
  32   34  
  33   35  #ifndef _SYS_X86_ARCHEXT_H
  34   36  #define _SYS_X86_ARCHEXT_H
  35   37  
  36   38  #if !defined(_ASM)
  37   39  #include <sys/regset.h>
  38   40  #include <sys/processor.h>
  39   41  #include <vm/seg_enum.h>
  40   42  #include <vm/page.h>
↓ open down ↓ 479 lines elided ↑ open up ↑
 520  522  #define X86_CHIPREV_AMD_F_REV_F _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0xf, 0x0020)
 521  523  #define X86_CHIPREV_AMD_F_REV_G _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0xf, 0x0040)
 522  524  
 523  525  /*
 524  526   * Definitions for AMD Family 0x10.  Rev A was Engineering Samples only.
 525  527   */
 526  528  #define X86_CHIPREV_AMD_10_REV_A \
 527  529          _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0001)
 528  530  #define X86_CHIPREV_AMD_10_REV_B \
 529  531          _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0002)
 530      -#define X86_CHIPREV_AMD_10_REV_C \
      532 +#define X86_CHIPREV_AMD_10_REV_C2 \
 531  533          _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0004)
 532      -#define X86_CHIPREV_AMD_10_REV_D \
      534 +#define X86_CHIPREV_AMD_10_REV_C3 \
 533  535          _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0008)
      536 +#define X86_CHIPREV_AMD_10_REV_D0 \
      537 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0010)
      538 +#define X86_CHIPREV_AMD_10_REV_D1 \
      539 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0020)
      540 +#define X86_CHIPREV_AMD_10_REV_E \
      541 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x10, 0x0040)
 534  542  
 535  543  /*
 536  544   * Definitions for AMD Family 0x11.
 537  545   */
 538      -#define X86_CHIPREV_AMD_11 \
 539      -        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x11, 0x0001)
      546 +#define X86_CHIPREV_AMD_11_REV_B \
      547 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x11, 0x0002)
 540  548  
      549 +/*
      550 + * Definitions for AMD Family 0x12.
      551 + */
      552 +#define X86_CHIPREV_AMD_12_REV_B \
      553 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x12, 0x0002)
 541  554  
 542  555  /*
      556 + * Definitions for AMD Family 0x14.
      557 + */
      558 +#define X86_CHIPREV_AMD_14_REV_B \
      559 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x14, 0x0002)
      560 +#define X86_CHIPREV_AMD_14_REV_C \
      561 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x14, 0x0004)
      562 +
      563 +/*
      564 + * Definitions for AMD Family 0x15
      565 + */
      566 +#define X86_CHIPREV_AMD_15OR_REV_B2 \
      567 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x15, 0x0001)
      568 +
      569 +#define X86_CHIPREV_AMD_15TN_REV_A1 \
      570 +        _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x15, 0x0002)
      571 +
      572 +/*
 543  573   * Various socket/package types, extended as the need to distinguish
 544  574   * a new type arises.  The top 8 byte identfies the vendor and the
 545  575   * remaining 24 bits describe 24 socket types.
 546  576   */
 547  577  
 548  578  #define _X86_SOCKET_VENDOR_SHIFT        24
 549  579  #define _X86_SOCKET_VENDOR(x)   ((x) >> _X86_SOCKET_VENDOR_SHIFT)
 550  580  #define _X86_SOCKET_TYPE_MASK   0x00ffffff
 551  581  #define _X86_SOCKET_TYPE(x)             ((x) & _X86_SOCKET_TYPE_MASK)
 552  582  
↓ open down ↓ 15 lines elided ↑ open up ↑
 568  598  #define X86_SOCKET_AM2          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000010)
 569  599  #define X86_SOCKET_F1207        _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000020)
 570  600  #define X86_SOCKET_S1g2         _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000040)
 571  601  #define X86_SOCKET_S1g3         _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000080)
 572  602  #define X86_SOCKET_AM           _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000100)
 573  603  #define X86_SOCKET_AM2R2        _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000200)
 574  604  #define X86_SOCKET_AM3          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000400)
 575  605  #define X86_SOCKET_G34          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x000800)
 576  606  #define X86_SOCKET_ASB2         _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x001000)
 577  607  #define X86_SOCKET_C32          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x002000)
      608 +#define X86_SOCKET_S1g4         _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x004000)
      609 +#define X86_SOCKET_FT1          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x008000)
      610 +#define X86_SOCKET_FM1          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x010000)
      611 +#define X86_SOCKET_FS1          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x020000)
      612 +#define X86_SOCKET_AM3R2        _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x040000)
      613 +#define X86_SOCKET_FP2          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x080000)
      614 +#define X86_SOCKET_FS1R2        _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x100000)
      615 +#define X86_SOCKET_FM2          _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x200000)
 578  616  
 579  617  /*
 580  618   * xgetbv/xsetbv support
 581  619   */
 582  620  
 583  621  #define XFEATURE_ENABLED_MASK   0x0
 584  622  /*
 585  623   * XFEATURE_ENABLED_MASK values (eax)
 586  624   */
 587  625  #define XFEATURE_LEGACY_FP      0x1
↓ open down ↓ 208 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX