Namespaces

Enumerations

enum class Flags
Name Value
fReserved 0x0
fDeviceInit 0x1
fPermanentWPEn 2
fPowerOnWPEn 3
fBackgroundOpsEn 4
fDeviceLifeSpanModeEn 5
fPurgeEnable 6
fRefreshEnable 7
fPhyResourceRemoval 0x8
fBusyRTC 9
fPermanentlyDisableFwUpdate 0xb
fWriteBoosterEn 0xe
fWBBufferFlushEn 0xf
fWBBufferFlushDuringHibernate 0x10
kFlagCount 0x11

UFS Specification Version 3.1, section 14.2 "Flags".

Defined at line 13 of file ../../src/devices/block/drivers/ufs/upiu/flags.h

enum DataDirection
Name Value
kNone 0
kHostToDevice 1
kDeviceToHost 2

UFSHCI Specification Version 3.0, section 6.1.1 "UTP Transfer Request Descriptor".

Defined at line 15 of file ../../src/devices/block/drivers/ufs/transfer_request_descriptor.h

enum class Attributes
Name Value
bBootLunEn 0x00
bCurrentPowerMode 0x02
bActiveIccLevel 0x03
bOutOfOrderDataEn 0x04
bBackgroundOpStatus 0x05
bPurgeStatus 0x06
bMaxDataInSize 0x07
bMaxDataOutSize 0x08
dDynCapNeeded 0x09
bRefClkFreq 0x0a
bConfigDescrLock 0x0b
bMaxNumOfRTT 0x0c
wExceptionEventControl 0x0d
wExceptionEventStatus 0x0e
dSecondsPassed 0x0f
wContextConf 0x10
bDeviceFFUStatus 0x14
bPSAState 0x15
dPSADataSize 0x16
bRefClkGatingWaitTime 0x17
bDeviceCaseRoughTemperaure 0x18
bDeviceTooHighTempBoundary 0x19
bDeviceTooLowTempBoundary 0x1a
bThrottlingStatus 0x1b
bWBBufferFlushStatus 0x1c
bAvailableWBBufferSize 0x1d
bWBBufferLifeTimeEst 0x1e
dCurrentWBBufferSize 0x1f
bRefreshStatus 0x2c
bRefreshFreq 0x2d
bRefreshUnit 0x2e
bRefreshMethod 0x2f
kAttributeCount 0x30

UFS Specification Version 3.1, section 14.3 "Attributes".

Defined at line 15 of file ../../src/devices/block/drivers/ufs/upiu/attributes.h

enum RegisterMap
Name Value Comments
kCAP 0x00

Host Capabilities

kVER 0x08

Host Capabilities

kHCDDID 0x10

Host Capabilities

kHCPMID 0x14

Host Capabilities

kAHIT 0x18

Host Capabilities

kIS 0x20

Operation and Runtime

kIE 0x24

Operation and Runtime

kHCS 0x30

Operation and Runtime

kHCE 0x34

Operation and Runtime

kUECPA 0x38

Operation and Runtime

kUECDL 0x3C

Operation and Runtime

kUECN 0x40

Operation and Runtime

kUECT 0x44

Operation and Runtime

kUECDME 0x48

Operation and Runtime

kUTRIACR 0x4C

Operation and Runtime

kUTRLBA 0x50

UTP Transfer Request

kUTRLBAU 0x54

UTP Transfer Request

kUTRLDBR 0x58

UTP Transfer Request

kUTRLCLR 0x5c

UTP Transfer Request

kUTRLRSR 0x60

UTP Transfer Request

kUTRLCNR 0x64

UTP Transfer Request

kUTMRLBA 0x70

UTP Task Management

kUTMRLBAU 0x74

UTP Task Management

kUTMRLDBR 0x78

UTP Task Management

kUTMRLCLR 0x7c

UTP Task Management

kUTMRLRSR 0x80

UTP Task Management

kUICCMD 0x90

UIC Command

