1230557Sjimharris/*- 2230557Sjimharris * This file is provided under a dual BSD/GPLv2 license. When using or 3230557Sjimharris * redistributing this file, you may do so under either license. 4230557Sjimharris * 5230557Sjimharris * GPL LICENSE SUMMARY 6230557Sjimharris * 7230557Sjimharris * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 8230557Sjimharris * 9230557Sjimharris * This program is free software; you can redistribute it and/or modify 10230557Sjimharris * it under the terms of version 2 of the GNU General Public License as 11230557Sjimharris * published by the Free Software Foundation. 12230557Sjimharris * 13230557Sjimharris * This program is distributed in the hope that it will be useful, but 14230557Sjimharris * WITHOUT ANY WARRANTY; without even the implied warranty of 15230557Sjimharris * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16230557Sjimharris * General Public License for more details. 17230557Sjimharris * 18230557Sjimharris * You should have received a copy of the GNU General Public License 19230557Sjimharris * along with this program; if not, write to the Free Software 20230557Sjimharris * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 21230557Sjimharris * The full GNU General Public License is included in this distribution 22230557Sjimharris * in the file called LICENSE.GPL. 23230557Sjimharris * 24230557Sjimharris * BSD LICENSE 25230557Sjimharris * 26230557Sjimharris * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 27230557Sjimharris * All rights reserved. 28230557Sjimharris * 29230557Sjimharris * Redistribution and use in source and binary forms, with or without 30230557Sjimharris * modification, are permitted provided that the following conditions 31230557Sjimharris * are met: 32230557Sjimharris * 33230557Sjimharris * * Redistributions of source code must retain the above copyright 34230557Sjimharris * notice, this list of conditions and the following disclaimer. 35230557Sjimharris * * Redistributions in binary form must reproduce the above copyright 36230557Sjimharris * notice, this list of conditions and the following disclaimer in 37230557Sjimharris * the documentation and/or other materials provided with the 38230557Sjimharris * distribution. 39230557Sjimharris * 40230557Sjimharris * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41230557Sjimharris * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42230557Sjimharris * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43230557Sjimharris * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44230557Sjimharris * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45230557Sjimharris * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46230557Sjimharris * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47230557Sjimharris * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48230557Sjimharris * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49230557Sjimharris * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50230557Sjimharris * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51230557Sjimharris * 52230557Sjimharris * $FreeBSD$ 53230557Sjimharris */ 54230557Sjimharris#ifndef _SCU_TASK_CONTEXT_H_ 55230557Sjimharris#define _SCU_TASK_CONTEXT_H_ 56230557Sjimharris 57230557Sjimharris/** 58230557Sjimharris * @file 59230557Sjimharris * 60230557Sjimharris * @brief This file contains the structures and constants for the SCU hardware 61230557Sjimharris * task context. 62230557Sjimharris */ 63230557Sjimharris 64230557Sjimharris#ifdef __cplusplus 65230557Sjimharrisextern "C" { 66230557Sjimharris#endif // __cplusplus 67230557Sjimharris 68230557Sjimharris#include <dev/isci/scil/sci_types.h> 69230557Sjimharris 70230557Sjimharris/** 71230557Sjimharris * @enum SCU_SSP_TASK_TYPE 72230557Sjimharris * 73230557Sjimharris * @brief This enumberation defines the various SSP task types the SCU 74230557Sjimharris * hardware will accept. 75230557Sjimharris * 76230557Sjimharris * The definition for the various task types the SCU hardware will accept can 77230557Sjimharris * be found in the DS specification. 78230557Sjimharris */ 79230557Sjimharristypedef enum 80230557Sjimharris{ 81230557Sjimharris SCU_TASK_TYPE_IOREAD, ///< IO READ direction or no direction 82230557Sjimharris SCU_TASK_TYPE_IOWRITE, ///< IO Write direction 83230557Sjimharris SCU_TASK_TYPE_SMP_REQUEST, ///< SMP Request type 84230557Sjimharris SCU_TASK_TYPE_RESPONSE, ///< Driver generated response frame (targt mode) 85230557Sjimharris SCU_TASK_TYPE_RAW_FRAME, ///< Raw frame request type 86230557Sjimharris SCU_TASK_TYPE_PRIMITIVE ///< Request for a primitive to be transmitted 87230557Sjimharris} SCU_SSP_TASK_TYPE; 88230557Sjimharris 89230557Sjimharris/** 90230557Sjimharris * @enum SCU_SATA_TASK_TYPE 91230557Sjimharris * 92230557Sjimharris * @brief This enumeration defines the various SATA task types the SCU 93230557Sjimharris * hardware will accept. 94230557Sjimharris * 95230557Sjimharris * The definition for the various task types the SCU hardware will accept can 96230557Sjimharris * be found in the DS specification. 97230557Sjimharris */ 98230557Sjimharristypedef enum 99230557Sjimharris{ 100230557Sjimharris SCU_TASK_TYPE_DMA_IN, ///< Read request 101230557Sjimharris SCU_TASK_TYPE_FPDMAQ_READ, ///< NCQ read request 102230557Sjimharris SCU_TASK_TYPE_PACKET_DMA_IN, ///< Packet read request 103230557Sjimharris SCU_TASK_TYPE_SATA_RAW_FRAME, ///< Raw frame request 104230557Sjimharris RESERVED_4, 105230557Sjimharris RESERVED_5, 106230557Sjimharris RESERVED_6, 107230557Sjimharris RESERVED_7, 108230557Sjimharris SCU_TASK_TYPE_DMA_OUT, ///< Write request 109230557Sjimharris SCU_TASK_TYPE_FPDMAQ_WRITE, ///< NCQ write Request 110230557Sjimharris SCU_TASK_TYPE_PACKET_DMA_OUT ///< Packet write request 111230557Sjimharris} SCU_SATA_TASK_TYPE; 112230557Sjimharris 113230557Sjimharris 114230557Sjimharris/** 115230557Sjimharris * @name SCU_CONTEXT_TYPE 116230557Sjimharris */ 117230557Sjimharris/*@{*/ 118230557Sjimharris#define SCU_TASK_CONTEXT_TYPE 0 119230557Sjimharris#define SCU_RNC_CONTEXT_TYPE 1 120230557Sjimharris/*@}*/ 121230557Sjimharris 122230557Sjimharris/** 123230557Sjimharris * @name SCU_TASK_CONTEXT_VALIDITY 124230557Sjimharris */ 125230557Sjimharris/*@{*/ 126230557Sjimharris#define SCU_TASK_CONTEXT_INVALID 0 127230557Sjimharris#define SCU_TASK_CONTEXT_VALID 1 128230557Sjimharris/*@}*/ 129230557Sjimharris 130230557Sjimharris/** 131230557Sjimharris * @name SCU_COMMAND_CODE 132230557Sjimharris */ 133230557Sjimharris/*@{*/ 134230557Sjimharris#define SCU_COMMAND_CODE_INITIATOR_NEW_TASK 0 135230557Sjimharris#define SCU_COMMAND_CODE_ACTIVE_TASK 1 136230557Sjimharris#define SCU_COMMAND_CODE_PRIMITIVE_SEQ_TASK 2 137230557Sjimharris#define SCU_COMMAND_CODE_TARGET_RAW_FRAMES 3 138230557Sjimharris/*@}*/ 139230557Sjimharris 140230557Sjimharris/** 141230557Sjimharris * @name SCU_TASK_PRIORITY 142230557Sjimharris */ 143230557Sjimharris/*@{*/ 144230557Sjimharris/** 145230557Sjimharris * This priority is used when there is no priority request for this request. 146230557Sjimharris */ 147230557Sjimharris#define SCU_TASK_PRIORITY_NORMAL 0 148230557Sjimharris 149230557Sjimharris/** 150230557Sjimharris * This priority indicates that the task should be scheduled to the head 151230557Sjimharris * of the queue. The task will NOT be executed if the TX is suspended for 152230557Sjimharris * the remote node. 153230557Sjimharris */ 154230557Sjimharris#define SCU_TASK_PRIORITY_HEAD_OF_Q 1 155230557Sjimharris 156230557Sjimharris/** 157230557Sjimharris * This priority indicates that the task will be executed before all 158230557Sjimharris * SCU_TASK_PRIORITY_NORMAL and SCU_TASK_PRIORITY_HEAD_OF_Q tasks. 159230557Sjimharris * The task WILL be executed if the TX is suspended for the remote node. 160230557Sjimharris */ 161230557Sjimharris#define SCU_TASK_PRIORITY_HIGH 2 162230557Sjimharris 163230557Sjimharris/** 164230557Sjimharris * This task priority is reserved and should not be used. 165230557Sjimharris */ 166230557Sjimharris#define SCU_TASK_PRIORITY_RESERVED 3 167230557Sjimharris/*@}*/ 168230557Sjimharris 169230557Sjimharris#define SCU_TASK_INITIATOR_MODE 1 170230557Sjimharris#define SCU_TASK_TARGET_MODE 0 171230557Sjimharris 172230557Sjimharris#define SCU_TASK_REGULAR 0 173230557Sjimharris#define SCU_TASK_ABORTED 1 174230557Sjimharris 175230557Sjimharris//direction bit defintion 176230557Sjimharris/** 177230557Sjimharris * @name SATA_DIRECTION 178230557Sjimharris */ 179230557Sjimharris/*@{*/ 180230557Sjimharris#define SCU_SATA_WRITE_DATA_DIRECTION 0 181230557Sjimharris#define SCU_SATA_READ_DATA_DIRECTION 1 182230557Sjimharris/*@}*/ 183230557Sjimharris 184230557Sjimharris/** 185230557Sjimharris * @name SCU_COMMAND_CONTEXT_MACROS 186230557Sjimharris * 187230557Sjimharris * These macros provide the mask and shift operations to construct the various 188230557Sjimharris * SCU commands 189230557Sjimharris */ 190230557Sjimharris/*@{*/ 191230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_SHIFT 21UL 192230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_MASK 0x00E00000UL 193230557Sjimharris#define scu_get_command_request_type(x) \ 194230557Sjimharris ((x) & SCU_CONTEXT_COMMAND_REQUEST_TYPE_MASK) 195230557Sjimharris 196230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_SHIFT 18UL 197230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_MASK 0x001C0000UL 198230557Sjimharris#define scu_get_command_request_subtype(x) \ 199230557Sjimharris ((x) & SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_MASK) 200230557Sjimharris 201230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_FULLTYPE_MASK \ 202230557Sjimharris ( \ 203230557Sjimharris SCU_CONTEXT_COMMAND_REQUEST_TYPE_MASK \ 204230557Sjimharris | SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_MASK \ 205230557Sjimharris ) 206230557Sjimharris#define scu_get_command_request_full_type(x) \ 207230557Sjimharris ((x) & SCU_CONTEXT_COMMAND_REQUEST_FULLTYPE_MASK) 208230557Sjimharris 209230557Sjimharris#define SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT 16UL 210230557Sjimharris#define SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_MASK 0x00010000UL 211230557Sjimharris#define scu_get_command_protocl_engine_group(x) \ 212230557Sjimharris ((x) & SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_MASK) 213230557Sjimharris 214230557Sjimharris#define SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT 12UL 215230557Sjimharris#define SCU_CONTEXT_COMMAND_LOGICAL_PORT_MASK 0x00007000UL 216230557Sjimharris#define scu_get_command_reqeust_logical_port(x) \ 217230557Sjimharris ((x) & SCU_CONTEXT_COMMAND_LOGICAL_PORT_MASK) 218230557Sjimharris 219230557Sjimharris 220230557Sjimharris#define MAKE_SCU_CONTEXT_COMMAND_TYPE(type) \ 221230557Sjimharris ((U32)(type) << SCU_CONTEXT_COMMAND_REQUEST_TYPE_SHIFT) 222230557Sjimharris/*@}*/ 223230557Sjimharris 224230557Sjimharris/** 225230557Sjimharris * @name SCU_COMMAND_TYPES 226230557Sjimharris * 227230557Sjimharris * These constants provide the grouping of the different SCU command types. 228230557Sjimharris */ 229230557Sjimharris/*@{*/ 230230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC MAKE_SCU_CONTEXT_COMMAND_TYPE(0UL) 231230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_TC MAKE_SCU_CONTEXT_COMMAND_TYPE(1UL) 232230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC MAKE_SCU_CONTEXT_COMMAND_TYPE(2UL) 233230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC MAKE_SCU_CONTEXT_COMMAND_TYPE(3UL) 234230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC MAKE_SCU_CONTEXT_COMMAND_TYPE(6UL) 235230557Sjimharris/*@}*/ 236230557Sjimharris 237230557Sjimharris#define MAKE_SCU_CONTEXT_COMMAND_REQUEST(type, command) \ 238230557Sjimharris ((type) | (((U32)(command)) << SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_SHIFT)) 239230557Sjimharris 240230557Sjimharris/** 241230557Sjimharris * @name SCU_REQUEST_TYPES 242230557Sjimharris * 243230557Sjimharris * These constants are the various request types that can be posted to the SCU 244230557Sjimharris * hardware. 245230557Sjimharris */ 246230557Sjimharris/*@{*/ 247230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUST_POST_TC \ 248230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC, 0)) 249230557Sjimharris 250230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUEST_POST_TC_ABORT \ 251230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC, 1)) 252230557Sjimharris 253230557Sjimharris#define SCU_CONTEXT_COMMAND_REQUST_DUMP_TC \ 254230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_TC, 0)) 255230557Sjimharris 256230557Sjimharris#define SCU_CONTEXT_COMMAND_POST_RNC_32 \ 257230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC, 0)) 258230557Sjimharris 259230557Sjimharris#define SCU_CONTEXT_COMMAND_POST_RNC_96 \ 260230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC, 1)) 261230557Sjimharris 262230557Sjimharris#define SCU_CONTEXT_COMMAND_POST_RNC_INVALIDATE \ 263230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC, 2)) 264230557Sjimharris 265230557Sjimharris#define SCU_CONTEXT_COMMAND_DUMP_RNC_32 \ 266230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC, 0)) 267230557Sjimharris 268230557Sjimharris#define SCU_CONTEXT_COMMAND_DUMP_RNC_96 \ 269230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC, 1)) 270230557Sjimharris 271230557Sjimharris#define SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX \ 272230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 0)) 273230557Sjimharris 274230557Sjimharris#define SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX_RX \ 275230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 1)) 276230557Sjimharris 277230557Sjimharris#define SCU_CONTEXT_COMMAND_POST_RNC_RESUME \ 278230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 2)) 279230557Sjimharris 280230557Sjimharris#define SCU_CONTEXT_IT_NEXUS_LOSS_TIMER_ENABLE \ 281230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 3)) 282230557Sjimharris 283230557Sjimharris#define SCU_CONTEXT_IT_NEXUS_LOSS_TIMER_DISABLE \ 284230557Sjimharris (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 4)) 285230557Sjimharris/*@}*/ 286230557Sjimharris 287230557Sjimharris/** 288230557Sjimharris * @name SCU_TASK_CONTEXT_PROTOCOL 289230557Sjimharris * SCU Task context protocol types this is uesd to program the SCU Task 290230557Sjimharris * context protocol field in word 0x00. 291230557Sjimharris */ 292230557Sjimharris/*@{*/ 293230557Sjimharris#define SCU_TASK_CONTEXT_PROTOCOL_SMP 0x00 294230557Sjimharris#define SCU_TASK_CONTEXT_PROTOCOL_SSP 0x01 295230557Sjimharris#define SCU_TASK_CONTEXT_PROTOCOL_STP 0x02 296230557Sjimharris#define SCU_TASK_CONTEXT_PROTOCOL_NONE 0x07 297230557Sjimharris/*@}*/ 298230557Sjimharris 299230557Sjimharris/** 300230557Sjimharris * @struct SSP_TASK_CONTEXT 301230557Sjimharris * 302230557Sjimharris * @brief This is the SCU hardware definition for an SSP request. 303230557Sjimharris */ 304230557Sjimharrisstruct SSP_TASK_CONTEXT 305230557Sjimharris{ 306230557Sjimharris // OFFSET 0x18 307230557Sjimharris U32 reserved00 : 24; 308230557Sjimharris U32 frame_type : 8; 309230557Sjimharris 310230557Sjimharris // OFFSET 0x1C 311230557Sjimharris U32 reserved01; 312230557Sjimharris 313230557Sjimharris // OFFSET 0x20 314230557Sjimharris U32 fill_bytes : 2; 315230557Sjimharris U32 reserved02 : 6; 316230557Sjimharris U32 changing_data_pointer : 1; 317230557Sjimharris U32 retransmit : 1; 318230557Sjimharris U32 retry_data_frame : 1; 319230557Sjimharris U32 tlr_control : 2; 320230557Sjimharris U32 reserved03 : 19; 321230557Sjimharris 322230557Sjimharris // OFFSET 0x24 323230557Sjimharris U32 uiRsvd4; 324230557Sjimharris 325230557Sjimharris // OFFSET 0x28 326230557Sjimharris U32 target_port_transfer_tag : 16; 327230557Sjimharris U32 tag : 16; 328230557Sjimharris 329230557Sjimharris // OFFSET 0x2C 330230557Sjimharris U32 data_offset; 331230557Sjimharris}; 332230557Sjimharris 333230557Sjimharris/** 334230557Sjimharris * @struct STP_TASK_CONTEXT 335230557Sjimharris * 336230557Sjimharris * @brief This is the SCU hardware definition for an STP request. 337230557Sjimharris */ 338230557Sjimharrisstruct STP_TASK_CONTEXT 339230557Sjimharris{ 340230557Sjimharris // OFFSET 0x18 341230557Sjimharris U32 fis_type : 8; 342230557Sjimharris U32 pm_port : 4; 343230557Sjimharris U32 reserved0 : 3; 344230557Sjimharris U32 control : 1; 345230557Sjimharris U32 command : 8; 346230557Sjimharris U32 features : 8; 347230557Sjimharris 348230557Sjimharris // OFFSET 0x1C 349230557Sjimharris U32 reserved1; 350230557Sjimharris 351230557Sjimharris // OFFSET 0x20 352230557Sjimharris U32 reserved2; 353230557Sjimharris 354230557Sjimharris // OFFSET 0x24 355230557Sjimharris U32 reserved3; 356230557Sjimharris 357230557Sjimharris // OFFSET 0x28 358230557Sjimharris U32 ncq_tag : 5; 359230557Sjimharris U32 reserved4 : 27; 360230557Sjimharris 361230557Sjimharris // OFFSET 0x2C 362230557Sjimharris U32 data_offset; // TODO: What is this used for? 363230557Sjimharris}; 364230557Sjimharris 365230557Sjimharris/** 366230557Sjimharris * @struct SMP_TASK_CONTEXT 367230557Sjimharris * 368230557Sjimharris * @brief This is the SCU hardware definition for an SMP request. 369230557Sjimharris */ 370230557Sjimharrisstruct SMP_TASK_CONTEXT 371230557Sjimharris{ 372230557Sjimharris // OFFSET 0x18 373230557Sjimharris U32 response_length : 8; 374230557Sjimharris U32 function_result : 8; 375230557Sjimharris U32 function : 8; 376230557Sjimharris U32 frame_type : 8; 377230557Sjimharris 378230557Sjimharris // OFFSET 0x1C 379230557Sjimharris U32 smp_response_ufi : 12; 380230557Sjimharris U32 reserved1 : 20; 381230557Sjimharris 382230557Sjimharris // OFFSET 0x20 383230557Sjimharris U32 reserved2; 384230557Sjimharris 385230557Sjimharris // OFFSET 0x24 386230557Sjimharris U32 reserved3; 387230557Sjimharris 388230557Sjimharris // OFFSET 0x28 389230557Sjimharris U32 reserved4; 390230557Sjimharris 391230557Sjimharris // OFFSET 0x2C 392230557Sjimharris U32 reserved5; 393230557Sjimharris}; 394230557Sjimharris 395230557Sjimharris/** 396230557Sjimharris * @struct PRIMITIVE_TASK_CONTEXT 397230557Sjimharris * 398230557Sjimharris * @brief This is the SCU hardware definition used when the driver wants to 399230557Sjimharris * send a primitive on the link. 400230557Sjimharris */ 401230557Sjimharrisstruct PRIMITIVE_TASK_CONTEXT 402230557Sjimharris{ 403230557Sjimharris // OFFSET 0x18 404230557Sjimharris /** 405230557Sjimharris * This field is the control word and it must be 0. 406230557Sjimharris */ 407230557Sjimharris U32 control; ///< must be set to 0 408230557Sjimharris 409230557Sjimharris // OFFSET 0x1C 410230557Sjimharris /** 411230557Sjimharris * This field specifies the primitive that is to be transmitted. 412230557Sjimharris */ 413230557Sjimharris U32 sequence; 414230557Sjimharris 415230557Sjimharris // OFFSET 0x20 416230557Sjimharris U32 reserved0; 417230557Sjimharris 418230557Sjimharris // OFFSET 0x24 419230557Sjimharris U32 reserved1; 420230557Sjimharris 421230557Sjimharris // OFFSET 0x28 422230557Sjimharris U32 reserved2; 423230557Sjimharris 424230557Sjimharris // OFFSET 0x2C 425230557Sjimharris U32 reserved3; 426230557Sjimharris}; 427230557Sjimharris 428230557Sjimharris/** 429230557Sjimharris * @union PROTOCOL_CONTEXT 430230557Sjimharris * 431230557Sjimharris * @brief The union of the protocols that can be selected in the SCU task 432230557Sjimharris * context field. 433230557Sjimharris */ 434230557Sjimharrisunion PROTOCOL_CONTEXT 435230557Sjimharris{ 436230557Sjimharris struct SSP_TASK_CONTEXT ssp; 437230557Sjimharris struct STP_TASK_CONTEXT stp; 438230557Sjimharris struct SMP_TASK_CONTEXT smp; 439230557Sjimharris struct PRIMITIVE_TASK_CONTEXT primitive; 440230557Sjimharris U32 words[6]; 441230557Sjimharris}; 442230557Sjimharris 443230557Sjimharris/** 444230557Sjimharris * @struct SCU_SGL_ELEMENT 445230557Sjimharris * @typedef SCU_SGL_ELEMENT_T 446230557Sjimharris * 447230557Sjimharris * @brief This structure represents a single SCU defined SGL element. 448230557Sjimharris * 449230557Sjimharris * SCU SGLs contain a 64 bit address with the maximum data transfer being 24 450230557Sjimharris * bits in size. The SGL can not cross a 4GB boundary. 451230557Sjimharris */ 452230557Sjimharristypedef struct SCU_SGL_ELEMENT 453230557Sjimharris{ 454230557Sjimharris /** 455230557Sjimharris * This field is the upper 32 bits of the 64 bit physical address. 456230557Sjimharris */ 457230557Sjimharris U32 address_upper; 458230557Sjimharris 459230557Sjimharris /** 460230557Sjimharris * This field is the lower 32 bits of the 64 bit physical address. 461230557Sjimharris */ 462230557Sjimharris U32 address_lower; 463230557Sjimharris 464230557Sjimharris /** 465230557Sjimharris * This field is the number of bytes to transfer. 466230557Sjimharris */ 467230557Sjimharris U32 length: 24; 468230557Sjimharris 469230557Sjimharris /** 470230557Sjimharris * This field is the address modifier to be used when a virtual function is 471230557Sjimharris * requesting a data transfer. 472230557Sjimharris */ 473230557Sjimharris U32 address_modifier: 8; 474230557Sjimharris 475230557Sjimharris} SCU_SGL_ELEMENT_T; 476230557Sjimharris 477230557Sjimharris#define SCU_SGL_ELEMENT_PAIR_A 0 478230557Sjimharris#define SCU_SGL_ELEMENT_PAIR_B 1 479230557Sjimharris 480230557Sjimharris/** 481230557Sjimharris * @struct SCU_SGL_ELEMENT_PAIR 482230557Sjimharris * 483230557Sjimharris * @brief This structure is the SCU hardware definition of a pair of SGL 484230557Sjimharris * elements. 485230557Sjimharris * 486230557Sjimharris * The SCU hardware always works on SGL pairs. They are refered to in the DS 487230557Sjimharris * specification as SGL A and SGL B. Each SGL pair is followed by the address 488230557Sjimharris * of the next pair. 489230557Sjimharris */ 490230557Sjimharristypedef struct SCU_SGL_ELEMENT_PAIR 491230557Sjimharris{ 492230557Sjimharris // OFFSET 0x60-0x68 493230557Sjimharris /** 494230557Sjimharris * This field is the SGL element A of the SGL pair. 495230557Sjimharris */ 496230557Sjimharris SCU_SGL_ELEMENT_T A; 497230557Sjimharris 498230557Sjimharris // OFFSET 0x6C-0x74 499230557Sjimharris /** 500230557Sjimharris * This field is the SGL element B of the SGL pair. 501230557Sjimharris */ 502230557Sjimharris SCU_SGL_ELEMENT_T B; 503230557Sjimharris 504230557Sjimharris // OFFSET 0x78-0x7C 505230557Sjimharris /** 506230557Sjimharris * This field is the upper 32 bits of the 64 bit address to the next SGL 507230557Sjimharris * element pair. 508230557Sjimharris */ 509230557Sjimharris U32 next_pair_upper; 510230557Sjimharris 511230557Sjimharris /** 512230557Sjimharris * This field is the lower 32 bits of the 64 bit address to the next SGL 513230557Sjimharris * element pair. 514230557Sjimharris */ 515230557Sjimharris U32 next_pair_lower; 516230557Sjimharris 517230557Sjimharris} SCU_SGL_ELEMENT_PAIR_T; 518230557Sjimharris 519230557Sjimharris/** 520230557Sjimharris * @struct TRANSPORT_SNAPSHOT 521230557Sjimharris * 522230557Sjimharris * @brief This structure is the SCU hardware scratch area for the task 523230557Sjimharris * context. 524230557Sjimharris * 525230557Sjimharris * This is set to 0 by the driver but can be read by issuing a dump TC request 526230557Sjimharris * to the SCU. 527230557Sjimharris */ 528230557Sjimharrisstruct TRANSPORT_SNAPSHOT 529230557Sjimharris{ 530230557Sjimharris // OFFSET 0x48 531230557Sjimharris U32 xfer_rdy_write_data_length; 532230557Sjimharris 533230557Sjimharris // OFFSET 0x4C 534230557Sjimharris U32 data_offset; 535230557Sjimharris 536230557Sjimharris // OFFSET 0x50 537230557Sjimharris U32 data_transfer_size : 24; 538230557Sjimharris U32 reserved_50_0 : 8; 539230557Sjimharris 540230557Sjimharris // OFFSET 0x54 541230557Sjimharris U32 next_initiator_write_data_offset; 542230557Sjimharris 543230557Sjimharris // OFFSET 0x58 544230557Sjimharris U32 next_initiator_write_data_xfer_size : 24; 545230557Sjimharris U32 reserved_58_0 : 8; 546230557Sjimharris}; 547230557Sjimharris 548230557Sjimharris/** 549230557Sjimharris * @struct SCU_TASK_CONTEXT 550230557Sjimharris * 551230557Sjimharris * @brief This structure defines the contents of the SCU silicon task context. 552230557Sjimharris * It lays out all of the fields according to the expected order and 553230557Sjimharris * location for the Storage Controller unit. 554230557Sjimharris */ 555230557Sjimharristypedef struct SCU_TASK_CONTEXT 556230557Sjimharris{ 557230557Sjimharris // OFFSET 0x00 ------ 558230557Sjimharris /** 559230557Sjimharris * This field must be encoded to one of the valid SCU task priority values 560230557Sjimharris * - SCU_TASK_PRIORITY_NORMAL 561230557Sjimharris * - SCU_TASK_PRIORITY_HEAD_OF_Q 562230557Sjimharris * - SCU_TASK_PRIORITY_HIGH 563230557Sjimharris */ 564230557Sjimharris U32 priority : 2; 565230557Sjimharris 566230557Sjimharris /** 567230557Sjimharris * This field must be set to TRUE if this is an initiator generated request. 568230557Sjimharris * Until target mode is supported all task requests are initiator requests. 569230557Sjimharris */ 570230557Sjimharris U32 initiator_request : 1; 571230557Sjimharris 572230557Sjimharris /** 573230557Sjimharris * This field must be set to one of the valid connection rates valid values 574230557Sjimharris * are 0x8, 0x9, and 0xA. 575230557Sjimharris */ 576230557Sjimharris U32 connection_rate : 4; 577230557Sjimharris 578230557Sjimharris /** 579230557Sjimharris * This field muse be programed when generating an SMP response since the SMP 580230557Sjimharris * connection remains open until the SMP response is generated. 581230557Sjimharris */ 582230557Sjimharris U32 protocol_engine_index : 3; 583230557Sjimharris 584230557Sjimharris /** 585230557Sjimharris * This field must contain the logical port for the task request. 586230557Sjimharris */ 587230557Sjimharris U32 logical_port_index : 3; 588230557Sjimharris 589230557Sjimharris /** 590230557Sjimharris * This field must be set to one of the SCU_TASK_CONTEXT_PROTOCOL values 591230557Sjimharris * - SCU_TASK_CONTEXT_PROTOCOL_SMP 592230557Sjimharris * - SCU_TASK_CONTEXT_PROTOCOL_SSP 593230557Sjimharris * - SCU_TASK_CONTEXT_PROTOCOL_STP 594230557Sjimharris * - SCU_TASK_CONTEXT_PROTOCOL_NONE 595230557Sjimharris */ 596230557Sjimharris U32 protocol_type : 3; 597230557Sjimharris 598230557Sjimharris /** 599230557Sjimharris * This filed must be set to the TCi allocated for this task 600230557Sjimharris */ 601230557Sjimharris U32 task_index : 12; 602230557Sjimharris 603230557Sjimharris /** 604230557Sjimharris * This field is reserved and must be set to 0x00 605230557Sjimharris */ 606230557Sjimharris U32 reserved_00_0 : 1; 607230557Sjimharris 608230557Sjimharris /** 609230557Sjimharris * For a normal task request this must be set to 0. If this is an abort of 610230557Sjimharris * this task request it must be set to 1. 611230557Sjimharris */ 612230557Sjimharris U32 abort : 1; 613230557Sjimharris 614230557Sjimharris /** 615230557Sjimharris * This field must be set to TRUE for the SCU hardware to process the task. 616230557Sjimharris */ 617230557Sjimharris U32 valid : 1; 618230557Sjimharris 619230557Sjimharris /** 620230557Sjimharris * This field must be set to SCU_TASK_CONTEXT_TYPE 621230557Sjimharris */ 622230557Sjimharris U32 context_type : 1; 623230557Sjimharris 624230557Sjimharris // OFFSET 0x04 625230557Sjimharris /** 626230557Sjimharris * This field contains the RNi that is the target of this request. 627230557Sjimharris */ 628230557Sjimharris U32 remote_node_index : 12; 629230557Sjimharris 630230557Sjimharris /** 631230557Sjimharris * This field is programmed if this is a mirrored request, which we are not 632230557Sjimharris * using, in which case it is the RNi for the mirrored target. 633230557Sjimharris */ 634230557Sjimharris U32 mirrored_node_index : 12; 635230557Sjimharris 636230557Sjimharris /** 637230557Sjimharris * This field is programmed with the direction of the SATA reqeust 638230557Sjimharris * - SCU_SATA_WRITE_DATA_DIRECTION 639230557Sjimharris * - SCU_SATA_READ_DATA_DIRECTION 640230557Sjimharris */ 641230557Sjimharris U32 sata_direction : 1; 642230557Sjimharris 643230557Sjimharris /** 644230557Sjimharris * This field is programmsed with one of the following SCU_COMMAND_CODE 645230557Sjimharris * - SCU_COMMAND_CODE_INITIATOR_NEW_TASK 646230557Sjimharris * - SCU_COMMAND_CODE_ACTIVE_TASK 647230557Sjimharris * - SCU_COMMAND_CODE_PRIMITIVE_SEQ_TASK 648230557Sjimharris * - SCU_COMMAND_CODE_TARGET_RAW_FRAMES 649230557Sjimharris */ 650230557Sjimharris U32 command_code : 2; 651230557Sjimharris 652230557Sjimharris /** 653230557Sjimharris * This field is set to TRUE if the remote node should be suspended. 654230557Sjimharris * This bit is only valid for SSP & SMP target devices. 655230557Sjimharris */ 656230557Sjimharris U32 suspend_node : 1; 657230557Sjimharris 658230557Sjimharris /** 659230557Sjimharris * This field is programmed with one of the following command type codes 660230557Sjimharris * 661230557Sjimharris * For SAS requests use the SCU_SSP_TASK_TYPE 662230557Sjimharris * - SCU_TASK_TYPE_IOREAD 663230557Sjimharris * - SCU_TASK_TYPE_IOWRITE 664230557Sjimharris * - SCU_TASK_TYPE_SMP_REQUEST 665230557Sjimharris * - SCU_TASK_TYPE_RESPONSE 666230557Sjimharris * - SCU_TASK_TYPE_RAW_FRAME 667230557Sjimharris * - SCU_TASK_TYPE_PRIMITIVE 668230557Sjimharris * 669230557Sjimharris * For SATA requests use the SCU_SATA_TASK_TYPE 670230557Sjimharris * - SCU_TASK_TYPE_DMA_IN 671230557Sjimharris * - SCU_TASK_TYPE_FPDMAQ_READ 672230557Sjimharris * - SCU_TASK_TYPE_PACKET_DMA_IN 673230557Sjimharris * - SCU_TASK_TYPE_SATA_RAW_FRAME 674230557Sjimharris * - SCU_TASK_TYPE_DMA_OUT 675230557Sjimharris * - SCU_TASK_TYPE_FPDMAQ_WRITE 676230557Sjimharris * - SCU_TASK_TYPE_PACKET_DMA_OUT 677230557Sjimharris */ 678230557Sjimharris U32 task_type : 4; 679230557Sjimharris 680230557Sjimharris // OFFSET 0x08 681230557Sjimharris /** 682230557Sjimharris * This field is reserved and the must be set to 0x00 683230557Sjimharris */ 684230557Sjimharris U32 link_layer_control : 8; // presently all reserved 685230557Sjimharris 686230557Sjimharris /** 687230557Sjimharris * This field is set to TRUE when TLR is to be enabled 688230557Sjimharris */ 689230557Sjimharris U32 ssp_tlr_enable : 1; 690230557Sjimharris 691230557Sjimharris /** 692230557Sjimharris * This is field specifies if the SCU DMAs a response frame to host 693230557Sjimharris * memory for good response frames when operating in target mode. 694230557Sjimharris */ 695230557Sjimharris U32 dma_ssp_target_good_response : 1; 696230557Sjimharris 697230557Sjimharris /** 698230557Sjimharris * This field indicates if the SCU should DMA the response frame to 699230557Sjimharris * host memory. 700230557Sjimharris */ 701230557Sjimharris U32 do_not_dma_ssp_good_response : 1; 702230557Sjimharris 703230557Sjimharris /** 704230557Sjimharris * This field is set to TRUE when strict ordering is to be enabled 705230557Sjimharris */ 706230557Sjimharris U32 strict_ordering : 1; 707230557Sjimharris 708230557Sjimharris /** 709230557Sjimharris * This field indicates the type of endianess to be utilized for the 710230557Sjimharris * frame. command, task, and response frames utilized control_frame 711230557Sjimharris * set to 1. 712230557Sjimharris */ 713230557Sjimharris U32 control_frame : 1; 714230557Sjimharris 715230557Sjimharris /** 716230557Sjimharris * This field is reserved and the driver should set to 0x00 717230557Sjimharris */ 718230557Sjimharris U32 tl_control_reserved : 3; 719230557Sjimharris 720230557Sjimharris /** 721230557Sjimharris * This field is set to TRUE when the SCU hardware task timeout control is to 722230557Sjimharris * be enabled 723230557Sjimharris */ 724230557Sjimharris U32 timeout_enable : 1; 725230557Sjimharris 726230557Sjimharris /** 727230557Sjimharris * This field is reserved and the driver should set it to 0x00 728230557Sjimharris */ 729230557Sjimharris U32 pts_control_reserved : 7; 730230557Sjimharris 731230557Sjimharris /** 732230557Sjimharris * This field should be set to TRUE when block guard is to be enabled 733230557Sjimharris */ 734230557Sjimharris U32 block_guard_enable : 1; 735230557Sjimharris 736230557Sjimharris /** 737230557Sjimharris * This field is reserved and the driver should set to 0x00 738230557Sjimharris */ 739230557Sjimharris U32 sdma_control_reserved : 7; 740230557Sjimharris 741230557Sjimharris // OFFSET 0x0C 742230557Sjimharris /** 743230557Sjimharris * This field is the address modifier for this io request it should be 744230557Sjimharris * programmed with the virtual function that is making the request. 745230557Sjimharris */ 746230557Sjimharris U32 address_modifier : 16; 747230557Sjimharris 748230557Sjimharris /** 749230557Sjimharris * @todo What we support mirrored SMP response frame? 750230557Sjimharris */ 751230557Sjimharris U32 mirrored_protocol_engine : 3; // mirrored protocol Engine Index 752230557Sjimharris 753230557Sjimharris /** 754230557Sjimharris * If this is a mirrored request the logical port index for the mirrored RNi 755230557Sjimharris * must be programmed. 756230557Sjimharris */ 757230557Sjimharris U32 mirrored_logical_port : 4; // mirrored local port index 758230557Sjimharris 759230557Sjimharris /** 760230557Sjimharris * This field is reserved and the driver must set it to 0x00 761230557Sjimharris */ 762230557Sjimharris U32 reserved_0C_0 : 8; 763230557Sjimharris 764230557Sjimharris /** 765230557Sjimharris * This field must be set to TRUE if the mirrored request processing is to be 766230557Sjimharris * enabled. 767230557Sjimharris */ 768230557Sjimharris U32 mirror_request_enable : 1; // Mirrored request Enable 769230557Sjimharris 770230557Sjimharris // OFFSET 0x10 771230557Sjimharris /** 772230557Sjimharris * This field is the command iu length in dwords 773230557Sjimharris */ 774230557Sjimharris U32 ssp_command_iu_length : 8; 775230557Sjimharris 776230557Sjimharris /** 777230557Sjimharris * This is the target TLR enable bit it must be set to 0 when creatning the 778230557Sjimharris * task context. 779230557Sjimharris */ 780230557Sjimharris U32 xfer_ready_tlr_enable : 1; 781230557Sjimharris 782230557Sjimharris /** 783230557Sjimharris * This field is reserved and the driver must set it to 0x00 784230557Sjimharris */ 785230557Sjimharris U32 reserved_10_0 : 7; 786230557Sjimharris 787230557Sjimharris /** 788230557Sjimharris * This is the maximum burst size that the SCU hardware will send in one 789230557Sjimharris * connection its value is (N x 512) and N must be a multiple of 2. If the 790230557Sjimharris * value is 0x00 then maximum burst size is disabled. 791230557Sjimharris */ 792230557Sjimharris U32 ssp_max_burst_size : 16; 793230557Sjimharris 794230557Sjimharris // OFFSET 0x14 795230557Sjimharris /** 796230557Sjimharris * This filed is set to the number of bytes to be transfered in the request. 797230557Sjimharris */ 798230557Sjimharris U32 transfer_length_bytes : 24; // In terms of bytes 799230557Sjimharris 800230557Sjimharris /** 801230557Sjimharris * This field is reserved and the driver should set it to 0x00 802230557Sjimharris */ 803230557Sjimharris U32 reserved_14_0 : 8; 804230557Sjimharris 805230557Sjimharris // OFFSET 0x18-0x2C 806230557Sjimharris /** 807230557Sjimharris * This union provides for the protocol specif part of the SCU Task Context. 808230557Sjimharris */ 809230557Sjimharris union PROTOCOL_CONTEXT type; 810230557Sjimharris 811230557Sjimharris // OFFSET 0x30-0x34 812230557Sjimharris /** 813230557Sjimharris * This field is the upper 32 bits of the 64 bit physical address of the 814230557Sjimharris * command iu buffer 815230557Sjimharris */ 816230557Sjimharris U32 command_iu_upper; 817230557Sjimharris 818230557Sjimharris /** 819230557Sjimharris * This field is the lower 32 bits of the 64 bit physical address of the 820230557Sjimharris * command iu buffer 821230557Sjimharris */ 822230557Sjimharris U32 command_iu_lower; 823230557Sjimharris 824230557Sjimharris // OFFSET 0x38-0x3C 825230557Sjimharris /** 826230557Sjimharris * This field is the upper 32 bits of the 64 bit physical address of the 827230557Sjimharris * response iu buffer 828230557Sjimharris */ 829230557Sjimharris U32 response_iu_upper; 830230557Sjimharris 831230557Sjimharris /** 832230557Sjimharris * This field is the lower 32 bits of the 64 bit physical address of the 833230557Sjimharris * response iu buffer 834230557Sjimharris */ 835230557Sjimharris U32 response_iu_lower; 836230557Sjimharris 837230557Sjimharris // OFFSET 0x40 838230557Sjimharris /** 839230557Sjimharris * This field is set to the task phase of the SCU hardware. The driver must 840230557Sjimharris * set this to 0x01 841230557Sjimharris */ 842230557Sjimharris U32 task_phase : 8; 843230557Sjimharris 844230557Sjimharris /** 845230557Sjimharris * This field is set to the transport layer task status. The driver must set 846230557Sjimharris * this to 0x00 847230557Sjimharris */ 848230557Sjimharris U32 task_status : 8; 849230557Sjimharris 850230557Sjimharris /** 851230557Sjimharris * This field is used during initiator write TLR 852230557Sjimharris */ 853230557Sjimharris U32 previous_extended_tag : 4; 854230557Sjimharris 855230557Sjimharris /** 856230557Sjimharris * This field is set the maximum number of retries for a STP non-data FIS 857230557Sjimharris */ 858230557Sjimharris U32 stp_retry_count : 2; 859230557Sjimharris 860230557Sjimharris /** 861230557Sjimharris * This field is reserved and the driver must set it to 0x00 862230557Sjimharris */ 863230557Sjimharris U32 reserved_40_1 : 2; 864230557Sjimharris 865230557Sjimharris /** 866230557Sjimharris * This field is used by the SCU TL to determine when to take a snapshot when 867230557Sjimharris * tranmitting read data frames. 868230557Sjimharris * - 0x00 The entire IO 869230557Sjimharris * - 0x01 32k 870230557Sjimharris * - 0x02 64k 871230557Sjimharris * - 0x04 128k 872230557Sjimharris * - 0x08 256k 873230557Sjimharris */ 874230557Sjimharris U32 ssp_tlr_threshold : 4; 875230557Sjimharris 876230557Sjimharris /** 877230557Sjimharris * This field is reserved and the driver must set it to 0x00 878230557Sjimharris */ 879230557Sjimharris U32 reserved_40_2 : 4; 880230557Sjimharris 881230557Sjimharris // OFFSET 0x44 882230557Sjimharris U32 write_data_length; // read only set to 0 883230557Sjimharris 884230557Sjimharris // OFFSET 0x48-0x58 885230557Sjimharris struct TRANSPORT_SNAPSHOT snapshot; // read only set to 0 886230557Sjimharris 887230557Sjimharris // OFFSET 0x5C 888230557Sjimharris U32 block_protection_enable : 1; 889230557Sjimharris U32 block_size : 2; 890230557Sjimharris U32 block_protection_function : 2; 891230557Sjimharris U32 reserved_5C_0 : 9; 892230557Sjimharris U32 active_sgl_element : 2; // read only set to 0 893230557Sjimharris U32 sgl_exhausted : 1; // read only set to 0 894230557Sjimharris U32 payload_data_transfer_error : 4; // read only set to 0 895230557Sjimharris U32 frame_buffer_offset : 11; // read only set to 0 896230557Sjimharris 897230557Sjimharris // OFFSET 0x60-0x7C 898230557Sjimharris /** 899230557Sjimharris * This field is the first SGL element pair found in the TC data structure. 900230557Sjimharris */ 901230557Sjimharris SCU_SGL_ELEMENT_PAIR_T sgl_pair_ab; 902230557Sjimharris // OFFSET 0x80-0x9C 903230557Sjimharris /** 904230557Sjimharris * This field is the second SGL element pair found in the TC data structure. 905230557Sjimharris */ 906230557Sjimharris SCU_SGL_ELEMENT_PAIR_T sgl_pair_cd; 907230557Sjimharris 908230557Sjimharris // OFFSET 0xA0-BC 909230557Sjimharris SCU_SGL_ELEMENT_PAIR_T sgl_snapshot_ac; 910230557Sjimharris 911230557Sjimharris // OFFSET 0xC0 912230557Sjimharris U32 active_sgl_element_pair; // read only set to 0 913230557Sjimharris 914230557Sjimharris // OFFSET 0xC4-0xCC 915230557Sjimharris U32 reserved_C4_CC[3]; 916230557Sjimharris 917230557Sjimharris // OFFSET 0xD0 918230557Sjimharris U32 intermediate_crc_value : 16; 919230557Sjimharris U32 initial_crc_seed : 16; 920230557Sjimharris 921230557Sjimharris // OFFSET 0xD4 922230557Sjimharris U32 application_tag_for_verify : 16; 923230557Sjimharris U32 application_tag_for_generate : 16; 924230557Sjimharris 925230557Sjimharris // OFFSET 0xD8 926230557Sjimharris U32 reference_tag_seed_for_verify_function; 927230557Sjimharris 928230557Sjimharris // OFFSET 0xDC 929230557Sjimharris U32 reserved_DC; 930230557Sjimharris 931230557Sjimharris // OFFSET 0xE0 932230557Sjimharris U32 reserved_E0_0 : 16; 933230557Sjimharris U32 application_tag_mask_for_generate: 16; 934230557Sjimharris 935230557Sjimharris // OFFSET 0xE4 936230557Sjimharris U32 block_protection_control : 16; 937230557Sjimharris U32 application_tag_mask_for_verify : 16; 938230557Sjimharris 939230557Sjimharris // OFFSET 0xE8 940230557Sjimharris U32 block_protection_error : 8; 941230557Sjimharris U32 reserved_E8_0 :24; 942230557Sjimharris 943230557Sjimharris // OFFSET 0xEC 944230557Sjimharris U32 reference_tag_seed_for_verify; 945230557Sjimharris 946230557Sjimharris // OFFSET 0xF0 947230557Sjimharris U32 intermediate_crc_valid_snapshot : 16; 948230557Sjimharris U32 reserved_F0_0 : 16; 949230557Sjimharris 950230557Sjimharris // OFFSET 0xF4 951230557Sjimharris U32 reference_tag_seed_for_verify_function_snapshot; 952230557Sjimharris 953230557Sjimharris // OFFSET 0xF8 954230557Sjimharris U32 snapshot_of_reserved_dword_DC_of_tc; 955230557Sjimharris 956230557Sjimharris // OFFSET 0xFC 957230557Sjimharris U32 reference_tag_seed_for_generate_function_snapshot; 958230557Sjimharris 959230557Sjimharris} SCU_TASK_CONTEXT_T; 960230557Sjimharris 961230557Sjimharris#ifdef __cplusplus 962230557Sjimharris} 963230557Sjimharris#endif // __cplusplus 964230557Sjimharris 965230557Sjimharris#endif // _SCU_TASK_CONTEXT_H_ 966