Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2019 22:06:40 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r350800 - stable/11/sys/sys
Message-ID:  <201908082206.x78M6ek7041679@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Aug  8 22:06:40 2019
New Revision: 350800
URL: https://svnweb.freebsd.org/changeset/base/350800

Log:
  MFC r348376 (by rpokala):
  Add bits related to SANITIZE, SED, and form-factor to (struct ata_params)
  
  Based on ATA-ACS-4, recognize several bit-fields related to the ATA SANITIZE
  feature-set, Self-Encrypting Drives, and form-factor identification.
  
  As part of this change, the name of word 48 of (struct ata_params) is being
  changed. The previous name, "usedmovsd" does not appear to be related to the
  previous definition of the word ("double-word IO supported"). The word was
  defined that way in ATA-1 (1994), but it was marked "Reserved" (meaning
  "unused, but might be used in the future") in ATA-2 (1996). It stayed that
  way until ATA-8 (2008), which re-defined it as implemented in this change.
  The field is not used in-tree.

Modified:
  stable/11/sys/sys/ata.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/sys/ata.h
==============================================================================
--- stable/11/sys/sys/ata.h	Thu Aug  8 22:05:39 2019	(r350799)
+++ stable/11/sys/sys/ata.h	Thu Aug  8 22:06:40 2019	(r350800)
@@ -64,7 +64,8 @@ struct ata_params {
 /*023*/ u_int8_t        revision[8];            /* firmware revision */
 /*027*/ u_int8_t        model[40];              /* model name */
 /*047*/ u_int16_t       sectors_intr;           /* sectors per interrupt */
-/*048*/ u_int16_t       usedmovsd;              /* double word read/write? */
+/*048*/ u_int16_t       tcg;                    /* Trusted Computing Group */
+#define ATA_SUPPORT_TCG                 0x0001
 /*049*/ u_int16_t       capabilities1;
 #define ATA_SUPPORT_DMA                 0x0100
 #define ATA_SUPPORT_LBA                 0x0200
@@ -90,6 +91,10 @@ struct ata_params {
 /*057*/ u_int16_t       current_size_1;
 /*058*/ u_int16_t       current_size_2;
 /*059*/ u_int16_t       multi;
+#define ATA_SUPPORT_BLOCK_ERASE_EXT     0x8000
+#define ATA_SUPPORT_OVERWRITE_EXT       0x4000
+#define ATA_SUPPORT_CRYPTO_SCRAMBLE_EXT 0x2000
+#define ATA_SUPPORT_SANITIZE            0x1000
 #define ATA_MULTI_VALID                 0x0100
 
 /*060*/ u_int16_t       lba_size_1;
@@ -105,6 +110,7 @@ struct ata_params {
 /*069*/ u_int16_t       support3;
 #define ATA_SUPPORT_RZAT                0x0020
 #define ATA_SUPPORT_DRAT                0x4000
+#define ATA_ENCRYPTS_ALL_USER_DATA      0x0010  /* Self-encrypting drive */
 #define	ATA_SUPPORT_ZONE_MASK		0x0003
 #define	ATA_SUPPORT_ZONE_NR		0x0000
 #define	ATA_SUPPORT_ZONE_HOST_AWARE	0x0001
@@ -257,7 +263,19 @@ struct ata_params {
 /*162*/ u_int16_t       cfa_kms_support;
 /*163*/ u_int16_t       cfa_trueide_modes;
 /*164*/ u_int16_t       cfa_memory_modes;
-	u_int16_t       reserved165[4];
+	u_int16_t       reserved165[3];
+/*168*/ u_int16_t       form_factor;
+#define ATA_FORM_FACTOR_MASK		0x000f
+#define ATA_FORM_FACTOR_NOT_REPORTED	0x0000
+#define ATA_FORM_FACTOR_5_25		0x0001
+#define ATA_FORM_FACTOR_3_5		0x0002
+#define ATA_FORM_FACTOR_2_5		0x0003
+#define ATA_FORM_FACTOR_1_8		0x0004
+#define ATA_FORM_FACTOR_SUB_1_8		0x0005
+#define ATA_FORM_FACTOR_MSATA		0x0006
+#define ATA_FORM_FACTOR_M_2		0x0007
+#define ATA_FORM_FACTOR_MICRO_SSD	0x0008
+#define ATA_FORM_FACTOR_C_FAST		0x0009
 /*169*/	u_int16_t       support_dsm;
 #define ATA_SUPPORT_DSM_TRIM		0x0001
 	u_int16_t       reserved170[6];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908082206.x78M6ek7041679>