kUICCMDARG1 0x94

UIC Command

kUICCMDARG2 0x98

UIC Command

kUICCMDARG3 0x9c

UIC Command

kCCAP 0x100

Crypto

kRegisterSize 0x104

Crypto

UFSHCI Specification Version 3.0, section 5.1 "Register Map".

Defined at line 15 of file ../../src/devices/block/drivers/ufs/registers.h

enum class DescriptorType
Name Value
kDevice 0x00
kConfiguration 0x01
kUnit 0x02
kInterconnect 0x04
kString 0x05
kGeometry 0x07
kPower 0x08
kDeviceHealth 0x09
kDescriptorCount 0x0a

UFS Specification Version 3.1, section 14.1 "UFS Descriptors".

All descriptors use big-endian byte ordering.

Defined at line 17 of file ../../src/devices/block/drivers/ufs/upiu/descriptors.h

enum OverallCommandStatus
Name Value
kSuccess 0x0
kInvalidCommandTableAttributes 0x01
kInvalidPrdtAttributes 0x02
kMismatchDataBufferSize 0x03
kMismatchResponseUpiuSize 0x04
kCommunicationFailureWithinUicLayers 0x05
kAborted 0x06
kHostControllerFatalError 0x07
kDeviceFatalError 0x08
kInvalidCryptoConfiguration 0x09
kGeneralCryptoError 0x0a
kInvalid 0xf

Defined at line 21 of file ../../src/devices/block/drivers/ufs/transfer_request_descriptor.h

enum class UfsPowerMode : uint8_t
Name Value
kIdle 0x00
kPreActive 0x10
kActive 0x11
kPreSleep 0x20
kSleep 0x21
kPrePowerDown 0x30
kPowerDown 0x33

UFS Specification Version 3.1, section 7.4.3 "Power Mode Control".

Defined at line 22 of file ../../src/devices/block/drivers/ufs/device_manager.h

enum class SlotState
Name Value
kFree 0
kReserved 1
kScheduled 2
kTimeout 3
kNeedErrorHandling 4

Defined at line 26 of file ../../src/devices/block/drivers/ufs/request_list.h

enum UpiuTransactionCodes : uint8_t
Name Value
kNopOut 0x00
kCommand 0x01
kDataOut 0x02
kTaskManagementRequest 0x04
kQueryRequest 0x16
kNopIn 0x20
kResponse 0x21
kDataIn 0x22
kTaskManagementResponse 0x24
kReadyToTransfer 0x31
kQueryResponse 0x36
kRejectUpiu 0x3f

UFS Specification Version 3.1, section 10.5 "UPIU Transactions".

Defined at line 32 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum class LinkState : uint8_t
Name Value Comments
kOff 0

Power down / Disable

kActive 1

Fast / Slow / Sleep state

kHibernate 2 --
kBroken 3 --

Defined at line 35 of file ../../src/devices/block/drivers/ufs/device_manager.h

enum class WriteBoosterBufferType : uint8_t
Name Value
kLuDedicatedBuffer 0x00
kSharedBuffer 0x01

UFS Specification Version 4.0, section 13.4.18 "WriteBooster".

Defined at line 43 of file ../../src/devices/block/drivers/ufs/device_manager.h

enum UpiuCommandSetType
Name Value
kScsi 0x00
kUfsSpecificCommandSet 0x01
kVendorSpecificSet 0x08

Defined at line 47 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum class UserSpaceConfigurationOption : uint8_t
Name Value
kUserSpaceReduction 0x00
kPreserveUserSpace 0x01

Defined at line 48 of file ../../src/devices/block/drivers/ufs/device_manager.h

enum class WellKnownLuns : uint8_t
Name Value
kReportLuns 0x81
kBoot 0xb0
kRpmb 0xc4
kUfsDevice 0xd0
kCount 4

Defined at line 50 of file ../../src/devices/block/drivers/ufs/ufs.h

