/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* ATAPI-7 Definitions (subset) that include Serial ATA
*/
#ifndef _ATAPI7V3_H
#define _ATAPI7V3_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Register - Host to Device FIS
*/
typedef struct {
/*
* Register - Device to Host FIS
*/
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
/*
* FIS Types
*/
/*
* IDC bits
*/
/*
* 28-Bit Command Mapping from ACS to FIS
*
* ACS Field FIS Field
* --------------------------------------
* Feature (7:0) -> Feature
* Count (7:0) -> Sector Count
* LBA (7:0) -> LBA Low
* LBA (15:8) -> LBA Mid
* LBA (23:16) -> LBA High
* LBA (27:24) -> Device (3:0)
* Device (15:12) -> Device (7:4)
* Command -> Command
*
* 48- Bit Command Mapping from ACS to FIS
*
* ACS Field FIS Field
* --------------------------------------
* Feature (7:0) -> Feature
* Feature (15:8) -> Feature (exp)
* Count (7:0) -> Sector Count
* Count (15:8) -> Sector Count (exp)
* LBA (7:0) -> LBA Low
* LBA (15:8) -> LBA Mid
* LBA (23:16) -> LBA High
* LBA (31:24) -> LBA Low (exp)
* LBA (39:32) -> LBA Mid (exp)
* LBA (47:40) -> LBA High (exp)
* Device (15:12) -> Device (7:4)
* Command -> Command
*
* FIS (FIS_REG_H2DEV) layout:
*
* 31.........24 23...........16 15....................8.7.............0
* FEATURE | COMMAND | C R R RESERVED | FIS TYPE 0x27
* DEVICE | LBA HIGH | LBA MID | LBA LOW
* FEATURE(exp) | LBA HIGH(exp) | LBA MID(exp) | LBA LOW(exp)
* CONTROL | RESERVED | Sector Count(exp) | Sector Count
* RESERVED | RESERVED | RESERVED | RESERVED
*
* FIS (FIS_REG_D2H) layout:
*
* 31.........24 23...........16 15....................8.7.............0
* ERROR | STATUS | R I R RESERVED | FIS TYPE 0x34
* DEVICE | LBA HIGH | LBA MID | LBA LOW
* RESERVED | LBA HIGH(exp) | LBA MID(exp) | LBA LOW(exp)
* RESERVED | RESERVED | Sector Count(exp) | Sector Count
* RESERVED | RESERVED | RESERVED | RESERVED
*/
/*
* Reasonable size to reserve for holding the most common FIS types.
*/
#ifdef __cplusplus
}
#endif
#endif /* _ATAPI7V3_H */