VSCSIVpdPages.h revision ec2c18baf60b8407529ba6453f3bf8c36574ee7c
/* $Id$ */
/** @file
* Virtual SCSI driver: Definitions for VPD pages.
*/
/*
* Copyright (C) 2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___VSCSIVpdPages_h
#define ___VSCSIVpdPages_h
/** VPD supported VPD pages page number. */
#define VSCSI_VPD_SUPPORTED_PAGES_NUMBER 0x00
/** VPD supported VPD pages size. */
#define VSCSI_VPD_SUPPORTED_PAGES_SIZE 4
/**
* Block limits VPD page data.
*/
#pragma pack(1)
typedef struct VSCSIVPDPAGESUPPORTEDPAGES
{
/** Device type. */
/** Qualifier. */
unsigned u3PeripheralQualifier : 3;
/** Page number. */
unsigned u8PageCode : 8;
/** Page size (Big endian) */
unsigned u16PageLength : 16;
/** Supported pages array - variable. */
#pragma pack()
typedef const VSCSIVPDPAGESUPPORTEDPAGES *PCVSCSIVPDPAGESUPPORTEDPAGES;
/** VPD block characteristics page number. */
#define VSCSI_VPD_BLOCK_CHARACTERISTICS_NUMBER 0xb1
/** VPD block characteristics size. */
#define VSCSI_VPD_BLOCK_CHARACTERISTICS_SIZE 64
/**
* Block limits VPD page data.
*/
#pragma pack(1)
typedef struct VSCSIVPDPAGEBLOCKCHARACTERISTICS
{
/** Device type. */
/** Qualifier. */
unsigned u3PeripheralQualifier : 3;
/** Page number. */
unsigned u8PageCode : 8;
/** Page size (Big endian) */
unsigned u16PageLength : 16;
/** Medium rotation rate. */
unsigned u16MediumRotationRate : 16;
/** Reserved. */
unsigned u8Reserved : 8;
/** Nominal form factor. */
unsigned u4NominalFormFactor : 4;
/** Reserved */
unsigned u4Reserved : 4;
/** Reserved. */
#pragma pack()
typedef const VSCSIVPDPAGEBLOCKCHARACTERISTICS *PCVSCSIVPDPAGEBLOCKCHARACTERISTICS;
/** VPD block limits page number. */
#define VSCSI_VPD_BLOCK_LIMITS_NUMBER 0xb0
/** VPD block limits size. */
#define VSCSI_VPD_BLOCK_LIMITS_SIZE 64
/**
* Block limits VPD page data.
*/
#pragma pack(1)
typedef struct VSCSIVPDPAGEBLOCKLIMITS
{
/** Device type. */
/** Qualifier. */
unsigned u3PeripheralQualifier : 3;
/** Page number. */
unsigned u8PageCode : 8;
/** Page size (Big endian) */
unsigned u16PageLength : 16;
/** Reserved. */
/** Maximum compare and write length. */
/** Optimal transfer length granularity. */
/** Maximum transfer length. */
/** Optimal transfer length. */
/** Maximum PREFETCH, XDREAD and XDWRITE transfer length. */
/** Maximum UNMAP LBA count. */
/** Maximum UNMAP block descriptor count. */
/** Optimal UNMAP granularity. */
/** UNMAP granularity alignment. */
/** Reserved. */
#pragma pack()
typedef const VSCSIVPDPAGEBLOCKLIMITS *PCVSCSIVPDPAGEBLOCKLIMITS;
/** VPD block provisioning page number. */
#define VSCSI_VPD_BLOCK_PROV_NUMBER 0xb2
/** VPD block provisioning size. */
#define VSCSI_VPD_BLOCK_PROV_SIZE 8
/**
* Block provisioning VPD page data.
*/
#pragma pack(1)
typedef struct VSCSIVPDPAGEBLOCKPROV
{
/** Device type. */
/** Qualifier. */
unsigned u3PeripheralQualifier : 3;
/** Page number. */
unsigned u8PageCode : 8;
/** Page size (Big endian) */
unsigned u16PageLength : 16;
/** Threshold exponent. */
unsigned u8ThresholdExponent : 8;
/** Descriptor present. */
bool fDP : 1;
/** Anchored LBAs supported. */
bool fAncSup : 1;
/** Reserved. */
unsigned u4Reserved : 4;
/** WRITE SAME command supported. */
bool fLBPWS : 1;
/** UNMAP command supported. */
bool fLBPU : 1;
/** Provisioning type. */
unsigned u3ProvType : 3;
/** Reserved. */
unsigned u5Reserved : 5;
/** Reserved. */
unsigned u8Reserved : 8;
#pragma pack()
typedef VSCSIVPDPAGEBLOCKPROV *PVSCSIVPDPAGEBLOCKPROV;
typedef const VSCSIVPDPAGEBLOCKPROV *PCVSCSIVPDPAGEBLOCKPROVS;
#endif /* ___VSCSIVpdPages_h */