enum BackgroundOpStatus
Name Value
kNotRequired 0x00
kRequiredNotCritical 0x01
kRequiredPerformanceImpact 0x02
kCritical 0x03

UFS Specification Version 3.1, section 14.3 "Attributes".

Defined at line 52 of file ../../src/devices/block/drivers/ufs/upiu/attributes.h

enum UpiuHeaderResponseCode
Name Value
kTargetSuccess 0x00
kTargetFailure 0x01

Defined at line 53 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum NotifyEvent
Name Value
kInit 0
kReset 1
kPreLinkStartup 2
kPostLinkStartup 3
kSetupTransferRequestList 4
kSetupTaskManagementRequestList 5
kDeviceInitDone 6
kPrePowerModeChange 7
kPostPowerModeChange 8

Defined at line 58 of file ../../src/devices/block/drivers/ufs/ufs.h

enum class UicCommandOpcode
Name Value Comments
kDmeGet 0x01

Configuration

kDmeSet 0x02

Configuration

kDmePeerGet 0x03

Configuration

kDmePeerSet 0x04

Configuration

kDmePowerOn 0x10

Control

kDmePowerOff 0x11

Control

kDmeEnable 0x12

Control

kDmeReset 0x14

Control

kDmeEndpointReset 0x15

Control

kDmeLinkStartUp 0x16

Control

kDmeHibernateEnter 0x17

Control

kDmeHibernateExit 0x18

Control

kDmeTestMode 0x1a

Control

Defined at line 58 of file ../../src/devices/block/drivers/ufs/uic/uic_commands.h

enum AttributeReferenceClock
Name Value
k19_2MHz 0x0
k26MHz 0x1
k38_4MHz 0x2
kObsolete 0x3

UFS Specification Version 3.1, section 6.4 "Reference Clock".

Defined at line 86 of file ../../src/devices/block/drivers/ufs/upiu/attributes.h

enum LUWriteProtect
Name Value
kNoWriteProtect 0x00
kPowerOnWriteProtect 0x01
kPermanentWriteProtect 0x02

Defined at line 235 of file ../../src/devices/block/drivers/ufs/upiu/descriptors.h

enum class TaskManagementFunction : uint8_t
Name Value
kAbortTask 0x01
kAbortTaskSet 0x02
kClearTaskSet 0x04
kLogicalUnitReset 0x08
kQueryTask 0x80
kQueryTaskSet 0x81

Defined at line 245 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum class TaskManagementServiceResponse : uint8_t
Name Value
kTaskManagementFunctionComplete 0x00
kTaskManagementFunctionNotSupported 0x04
kTaskManagementFunctionFailed 0x05
kTaskManagementFunctionSucceeded 0x08
kIncorrectLogicalUnitNumber 0x09

Defined at line 254 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum class QueryFunction
Name Value
kStandardReadRequest 0x01
kStandardWriteRequest 0x81

Defined at line 322 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum class QueryOpcode
Name Value
kNop 0
kReadDescriptor 1
kWriteDescriptor 2
kReadAttribute 3
kWriteAttribute 4
kReadFlag 5
kSetFlag 6
kClearFlag 7
kToggleFlag 8

Defined at line 327 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

enum class QueryResponseCode
Name Value
kSuccess 0x00
kParameterNotReadable 0xf6
kParameterNotWriteable 0xf7
kParameterAlreadyWritten 0xf8
kInvalidLength 0xf9
kInvalidValue 0xfa
kInvalidSelector 0xfb
kInvalidIndex 0xfc
kInvalidIdn 0xfd
kInvalidOpcode 0xfe
kGeneralFailure 0xff

Defined at line 364 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h

Records

Functions

  • size_t GetDescriptorSize (DescriptorType type)

    Defined at line 311 of file ../../src/devices/block/drivers/ufs/upiu/descriptors.h

  • const char * QueryOpcodeToString (QueryOpcode opcode)

    Defined at line 339 of file ../../src/devices/block/drivers/ufs/upiu/upiu_transactions.h