├── .gdbinit ├── .gitignore ├── Cmds ├── .gitignore ├── Makefile ├── adminCmd.cpp ├── adminCmd.h ├── asyncEventReq.cpp ├── asyncEventReq.h ├── asyncEventReqDefs.h ├── baseFeatures.cpp ├── baseFeatures.h ├── baseSecurity.cpp ├── baseSecurity.h ├── baseSecurityDefs.h ├── cmd.cpp ├── cmd.h ├── createIOCQ.cpp ├── createIOCQ.h ├── createIOSQ.cpp ├── createIOSQ.h ├── datasetMgmt.cpp ├── datasetMgmt.h ├── deleteIOCQ.cpp ├── deleteIOCQ.h ├── deleteIOSQ.cpp ├── deleteIOSQ.h ├── featureDefs.h ├── flush.cpp ├── flush.h ├── formatNVM.cpp ├── formatNVM.h ├── fwActivate.cpp ├── fwActivate.h ├── fwImgDnld.cpp ├── fwImgDnld.h ├── getFeatures.cpp ├── getFeatures.h ├── getLogPage.cpp ├── getLogPage.h ├── getLogPageDefs.h ├── identify.cpp ├── identify.h ├── identifyDefs.h ├── metaData.cpp ├── metaData.h ├── namespaceAttach.cpp ├── namespaceAttach.h ├── namespaceManagement.cpp ├── namespaceManagement.h ├── namespaceManagementDefs.h ├── nvmCmd.cpp ├── nvmCmd.h ├── prpData.cpp ├── prpData.h ├── read.cpp ├── read.h ├── reservationAcquire.cpp ├── reservationAcquire.h ├── reservationRegister.cpp ├── reservationRegister.h ├── reservationRelease.cpp ├── reservationRelease.h ├── reservationReport.cpp ├── reservationReport.h ├── securityRcv.cpp ├── securityRcv.h ├── securitySend.cpp ├── securitySend.h ├── setFeatures.cpp ├── setFeatures.h ├── write.cpp └── write.h ├── Doc ├── .gitignore ├── compSuitePreso.pdf ├── readme.compile ├── readme.files.odt ├── readme.relnotes ├── readme.startHere ├── readme.startHere.odt ├── readme.supplemental.docx ├── testDependencyPreso.pdf └── testPlan.ods ├── Exception ├── .gitignore ├── Makefile ├── frmwkEx.cpp └── frmwkEx.h ├── GrpAdminAsyncCmd ├── .gitignore ├── Makefile ├── abortByReset_r10b.cpp ├── abortByReset_r10b.h ├── grpAdminAsyncCmd.cpp ├── grpAdminAsyncCmd.h ├── grpDefs.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp ├── unsupportRsvdFields_r12.h ├── verifyEventQueueing_r10b.cpp ├── verifyEventQueueing_r10b.h ├── verifyMasking_r10b.cpp ├── verifyMasking_r10b.h ├── verifyMaxEvents_r10b.cpp └── verifyMaxEvents_r10b.h ├── GrpAdminCreateIOCQCmd ├── .gitignore ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpAdminCreateIOCQCmd.cpp ├── grpAdminCreateIOCQCmd.h ├── grpDefs.h ├── invalidQID_r10b.cpp ├── invalidQID_r10b.h ├── maxQSizeExceed_r10b.cpp ├── maxQSizeExceed_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminCreateIOQCmd ├── .gitignore ├── Makefile ├── grpAdminCreateIOQCmd.cpp ├── grpAdminCreateIOQCmd.h ├── grpDefs.h ├── prpGreaterPageContig_r10b.cpp ├── prpGreaterPageContig_r10b.h ├── prpGreaterPageDiscontig_r10b.cpp ├── prpGreaterPageDiscontig_r10b.h ├── prpLessPageContig_r10b.cpp ├── prpLessPageContig_r10b.h ├── prpLessPageDiscontig_r10b.cpp ├── prpLessPageDiscontig_r10b.h ├── prpSinglePageContig_r10b.cpp ├── prpSinglePageContig_r10b.h ├── prpSinglePageDiscontig_r10b.cpp └── prpSinglePageDiscontig_r10b.h ├── GrpAdminCreateIOSQCmd ├── .gitignore ├── Makefile ├── acceptQPriority_r10b.cpp ├── acceptQPriority_r10b.h ├── completionQInvalid_r10b.cpp ├── completionQInvalid_r10b.h ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpAdminCreateIOSQCmd.cpp ├── grpAdminCreateIOSQCmd.h ├── grpDefs.h ├── invalidQID_r10b.cpp ├── invalidQID_r10b.h ├── maxQSizeExceed_r10b.cpp ├── maxQSizeExceed_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminDeleteIOCQCmd ├── .gitignore ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── deleteAllAtOnce_r10b.cpp ├── deleteAllAtOnce_r10b.h ├── deleteFullQ_r10b.cpp ├── deleteFullQ_r10b.h ├── grpAdminDeleteIOCQCmd.cpp ├── grpAdminDeleteIOCQCmd.h ├── grpDefs.h ├── invalidQID_r10b.cpp ├── invalidQID_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminDeleteIOSQCmd ├── .gitignore ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpAdminDeleteIOSQCmd.cpp ├── grpAdminDeleteIOSQCmd.h ├── grpDefs.h ├── invalidQID_r10b.cpp ├── invalidQID_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminGetFeatCmd ├── .gitignore ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpAdminGetFeatCmd.cpp ├── grpAdminGetFeatCmd.h ├── grpDefs.h ├── invalidFieldInCmd_r10b.cpp ├── invalidFieldInCmd_r10b.h ├── invalidFieldInCmd_r11.cpp ├── invalidFieldInCmd_r11.h ├── invalidFieldInCmd_r12.cpp ├── invalidFieldInCmd_r12.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminGetLogPgCmd ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpAdminGetLogPgCmd.cpp ├── grpAdminGetLogPgCmd.h ├── grpDefs.h ├── invalidLogPageNVMSet_r10b.cpp ├── invalidLogPageNVMSet_r10b.h ├── invalidLogPageNVMSet_r11b.cpp ├── invalidLogPageNVMSet_r11b.h ├── invalidNamspc_r10b.cpp ├── invalidNamspc_r10b.h ├── invalidNamspc_r11a.cpp ├── invalidNamspc_r11a.h ├── mandatoryErrInfo_r10b.cpp ├── mandatoryErrInfo_r10b.h ├── mandatoryFW_r10b.cpp ├── mandatoryFW_r10b.h ├── mandatorySMART_r10b.cpp ├── mandatorySMART_r10b.h ├── numDIsAdhered_r10b.cpp ├── numDIsAdhered_r10b.h ├── prp1PRP2_r10b.cpp ├── prp1PRP2_r10b.h ├── prp1_r10b.cpp ├── prp1_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminIdentifyCmd ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpAdminIdentifyCmd.cpp ├── grpAdminIdentifyCmd.h ├── grpDefs.h ├── invalidNamspc_r10b.cpp ├── invalidNamspc_r10b.h ├── prp1PRP2_r10b.cpp ├── prp1PRP2_r10b.h ├── prp1_r10b.cpp ├── prp1_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpAdminNamespaceManagement ├── Makefile ├── createAndAttachMaxNamespacesAndVerify.cpp ├── createAndAttachMaxNamespacesAndVerify.h ├── createResources_r12.cpp ├── createResources_r12.h ├── deleteAllNamespacesAndVerify.cpp ├── deleteAllNamespacesAndVerify.h ├── grpAdminNamespaceManagement.cpp ├── grpAdminNamespaceManagement.h ├── grpDefs.h ├── namespaceManagementUtilities.cpp ├── namespaceManagementUtilities.h ├── unsupportRsvdFields_r10b.cpp └── unsupportRsvdFields_r10b.h ├── GrpAdminSetFeatCmd ├── .gitignore ├── Makefile ├── grpAdminSetFeatCmd.cpp ├── grpAdminSetFeatCmd.h ├── grpDefs.h ├── invalidFieldInCmd_r10b.cpp ├── invalidFieldInCmd_r10b.h ├── invalidFieldInCmd_r12.cpp └── invalidFieldInCmd_r12.h ├── GrpAdminSetGetFeatCombo ├── .gitignore ├── Makefile ├── fidArbitration_r10b.cpp ├── fidArbitration_r10b.h ├── fidAsyncEventCfg_r10b.cpp ├── fidAsyncEventCfg_r10b.h ├── fidErrRecovery_r10b.cpp ├── fidErrRecovery_r10b.h ├── fidErrRecovery_r12.cpp ├── fidErrRecovery_r12.h ├── fidIRQCoalescing_r10b.cpp ├── fidIRQCoalescing_r10b.h ├── fidIRQVec_r10b.cpp ├── fidIRQVec_r10b.h ├── fidIRQVec_r11.cpp ├── fidIRQVec_r11.h ├── fidPwrMgmt_r10b.cpp ├── fidPwrMgmt_r10b.h ├── fidTempThres_r10b.cpp ├── fidTempThres_r10b.h ├── fidVolatileCash_r10b.cpp ├── fidVolatileCash_r10b.h ├── fidWriteAtomicity_r10b.cpp ├── fidWriteAtomicity_r10b.h ├── grpAdminSetGetFeatCombo.cpp ├── grpAdminSetGetFeatCombo.h └── grpDefs.h ├── GrpBasicInit ├── .gitignore ├── Makefile ├── createACQASQ_r10b.cpp ├── createACQASQ_r10b.h ├── createIOQContigIrq_r10b.cpp ├── createIOQContigIrq_r10b.h ├── createIOQContigPoll_r10b.cpp ├── createIOQContigPoll_r10b.h ├── createIOQDiscontigIrq_r10b.cpp ├── createIOQDiscontigIrq_r10b.h ├── createIOQDiscontigPoll_r10b.cpp ├── createIOQDiscontigPoll_r10b.h ├── deleteIOQContig_r10b.cpp ├── deleteIOQContig_r10b.h ├── deleteIOQDiscontig_r10b.cpp ├── deleteIOQDiscontig_r10b.h ├── grpBasicInit.cpp ├── grpBasicInit.h ├── grpDefs.h ├── verifyDataPat_r10b.cpp ├── verifyDataPat_r10b.h ├── writeDataPat_r10b.cpp └── writeDataPat_r10b.h ├── GrpCtrlRegisters ├── .gitignore ├── Makefile ├── allCtrlRegs_r10b.cpp ├── allCtrlRegs_r10b.h ├── allCtrlRegs_r11.cpp ├── allCtrlRegs_r11.h ├── allCtrlRegs_r12.cpp ├── allCtrlRegs_r12.h ├── ctrlrResetDefaults_r10b.cpp ├── ctrlrResetDefaults_r10b.h ├── grpCtrlRegisters.cpp └── grpCtrlRegisters.h ├── GrpGeneralCmds ├── Makefile ├── cidAcceptedASQ_r10b.cpp ├── cidAcceptedASQ_r10b.h ├── cidAcceptedIOSQ_r10b.cpp ├── cidAcceptedIOSQ_r10b.h ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpDefs.h ├── grpGeneralCmds.cpp ├── grpGeneralCmds.h ├── illegalAdminCmds_r10b.cpp ├── illegalAdminCmds_r10b.h ├── illegalAdminCmds_r12.cpp ├── illegalAdminCmds_r12.h ├── illegalNVMCmds_r10b.cpp ├── illegalNVMCmds_r10b.h ├── illegalNVMCmds_r11.cpp └── illegalNVMCmds_r11.h ├── GrpInterrupts ├── .gitignore ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpDefs.h ├── grpInterrupts.cpp ├── grpInterrupts.h ├── invalidMSIXIRQ_r10b.cpp ├── invalidMSIXIRQ_r10b.h ├── maxIOQMSIX1To1_r10b.cpp ├── maxIOQMSIX1To1_r10b.h ├── maxIOQMSIXManyTo1_r10b.cpp ├── maxIOQMSIXManyTo1_r10b.h ├── partialReapMSIX_r10b.cpp └── partialReapMSIX_r10b.h ├── GrpNVMCompareCmd ├── .gitignore ├── Makefile ├── grpDefs.h ├── grpNVMCompareCmd.cpp └── grpNVMCompareCmd.h ├── GrpNVMDatasetMgmtCmd ├── Makefile ├── attributes_r10b.cpp ├── attributes_r10b.h ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpDefs.h ├── grpNVMDatasetMgmtCmd.cpp ├── grpNVMDatasetMgmtCmd.h ├── invalidNamspc_r10b.cpp ├── invalidNamspc_r10b.h ├── prp1PRP2NR_r10b.cpp ├── prp1PRP2NR_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp ├── unsupportRsvdFields_r12.h ├── verifyNUSE_r10b.cpp └── verifyNUSE_r10b.h ├── GrpNVMFlushCmd ├── .gitignore ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── functionalityBare_r10b.cpp ├── functionalityBare_r10b.h ├── functionalityMeta_r10b.cpp ├── functionalityMeta_r10b.h ├── grpDefs.h ├── grpNVMFlushCmd.cpp ├── grpNVMFlushCmd.h ├── invalidNamspc_r10b.cpp ├── invalidNamspc_r10b.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpNVMReadCmd ├── .gitignore ├── FUA_r10b.cpp ├── FUA_r10b.h ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpDefs.h ├── grpNVMReadCmd.cpp ├── grpNVMReadCmd.h ├── ignoreMetaPtrBare_r10b.cpp ├── ignoreMetaPtrBare_r10b.h ├── ignoreMetaPtrBare_r12.cpp ├── ignoreMetaPtrBare_r12.h ├── ignoreMetaPtrMeta_r10b.cpp ├── ignoreMetaPtrMeta_r10b.h ├── ignoreMetaPtrMeta_r12.cpp ├── ignoreMetaPtrMeta_r12.h ├── invalidNamspc_r10b.cpp ├── invalidNamspc_r10b.h ├── lbaOutOfRangeBare_r10b.cpp ├── lbaOutOfRangeBare_r10b.h ├── lbaOutOfRangeBare_r12.cpp ├── lbaOutOfRangeBare_r12.h ├── lbaOutOfRangeMeta_r10b.cpp ├── lbaOutOfRangeMeta_r10b.h ├── lbaOutOfRangeMeta_r12.cpp ├── lbaOutOfRangeMeta_r12.h ├── limitedRetry_r10b.cpp ├── limitedRetry_r10b.h ├── protInfoIgnoreBare_r10b.cpp ├── protInfoIgnoreBare_r10b.h ├── protInfoIgnoreBare_r12.cpp ├── protInfoIgnoreBare_r12.h ├── protInfoIgnoreMeta_r10b.cpp ├── protInfoIgnoreMeta_r10b.h ├── protInfoIgnoreMeta_r12.cpp ├── protInfoIgnoreMeta_r12.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpNVMWriteCmd ├── .gitignore ├── FUA_r10b.cpp ├── FUA_r10b.h ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpDefs.h ├── grpNVMWriteCmd.cpp ├── grpNVMWriteCmd.h ├── ignoreMetaPtrBare_r10b.cpp ├── ignoreMetaPtrBare_r10b.h ├── ignoreMetaPtrBare_r12.cpp ├── ignoreMetaPtrBare_r12.h ├── ignoreMetaPtrMeta_r10b.cpp ├── ignoreMetaPtrMeta_r10b.h ├── ignoreMetaPtrMeta_r12.cpp ├── ignoreMetaPtrMeta_r12.h ├── invalidNamspc_r10b.cpp ├── invalidNamspc_r10b.h ├── lbaOutOfRangeBare_r10b.cpp ├── lbaOutOfRangeBare_r10b.h ├── lbaOutOfRangeBare_r12.cpp ├── lbaOutOfRangeBare_r12.h ├── lbaOutOfRangeMeta_r10b.cpp ├── lbaOutOfRangeMeta_r10b.h ├── lbaOutOfRangeMeta_r12.cpp ├── lbaOutOfRangeMeta_r12.h ├── limitedRetry_r10b.cpp ├── limitedRetry_r10b.h ├── protInfoIgnoreBare_r10b.cpp ├── protInfoIgnoreBare_r10b.h ├── protInfoIgnoreBare_r12.cpp ├── protInfoIgnoreBare_r12.h ├── protInfoIgnoreMeta_r10b.cpp ├── protInfoIgnoreMeta_r10b.h ├── protInfoIgnoreMeta_r12.cpp ├── protInfoIgnoreMeta_r12.h ├── unsupportRsvdFields_r10b.cpp ├── unsupportRsvdFields_r10b.h ├── unsupportRsvdFields_r11b.cpp ├── unsupportRsvdFields_r11b.h ├── unsupportRsvdFields_r12.cpp └── unsupportRsvdFields_r12.h ├── GrpNVMWriteReadCombo ├── Makefile ├── createResources_r10b.cpp ├── createResources_r10b.h ├── datasetMgmt_r10b.cpp ├── datasetMgmt_r10b.h ├── grpDefs.h ├── grpNVMWriteReadCombo.cpp ├── grpNVMWriteReadCombo.h ├── nlbaBare_r10b.cpp ├── nlbaBare_r10b.h ├── nlbaMeta_r10b.cpp ├── nlbaMeta_r10b.h ├── prp2Rsvd_r10b.cpp ├── prp2Rsvd_r10b.h ├── prpOffsetDualPgMultiBlk_r10b.cpp ├── prpOffsetDualPgMultiBlk_r10b.h ├── prpOffsetMultiPgMultiBlk_r10b.cpp ├── prpOffsetMultiPgMultiBlk_r10b.h ├── prpOffsetSinglePgMultiBlk_r10b.cpp ├── prpOffsetSinglePgMultiBlk_r10b.h ├── prpOffsetSinglePgSingleBlk_r10b.cpp ├── prpOffsetSinglePgSingleBlk_r10b.h ├── startingLBABare_r10b.cpp ├── startingLBABare_r10b.h ├── startingLBAMeta_r10b.cpp └── startingLBAMeta_r10b.h ├── GrpNVMWriteUncorrectCmd ├── .gitignore ├── Makefile ├── grpDefs.h ├── grpNVMWriteUncorrectCmd.cpp └── grpNVMWriteUncorrectCmd.h ├── GrpPciRegisters ├── .gitignore ├── Makefile ├── allPciRegs_r10b.cpp ├── allPciRegs_r10b.h ├── grpPciRegisters.cpp └── grpPciRegisters.h ├── GrpQueues ├── .gitignore ├── Makefile ├── adminQFull_r10b.cpp ├── adminQFull_r10b.h ├── adminQRollChkDiff_r10b.cpp ├── adminQRollChkDiff_r10b.h ├── adminQRollChkSame_r10b.cpp ├── adminQRollChkSame_r10b.h ├── createResources_r10b.cpp ├── createResources_r10b.h ├── grpDefs.h ├── grpQueues.cpp ├── grpQueues.h ├── illegalCreateOrder_r10b.cpp ├── illegalCreateOrder_r10b.h ├── illegalCreateQs_r10b.cpp ├── illegalCreateQs_r10b.h ├── illegalDeleteQs_r10b.cpp ├── illegalDeleteQs_r10b.h ├── initialStateAdmin_r10b.cpp ├── initialStateAdmin_r10b.h ├── ioqFull_r10b.cpp ├── ioqFull_r10b.h ├── ioqRollChkDiff_r10b.cpp ├── ioqRollChkDiff_r10b.h ├── ioqRollChkSame_r10b.cpp ├── ioqRollChkSame_r10b.h ├── manyCmdSubmit_r10b.cpp ├── manyCmdSubmit_r10b.h ├── manySQtoCQAssoc_r10b.cpp ├── manySQtoCQAssoc_r10b.h ├── maxIOQ_r10b.cpp ├── maxIOQ_r10b.h ├── qIdVariations_r10b.cpp ├── qIdVariations_r10b.h ├── sqcqSizeMismatch_r10b.cpp └── sqcqSizeMismatch_r10b.h ├── GrpReservationsHostA ├── Makefile ├── acquireReservation.cpp ├── acquireReservation.h ├── createResources_r11.cpp ├── createResources_r11.h ├── grpDefs.h ├── grpReservationsHostA.cpp ├── grpReservationsHostA.h ├── registerReservation.cpp ├── registerReservation.h ├── releaseReservation.cpp ├── releaseReservation.h ├── replaceReservation.cpp ├── replaceReservation.h ├── unsupportRsvdFields_r10b.cpp └── unsupportRsvdFields_r10b.h ├── GrpReservationsHostB ├── Makefile ├── acquireReservation.cpp ├── acquireReservation.h ├── createResources_r11.cpp ├── createResources_r11.h ├── grpDefs.h ├── grpReservationsHostB.cpp ├── grpReservationsHostB.h ├── readWriteToUnacquiredReservation.cpp ├── readWriteToUnacquiredReservation.h ├── registerReservation.cpp ├── registerReservation.h ├── replaceReservation.cpp ├── replaceReservation.h ├── unsupportRsvdFields_r10b.cpp └── unsupportRsvdFields_r10b.h ├── GrpResets ├── .gitignore ├── Makefile ├── ctrlrResetIOQDeleted_r10b.cpp ├── ctrlrResetIOQDeleted_r10b.h ├── ctrlrResetNotEffectAdminQ_r10b.cpp ├── ctrlrResetNotEffectAdminQ_r10b.h ├── grpDefs.h ├── grpResets.cpp └── grpResets.h ├── GrpTemplate ├── .gitignore ├── Makefile ├── grpDefs.h ├── grpTemplate.cpp ├── grpTemplate.h ├── testCase_r10b.cpp └── testCase_r10b.h ├── LICENSE.txt ├── Makefile ├── Queues ├── .gitignore ├── Makefile ├── acq.cpp ├── acq.h ├── asq.cpp ├── asq.h ├── backdoor.cpp ├── backdoor.h ├── ce.cpp ├── ce.h ├── ceDefs.h ├── cq.cpp ├── cq.h ├── iocq.cpp ├── iocq.h ├── iosq.cpp ├── iosq.h ├── queue.cpp ├── queue.h ├── se.h ├── sq.cpp └── sq.h ├── README ├── Singletons ├── .gitignore ├── Makefile ├── ctrlrCap.cpp ├── ctrlrCap.h ├── ctrlrConfig.cpp ├── ctrlrConfig.h ├── informative.cpp ├── informative.h ├── memBuffer.cpp ├── memBuffer.h ├── metaRsrc.cpp ├── metaRsrc.h ├── objRsrc.cpp ├── objRsrc.h ├── readme ├── regDefs.h ├── registers.cpp ├── registers.h ├── rsrcMngr.cpp └── rsrcMngr.h ├── Utils ├── .gitignore ├── Makefile ├── buffers.cpp ├── buffers.h ├── fileSystem.cpp ├── fileSystem.h ├── io.cpp ├── io.h ├── irq.cpp ├── irq.h ├── kernelAPI.cpp ├── kernelAPI.h ├── queues.cpp └── queues.h ├── build.sh ├── classHierarchy.sh ├── configure ├── dbgMemLeak.sh ├── dnvme.h ├── doxygen.conf ├── dutDefs.h ├── format.xml ├── globals.cpp ├── globals.h ├── group.cpp ├── group.h ├── identify.gold.xml ├── observer.h ├── skiptest.cfg ├── subject.h ├── test.cpp ├── test.h ├── testDescribe.cpp ├── testDescribe.h ├── testRef.cpp ├── testRef.h ├── testResults.cpp ├── testResults.h ├── tnvme.cpp ├── tnvme.h ├── tnvme.spec ├── tnvmeHelpers.cpp ├── tnvmeHelpers.h ├── tnvmeParsers.cpp ├── tnvmeParsers.h ├── trackable.cpp ├── trackable.h └── version.h /.gdbinit: -------------------------------------------------------------------------------- 1 | directory GrpInformative 2 | directory GrpCtrlRegisters 3 | b ExecuteTests 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | src/ 2 | rpm/ 3 | Debug/ 4 | rpmbuild/ 5 | Logs/ 6 | tnvme-*/ 7 | 8 | tnvme 9 | .cproject 10 | .project 11 | .settings 12 | *.sublime-project 13 | *.sublime-workspace 14 | *.a 15 | *.o 16 | doxygen.log 17 | dump.reg.pci 18 | dump.reg.ctrl 19 | tnvme-*.tar.gz 20 | -------------------------------------------------------------------------------- /Cmds/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /Cmds/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | cmd.cpp \ 21 | prpData.cpp \ 22 | metaData.cpp \ 23 | adminCmd.cpp \ 24 | nvmCmd.cpp \ 25 | createIOCQ.cpp \ 26 | deleteIOCQ.cpp \ 27 | createIOSQ.cpp \ 28 | deleteIOSQ.cpp \ 29 | identify.cpp \ 30 | baseFeatures.cpp \ 31 | getFeatures.cpp \ 32 | setFeatures.cpp \ 33 | write.cpp \ 34 | read.cpp \ 35 | flush.cpp \ 36 | getLogPage.cpp \ 37 | formatNVM.cpp \ 38 | fwActivate.cpp \ 39 | fwImgDnld.cpp \ 40 | datasetMgmt.cpp \ 41 | baseSecurity.cpp \ 42 | securitySend.cpp \ 43 | securityRcv.cpp \ 44 | asyncEventReq.cpp \ 45 | namespaceAttach.cpp \ 46 | namespaceManagement.cpp \ 47 | reservationAcquire.cpp \ 48 | reservationRegister.cpp \ 49 | reservationRelease.cpp \ 50 | reservationReport.cpp 51 | 52 | .SUFFIXES: .cpp 53 | 54 | OBJ = $(SRC:.cpp=.o) 55 | OUT = libCmds.a 56 | 57 | all: $(OUT) 58 | 59 | .cpp.o: 60 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS)-c $< -o $@ $(LDFLAGS) 61 | 62 | $(OUT): $(OBJ) 63 | ar rcs $(OUT) $(OBJ) 64 | 65 | clean: 66 | rm -f $(OBJ) $(OUT) Makefile.bak 67 | 68 | clobber: clean 69 | rm -f $(OUT) 70 | -------------------------------------------------------------------------------- /Cmds/adminCmd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "adminCmd.h" 18 | 19 | 20 | SharedAdminCmdPtr AdminCmd::NullAdminCmdPtr; 21 | 22 | 23 | AdminCmd::AdminCmd() : Cmd(Trackable::OBJ_ADMINCMD) 24 | { 25 | } 26 | 27 | 28 | AdminCmd::AdminCmd(Trackable::ObjType objBeingCreated) : Cmd(objBeingCreated) 29 | { 30 | } 31 | 32 | 33 | AdminCmd::~AdminCmd() 34 | { 35 | } 36 | 37 | 38 | void 39 | AdminCmd::Init(uint8_t opcode, uint16_t cmdSize) 40 | { 41 | Cmd::Init(opcode, DATADIR_NONE, cmdSize); 42 | } 43 | -------------------------------------------------------------------------------- /Cmds/asyncEventReq.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "asyncEventReqDefs.h" 18 | #include "asyncEventReq.h" 19 | 20 | 21 | SharedAsyncEventReqPtr AsyncEventReq::NullAsyncEventReqPtr; 22 | const uint8_t AsyncEventReq::Opcode = 0x0c; 23 | 24 | 25 | AsyncEventReq::AsyncEventReq() : Cmd(Trackable::OBJ_ASYNCEVENTREQ) 26 | { 27 | Init(Opcode, DATADIR_NONE, 64); 28 | } 29 | 30 | 31 | AsyncEventReq::~AsyncEventReq() 32 | { 33 | } 34 | -------------------------------------------------------------------------------- /Cmds/asyncEventReq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ASYNCEVENTREQ_H_ 18 | #define _ASYNCEVENTREQ_H_ 19 | 20 | #include "cmd.h" 21 | 22 | 23 | class AsyncEventReq; // forward definition 24 | typedef boost::shared_ptr SharedAsyncEventReqPtr; 25 | typedef boost::shared_ptr 26 | ConstSharedAsyncEventRequestPtr; 27 | #define CAST_TO_ASYNCEVENT(shared_trackable_ptr) \ 28 | boost::dynamic_pointer_cast(shared_trackable_ptr); 29 | 30 | 31 | /** 32 | * This class implements the AsyncEventReq admin cmd 33 | * 34 | * @note This class may throw exceptions. 35 | */ 36 | class AsyncEventReq : public Cmd 37 | { 38 | public: 39 | AsyncEventReq(); 40 | virtual ~AsyncEventReq(); 41 | 42 | /// Used to compare for NULL pointers being returned by allocations 43 | static SharedAsyncEventReqPtr NullAsyncEventReqPtr; 44 | static const uint8_t Opcode; 45 | 46 | }; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /Cmds/asyncEventReqDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ASYNCEVENTREQDEFS_H_ 18 | #define _ASYNCEVENTREQDEFS_H_ 19 | 20 | /// Bit definitions for CE.n.async.asyncEventType 21 | typedef enum { 22 | EVENT_TYPE_ERROR_STS = 0, 23 | EVENT_TYPE_SMART_STS = 1, 24 | EVENT_TYPE_VS_SPEC = 7 25 | } AsyncEventTypes; 26 | 27 | /// Bit definitions for CE.n.async.asyncEventInfo 28 | typedef enum { 29 | ERR_STS_INVALID_SQ = 0, 30 | ERR_STS_INVALID_DB_WR = 1, 31 | ERR_STS_DIAG_FAIL = 2, 32 | ERR_STS_PERSISTENT_INTERNAL_DEV_ERR = 3, 33 | ERR_STS_TRANSIENT_INTERNAL_DEV_ERR = 4, 34 | ERR_STS_FW_IMG_LOAD_ERR = 5, 35 | SMART_STS_RELIABILITY = 0, 36 | SMART_STS_TEMP_THRESH = 1, 37 | SMART_STS_SPARE_THRESH = 2 38 | } AsyncEventInfomation; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Cmds/baseFeatures.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "baseFeatures.h" 18 | #include "featureDefs.h" 19 | 20 | #define ZZ(a,b) b, 21 | const uint8_t FID[] = { 22 | FEATURE_TABLE 23 | FID_FENCE // always must be the last element 24 | }; 25 | const uint32_t FID_RES[] = { 26 | FEATURE_RESERVE_TABLE 27 | FID_FENCE 28 | }; 29 | #undef ZZ 30 | 31 | 32 | BaseFeatures::BaseFeatures() : Cmd(Trackable::OBJTYPE_FENCE) 33 | { 34 | // This constructor will throw 35 | } 36 | 37 | 38 | BaseFeatures::BaseFeatures(Trackable::ObjType objBeingCreated) : 39 | Cmd(objBeingCreated) 40 | { 41 | } 42 | 43 | 44 | BaseFeatures::~BaseFeatures() 45 | { 46 | } 47 | 48 | 49 | void 50 | BaseFeatures::SetFID(uint8_t fid) 51 | { 52 | LOG_NRM("Setting FID: 0x%02X", fid); 53 | SetByte(fid, 10, 0); 54 | } 55 | 56 | 57 | uint8_t 58 | BaseFeatures::GetFID() const 59 | { 60 | LOG_NRM("Getting FID"); 61 | return GetByte(10, 0); 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Cmds/baseFeatures.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _BASEFEATURES_H_ 18 | #define _BASEFEATURES_H_ 19 | 20 | #include "cmd.h" 21 | 22 | 23 | /** 24 | * This class implements the common operations of Get/Set BaseFeatures admin cmd 25 | * 26 | * @note This class may throw exceptions. 27 | */ 28 | class BaseFeatures : public Cmd 29 | { 30 | public: 31 | /** 32 | * @param objBeingCreated Pass the type of object this child class is 33 | */ 34 | BaseFeatures(Trackable::ObjType objBeingCreated); 35 | virtual ~BaseFeatures(); 36 | 37 | /** 38 | * Set which features ID to retrieve from the DUT. 39 | * @param fid Pass which ID to request 40 | */ 41 | void SetFID(uint8_t fid); 42 | uint8_t GetFID() const; 43 | 44 | 45 | private: 46 | BaseFeatures(); 47 | }; 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Cmds/createIOCQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CREATEIOCQ_H_ 18 | #define _CREATEIOCQ_H_ 19 | 20 | #include "cmd.h" 21 | #include "../Queues/iocq.h" 22 | 23 | 24 | class CreateIOCQ; // forward definition 25 | typedef boost::shared_ptr SharedCreateIOCQPtr; 26 | typedef boost::shared_ptr ConstSharedCreateIOCQPtr; 27 | #define CAST_TO_CREATEIOCQ(shared_trackable_ptr) \ 28 | boost::dynamic_pointer_cast(shared_trackable_ptr); 29 | 30 | 31 | /** 32 | * This class implements the Create IO Completion Queue admin cmd. After 33 | * instantiation the Init() methods must be called to attain something useful. 34 | * 35 | * @note This class may throw exceptions. 36 | */ 37 | class CreateIOCQ : public Cmd 38 | { 39 | public: 40 | CreateIOCQ(); 41 | virtual ~CreateIOCQ(); 42 | 43 | /// Used to compare for NULL pointers being returned by allocations 44 | static SharedCreateIOCQPtr NullCreateIOCQPtr; 45 | static const uint8_t Opcode; 46 | 47 | /** 48 | * Initialize this object and prepares it to send to the hdw. 49 | * @param iocq Pass the IOCQ object which will initialize this cmd. 50 | */ 51 | void Init(const SharedIOCQPtr iocq); 52 | void InitInvalidPrpOffset(const SharedIOCQPtr iocq); 53 | }; 54 | 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Cmds/createIOSQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CREATEIOSQ_H_ 18 | #define _CREATEIOSQ_H_ 19 | 20 | #include "cmd.h" 21 | #include "../Queues/iosq.h" 22 | 23 | 24 | class CreateIOSQ; // forward definition 25 | typedef boost::shared_ptr SharedCreateIOSQPtr; 26 | typedef boost::shared_ptr ConstSharedCreateIOSQPtr; 27 | #define CAST_TO_CREATEIOSQ(shared_trackable_ptr) \ 28 | boost::dynamic_pointer_cast(shared_trackable_ptr); 29 | 30 | 31 | /** 32 | * This class implements the Create IO Submission Queue admin cmd. After 33 | * instantiation the Init() methods must be called to attain something useful. 34 | * 35 | * @note This class may throw exceptions. 36 | */ 37 | class CreateIOSQ : public Cmd 38 | { 39 | public: 40 | CreateIOSQ(); 41 | virtual ~CreateIOSQ(); 42 | 43 | /// Used to compare for NULL pointers being returned by allocations 44 | static SharedCreateIOSQPtr NullCreateIOSQPtr; 45 | static const uint8_t Opcode; 46 | 47 | /** 48 | * Initialize this object and prepares it to send to the hdw. 49 | * @param iosq Pass the IOSQ object which will initialize this cmd. 50 | */ 51 | void Init(const SharedIOSQPtr iosq); 52 | }; 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Cmds/deleteIOCQ.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "deleteIOCQ.h" 18 | #include "../Utils/buffers.h" 19 | 20 | SharedDeleteIOCQPtr DeleteIOCQ::NullDeleteIOCQPtr; 21 | const uint8_t DeleteIOCQ::Opcode = 0x04; 22 | 23 | 24 | DeleteIOCQ::DeleteIOCQ() : Cmd(Trackable::OBJ_DELETEIOCQ) 25 | { 26 | Cmd::Init(Opcode, DATADIR_NONE, 64); 27 | } 28 | 29 | 30 | DeleteIOCQ::~DeleteIOCQ() 31 | { 32 | } 33 | 34 | 35 | void 36 | DeleteIOCQ::Init(const SharedIOCQPtr iocq) 37 | { 38 | { // Handle DWORD 10 39 | uint32_t dword10 = GetDword(10); 40 | 41 | // Handle Q ID 42 | dword10 &= ~0x0000ffff; 43 | dword10 |= (uint32_t)iocq->GetQId(); 44 | LOG_NRM("Init delete IOCQ cmd for CQ=%d", (uint32_t)iocq->GetQId()); 45 | 46 | SetDword(dword10, 10); 47 | } // Handle DWORD 10 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Cmds/deleteIOCQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DELETEIOCQ_H_ 18 | #define _DELETEIOCQ_H_ 19 | 20 | #include "cmd.h" 21 | #include "../Queues/iocq.h" 22 | 23 | 24 | class DeleteIOCQ; // forward definition 25 | typedef boost::shared_ptr SharedDeleteIOCQPtr; 26 | typedef boost::shared_ptr ConstSharedDeleteIOCQPtr; 27 | #define CAST_TO_DELETEIOCQ(shared_trackable_ptr) \ 28 | boost::dynamic_pointer_cast(shared_trackable_ptr); 29 | 30 | 31 | /** 32 | * This class implements the Delete IO Completion Queue admin cmd. After 33 | * instantiation the Init() methods must be called to attain something useful. 34 | * 35 | * @note This class may throw exceptions. 36 | */ 37 | class DeleteIOCQ : public Cmd 38 | { 39 | public: 40 | DeleteIOCQ(); 41 | virtual ~DeleteIOCQ(); 42 | 43 | /// Used to compare for NULL pointers being returned by allocations 44 | static SharedDeleteIOCQPtr NullDeleteIOCQPtr; 45 | static const uint8_t Opcode; 46 | 47 | /** 48 | * Initialize this object and prepares it to send to the hdw. 49 | * @param iocq Pass the IOCQ object which will initialize this cmd. 50 | */ 51 | void Init(const SharedIOCQPtr iocq); 52 | }; 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Cmds/deleteIOSQ.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "deleteIOSQ.h" 18 | #include "../Utils/buffers.h" 19 | 20 | SharedDeleteIOSQPtr DeleteIOSQ::NullDeleteIOSQPtr; 21 | const uint8_t DeleteIOSQ::Opcode = 0x00; 22 | 23 | 24 | DeleteIOSQ::DeleteIOSQ() : Cmd(Trackable::OBJ_DELETEIOSQ) 25 | { 26 | Cmd::Init(Opcode, DATADIR_NONE, 64); 27 | } 28 | 29 | 30 | DeleteIOSQ::~DeleteIOSQ() 31 | { 32 | } 33 | 34 | 35 | void 36 | DeleteIOSQ::Init(const SharedIOSQPtr iosq) 37 | { 38 | { // Handle DWORD 10 39 | uint32_t dword10 = GetDword(10); 40 | 41 | // Handle Q ID 42 | dword10 &= ~0x0000ffff; 43 | dword10 |= (uint32_t)iosq->GetQId(); 44 | LOG_NRM("Init delete IOSQ cmd for SQ=%d", (uint32_t)iosq->GetQId()); 45 | 46 | SetDword(dword10, 10); 47 | } // Handle DWORD 10 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Cmds/deleteIOSQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DELETEIOSQ_H_ 18 | #define _DELETEIOSQ_H_ 19 | 20 | #include "cmd.h" 21 | #include "../Queues/iosq.h" 22 | 23 | 24 | class DeleteIOSQ; // forward definition 25 | typedef boost::shared_ptr SharedDeleteIOSQPtr; 26 | typedef boost::shared_ptr ConstSharedDeleteIOSQPtr; 27 | #define CAST_TO_DELETEIOSQ(shared_trackable_ptr) \ 28 | boost::dynamic_pointer_cast(shared_trackable_ptr); 29 | 30 | 31 | /** 32 | * This class implements the Delete IO Submission Queue admin cmd. After 33 | * instantiation the Init() methods must be called to attain something useful. 34 | * 35 | * @note This class may throw exceptions. 36 | */ 37 | class DeleteIOSQ : public Cmd 38 | { 39 | public: 40 | DeleteIOSQ(); 41 | virtual ~DeleteIOSQ(); 42 | 43 | /// Used to compare for NULL pointers being returned by allocations 44 | static SharedDeleteIOSQPtr NullDeleteIOSQPtr; 45 | static const uint8_t Opcode; 46 | 47 | /** 48 | * Initialize this object and prepares it to send to the hdw. 49 | * @param iosq Pass the IOCQ object which will initialize this cmd. 50 | */ 51 | void Init(const SharedIOSQPtr iosq); 52 | }; 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Cmds/flush.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "flush.h" 18 | 19 | 20 | SharedFlushPtr Flush::NullFlushPtr; 21 | const uint8_t Flush::Opcode = 0x00; 22 | 23 | 24 | Flush::Flush() : Cmd(Trackable::OBJ_FLUSH) 25 | { 26 | Init(Opcode, DATADIR_NONE, 64); 27 | } 28 | 29 | 30 | Flush::~Flush() 31 | { 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Cmds/flush.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _FLUSH_H_ 18 | #define _FLUSH_H_ 19 | 20 | #include "cmd.h" 21 | 22 | 23 | class Flush; // forward definition 24 | typedef boost::shared_ptr SharedFlushPtr; 25 | typedef boost::shared_ptr ConstSharedFlushPtr; 26 | #define CAST_TO_FLUSH(shared_trackable_ptr) \ 27 | boost::dynamic_pointer_cast(shared_trackable_ptr); 28 | 29 | 30 | /** 31 | * This class implements the flush admin cmd 32 | * 33 | * @note This class may throw exceptions. 34 | */ 35 | class Flush : public Cmd 36 | { 37 | public: 38 | Flush(); 39 | virtual ~Flush(); 40 | 41 | /// Used to compare for NULL pointers being returned by allocations 42 | static SharedFlushPtr NullFlushPtr; 43 | static const uint8_t Opcode; 44 | }; 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Cmds/fwActivate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "fwActivate.h" 18 | 19 | SharedFWActivatePtr FWActivate::NullFWActivatePtr; 20 | const uint8_t FWActivate::Opcode = 0x10; 21 | 22 | 23 | FWActivate::FWActivate() : Cmd(Trackable::OBJ_FWACTIVATE) 24 | { 25 | Init(Opcode, DATADIR_NONE, 64); 26 | } 27 | 28 | 29 | FWActivate::~FWActivate() 30 | { 31 | } 32 | 33 | 34 | void 35 | FWActivate::SetAA(uint8_t aa) 36 | { 37 | LOG_NRM("Setting AA = 0x%01X", aa); 38 | 39 | if (aa > 0x03) 40 | throw FrmwkEx(HERE, "Value to large; must fit within 2 bits"); 41 | 42 | uint8_t work = GetByte(10, 0); 43 | work &= ~0x18; 44 | work |= (aa << 3); 45 | SetByte(work, 10, 0); 46 | } 47 | 48 | 49 | uint8_t 50 | FWActivate::GetAA() const 51 | { 52 | LOG_NRM("Getting AA"); 53 | return (uint8_t)((GetByte(10, 0) >> 3) & 0x03); 54 | } 55 | 56 | 57 | void 58 | FWActivate::SetFS(uint8_t fs) 59 | { 60 | LOG_NRM("Setting FS = 0x%01X", fs); 61 | 62 | if (fs > 0x07) 63 | throw FrmwkEx(HERE, "Value to large; must fit within 3 bits"); 64 | 65 | uint8_t work = GetByte(10, 0); 66 | work &= ~0x07; 67 | work |= fs; 68 | SetByte(work, 10, 0); 69 | } 70 | 71 | 72 | uint8_t 73 | FWActivate::GetFS() const 74 | { 75 | LOG_NRM("Getting FS"); 76 | return (uint8_t)(GetByte(10, 0) & 0x07); 77 | } 78 | 79 | 80 | -------------------------------------------------------------------------------- /Cmds/fwActivate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _FWACTIVATE_H_ 18 | #define _FWACTIVATE_H_ 19 | 20 | #include "cmd.h" 21 | 22 | 23 | class FWActivate; // forward definition 24 | typedef boost::shared_ptr SharedFWActivatePtr; 25 | typedef boost::shared_ptr ConstSharedFWActivatePtr; 26 | #define CAST_TO_FWACTIVATE(shared_trackable_ptr) \ 27 | boost::dynamic_pointer_cast(shared_trackable_ptr); 28 | 29 | 30 | /** 31 | * This class implements the FW Activate admin cmd 32 | * 33 | * @note This class may throw exceptions. 34 | */ 35 | class FWActivate : public Cmd 36 | { 37 | public: 38 | FWActivate(); 39 | virtual ~FWActivate(); 40 | 41 | /// Used to compare for NULL pointers being returned by allocations 42 | static SharedFWActivatePtr NullFWActivatePtr; 43 | static const uint8_t Opcode; 44 | 45 | /** 46 | * Set the Activate Action (AA) 47 | * @param aa Pass any value which can be set in 2 bits. 48 | */ 49 | void SetAA(uint8_t aa); 50 | uint8_t GetAA() const; 51 | 52 | 53 | /** 54 | * Set the Firmware Slot (FS) 55 | * @param fs Pass any value which can be set in 3 bits. 56 | */ 57 | void SetFS(uint8_t fs); 58 | uint8_t GetFS() const; 59 | }; 60 | 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Cmds/fwImgDnld.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "fwImgDnld.h" 18 | 19 | SharedFWImgDnldPtr FWImgDnld::NullFWImgDnldPtr; 20 | const uint8_t FWImgDnld::Opcode = 0x11; 21 | 22 | 23 | FWImgDnld::FWImgDnld() : Cmd(Trackable::OBJ_FWIMGDNLD) 24 | { 25 | Init(Opcode, DATADIR_TO_DEVICE, 64); 26 | 27 | // No cmd should ever be created which violates these masking possibilities 28 | send_64b_bitmask allowPrpMask = (send_64b_bitmask) 29 | (MASK_PRP1_PAGE | MASK_PRP2_PAGE | MASK_PRP2_LIST); 30 | SetPrpAllowed(allowPrpMask); 31 | } 32 | 33 | 34 | FWImgDnld::~FWImgDnld() 35 | { 36 | } 37 | 38 | 39 | void 40 | FWImgDnld::SetNUMD(uint32_t numd) 41 | { 42 | LOG_NRM("Setting NUMD = 0x%04X", numd); 43 | SetDword(numd, 10); 44 | } 45 | 46 | 47 | uint32_t 48 | FWImgDnld::GetNUMD() const 49 | { 50 | LOG_NRM("Getting NUMD"); 51 | return GetDword(10); 52 | } 53 | 54 | 55 | void 56 | FWImgDnld::SetOFST(uint32_t ofst) 57 | { 58 | LOG_NRM("Setting OFST = 0x%04X", ofst); 59 | SetDword(ofst, 11); 60 | } 61 | 62 | 63 | uint32_t 64 | FWImgDnld::GetOFST() const 65 | { 66 | LOG_NRM("Getting OFST"); 67 | return GetDword(11); 68 | } 69 | 70 | 71 | -------------------------------------------------------------------------------- /Cmds/fwImgDnld.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _FWIMGDNLD_H_ 18 | #define _FWIMGDNLD_H_ 19 | 20 | #include "cmd.h" 21 | 22 | 23 | class FWImgDnld; // forward definition 24 | typedef boost::shared_ptr SharedFWImgDnldPtr; 25 | typedef boost::shared_ptr ConstSharedFWImgDnldPtr; 26 | #define CAST_TO_FWIMGDNLD(shared_trackable_ptr) \ 27 | boost::dynamic_pointer_cast(shared_trackable_ptr); 28 | 29 | 30 | /** 31 | * This class implements the FW Activate admin cmd 32 | * 33 | * @note This class may throw exceptions. 34 | */ 35 | class FWImgDnld : public Cmd 36 | { 37 | public: 38 | FWImgDnld(); 39 | virtual ~FWImgDnld(); 40 | 41 | /// Used to compare for NULL pointers being returned by allocations 42 | static SharedFWImgDnldPtr NullFWImgDnldPtr; 43 | static const uint8_t Opcode; 44 | 45 | /** 46 | * Set the Number of Dwords (NUMD) 47 | * @param numd Pass the number of DW's = sizeof(img to download) 48 | */ 49 | void SetNUMD(uint32_t numd); 50 | uint32_t GetNUMD() const; 51 | 52 | 53 | /** 54 | * Set the Offset (OFST) 55 | * @param ofst Pass the offset address where to program this data segment 56 | */ 57 | void SetOFST(uint32_t ofst); 58 | uint32_t GetOFST() const; 59 | }; 60 | 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Cmds/getFeatures.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "getFeatures.h" 18 | #include "../Utils/buffers.h" 19 | 20 | #define BYTE_BITMASK_SEL 0x07 21 | 22 | SharedGetFeaturesPtr GetFeatures::NullGetFeaturesPtr; 23 | const uint8_t GetFeatures::Opcode = 0x0a; 24 | 25 | 26 | GetFeatures::GetFeatures() : BaseFeatures(Trackable::OBJ_GETFEATURES) 27 | { 28 | Init(Opcode, DATADIR_FROM_DEVICE, 64); 29 | 30 | // No cmd should ever be created which violates these masking possibilities 31 | send_64b_bitmask allowPrpMask = (send_64b_bitmask) 32 | (MASK_PRP1_PAGE | MASK_PRP2_PAGE); 33 | SetPrpAllowed(allowPrpMask); 34 | } 35 | 36 | 37 | GetFeatures::~GetFeatures() 38 | { 39 | } 40 | 41 | 42 | 43 | void 44 | GetFeatures::SetIntVecConfigIV(uint16_t iv) 45 | { 46 | LOG_NRM("Setting interrupt vector (IV): 0x%04X", iv); 47 | SetWord(iv, 11, 0); 48 | } 49 | 50 | 51 | void 52 | GetFeatures::SetSelField(uint8_t selVal) 53 | { 54 | uint8_t newVal = GetByte(10, 1); 55 | LOG_NRM("Original DW10 byte 1: 0x%d", newVal); 56 | newVal &= ~BYTE_BITMASK_SEL; 57 | newVal |= (selVal & BYTE_BITMASK_SEL); 58 | LOG_NRM("Setting SEL field to: 0x%02X", newVal); 59 | SetByte(newVal, 10, 1); 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /Cmds/namespaceAttach.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "namespaceAttach.h" 18 | 19 | 20 | SharedNamespaceAttachPtr NamespaceAttach::NullNamespaceAttachPtr; 21 | const uint8_t NamespaceAttach::Opcode = 0x15; 22 | 23 | 24 | NamespaceAttach::NamespaceAttach() : Cmd(Trackable::OBJ_NAMESPACEATTACH) 25 | { 26 | // 64B size of buffer used to hold the admin command 16DW 27 | Init(Opcode, DATADIR_TO_DEVICE, 64); 28 | 29 | // No cmd should ever be created which violates these masking possibilities 30 | send_64b_bitmask allowPrpMask = (send_64b_bitmask)(MASK_PRP1_PAGE 31 | | MASK_PRP1_LIST | MASK_PRP2_PAGE); 32 | SetPrpAllowed(allowPrpMask); 33 | } 34 | 35 | NamespaceAttach::~NamespaceAttach() 36 | { 37 | } 38 | 39 | void 40 | NamespaceAttach::SetSEL(uint8_t sel) 41 | { 42 | LOG_NRM("Setting SEL = 0x%01X", sel); 43 | SetNibble(sel, 10, 0); 44 | } 45 | 46 | uint8_t 47 | NamespaceAttach::GetSEL() const 48 | { 49 | LOG_NRM("Getting SEL"); 50 | return GetByte(10, 0) & 0xF; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Cmds/namespaceAttach.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _NAMESPACEATTACH_H_ 18 | #define _NAMESPACEATTACH_H_ 19 | 20 | #include "cmd.h" 21 | 22 | class NamespaceAttach; // forward definition 23 | typedef boost::shared_ptr SharedNamespaceAttachPtr; 24 | typedef boost::shared_ptr ConstSharedNamespaceAttachPtr; 25 | #define CAST_TO_NAMESPACEATTACH(shared_trackable_ptr) \ 26 | boost::shared_polymorphic_downcast(shared_trackable_ptr); 27 | 28 | 29 | /** 30 | * This class implements the dataset mgmt nvm cmd 31 | * 32 | * @note This class may throw exceptions. 33 | */ 34 | class NamespaceAttach : public Cmd 35 | { 36 | public: 37 | NamespaceAttach(); 38 | virtual ~NamespaceAttach(); 39 | 40 | /// Used to compare for NULL pointers being returned by allocations 41 | static SharedNamespaceAttachPtr NullNamespaceAttachPtr; 42 | static const uint8_t Opcode; 43 | 44 | /** 45 | * @param SEL Pass the value 46 | */ 47 | void SetSEL(uint8_t); 48 | uint8_t GetSEL() const; 49 | 50 | }; 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Cmds/namespaceManagement.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "namespaceManagement.h" 18 | 19 | 20 | SharedNamespaceManagementPtr NamespaceManagement::NullNamespaceManagementPtr; 21 | const uint8_t NamespaceManagement::Opcode = 0x0D; 22 | 23 | 24 | NamespaceManagement::NamespaceManagement() : Cmd(Trackable::OBJ_NAMESPACEMANAGEMENT) 25 | { 26 | Init(Opcode, DATADIR_TO_DEVICE, 64); //64B size of buffer used to hold the admin command 16DW 27 | 28 | // No cmd should ever be created which violates these masking possibilities 29 | send_64b_bitmask allowPrpMask = (send_64b_bitmask) (MASK_PRP1_PAGE | MASK_PRP2_PAGE); 30 | SetPrpAllowed(allowPrpMask); 31 | } 32 | 33 | NamespaceManagement::~NamespaceManagement() 34 | { 35 | } 36 | 37 | void 38 | NamespaceManagement::SetSEL(uint8_t sel) 39 | { 40 | LOG_NRM("Setting SEL = 0x%01X", sel); 41 | // uint8_t val = GetByte(10, 0); 42 | // SetByte(val | (sel & 0xF), 10, 0); // 1st byte in DW10 43 | SetNibble(sel, 10, 0); 44 | } 45 | 46 | 47 | uint8_t 48 | NamespaceManagement::GetSEL() const 49 | { 50 | LOG_NRM("Getting SEL"); 51 | return GetByte(10, 0) & 0xF; 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Cmds/namespaceManagement.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _NAMESPACEMANAGEMENT_H_ 18 | #define _NAMESPACEMANAGEMENT_H_ 19 | 20 | #include "cmd.h" 21 | 22 | class NamespaceManagement; // forward definition 23 | typedef boost::shared_ptr SharedNamespaceManagementPtr; 24 | typedef boost::shared_ptr ConstSharedNamespaceManagementPtr; 25 | #define CAST_TO_NAMESPACEMANAGEMENT(shared_trackable_ptr) \ 26 | boost::shared_polymorphic_downcast(shared_trackable_ptr); 27 | 28 | /** 29 | * This class implements the dataset mgmt nvm cmd 30 | * 31 | * @note This class may throw exceptions. 32 | */ 33 | class NamespaceManagement : public Cmd 34 | { 35 | public: 36 | NamespaceManagement(); 37 | virtual ~NamespaceManagement(); 38 | 39 | /// Used to compare for NULL pointers being returned by allocations 40 | static SharedNamespaceManagementPtr NullNamespaceManagementPtr; 41 | static const uint8_t Opcode; 42 | 43 | /** 44 | * @param SEL Pass the value 45 | */ 46 | void SetSEL(uint8_t); 47 | uint8_t GetSEL() const; 48 | 49 | }; 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Cmds/namespaceManagementDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _NAMESPACEMANAGEMENTDEFS_H_ 18 | #define _NAMESPACEMANAGEMENTDEFS_H_ 19 | 20 | 21 | struct NamspcMgmtCreateStruct { 22 | IdNamespcStructNonVS IdNamspc; 23 | uint8_t Resvd[640]; 24 | uint8_t VS[3072]; 25 | } __attribute__((__packed__)); 26 | 27 | typedef enum NamspcMgmtSelectVals { 28 | NAMSPC_MGMT_SEL_CREATE = 0x0, 29 | NAMSPC_MGMT_SEL_DELETE = 0x1, 30 | } NamspcMgmtSelectVals; 31 | 32 | typedef enum NamspcAttachSelectVals { 33 | NAMSPC_ATTACH_SEL_ATTACH = 0x0, 34 | NAMSPC_ATTACH_SEL_DETACH = 0x1, 35 | } NamspcAttachSelectVals; 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Cmds/nvmCmd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "nvmCmd.h" 18 | 19 | 20 | SharedNVMCmdPtr NVMCmd::NullNVMCmdPtr; 21 | 22 | 23 | NVMCmd::NVMCmd() : Cmd(Trackable::OBJ_NVMCMD) 24 | { 25 | } 26 | 27 | 28 | NVMCmd::NVMCmd(Trackable::ObjType objBeingCreated) : Cmd(objBeingCreated) 29 | { 30 | } 31 | 32 | 33 | NVMCmd::~NVMCmd() 34 | { 35 | } 36 | 37 | 38 | void 39 | NVMCmd::Init(uint8_t opcode, uint16_t cmdSize) 40 | { 41 | Cmd::Init(opcode, DATADIR_NONE, cmdSize); 42 | } 43 | -------------------------------------------------------------------------------- /Cmds/reservationReport.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "reservationReport.h" 18 | 19 | SharedReservationReportPtr ReservationReport::NullReservationReportPtr; 20 | const uint8_t ReservationReport::Opcode = 0x0E; 21 | 22 | ReservationReport::ReservationReport() : Cmd(Trackable::OBJ_RESERVATIONREPORT) 23 | { 24 | Init(Opcode, DATADIR_FROM_DEVICE, 64); 25 | 26 | // No cmd should ever be created which violates these masking possibilities 27 | send_64b_bitmask allowPrpMask = (send_64b_bitmask) (MASK_PRP1_PAGE | MASK_PRP2_PAGE); 28 | SetPrpAllowed(allowPrpMask); 29 | } 30 | 31 | ReservationReport::~ReservationReport() 32 | { 33 | } 34 | 35 | void 36 | ReservationReport::SetNUMD(uint32_t val) 37 | { 38 | LOG_NRM("Setting NUMD = 0x%08X", val); 39 | SetDword(val, 10); 40 | } 41 | 42 | uint32_t 43 | ReservationReport::GetNUMD() const 44 | { 45 | LOG_NRM("Getting NUMD"); 46 | return GetDword(10); 47 | } 48 | -------------------------------------------------------------------------------- /Cmds/securityRcv.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "securityRcv.h" 18 | #include "globals.h" 19 | #include "../Utils/buffers.h" 20 | 21 | SharedSecurityRcvPtr SecurityRcv::NullSecurityRcvPtr; 22 | const uint8_t SecurityRcv::Opcode = 0x82; 23 | 24 | 25 | SecurityRcv::SecurityRcv() : BaseSecurity(Trackable::OBJ_SECURITYRCV) 26 | { 27 | Init(Opcode, DATADIR_FROM_DEVICE, 64); 28 | } 29 | 30 | 31 | SecurityRcv::~SecurityRcv() 32 | { 33 | } 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Cmds/securityRcv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SECURITYRCV_H_ 18 | #define _SECURITYRCV_H_ 19 | 20 | #include "baseSecurity.h" 21 | 22 | 23 | class SecurityRcv; // forward definition 24 | typedef boost::shared_ptr SharedSecurityRcvPtr; 25 | typedef boost::shared_ptr ConstSharedSecurityRcvPtr; 26 | #define CAST_TO_SECURITYRCV(shared_trackable_ptr) \ 27 | boost::dynamic_pointer_cast(shared_trackable_ptr); 28 | 29 | 30 | /** 31 | * This class implements the Security Send admin cmd specific to nvm cmd set. 32 | * 33 | * @note This class may throw exceptions. 34 | */ 35 | class SecurityRcv : public BaseSecurity 36 | { 37 | public: 38 | SecurityRcv(); 39 | virtual ~SecurityRcv(); 40 | 41 | /// Used to compare for NULL pointers being returned by allocations 42 | static SharedSecurityRcvPtr NullSecurityRcvPtr; 43 | static const uint8_t Opcode; 44 | }; 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Cmds/securitySend.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "securitySend.h" 18 | #include "globals.h" 19 | #include "../Utils/buffers.h" 20 | 21 | SharedSecuritySendPtr SecuritySend::NullSecuritySendPtr; 22 | const uint8_t SecuritySend::Opcode = 0x81; 23 | 24 | 25 | SecuritySend::SecuritySend() : BaseSecurity(Trackable::OBJ_SECURITYSEND) 26 | { 27 | Init(Opcode, DATADIR_TO_DEVICE, 64); 28 | } 29 | 30 | 31 | SecuritySend::~SecuritySend() 32 | { 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /Cmds/securitySend.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SECURITYSEND_H_ 18 | #define _SECURITYSEND_H_ 19 | 20 | #include "baseSecurity.h" 21 | 22 | 23 | class SecuritySend; // forward definition 24 | typedef boost::shared_ptr SharedSecuritySendPtr; 25 | typedef boost::shared_ptr ConstSharedSecuritySendPtr; 26 | #define CAST_TO_SECURITYSEND(shared_trackable_ptr) \ 27 | boost::dynamic_pointer_cast(shared_trackable_ptr); 28 | 29 | 30 | /** 31 | * This class implements the Security Send admin cmd specific to nvm cmd set. 32 | * 33 | * @note This class may throw exceptions. 34 | */ 35 | class SecuritySend : public BaseSecurity 36 | { 37 | public: 38 | SecuritySend(); 39 | virtual ~SecuritySend(); 40 | 41 | /// Used to compare for NULL pointers being returned by allocations 42 | static SharedSecuritySendPtr NullSecuritySendPtr; 43 | static const uint8_t Opcode; 44 | }; 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Doc/.gitignore: -------------------------------------------------------------------------------- 1 | HTML/ 2 | -------------------------------------------------------------------------------- /Doc/compSuitePreso.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/Doc/compSuitePreso.pdf -------------------------------------------------------------------------------- /Doc/readme.compile: -------------------------------------------------------------------------------- 1 | See https://github.com/nvmecompliance/tnvme/wiki/Compiling 2 | 3 | -------------------------------------------------------------------------------- /Doc/readme.files.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/Doc/readme.files.odt -------------------------------------------------------------------------------- /Doc/readme.startHere: -------------------------------------------------------------------------------- 1 | See https://github.com/nvmecompliance/tnvme/wiki 2 | 3 | -------------------------------------------------------------------------------- /Doc/readme.startHere.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/Doc/readme.startHere.odt -------------------------------------------------------------------------------- /Doc/readme.supplemental.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/Doc/readme.supplemental.docx -------------------------------------------------------------------------------- /Doc/testDependencyPreso.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/Doc/testDependencyPreso.pdf -------------------------------------------------------------------------------- /Doc/testPlan.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/Doc/testPlan.ods -------------------------------------------------------------------------------- /Exception/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /Exception/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | frmwkEx.cpp 21 | 22 | .SUFFIXES: .cpp 23 | 24 | OBJ = $(SRC:.cpp=.o) 25 | OUT = libException.a 26 | 27 | all: $(OUT) 28 | 29 | .cpp.o: 30 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 31 | 32 | $(OUT): $(OBJ) 33 | ar rcs $(OUT) $(OBJ) 34 | 35 | clean: 36 | rm -f $(OBJ) $(OUT) Makefile.bak 37 | 38 | clobber: clean 39 | rm -f $(OUT) 40 | -------------------------------------------------------------------------------- /GrpAdminAsyncCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminAsyncCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminAsyncCmd.cpp \ 21 | unsupportRsvdFields_r10b.cpp \ 22 | unsupportRsvdFields_r11b.cpp \ 23 | unsupportRsvdFields_r12.cpp \ 24 | abortByReset_r10b.cpp \ 25 | verifyMaxEvents_r10b.cpp \ 26 | verifyMasking_r10b.cpp \ 27 | verifyEventQueueing_r10b.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libGrpAdminAsyncCmd.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /GrpAdminAsyncCmd/grpAdminAsyncCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINASYNCCMD_H_ 18 | #define _GRPADMINASYNCCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminAsyncCmd { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set async event request test cases. 27 | */ 28 | class GrpAdminAsyncCmd : public Group 29 | { 30 | public: 31 | GrpAdminAsyncCmd(size_t grpNum); 32 | virtual ~GrpAdminAsyncCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminAsyncCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminAsyncCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpAdminCreateIOCQCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminCreateIOCQCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminCreateIOCQCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | unsupportRsvdFields_r10b.cpp \ 23 | unsupportRsvdFields_r11b.cpp \ 24 | unsupportRsvdFields_r12.cpp \ 25 | invalidQID_r10b.cpp \ 26 | maxQSizeExceed_r10b.cpp 27 | 28 | .SUFFIXES: .cpp 29 | 30 | OBJ = $(SRC:.cpp=.o) 31 | OUT = libGrpAdminCreateIOCQCmd.a 32 | 33 | all: $(OUT) 34 | 35 | .cpp.o: 36 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 37 | 38 | $(OUT): $(OBJ) 39 | ar rcs $(OUT) $(OBJ) 40 | 41 | clean: 42 | rm -f $(OBJ) $(OUT) Makefile.bak 43 | 44 | clobber: clean 45 | rm -f $(OUT) 46 | -------------------------------------------------------------------------------- /GrpAdminCreateIOCQCmd/grpAdminCreateIOCQCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINCREATEIOCQCMD_H_ 18 | #define _GRPADMINCREATEIOCQCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminCreateIOCQCmd { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set create IOCQ test cases. 27 | */ 28 | class GrpAdminCreateIOCQCmd : public Group 29 | { 30 | public: 31 | GrpAdminCreateIOCQCmd(size_t grpNum); 32 | virtual ~GrpAdminCreateIOCQCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminCreateIOCQCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminCreateIOCQCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpAdminCreateIOQCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminCreateIOQCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminCreateIOQCmd.cpp \ 21 | prpLessPageContig_r10b.cpp \ 22 | prpLessPageDiscontig_r10b.cpp \ 23 | prpSinglePageContig_r10b.cpp \ 24 | prpSinglePageDiscontig_r10b.cpp \ 25 | prpGreaterPageContig_r10b.cpp \ 26 | prpGreaterPageDiscontig_r10b.cpp 27 | 28 | .SUFFIXES: .cpp 29 | 30 | OBJ = $(SRC:.cpp=.o) 31 | OUT = libGrpAdminCreateIOQCmd.a 32 | 33 | all: $(OUT) 34 | 35 | .cpp.o: 36 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 37 | 38 | $(OUT): $(OBJ) 39 | ar rcs $(OUT) $(OBJ) 40 | 41 | clean: 42 | rm -f $(OBJ) $(OUT) Makefile.bak 43 | 44 | clobber: clean 45 | rm -f $(OUT) 46 | -------------------------------------------------------------------------------- /GrpAdminCreateIOQCmd/grpAdminCreateIOQCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINCREATEIOQCMD_H_ 18 | #define _GRPADMINCREATEIOQCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminCreateIOQCmd { 23 | 24 | 25 | /** 26 | * Admin cmd set create IOSQ and create IOCQ test cases. Common group needed 27 | * to make the test cases more efficient where the same test may validate both 28 | * types of creation simultaneously. 29 | */ 30 | class GrpAdminCreateIOQCmd : public Group 31 | { 32 | public: 33 | GrpAdminCreateIOQCmd(size_t grpNum); 34 | virtual ~GrpAdminCreateIOQCmd(); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GrpAdminCreateIOQCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminCreateIOQCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpAdminCreateIOSQCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminCreateIOSQCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminCreateIOSQCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | unsupportRsvdFields_r10b.cpp \ 23 | unsupportRsvdFields_r11b.cpp \ 24 | unsupportRsvdFields_r12.cpp \ 25 | invalidQID_r10b.cpp \ 26 | maxQSizeExceed_r10b.cpp \ 27 | completionQInvalid_r10b.cpp \ 28 | acceptQPriority_r10b.cpp 29 | 30 | .SUFFIXES: .cpp 31 | 32 | OBJ = $(SRC:.cpp=.o) 33 | OUT = libGrpAdminCreateIOSQCmd.a 34 | 35 | all: $(OUT) 36 | 37 | .cpp.o: 38 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 39 | 40 | $(OUT): $(OBJ) 41 | ar rcs $(OUT) $(OBJ) 42 | 43 | clean: 44 | rm -f $(OBJ) $(OUT) Makefile.bak 45 | 46 | clobber: clean 47 | rm -f $(OUT) 48 | -------------------------------------------------------------------------------- /GrpAdminCreateIOSQCmd/grpAdminCreateIOSQCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINCREATEIOSQCMD_H_ 18 | #define _GRPADMINCREATEIOSQCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminCreateIOSQCmd { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set create IOCQ test cases. 27 | */ 28 | class GrpAdminCreateIOSQCmd : public Group 29 | { 30 | public: 31 | GrpAdminCreateIOSQCmd(size_t grpNum); 32 | virtual ~GrpAdminCreateIOSQCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminCreateIOSQCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminCreateIOSQCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOCQCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOCQCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminDeleteIOCQCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | unsupportRsvdFields_r10b.cpp \ 23 | unsupportRsvdFields_r11b.cpp \ 24 | unsupportRsvdFields_r12.cpp \ 25 | invalidQID_r10b.cpp \ 26 | deleteAllAtOnce_r10b.cpp \ 27 | deleteFullQ_r10b.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libGrpAdminDeleteIOCQCmd.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOCQCmd/grpAdminDeleteIOCQCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINDELETEIOCQCMD_H_ 18 | #define _GRPADMINDELETEIOCQCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminDeleteIOCQCmd { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set delete IOCQ test cases. 27 | */ 28 | class GrpAdminDeleteIOCQCmd : public Group 29 | { 30 | public: 31 | GrpAdminDeleteIOCQCmd(size_t grpNum); 32 | virtual ~GrpAdminDeleteIOCQCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOCQCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminDeleteIOCQCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOSQCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOSQCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminDeleteIOSQCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | unsupportRsvdFields_r10b.cpp \ 23 | unsupportRsvdFields_r11b.cpp \ 24 | unsupportRsvdFields_r12.cpp \ 25 | invalidQID_r10b.cpp 26 | 27 | .SUFFIXES: .cpp 28 | 29 | OBJ = $(SRC:.cpp=.o) 30 | OUT = libGrpAdminDeleteIOSQCmd.a 31 | 32 | all: $(OUT) 33 | 34 | .cpp.o: 35 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 36 | 37 | $(OUT): $(OBJ) 38 | ar rcs $(OUT) $(OBJ) 39 | 40 | clean: 41 | rm -f $(OBJ) $(OUT) Makefile.bak 42 | 43 | clobber: clean 44 | rm -f $(OUT) 45 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOSQCmd/grpAdminDeleteIOSQCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINDELETEIOSQCMD_H_ 18 | #define _GRPADMINDELETEIOSQCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminDeleteIOSQCmd { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set delete IOSQ test cases. 27 | */ 28 | class GrpAdminDeleteIOSQCmd : public Group 29 | { 30 | public: 31 | GrpAdminDeleteIOSQCmd(size_t grpNum); 32 | virtual ~GrpAdminDeleteIOSQCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminDeleteIOSQCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminDeleteIOSQCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /GrpAdminGetFeatCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminGetFeatCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminGetFeatCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | invalidFieldInCmd_r10b.cpp \ 23 | invalidFieldInCmd_r11.cpp \ 24 | invalidFieldInCmd_r12.cpp \ 25 | unsupportRsvdFields_r10b.cpp \ 26 | unsupportRsvdFields_r11b.cpp \ 27 | unsupportRsvdFields_r12.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libGrpAdminGetFeatCmd.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /GrpAdminGetFeatCmd/grpAdminGetFeatCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINGETFEATCMD_H_ 18 | #define _GRPADMINGETFEATCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminGetFeatCmd { 23 | 24 | 25 | /** 26 | * This class implements a template for all groups to come. 27 | */ 28 | class GrpAdminGetFeatCmd : public Group 29 | { 30 | public: 31 | GrpAdminGetFeatCmd(size_t grpNum); 32 | virtual ~GrpAdminGetFeatCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminGetFeatCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminGetFeatCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpAdminGetFeatCmd/invalidFieldInCmd_r11.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, UNH-IOL - All Rights Reserved. 3 | */ 4 | 5 | #ifndef _INVALIDFIELDINCMD_r11_H_ 6 | #define _INVALIDFIELDINCMD_r11_H_ 7 | 8 | #include "test.h" 9 | #include "invalidFieldInCmd_r10b.h" 10 | 11 | namespace GrpAdminGetFeatCmd { 12 | 13 | 14 | /** \verbatim 15 | * ----------------------------------------------------------------------------- 16 | * ----------------Mandatory rules for children to follow----------------------- 17 | * ----------------------------------------------------------------------------- 18 | * 1) See notes in the header file of the Test base class 19 | * \endverbatim 20 | */ 21 | class InvalidFieldInCmd_r11 : public InvalidFieldInCmd_r10b 22 | { 23 | public: 24 | InvalidFieldInCmd_r11(string grpName, string testName); 25 | virtual ~InvalidFieldInCmd_r11(); 26 | 27 | /** 28 | * IMPORTANT: Read Test::Clone() header comment. 29 | */ 30 | virtual InvalidFieldInCmd_r11 *Clone() const 31 | { return new InvalidFieldInCmd_r11(*this); } 32 | InvalidFieldInCmd_r11 &operator=(const InvalidFieldInCmd_r11 &other); 33 | InvalidFieldInCmd_r11(const InvalidFieldInCmd_r11 &other); 34 | 35 | 36 | protected: 37 | virtual void getInvalidFIDs(vector invalidFIDs) const; 38 | 39 | 40 | private: 41 | /////////////////////////////////////////////////////////////////////////// 42 | // Adding a member variable? Then edit the copy constructor and operator=(). 43 | /////////////////////////////////////////////////////////////////////////// 44 | }; 45 | 46 | } // namespace 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /GrpAdminGetFeatCmd/invalidFieldInCmd_r12.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, UNH-IOL - All Rights Reserved. 3 | */ 4 | 5 | #ifndef _INVALIDFIELDINCMD_r12_H_ 6 | #define _INVALIDFIELDINCMD_r12_H_ 7 | 8 | #include "test.h" 9 | #include "invalidFieldInCmd_r10b.h" 10 | 11 | namespace GrpAdminGetFeatCmd { 12 | 13 | 14 | /** \verbatim 15 | * ----------------------------------------------------------------------------- 16 | * ----------------Mandatory rules for children to follow----------------------- 17 | * ----------------------------------------------------------------------------- 18 | * 1) See notes in the header file of the Test base class 19 | * \endverbatim 20 | */ 21 | class InvalidFieldInCmd_r12 : public InvalidFieldInCmd_r10b 22 | { 23 | public: 24 | InvalidFieldInCmd_r12(string grpName, string testName); 25 | virtual ~InvalidFieldInCmd_r12(); 26 | 27 | /** 28 | * IMPORTANT: Read Test::Clone() header comment. 29 | */ 30 | virtual InvalidFieldInCmd_r12 *Clone() const 31 | { return new InvalidFieldInCmd_r12(*this); } 32 | InvalidFieldInCmd_r12 &operator=(const InvalidFieldInCmd_r12 &other); 33 | InvalidFieldInCmd_r12(const InvalidFieldInCmd_r12 &other); 34 | 35 | 36 | protected: 37 | virtual void getInvalidFIDs(vector invalidFIDs) const; 38 | 39 | 40 | private: 41 | /////////////////////////////////////////////////////////////////////////// 42 | // Adding a member variable? Then edit the copy constructor and operator=(). 43 | /////////////////////////////////////////////////////////////////////////// 44 | }; 45 | 46 | } // namespace 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /GrpAdminGetLogPgCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminGetLogPgCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | prp1_r10b.cpp \ 23 | prp1PRP2_r10b.cpp \ 24 | unsupportRsvdFields_r10b.cpp \ 25 | unsupportRsvdFields_r11b.cpp \ 26 | unsupportRsvdFields_r12.cpp \ 27 | numDIsAdhered_r10b.cpp \ 28 | invalidLogPageNVMSet_r10b.cpp \ 29 | invalidLogPageNVMSet_r11b.cpp \ 30 | invalidNamspc_r10b.cpp \ 31 | invalidNamspc_r11a.cpp \ 32 | mandatoryErrInfo_r10b.cpp \ 33 | mandatorySMART_r10b.cpp \ 34 | mandatoryFW_r10b.cpp 35 | 36 | .SUFFIXES: .cpp 37 | 38 | OBJ = $(SRC:.cpp=.o) 39 | OUT = libGrpAdminGetLogPgCmd.a 40 | 41 | all: $(OUT) 42 | 43 | .cpp.o: 44 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 45 | 46 | $(OUT): $(OBJ) 47 | ar rcs $(OUT) $(OBJ) 48 | 49 | clean: 50 | rm -f $(OBJ) $(OUT) Makefile.bak 51 | 52 | clobber: clean 53 | rm -f $(OUT) 54 | -------------------------------------------------------------------------------- /GrpAdminGetLogPgCmd/grpAdminGetLogPgCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINGETLOGPGCMD_H_ 18 | #define _GRPADMINGETLOGPGCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminGetLogPgCmd { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set get log page test cases. 27 | */ 28 | class GrpAdminGetLogPgCmd : public Group 29 | { 30 | public: 31 | GrpAdminGetLogPgCmd(size_t grpNum); 32 | virtual ~GrpAdminGetLogPgCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminGetLogPgCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpTemplate { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpAdminIdentifyCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminIdentifyCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | prp1_r10b.cpp \ 23 | prp1PRP2_r10b.cpp \ 24 | unsupportRsvdFields_r10b.cpp \ 25 | unsupportRsvdFields_r11b.cpp \ 26 | unsupportRsvdFields_r12.cpp \ 27 | invalidNamspc_r10b.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libGrpAdminIdentifyCmd.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /GrpAdminIdentifyCmd/grpAdminIdentifyCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINIDENTIFYCMD_H_ 18 | #define _GRPADMINIDENTIFYCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminIdentifyCmd { 23 | 24 | 25 | /** 26 | * This class implements a template for all groups to come. 27 | */ 28 | class GrpAdminIdentifyCmd : public Group 29 | { 30 | public: 31 | GrpAdminIdentifyCmd(size_t grpNum); 32 | virtual ~GrpAdminIdentifyCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminIdentifyCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminIdentifyCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpAdminNamespaceManagement/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminNamespaceManagement.cpp \ 21 | createResources_r12.cpp \ 22 | deleteAllNamespacesAndVerify.cpp \ 23 | createAndAttachMaxNamespacesAndVerify.cpp 24 | 25 | .SUFFIXES: .cpp 26 | 27 | OBJ = $(SRC:.cpp=.o) 28 | OUT = libGrpAdminNamespaceManagement.a 29 | 30 | all: $(OUT) 31 | 32 | .cpp.o: 33 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 34 | 35 | $(OUT): $(OBJ) 36 | ar rcs $(OUT) $(OBJ) 37 | 38 | clean: 39 | rm -rf *.a 40 | rm -rf *.o 41 | rm -f $(OBJ) Makefile.bak 42 | 43 | clobber: clean 44 | rm -f $(OUT) 45 | -------------------------------------------------------------------------------- /GrpAdminNamespaceManagement/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpReservations { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } // namespace 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpAdminNamespaceManagement/namespaceManagementUtilities.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _NAMESPACEMANAGEMENTUTILITIES_r12_H_ 18 | #define _NAMESPACEMANAGEMENTUTILITIES_r12_H_ 19 | 20 | vector convertIdentifyNamespaceListBufferToVector(const uint8_t *namespaceListBuffer); 21 | vector convertIdentifyControllerListBufferToVector(const uint8_t *controllerListBuffer); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /GrpAdminNamespaceManagement/unsupportRsvdFields_r10b.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _UNSUPPORTRSVDFIELDS_r10b_H_ 18 | #define _UNSUPPORTRSVDFIELDS_r10b_H_ 19 | 20 | #include "test.h" 21 | #include "../Queues/acq.h" 22 | #include "../Queues/asq.h" 23 | 24 | namespace GrpReservationsHostA { 25 | 26 | 27 | /** \verbatim 28 | * ----------------------------------------------------------------------------- 29 | * ----------------Mandatory rules for children to follow----------------------- 30 | * ----------------------------------------------------------------------------- 31 | * 1) See notes in the header file of the Test base class 32 | * \endverbatim 33 | */ 34 | class UnsupportRsvdFields_r10b : public Test 35 | { 36 | public: 37 | UnsupportRsvdFields_r10b(string grpName, string testName); 38 | virtual ~UnsupportRsvdFields_r10b(); 39 | 40 | virtual UnsupportRsvdFields_r10b *Clone() const 41 | { return new UnsupportRsvdFields_r10b(*this); } 42 | UnsupportRsvdFields_r10b &operator=(const UnsupportRsvdFields_r10b &other); 43 | UnsupportRsvdFields_r10b(const UnsupportRsvdFields_r10b &other); 44 | 45 | 46 | protected: 47 | virtual void RunCoreTest(); 48 | virtual RunType RunnableCoreTest(bool preserve); 49 | 50 | 51 | private: 52 | 53 | }; 54 | 55 | } // namespace 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /GrpAdminSetFeatCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminSetFeatCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminSetFeatCmd.cpp \ 21 | invalidFieldInCmd_r10b.cpp \ 22 | invalidFieldInCmd_r12.cpp 23 | 24 | .SUFFIXES: .cpp 25 | 26 | OBJ = $(SRC:.cpp=.o) 27 | OUT = libGrpAdminSetFeatCmd.a 28 | 29 | all: $(OUT) 30 | 31 | .cpp.o: 32 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 33 | 34 | $(OUT): $(OBJ) 35 | ar rcs $(OUT) $(OBJ) 36 | 37 | clean: 38 | rm -f $(OBJ) $(OUT) Makefile.bak 39 | 40 | clobber: clean 41 | rm -f $(OUT) 42 | -------------------------------------------------------------------------------- /GrpAdminSetFeatCmd/grpAdminSetFeatCmd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "grpAdminSetFeatCmd.h" 18 | #include "invalidFieldInCmd_r10b.h" 19 | #include "invalidFieldInCmd_r12.h" 20 | 21 | namespace GrpAdminSetFeatCmd { 22 | 23 | 24 | GrpAdminSetFeatCmd::GrpAdminSetFeatCmd(size_t grpNum) : 25 | Group(grpNum, "GrpAdminSetFeatCmd", 26 | "Admin cmd set features test cases w/o get features") 27 | { 28 | // For complete details about the APPEND_TEST_AT_?LEVEL() macros: 29 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering" and 30 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Strategy 31 | switch (gCmdLine.rev) { 32 | case SPECREV_11: 33 | case SPECREV_10b: 34 | APPEND_TEST_AT_XLEVEL(InvalidFieldInCmd_r10b, GrpAdminSetFeatCmd) 35 | break; 36 | case SPECREV_13: 37 | case SPECREV_121: 38 | case SPECREV_12: 39 | APPEND_TEST_AT_XLEVEL(InvalidFieldInCmd_r12, GrpAdminSetFeatCmd) 40 | break; 41 | 42 | default: 43 | case SPECREVTYPE_FENCE: 44 | throw FrmwkEx(HERE, "Object created with an unknown SpecRev=%d", 45 | gCmdLine.rev); 46 | } 47 | } 48 | 49 | 50 | GrpAdminSetFeatCmd::~GrpAdminSetFeatCmd() 51 | { 52 | // mTests deallocated in parent 53 | } 54 | 55 | } // namespace 56 | -------------------------------------------------------------------------------- /GrpAdminSetFeatCmd/grpAdminSetFeatCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPADMINSETFEATCMD_H_ 18 | #define _GRPADMINSETFEATCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpAdminSetFeatCmd { 23 | 24 | 25 | /** 26 | * This class implements a template for all groups to come. 27 | */ 28 | class GrpAdminSetFeatCmd : public Group 29 | { 30 | public: 31 | GrpAdminSetFeatCmd(size_t grpNum); 32 | virtual ~GrpAdminSetFeatCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpAdminSetFeatCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminSetFeatCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpAdminSetGetFeatCombo/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpAdminSetGetFeatCombo/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpAdminSetGetFeatCombo.cpp \ 21 | fidArbitration_r10b.cpp \ 22 | fidPwrMgmt_r10b.cpp \ 23 | fidTempThres_r10b.cpp \ 24 | fidErrRecovery_r10b.cpp \ 25 | fidVolatileCash_r10b.cpp \ 26 | fidIRQCoalescing_r10b.cpp \ 27 | fidIRQVec_r10b.cpp \ 28 | fidIRQVec_r11.cpp \ 29 | fidWriteAtomicity_r10b.cpp \ 30 | fidAsyncEventCfg_r10b.cpp \ 31 | fidErrRecovery_r12.cpp 32 | 33 | .SUFFIXES: .cpp 34 | 35 | OBJ = $(SRC:.cpp=.o) 36 | OUT = libGrpAdminSetGetFeatCombo.a 37 | 38 | all: $(OUT) 39 | 40 | .cpp.o: 41 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 42 | 43 | $(OUT): $(OBJ) 44 | ar rcs $(OUT) $(OBJ) 45 | 46 | clean: 47 | rm -f $(OBJ) $(OUT) Makefile.bak 48 | 49 | clobber: clean 50 | rm -f $(OUT) 51 | -------------------------------------------------------------------------------- /GrpAdminSetGetFeatCombo/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpAdminSetGetFeatCombo { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define BITMASK_VWC 0x1 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpBasicInit/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpBasicInit/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpBasicInit.cpp \ 21 | createACQASQ_r10b.cpp \ 22 | createIOQContigPoll_r10b.cpp \ 23 | createIOQContigIrq_r10b.cpp \ 24 | createIOQDiscontigPoll_r10b.cpp \ 25 | createIOQDiscontigIrq_r10b.cpp \ 26 | deleteIOQContig_r10b.cpp \ 27 | deleteIOQDiscontig_r10b.cpp \ 28 | writeDataPat_r10b.cpp \ 29 | verifyDataPat_r10b.cpp 30 | 31 | .SUFFIXES: .cpp 32 | 33 | OBJ = $(SRC:.cpp=.o) 34 | OUT = libGrpBasicInit.a 35 | 36 | all: $(OUT) 37 | 38 | .cpp.o: 39 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 40 | 41 | $(OUT): $(OBJ) 42 | ar rcs $(OUT) $(OBJ) 43 | 44 | clean: 45 | rm -f $(OBJ) $(OUT) Makefile.bak 46 | 47 | clobber: clean 48 | rm -f $(OUT) 49 | -------------------------------------------------------------------------------- /GrpBasicInit/grpBasicInit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPBASICINIT_H_ 18 | #define _GRPBASICINIT_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpBasicInit { 23 | 24 | 25 | /** 26 | * This class implements a logical grouping of test cases for basic 27 | * initialization of NVME hardware. This mainly consists of the operations 28 | * one needs during a system power up to get the hardware operational. 29 | */ 30 | class GrpBasicInit : public Group 31 | { 32 | public: 33 | GrpBasicInit(size_t grpNum); 34 | virtual ~GrpBasicInit(); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GrpBasicInit/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpBasicInit { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_CONTIG_GROUP_ID "IOCQContig" 27 | #define IOSQ_CONTIG_GROUP_ID "IOSQContig" 28 | #define IOCQ_DISCONTIG_GROUP_ID "IOCQDiscontig" 29 | #define IOSQ_DISCONTIG_GROUP_ID "IOSQDiscontig" 30 | 31 | 32 | } // namespace 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /GrpCtrlRegisters/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpCtrlRegisters/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpCtrlRegisters.cpp \ 21 | allCtrlRegs_r10b.cpp \ 22 | allCtrlRegs_r11.cpp \ 23 | allCtrlRegs_r12.cpp \ 24 | ctrlrResetDefaults_r10b.cpp 25 | 26 | .SUFFIXES: .cpp 27 | 28 | OBJ = $(SRC:.cpp=.o) 29 | OUT = libGrpCtrlRegisters.a 30 | 31 | all: $(OUT) 32 | 33 | .cpp.o: 34 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 35 | 36 | $(OUT): $(OBJ) 37 | ar rcs $(OUT) $(OBJ) 38 | 39 | clean: 40 | rm -f $(OBJ) $(OUT) Makefile.bak 41 | 42 | clobber: clean 43 | rm -f $(OUT) 44 | -------------------------------------------------------------------------------- /GrpCtrlRegisters/grpCtrlRegisters.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPCTRLREGISTERS_H_ 18 | #define _GRPCTRLREGISTERS_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpCtrlRegisters { 23 | 24 | 25 | /** 26 | * This class implements a logical grouping of test cases for all NVME 27 | * specification document releases. It is logically grouping the PCI BAR0/BAR1, 28 | * i.e. all the NVME controller's registers address space for syntactical 29 | * compliance. 30 | */ 31 | class GrpCtrlRegisters : public Group 32 | { 33 | public: 34 | GrpCtrlRegisters(size_t grpNum); 35 | virtual ~GrpCtrlRegisters(); 36 | }; 37 | 38 | } // namespace 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /GrpGeneralCmds/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpGeneralCmds.cpp \ 21 | createResources_r10b.cpp \ 22 | illegalNVMCmds_r10b.cpp \ 23 | illegalNVMCmds_r11.cpp \ 24 | illegalAdminCmds_r10b.cpp \ 25 | illegalAdminCmds_r12.cpp \ 26 | cidAcceptedASQ_r10b.cpp \ 27 | cidAcceptedIOSQ_r10b.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libGrpGeneralCmds.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /GrpGeneralCmds/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpGeneralCmds { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } // namespace 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpGeneralCmds/grpGeneralCmds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPGENERALCMDS_H_ 18 | #define _GRPGENERALCMDS_H_ 19 | 20 | #include "../group.h" 21 | #include "../Exception/frmwkEx.h" 22 | 23 | 24 | namespace GrpGeneralCmds { 25 | 26 | 27 | /** 28 | * This class tests a command's features that are common to all command sets. 29 | */ 30 | class GrpGeneralCmds : public Group 31 | { 32 | public: 33 | GrpGeneralCmds(size_t grpNum); 34 | virtual ~GrpGeneralCmds(); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GrpInterrupts/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpInterrupts/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpInterrupts.cpp \ 21 | createResources_r10b.cpp \ 22 | invalidMSIXIRQ_r10b.cpp \ 23 | partialReapMSIX_r10b.cpp \ 24 | maxIOQMSIX1To1_r10b.cpp \ 25 | maxIOQMSIXManyTo1_r10b.cpp 26 | 27 | .SUFFIXES: .cpp 28 | 29 | OBJ = $(SRC:.cpp=.o) 30 | OUT = libGrpInterrupts.a 31 | 32 | all: $(OUT) 33 | 34 | .cpp.o: 35 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 36 | 37 | $(OUT): $(OBJ) 38 | ar rcs $(OUT) $(OBJ) 39 | 40 | clean: 41 | rm -f $(OBJ) $(OUT) Makefile.bak 42 | 43 | clobber: clean 44 | rm -f $(OUT) 45 | -------------------------------------------------------------------------------- /GrpInterrupts/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpInterrupts { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | 29 | 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpInterrupts/grpInterrupts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPINTERRUPTS_H_ 18 | #define _GRPINTERRUPTS_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpInterrupts { 23 | 24 | 25 | /** 26 | * This class implements a logical grouping of test cases for basic 27 | * initialization of NVME hardware. This mainly consists of the operations 28 | * one needs during a system power up to get the hardware operational. 29 | */ 30 | class GrpInterrupts : public Group 31 | { 32 | public: 33 | GrpInterrupts(size_t grpNum); 34 | virtual ~GrpInterrupts(); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GrpNVMCompareCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpNVMCompareCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMCompareCmd.cpp 21 | 22 | .SUFFIXES: .cpp 23 | 24 | OBJ = $(SRC:.cpp=.o) 25 | OUT = libGrpNVMCompareCmd.a 26 | 27 | all: $(OUT) 28 | 29 | .cpp.o: 30 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 31 | 32 | $(OUT): $(OBJ) 33 | ar rcs $(OUT) $(OBJ) 34 | 35 | clean: 36 | rm -f $(OBJ) $(OUT) Makefile.bak 37 | 38 | clobber: clean 39 | rm -f $(OUT) 40 | -------------------------------------------------------------------------------- /GrpNVMCompareCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMCompareCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpNVMCompareCmd/grpNVMCompareCmd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "tnvme.h" 18 | #include "../Exception/frmwkEx.h" 19 | #include "grpNVMCompareCmd.h" 20 | 21 | namespace GrpNVMCompareCmd { 22 | 23 | 24 | GrpNVMCompareCmd::GrpNVMCompareCmd(size_t grpNum) : 25 | Group(grpNum, "GrpNVMCompareCmd", "NVM cmd set compare test cases") 26 | { 27 | // For complete details about the APPEND_TEST_AT_?LEVEL() macros: 28 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering" and 29 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Strategy 30 | switch (gCmdLine.rev) { 31 | case SPECREV_10b: 32 | case SPECREV_11: 33 | case SPECREV_12: 34 | case SPECREV_121: 35 | case SPECREV_13: 36 | break; 37 | 38 | default: 39 | case SPECREVTYPE_FENCE: 40 | throw FrmwkEx(HERE, "Object created with an unknown SpecRev=%d", 41 | gCmdLine.rev); 42 | } 43 | } 44 | 45 | 46 | GrpNVMCompareCmd::~GrpNVMCompareCmd() 47 | { 48 | // mTests deallocated in parent 49 | } 50 | 51 | } // namespace 52 | -------------------------------------------------------------------------------- /GrpNVMCompareCmd/grpNVMCompareCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPNVMCOMPARECMD_H_ 18 | #define _GRPNVMCOMPARECMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpNVMCompareCmd { 23 | 24 | 25 | /** 26 | * This class implements NVM cmd set compare test cases. 27 | */ 28 | class GrpNVMCompareCmd : public Group 29 | { 30 | public: 31 | GrpNVMCompareCmd(size_t grpNum); 32 | virtual ~GrpNVMCompareCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpNVMDatasetMgmtCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMDatasetMgmtCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | invalidNamspc_r10b.cpp \ 23 | unsupportRsvdFields_r10b.cpp \ 24 | unsupportRsvdFields_r11b.cpp \ 25 | unsupportRsvdFields_r12.cpp \ 26 | prp1PRP2NR_r10b.cpp \ 27 | attributes_r10b.cpp \ 28 | verifyNUSE_r10b.cpp 29 | 30 | .SUFFIXES: .cpp 31 | 32 | OBJ = $(SRC:.cpp=.o) 33 | OUT = libGrpNVMDatasetMgmtCmd.a 34 | 35 | all: $(OUT) 36 | 37 | .cpp.o: 38 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 39 | 40 | $(OUT): $(OBJ) 41 | ar rcs $(OUT) $(OBJ) 42 | 43 | clean: 44 | rm -f $(OBJ) $(OUT) Makefile.bak 45 | 46 | clobber: clean 47 | rm -f $(OUT) 48 | -------------------------------------------------------------------------------- /GrpNVMDatasetMgmtCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMDatasetMgmtCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | 32 | } // namespace 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /GrpNVMDatasetMgmtCmd/grpNVMDatasetMgmtCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPNVMDATASETMGMTCMD_H_ 18 | #define _GRPNVMDATASETMGMTCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpNVMDatasetMgmtCmd { 23 | 24 | 25 | /** 26 | * This class implements NVM cmd set data set management test cases. 27 | */ 28 | class GrpNVMDatasetMgmtCmd : public Group 29 | { 30 | public: 31 | GrpNVMDatasetMgmtCmd(size_t grpNum); 32 | virtual ~GrpNVMDatasetMgmtCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpNVMFlushCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpNVMFlushCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMFlushCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | invalidNamspc_r10b.cpp \ 23 | unsupportRsvdFields_r10b.cpp \ 24 | unsupportRsvdFields_r11b.cpp \ 25 | unsupportRsvdFields_r12.cpp \ 26 | functionalityBare_r10b.cpp \ 27 | functionalityMeta_r10b.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libGrpNVMFlushCmd.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /GrpNVMFlushCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMFlushCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | } // namespace 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /GrpNVMFlushCmd/grpNVMFlushCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPNVMFLUSHCMD_H_ 18 | #define _GRPNVMFLUSHCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpNVMFlushCmd { 23 | 24 | 25 | /** 26 | * This class implements NVM cmd flush test cases. 27 | */ 28 | class GrpNVMFlushCmd : public Group 29 | { 30 | public: 31 | GrpNVMFlushCmd(size_t grpNum); 32 | virtual ~GrpNVMFlushCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpNVMReadCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpNVMReadCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMReadCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | lbaOutOfRangeBare_r10b.cpp \ 23 | lbaOutOfRangeBare_r12.cpp \ 24 | invalidNamspc_r10b.cpp \ 25 | unsupportRsvdFields_r10b.cpp \ 26 | unsupportRsvdFields_r11b.cpp \ 27 | unsupportRsvdFields_r12.cpp \ 28 | ignoreMetaPtrBare_r10b.cpp \ 29 | ignoreMetaPtrBare_r12.cpp \ 30 | protInfoIgnoreBare_r10b.cpp \ 31 | protInfoIgnoreBare_r12.cpp \ 32 | FUA_r10b.cpp \ 33 | limitedRetry_r10b.cpp \ 34 | lbaOutOfRangeMeta_r10b.cpp \ 35 | lbaOutOfRangeMeta_r12.cpp \ 36 | ignoreMetaPtrMeta_r10b.cpp \ 37 | ignoreMetaPtrMeta_r12.cpp \ 38 | protInfoIgnoreMeta_r10b.cpp \ 39 | protInfoIgnoreMeta_r12.cpp 40 | 41 | .SUFFIXES: .cpp 42 | 43 | OBJ = $(SRC:.cpp=.o) 44 | OUT = libGrpNVMReadCmd.a 45 | 46 | all: $(OUT) 47 | 48 | .cpp.o: 49 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 50 | 51 | $(OUT): $(OBJ) 52 | ar rcs $(OUT) $(OBJ) 53 | 54 | clean: 55 | rm -f $(OBJ) $(OUT) Makefile.bak 56 | 57 | clobber: clean 58 | rm -f $(OUT) 59 | -------------------------------------------------------------------------------- /GrpNVMReadCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMReadCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | 32 | } // namespace 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /GrpNVMReadCmd/grpNVMReadCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPNVMREADCMD_H_ 18 | #define _GRPNVMREADCMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpNVMReadCmd { 23 | 24 | 25 | /** 26 | * This class implements NVM cmd set read test cases that don't require data 27 | * to be written to media 1st to detect a successful outcome. 28 | */ 29 | class GrpNVMReadCmd : public Group 30 | { 31 | public: 32 | GrpNVMReadCmd(size_t grpNum); 33 | virtual ~GrpNVMReadCmd(); 34 | }; 35 | 36 | } // namespace 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /GrpNVMWriteCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpNVMWriteCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMWriteCmd.cpp \ 21 | createResources_r10b.cpp \ 22 | lbaOutOfRangeBare_r10b.cpp \ 23 | lbaOutOfRangeBare_r12.cpp \ 24 | invalidNamspc_r10b.cpp \ 25 | unsupportRsvdFields_r10b.cpp \ 26 | unsupportRsvdFields_r11b.cpp \ 27 | unsupportRsvdFields_r12.cpp \ 28 | ignoreMetaPtrBare_r10b.cpp \ 29 | ignoreMetaPtrBare_r12.cpp \ 30 | protInfoIgnoreBare_r10b.cpp \ 31 | protInfoIgnoreBare_r12.cpp \ 32 | FUA_r10b.cpp \ 33 | limitedRetry_r10b.cpp \ 34 | lbaOutOfRangeMeta_r10b.cpp \ 35 | lbaOutOfRangeMeta_r12.cpp \ 36 | ignoreMetaPtrMeta_r10b.cpp \ 37 | ignoreMetaPtrMeta_r12.cpp \ 38 | protInfoIgnoreMeta_r10b.cpp \ 39 | protInfoIgnoreMeta_r12.cpp 40 | 41 | .SUFFIXES: .cpp 42 | 43 | OBJ = $(SRC:.cpp=.o) 44 | OUT = libGrpNVMWriteCmd.a 45 | 46 | all: $(OUT) 47 | 48 | .cpp.o: 49 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 50 | 51 | $(OUT): $(OBJ) 52 | ar rcs $(OUT) $(OBJ) 53 | 54 | clean: 55 | rm -f $(OBJ) $(OUT) Makefile.bak 56 | 57 | clobber: clean 58 | rm -f $(OUT) 59 | -------------------------------------------------------------------------------- /GrpNVMWriteCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMWriteCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | 32 | } // namespace 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /GrpNVMWriteCmd/grpNVMWriteCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPNVMWRITECMD_H_ 18 | #define _GRPNVMWRITECMD_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpNVMWriteCmd { 23 | 24 | 25 | /** 26 | * This class implements NVM cmd set write test cases that don't require data 27 | * to be written to media 1st to detect a successful outcome. 28 | */ 29 | class GrpNVMWriteCmd : public Group 30 | { 31 | public: 32 | GrpNVMWriteCmd(size_t grpNum); 33 | virtual ~GrpNVMWriteCmd(); 34 | }; 35 | 36 | } // namespace 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /GrpNVMWriteReadCombo/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMWriteReadCombo.cpp \ 21 | createResources_r10b.cpp \ 22 | prpOffsetSinglePgSingleBlk_r10b.cpp \ 23 | prpOffsetSinglePgMultiBlk_r10b.cpp \ 24 | prpOffsetDualPgMultiBlk_r10b.cpp \ 25 | prpOffsetMultiPgMultiBlk_r10b.cpp \ 26 | startingLBABare_r10b.cpp \ 27 | nlbaBare_r10b.cpp \ 28 | datasetMgmt_r10b.cpp \ 29 | startingLBAMeta_r10b.cpp \ 30 | nlbaMeta_r10b.cpp \ 31 | prp2Rsvd_r10b.cpp 32 | 33 | .SUFFIXES: .cpp 34 | 35 | OBJ = $(SRC:.cpp=.o) 36 | OUT = libGrpNVMWriteReadCombo.a 37 | 38 | all: $(OUT) 39 | 40 | .cpp.o: 41 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 42 | 43 | $(OUT): $(OBJ) 44 | ar rcs $(OUT) $(OBJ) 45 | 46 | clean: 47 | rm -f $(OBJ) $(OUT) Makefile.bak 48 | 49 | clobber: clean 50 | rm -f $(OUT) 51 | -------------------------------------------------------------------------------- /GrpNVMWriteReadCombo/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMWriteReadCombo { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | 31 | 32 | } // namespace 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /GrpNVMWriteReadCombo/grpNVMWriteReadCombo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPNVMWRITEREADCOMBO_H_ 18 | #define _GRPNVMWRITEREADCOMBO_H_ 19 | 20 | #include "../group.h" 21 | #include "../Exception/frmwkEx.h" 22 | 23 | 24 | namespace GrpNVMWriteReadCombo { 25 | 26 | 27 | /** 28 | * This class implements NVM cmd set write/read test cases that require data 29 | * verification to detect a successful outcome. 30 | */ 31 | class GrpNVMWriteReadCombo : public Group 32 | { 33 | public: 34 | GrpNVMWriteReadCombo(size_t grpNum); 35 | virtual ~GrpNVMWriteReadCombo(); 36 | }; 37 | 38 | } // namespace 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /GrpNVMWriteUncorrectCmd/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpNVMWriteUncorrectCmd/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpNVMWriteUncorrectCmd.cpp 21 | 22 | .SUFFIXES: .cpp 23 | 24 | OBJ = $(SRC:.cpp=.o) 25 | OUT = libGrpNVMWriteUncorrectCmd.a 26 | 27 | all: $(OUT) 28 | 29 | .cpp.o: 30 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 31 | 32 | $(OUT): $(OBJ) 33 | ar rcs $(OUT) $(OBJ) 34 | 35 | clean: 36 | rm -f $(OBJ) $(OUT) Makefile.bak 37 | 38 | clobber: clean 39 | rm -f $(OUT) 40 | -------------------------------------------------------------------------------- /GrpNVMWriteUncorrectCmd/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpNVMWriteUncorrectCmd { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpNVMWriteUncorrectCmd/grpNVMWriteUncorrectCmd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "tnvme.h" 18 | #include "../Exception/frmwkEx.h" 19 | #include "grpNVMWriteUncorrectCmd.h" 20 | 21 | namespace GrpNVMWriteUncorrectCmd { 22 | 23 | 24 | GrpNVMWriteUncorrectCmd::GrpNVMWriteUncorrectCmd(size_t grpNum) : 25 | Group(grpNum, "GrpNVMWriteUncorrectCmd", 26 | "NVM cmd set write uncorrectable test cases") 27 | { 28 | // For complete details about the APPEND_TEST_AT_?LEVEL() macros: 29 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering" and 30 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Strategy 31 | switch (gCmdLine.rev) { 32 | case SPECREV_10b: 33 | case SPECREV_11: 34 | case SPECREV_12: 35 | case SPECREV_121: 36 | case SPECREV_13: 37 | break; 38 | 39 | default: 40 | case SPECREVTYPE_FENCE: 41 | throw FrmwkEx(HERE, "Object created with an unknown SpecRev=%d", 42 | gCmdLine.rev); 43 | } 44 | } 45 | 46 | 47 | GrpNVMWriteUncorrectCmd::~GrpNVMWriteUncorrectCmd() 48 | { 49 | // mTests deallocated in parent 50 | } 51 | 52 | } // namespace 53 | -------------------------------------------------------------------------------- /GrpNVMWriteUncorrectCmd/grpNVMWriteUncorrectCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GrpNVMWriteUncorrectCmd_H_ 18 | #define _GrpNVMWriteUncorrectCmd_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpNVMWriteUncorrectCmd { 23 | 24 | 25 | /** 26 | * This class implements NVM cmd write uncorrectable test cases. 27 | */ 28 | class GrpNVMWriteUncorrectCmd : public Group 29 | { 30 | public: 31 | GrpNVMWriteUncorrectCmd(size_t grpNum); 32 | virtual ~GrpNVMWriteUncorrectCmd(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpPciRegisters/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpPciRegisters/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpPciRegisters.cpp \ 21 | allPciRegs_r10b.cpp 22 | 23 | .SUFFIXES: .cpp 24 | 25 | OBJ = $(SRC:.cpp=.o) 26 | OUT = libGrpPciRegisters.a 27 | 28 | all: $(OUT) 29 | 30 | .cpp.o: 31 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 32 | 33 | $(OUT): $(OBJ) 34 | ar rcs $(OUT) $(OBJ) 35 | 36 | clean: 37 | rm -f $(OBJ) $(OUT) Makefile.bak 38 | 39 | clobber: clean 40 | rm -f $(OUT) 41 | -------------------------------------------------------------------------------- /GrpPciRegisters/grpPciRegisters.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "../Exception/frmwkEx.h" 18 | #include "grpPciRegisters.h" 19 | #include "allPciRegs_r10b.h" 20 | 21 | namespace GrpPciRegisters { 22 | 23 | 24 | GrpPciRegisters::GrpPciRegisters(size_t grpNum) : 25 | Group(grpNum, "GrpPciRegisters", "PCI registers syntactic") 26 | { 27 | // For complete details about the APPEND_TEST_AT_?LEVEL() macros: 28 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering" and 29 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Strategy 30 | switch (gCmdLine.rev) { 31 | case SPECREV_11: 32 | case SPECREV_12: 33 | case SPECREV_121: 34 | case SPECREV_13: 35 | case SPECREV_10b: 36 | APPEND_TEST_AT_XLEVEL(AllPciRegs_r10b, GrpPciRegisters) 37 | break; 38 | 39 | default: 40 | case SPECREVTYPE_FENCE: 41 | throw FrmwkEx(HERE, "Object created with an unknown SpecRev=%d", 42 | gCmdLine.rev); 43 | } 44 | } 45 | 46 | 47 | GrpPciRegisters::~GrpPciRegisters() 48 | { 49 | // mTests deallocated in parent 50 | } 51 | 52 | } // namespace 53 | -------------------------------------------------------------------------------- /GrpPciRegisters/grpPciRegisters.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPPCIREGISTERS_H_ 18 | #define _GRPPCIREGISTERS_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpPciRegisters { 23 | 24 | /** 25 | * This class implements a logical grouping of test cases for all NVME 26 | * specification document releases. It is logically grouping the PCI space 27 | * register syntactical compliance. 28 | */ 29 | class GrpPciRegisters : public Group 30 | { 31 | public: 32 | GrpPciRegisters(size_t grpNum); 33 | virtual ~GrpPciRegisters(); 34 | }; 35 | 36 | } // namespace 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /GrpQueues/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpQueues/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpQueues.cpp \ 21 | initialStateAdmin_r10b.cpp \ 22 | adminQRollChkSame_r10b.cpp \ 23 | adminQRollChkDiff_r10b.cpp \ 24 | createResources_r10b.cpp \ 25 | ioqRollChkSame_r10b.cpp \ 26 | ioqRollChkDiff_r10b.cpp \ 27 | manySQtoCQAssoc_r10b.cpp \ 28 | adminQFull_r10b.cpp \ 29 | ioqFull_r10b.cpp \ 30 | manyCmdSubmit_r10b.cpp \ 31 | illegalDeleteQs_r10b.cpp \ 32 | illegalCreateOrder_r10b.cpp \ 33 | maxIOQ_r10b.cpp \ 34 | sqcqSizeMismatch_r10b.cpp \ 35 | qIdVariations_r10b.cpp \ 36 | illegalCreateQs_r10b.cpp 37 | 38 | .SUFFIXES: .cpp 39 | 40 | OBJ = $(SRC:.cpp=.o) 41 | OUT = libGrpQueues.a 42 | 43 | all: $(OUT) 44 | 45 | .cpp.o: 46 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 47 | 48 | $(OUT): $(OBJ) 49 | ar rcs $(OUT) $(OBJ) 50 | 51 | clean: 52 | rm -f $(OBJ) $(OUT) Makefile.bak 53 | 54 | clobber: clean 55 | rm -f $(OUT) 56 | -------------------------------------------------------------------------------- /GrpQueues/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpQueues { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_CONTIG_GROUP_ID "IOCQContig" 27 | #define IOSQ_CONTIG_GROUP_ID "IOSQContig" 28 | #define IOCQ_DISCONTIG_GROUP_ID "IOCQDiscontig" 29 | #define IOSQ_DISCONTIG_GROUP_ID "IOSQDiscontig" 30 | #define IOQ_ID 1 31 | 32 | 33 | 34 | } // namespace 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /GrpQueues/grpQueues.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPQUEUES_H_ 18 | #define _GRPQUEUES_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpQueues { 23 | 24 | 25 | /** 26 | * This class implements a logical grouping of test cases for queues of the 27 | * NVME hardware. This mainly consists of the tests which validates general 28 | * queue functionality. 29 | */ 30 | class GrpQueues : public Group 31 | { 32 | public: 33 | GrpQueues(size_t grpNum); 34 | virtual ~GrpQueues(); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GrpReservationsHostA/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpReservationsHostA.cpp \ 21 | createResources_r11.cpp \ 22 | unsupportRsvdFields_r10b.cpp \ 23 | registerReservation.cpp \ 24 | replaceReservation.cpp \ 25 | acquireReservation.cpp \ 26 | releaseReservation.cpp 27 | 28 | .SUFFIXES: .cpp 29 | 30 | OBJ = $(SRC:.cpp=.o) 31 | OUT = libGrpReservationsHostA.a 32 | 33 | all: $(OUT) 34 | 35 | .cpp.o: 36 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 37 | 38 | $(OUT): $(OBJ) 39 | ar rcs $(OUT) $(OBJ) 40 | 41 | clean: 42 | rm -rf *.a 43 | rm -rf *.o 44 | rm -f $(OBJ) Makefile.bak 45 | 46 | clobber: clean 47 | rm -f $(OUT) 48 | -------------------------------------------------------------------------------- /GrpReservationsHostA/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpReservations { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } // namespace 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpReservationsHostA/grpReservationsHostA.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPRESERVATIONSHOSTA_H_ 18 | #define _GRPRESERVATIONSHOSTA_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpReservationsHostA { 23 | 24 | 25 | /** 26 | * This class implements admin cmd set async event request test cases. 27 | */ 28 | class GrpReservationsHostA : public Group 29 | { 30 | public: 31 | GrpReservationsHostA(size_t grpNum); 32 | virtual ~GrpReservationsHostA(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GrpReservationsHostA/unsupportRsvdFields_r10b.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _UNSUPPORTRSVDFIELDS_r10b_H_ 18 | #define _UNSUPPORTRSVDFIELDS_r10b_H_ 19 | 20 | #include "test.h" 21 | #include "../Queues/acq.h" 22 | #include "../Queues/asq.h" 23 | 24 | namespace GrpReservationsHostA { 25 | 26 | 27 | /** \verbatim 28 | * ----------------------------------------------------------------------------- 29 | * ----------------Mandatory rules for children to follow----------------------- 30 | * ----------------------------------------------------------------------------- 31 | * 1) See notes in the header file of the Test base class 32 | * \endverbatim 33 | */ 34 | class UnsupportRsvdFields_r10b : public Test 35 | { 36 | public: 37 | UnsupportRsvdFields_r10b(string grpName, string testName); 38 | virtual ~UnsupportRsvdFields_r10b(); 39 | 40 | virtual UnsupportRsvdFields_r10b *Clone() const 41 | { return new UnsupportRsvdFields_r10b(*this); } 42 | UnsupportRsvdFields_r10b &operator=(const UnsupportRsvdFields_r10b &other); 43 | UnsupportRsvdFields_r10b(const UnsupportRsvdFields_r10b &other); 44 | 45 | 46 | protected: 47 | virtual void RunCoreTest(); 48 | virtual RunType RunnableCoreTest(bool preserve); 49 | 50 | 51 | private: 52 | 53 | }; 54 | 55 | } // namespace 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /GrpReservationsHostB/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpReservationsHostB.cpp \ 21 | createResources_r11.cpp \ 22 | unsupportRsvdFields_r10b.cpp \ 23 | registerReservation.cpp \ 24 | replaceReservation.cpp \ 25 | acquireReservation.cpp \ 26 | readWriteToUnacquiredReservation.cpp 27 | 28 | .SUFFIXES: .cpp 29 | 30 | OBJ = $(SRC:.cpp=.o) 31 | OUT = libGrpReservationsHostB.a 32 | 33 | all: $(OUT) 34 | 35 | .cpp.o: 36 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 37 | 38 | $(OUT): $(OBJ) 39 | ar rcs $(OUT) $(OBJ) 40 | 41 | clean: 42 | rm -rf *.a 43 | rm -rf *.o 44 | rm -f $(OBJ) Makefile.bak 45 | 46 | clobber: clean 47 | rm -f $(OUT) 48 | -------------------------------------------------------------------------------- /GrpReservationsHostB/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpReservations { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_GROUP_ID "IOCQ" 27 | #define IOSQ_GROUP_ID "IOSQ" 28 | #define IOQ_ID 1 29 | 30 | } // namespace 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GrpReservationsHostB/grpReservationsHostB.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPRESERVATIONSHOSTB_H_ 18 | #define _GRPRESERVATIONSHOSTB_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpReservationsHostB { 23 | 24 | /** 25 | * This class implements admin cmd set async event request test cases. 26 | */ 27 | class GrpReservationsHostB : public Group 28 | { 29 | public: 30 | GrpReservationsHostB(size_t grpNum); 31 | virtual ~GrpReservationsHostB(); 32 | }; 33 | 34 | } // namespace 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /GrpReservationsHostB/unsupportRsvdFields_r10b.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _UNSUPPORTRSVDFIELDS_r10b_H_ 18 | #define _UNSUPPORTRSVDFIELDS_r10b_H_ 19 | 20 | #include "test.h" 21 | #include "../Queues/acq.h" 22 | #include "../Queues/asq.h" 23 | 24 | namespace GrpReservationsHostB { 25 | 26 | 27 | /** \verbatim 28 | * ----------------------------------------------------------------------------- 29 | * ----------------Mandatory rules for children to follow----------------------- 30 | * ----------------------------------------------------------------------------- 31 | * 1) See notes in the header file of the Test base class 32 | * \endverbatim 33 | */ 34 | class UnsupportRsvdFields_r10b : public Test 35 | { 36 | public: 37 | UnsupportRsvdFields_r10b(string grpName, string testName); 38 | virtual ~UnsupportRsvdFields_r10b(); 39 | 40 | virtual UnsupportRsvdFields_r10b *Clone() const 41 | { return new UnsupportRsvdFields_r10b(*this); } 42 | UnsupportRsvdFields_r10b &operator=(const UnsupportRsvdFields_r10b &other); 43 | UnsupportRsvdFields_r10b(const UnsupportRsvdFields_r10b &other); 44 | 45 | 46 | protected: 47 | virtual void RunCoreTest(); 48 | virtual RunType RunnableCoreTest(bool preserve); 49 | 50 | 51 | private: 52 | 53 | }; 54 | 55 | } // namespace 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /GrpResets/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpResets/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpResets.cpp \ 21 | ctrlrResetIOQDeleted_r10b.cpp \ 22 | ctrlrResetNotEffectAdminQ_r10b.cpp 23 | 24 | .SUFFIXES: .cpp 25 | 26 | OBJ = $(SRC:.cpp=.o) 27 | OUT = libGrpResets.a 28 | 29 | all: $(OUT) 30 | 31 | .cpp.o: 32 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 33 | 34 | $(OUT): $(OBJ) 35 | ar rcs $(OUT) $(OBJ) 36 | 37 | clean: 38 | rm -f $(OBJ) $(OUT) Makefile.bak 39 | 40 | clobber: clean 41 | rm -f $(OUT) 42 | -------------------------------------------------------------------------------- /GrpResets/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpResets { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | #define IOCQ_CONTIG_GROUP_ID "IOCQContig" 27 | #define IOSQ_CONTIG_GROUP_ID "IOSQContig" 28 | #define IOCQ_DISCONTIG_GROUP_ID "IOCQDiscontig" 29 | #define IOSQ_DISCONTIG_GROUP_ID "IOSQDiscontig" 30 | 31 | 32 | 33 | } // namespace 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /GrpResets/grpResets.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "grpResets.h" 18 | #include "ctrlrResetIOQDeleted_r10b.h" 19 | #include "ctrlrResetNotEffectAdminQ_r10b.h" 20 | 21 | namespace GrpResets { 22 | 23 | 24 | GrpResets::GrpResets(size_t grpNum) : 25 | Group(grpNum, "GrpResets", "All Ctrl'r reset related tests") 26 | { 27 | // For complete details about the APPEND_TEST_AT_?LEVEL() macros: 28 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering" and 29 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Strategy 30 | switch (gCmdLine.rev) { 31 | case SPECREV_11: 32 | case SPECREV_12: 33 | case SPECREV_121: 34 | case SPECREV_13: 35 | case SPECREV_10b: 36 | APPEND_TEST_AT_XLEVEL(CtrlrResetIOQDeleted_r10b, GrpResets) 37 | APPEND_TEST_AT_XLEVEL(CtrlrResetNotEffectAdminQ_r10b, GrpResets) 38 | break; 39 | 40 | default: 41 | case SPECREVTYPE_FENCE: 42 | throw FrmwkEx(HERE, "Object created with an unknown SpecRev=%d", 43 | gCmdLine.rev); 44 | } 45 | } 46 | 47 | 48 | GrpResets::~GrpResets() 49 | { 50 | // mTests deallocated in parent 51 | } 52 | 53 | } // namespace 54 | -------------------------------------------------------------------------------- /GrpResets/grpResets.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPRESETS_H_ 18 | #define _GRPRESETS_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpResets { 23 | 24 | 25 | /** 26 | * This class implements a logical grouping of test cases for all NVME 27 | * specification document releases. It is logically grouping the controller 28 | * resets related tests. 29 | */ 30 | class GrpResets : public Group 31 | { 32 | public: 33 | GrpResets(size_t grpNum); 34 | virtual ~GrpResets(); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GrpTemplate/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /GrpTemplate/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | grpTemplate.cpp \ 21 | testCase_r10b.cpp 22 | 23 | .SUFFIXES: .cpp 24 | 25 | OBJ = $(SRC:.cpp=.o) 26 | OUT = libGrpTemplate.a 27 | 28 | all: $(OUT) 29 | 30 | .cpp.o: 31 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 32 | 33 | $(OUT): $(OBJ) 34 | ar rcs $(OUT) $(OBJ) 35 | 36 | clean: 37 | rm -f $(OBJ) $(OUT) Makefile.bak 38 | 39 | clobber: clean 40 | rm -f $(OUT) 41 | -------------------------------------------------------------------------------- /GrpTemplate/grpDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPDEFS_H_ 18 | #define _GRPDEFS_H_ 19 | 20 | #include "dutDefs.h" 21 | 22 | namespace GrpTemplate { 23 | 24 | #define ACQ_GROUP_ID "ACQ" 25 | #define ASQ_GROUP_ID "ASQ" 26 | 27 | 28 | } // namespace 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /GrpTemplate/grpTemplate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "grpTemplate.h" 18 | #include "testCase_r10b.h" 19 | 20 | namespace GrpTemplate { 21 | 22 | 23 | GrpTemplate::GrpTemplate(size_t grpNum) : 24 | Group(grpNum, "GrpTemplate", "Template group description") 25 | { 26 | // For complete details about the APPEND_TEST_AT_?LEVEL() macros: 27 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering" and 28 | // "https://github.com/nvmecompliance/tnvme/wiki/Test-Strategy 29 | switch (gCmdLine.rev) { 30 | case SPECREV_11: 31 | case SPECREV_12: 32 | case SPECREV_121: 33 | case SPECREV_13: 34 | case SPECREV_10b: 35 | APPEND_TEST_AT_XLEVEL(TestCase_r10b, GrpTemplate) 36 | break; 37 | 38 | default: 39 | case SPECREVTYPE_FENCE: 40 | throw FrmwkEx(HERE, "Object created with an unknown SpecRev=%d", 41 | gCmdLine.rev); 42 | } 43 | } 44 | 45 | 46 | GrpTemplate::~GrpTemplate() 47 | { 48 | // mTests deallocated in parent 49 | } 50 | 51 | } // namespace 52 | -------------------------------------------------------------------------------- /GrpTemplate/grpTemplate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GRPTEMPLATE_H_ 18 | #define _GRPTEMPLATE_H_ 19 | 20 | #include "../group.h" 21 | 22 | namespace GrpTemplate { 23 | 24 | 25 | /** 26 | * This class implements a template for all groups to come. 27 | */ 28 | class GrpTemplate : public Group 29 | { 30 | public: 31 | GrpTemplate(size_t grpNum); 32 | virtual ~GrpTemplate(); 33 | }; 34 | 35 | } // namespace 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Intel Corporation. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /Queues/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /Queues/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | queue.cpp \ 21 | ce.cpp \ 22 | cq.cpp \ 23 | sq.cpp \ 24 | acq.cpp \ 25 | asq.cpp \ 26 | iocq.cpp \ 27 | iosq.cpp \ 28 | backdoor.cpp 29 | 30 | .SUFFIXES: .cpp 31 | 32 | OBJ = $(SRC:.cpp=.o) 33 | OUT = libQueues.a 34 | 35 | all: $(OUT) 36 | 37 | .cpp.o: 38 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 39 | 40 | $(OUT): $(OBJ) 41 | ar rcs $(OUT) $(OBJ) 42 | 43 | clean: 44 | rm -f $(OBJ) $(OUT) Makefile.bak 45 | 46 | clobber: clean 47 | rm -f $(OUT) 48 | -------------------------------------------------------------------------------- /Queues/acq.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "acq.h" 18 | #include "globals.h" 19 | 20 | SharedACQPtr ACQ::NullACQPtr; 21 | const uint16_t ACQ::IDEAL_ELEMENT_SIZE = 16; 22 | 23 | 24 | ACQ::ACQ() : CQ(0, Trackable::OBJTYPE_FENCE) 25 | { 26 | // This constructor will throw 27 | } 28 | 29 | 30 | ACQ::ACQ(int fd) : CQ(fd, Trackable::OBJ_ACQ) 31 | { 32 | } 33 | 34 | 35 | ACQ::~ACQ() 36 | { 37 | } 38 | 39 | 40 | void 41 | ACQ::Init(uint32_t numEntries) 42 | { 43 | LOG_WARN("Even though ACQ IRQ's enabled, may not be globally"); 44 | CQ::Init(0, IDEAL_ELEMENT_SIZE, numEntries, true, 0); 45 | } 46 | -------------------------------------------------------------------------------- /Queues/acq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ACQ_H_ 18 | #define _ACQ_H_ 19 | 20 | #include "cq.h" 21 | 22 | class ACQ; // forward definition 23 | typedef boost::shared_ptr SharedACQPtr; 24 | #define CAST_TO_ACQ(shared_trackable_ptr) \ 25 | boost::dynamic_pointer_cast(shared_trackable_ptr); 26 | 27 | 28 | /** 29 | * This class is meant to be instantiated and represents an ACQ. After 30 | * instantiation the Init() methods must be called to attain something useful. 31 | * 32 | * @note This class may throw exceptions. 33 | */ 34 | class ACQ : public CQ 35 | { 36 | public: 37 | /** 38 | * @param fd Pass the opened file descriptor for the device under test 39 | */ 40 | ACQ(int fd); 41 | virtual ~ACQ(); 42 | 43 | /// Used to compare for NULL pointers being returned by allocations 44 | static SharedACQPtr NullACQPtr; 45 | static const uint16_t IDEAL_ELEMENT_SIZE; 46 | 47 | /** 48 | * Initialize this object and allocates a contiguous ACQ 49 | * @param numEntries Pass the number of elements within the Q (1 - based) 50 | */ 51 | void Init(uint32_t numEntries); 52 | 53 | 54 | private: 55 | ACQ(); 56 | }; 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /Queues/asq.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "asq.h" 18 | #include "globals.h" 19 | #include "../Cmds/createIOCQ.h" 20 | 21 | SharedASQPtr ASQ::NullASQPtr; 22 | const uint16_t ASQ::IDEAL_ELEMENT_SIZE = 64; 23 | 24 | 25 | ASQ::ASQ() : SQ(0, Trackable::OBJTYPE_FENCE) 26 | { 27 | // This constructor will throw 28 | } 29 | 30 | 31 | ASQ::ASQ(int fd) : SQ(fd, Trackable::OBJ_ASQ) 32 | { 33 | } 34 | 35 | 36 | ASQ::~ASQ() 37 | { 38 | } 39 | 40 | 41 | void 42 | ASQ::Init(uint32_t numEntries) 43 | { 44 | SQ::Init(0, IDEAL_ELEMENT_SIZE, numEntries, 0); 45 | } 46 | 47 | 48 | void 49 | ASQ::Send(SharedCmdPtr cmd, uint16_t &uniqueId) 50 | { 51 | // Detect if doing something that looks suspicious/incorrect/illegal 52 | if ((GetQId() == 0) && // if it's admin cmd 53 | (cmd->GetOpcode() == CreateIOCQ::Opcode) && 54 | cmd->GetBit(11, 1) && // if IOCQ is using IRQ's, but 55 | (gCtrlrConfig->IrqsEnabled() == false)) { // dnvme is NOT using IRQ's 56 | 57 | LOG_ERR("Invoking IOCQ with IRQ's, but dnvme disabled IRQ's"); 58 | throw FrmwkEx(HERE, 59 | "Rethink test case, see gCtrlrConfig->SetIrqScheme()"); 60 | } 61 | 62 | SQ::Send(cmd, uniqueId); 63 | } 64 | -------------------------------------------------------------------------------- /Queues/backdoor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "backdoor.h" 18 | #include "../Exception/frmwkEx.h" 19 | 20 | 21 | Backdoor::Backdoor() 22 | { 23 | throw FrmwkEx(HERE, "Illegal constructor"); 24 | } 25 | 26 | 27 | Backdoor::Backdoor(int fd) 28 | { 29 | mFD = fd; 30 | if (mFD < 0) 31 | throw FrmwkEx(HERE, "Object created with a bad FD=%d", fd); 32 | } 33 | 34 | 35 | Backdoor::~Backdoor() 36 | { 37 | } 38 | 39 | 40 | void 41 | Backdoor::SetToxicCmdValue(struct backdoor_inject &injectReq) 42 | { 43 | int ret; 44 | 45 | // This is volatile, see class level header comment. 46 | if ((ret = ioctl(mFD, NVME_IOCTL_TOXIC_64B_DWORD, &injectReq)) < 0) 47 | throw FrmwkEx(HERE, "Backdoor toxic injection failed: 0x%02X", ret); 48 | } 49 | -------------------------------------------------------------------------------- /Queues/se.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SE_H_ 18 | #define _SE_H_ 19 | 20 | #include 21 | 22 | 23 | struct SEbyDW { 24 | uint32_t dw0; 25 | uint32_t dw1; 26 | uint32_t dw2; 27 | uint32_t dw3; 28 | uint32_t dw4; 29 | uint32_t dw5; 30 | uint32_t dw6; 31 | uint32_t dw7; 32 | uint32_t dw8; 33 | uint32_t dw9; 34 | uint32_t dw10; 35 | uint32_t dw11; 36 | uint32_t dw12; 37 | uint32_t dw13; 38 | uint32_t dw14; 39 | uint32_t dw15; 40 | }; 41 | 42 | struct SEbyName { 43 | uint32_t OPC : 8; 44 | uint32_t FUSE : 2; 45 | uint32_t RES0 : 6; 46 | uint32_t CID : 16; 47 | uint32_t NSID; 48 | uint32_t RES1; 49 | uint32_t RES2; 50 | uint32_t MPTRLo; 51 | uint32_t MPTRHi; 52 | uint32_t PRP1Lo; 53 | uint32_t PRP1Hi; 54 | uint32_t PRP2Lo; 55 | uint32_t PRP2Hi; 56 | uint32_t CDW10; 57 | uint32_t CDW11; 58 | uint32_t CDW12; 59 | uint32_t CDW13; 60 | uint32_t CDW14; 61 | uint32_t CDW15; 62 | }; 63 | 64 | /** 65 | * Submission Element (SE) definition. 66 | */ 67 | union SE { 68 | struct SEbyDW d; 69 | struct SEbyName n; 70 | }; 71 | 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is the tnvme repository in the nvmecompliance project. 2 | 3 | This repo contains the user-mode code for the NVMe Compliance Suite. 4 | 5 | The depth of information for this project is too immense for a simple readme file, thus for complete project details refer to https://github.com/nvmecompliance/tnvme/wiki. 6 | 7 | Email: compliance@nvmexpress.org for more information. 8 | -------------------------------------------------------------------------------- /Singletons/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /Singletons/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | registers.cpp \ 21 | memBuffer.cpp \ 22 | objRsrc.cpp \ 23 | metaRsrc.cpp \ 24 | rsrcMngr.cpp \ 25 | ctrlrCap.cpp \ 26 | ctrlrConfig.cpp \ 27 | informative.cpp 28 | 29 | .SUFFIXES: .cpp 30 | 31 | OBJ = $(SRC:.cpp=.o) 32 | OUT = libSingletons.a 33 | 34 | all: $(OUT) 35 | 36 | .cpp.o: 37 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 38 | 39 | $(OUT): $(OBJ) 40 | ar rcs $(OUT) $(OBJ) 41 | 42 | clean: 43 | rm -f $(OBJ) $(OUT) Makefile.bak 44 | 45 | clobber: clean 46 | rm -f $(OUT) 47 | -------------------------------------------------------------------------------- /Singletons/readme: -------------------------------------------------------------------------------- 1 | Singleton's should not be allowed to throw exceptions even if they use objects 2 | which do throw. Thus they must catch exceptions and return back booleans or 3 | return codes. 4 | 5 | Singleton's usually manage the IOCTL's into the driver and the decision as to 6 | whether an error is truly an error should be left up to the test case. Remember 7 | a test which seeks to cause an error and then sees that error is a sucessful 8 | test case. So Singleton's should return failures and let higher level logic 9 | decifer if this is truely an error condition. The policy should be left up to 10 | the higher layers. Layers, i.e. Singleton's, which are closest to the hardware 11 | should not perform policy decisions. 12 | 13 | Additionally, the tnvme framework relies upon Singlton's as there are cmd line 14 | options to directly poke and peek at the hardware. If a singleton throws then 15 | the main() function must catch all exceptions. Currently the main framework 16 | assumes it will never see an exception. Each test case, which almost all do 17 | throw, will catch and convert them to return codes so that the main() framework 18 | won't have to worry about exceptions. Again here, the policy of determining if 19 | an error really is an error is left up to the person executing the cmd line 20 | option which directly drove the Singleton to interact with the hardware. It 21 | could be that the error was expected. 22 | -------------------------------------------------------------------------------- /Utils/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /Utils/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LDFLAGS=-lm 16 | LIBS = -L../ -L/usr/local/lib -lm 17 | INCLUDES = -I. -I../ -I../../ -I/usr/local/include 18 | 19 | SRC = \ 20 | kernelAPI.cpp \ 21 | buffers.cpp \ 22 | fileSystem.cpp \ 23 | queues.cpp \ 24 | io.cpp \ 25 | irq.cpp 26 | 27 | .SUFFIXES: .cpp 28 | 29 | OBJ = $(SRC:.cpp=.o) 30 | OUT = libUtils.a 31 | 32 | all: $(OUT) 33 | 34 | .cpp.o: 35 | $(CC) $(INCLUDES) $(CFLAGS) $(DFLAGS) -c $< -o $@ $(LDFLAGS) 36 | 37 | $(OUT): $(OBJ) 38 | ar rcs $(OUT) $(OBJ) 39 | 40 | clean: 41 | rm -f $(OBJ) $(OUT) Makefile.bak 42 | 43 | clobber: clean 44 | rm -f $(OUT) 45 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | mdLine/gCmdLine/g 2 | 3 | # Copyright (c) 2011, Intel Corporation. 4 | # 5 | mdLine/gCmdLine/g 6 | mdLine/gCmdLine/g 7 | mdLine/gCmdLine/g 8 | # 9 | mdLine/gCmdLine/g 10 | # 11 | mdLine/gCmdLine/g 12 | mdLine/gCmdLine/g 13 | mdLine/gCmdLine/g 14 | mdLine/gCmdLine/g 15 | mdLine/gCmdLine/g 16 | # 17 | 18 | RPMCOMPILEDIR=$1 19 | RPMSPECFILE=$2 20 | RPMSRCFILE=$3 21 | 22 | mdLine/gCmdLine/g 23 | mdLine/gCmdLine/g 24 | mdLine/gCmdLine/g 25 | mdLine/gCmdLine/g 26 | mdLine/gCmdLine/g 27 | mdLine/gCmdLine/g 28 | echo "" 29 | } 30 | 31 | mdLine/gCmdLine/g 32 | if [[ $EUID -eq 0 ]]; then 33 | mdLine/gCmdLine/g 34 | exit 35 | fi 36 | 37 | if [ -z $RPMCOMPILEDIR ] || [ -z $RPMSPECFILE ] || [ -z $RPMSRCFILE ]; then 38 | mdLine/gCmdLine/g 39 | exit 40 | fi 41 | 42 | mdLine/gCmdLine/g 43 | mdLine/gCmdLine/g 44 | mdLine/gCmdLine/g 45 | rm -rf $RPMCOMPILEDIR 46 | mkdir -p $RPMCOMPILEDIR/{BUILDROOT,BUILD,RPMS,S{OURCE,PEC,RPM}S} 47 | cp -p $RPMSRCFILE.tar.gz $RPMCOMPILEDIR 48 | cp -p $RPMSRCFILE.tar.gz $RPMCOMPILEDIR/SOURCES 49 | cp -p ${RPMSPECFILE} $RPMCOMPILEDIR/SPECS 50 | cd $RPMCOMPILEDIR/SPECS 51 | rpmbuild --define "_topdir ${RPMCOMPILEDIR}" --define "_major $MAJOR" --define "_minor $MINOR" -ba ${RPMSPECFILE} 52 | 53 | exit 54 | -------------------------------------------------------------------------------- /classHierarchy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2011, Intel Corporation. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | firefox ./Doc/HTML/index.html 19 | 20 | exit 21 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nvmecompliance/tnvme/30a19c6829b571b2c7bdf854daf0351bfe038032/configure -------------------------------------------------------------------------------- /dbgMemLeak.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2011, Intel Corporation. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | TNVME_CMD_LINE=$@ 19 | 20 | Usage() { 21 | echo "usage...." 22 | echo " $0 " 23 | echo "" 24 | } 25 | 26 | if [ -z $TNVME_CMD_LINE ]; then 27 | Usage 28 | exit 29 | fi 30 | 31 | rm -rf ./Logs 32 | mkdir -m 0777 ./Logs 33 | echo ./tnvme -k skiptest.cfg $TNVME_CMD_LINE 2>&1 | tee ./Logs/tnvme.out 34 | #valgrind --tool=memcheck ./tnvme -k skiptest.cfg $TNVME_CMD_LINE 2>&1 | tee ./Logs/tnvme.out 35 | valgrind --tool=memcheck --leak-check=full --track-origins=yes -v --show-reachable=yes ./tnvme -k skiptest.cfg $TNVME_CMD_LINE 2>&1 | tee ./Logs/tnvme.out 36 | -------------------------------------------------------------------------------- /dnvme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DNVME_H_ 18 | #define _DNVME_H_ 19 | 20 | #include 21 | #include 22 | #include "dnvme/dnvme_ioctls.h" 23 | #include "dnvme/dnvme_interface.h" 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /dutDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DUTDEFS_H_ 18 | #define _DUTDEFS_H_ 19 | 20 | /** 21 | * When the namespace reports unlimited transfer size, this define artificially 22 | * caps it to allow reasonable coverage vs runtime target. 23 | */ 24 | #define MAX_DATA_TX_SIZE (256 * 1024) 25 | 26 | #define MAX_IOQ_ID 0xFFFF 27 | 28 | #define MAX_ADMIN_Q_SIZE 4096 29 | #define MIN_ADMIN_Q_SIZE 2 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /globals.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "globals.h" 18 | 19 | 20 | int gDutFd = -1; 21 | struct CmdLine gCmdLine; 22 | Registers *gRegisters; 23 | RsrcMngr *gRsrcMngr; 24 | CtrlrConfig *gCtrlrConfig; 25 | CtrlrCap *gCtrlrCap; 26 | Informative *gInformative; 27 | 28 | -------------------------------------------------------------------------------- /globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GLOBALS_H_ 18 | #define _GLOBALS_H_ 19 | 20 | #include "dnvme.h" 21 | #include "Singletons/registers.h" 22 | #include "Singletons/rsrcMngr.h" 23 | #include "Singletons/ctrlrConfig.h" 24 | #include "Singletons/ctrlrCap.h" 25 | #include "Singletons/informative.h" 26 | 27 | // NOTE: To make it easier to decipher objects which are global, prepend 'g' 28 | 29 | /// The sole targeted DUT's file descriptor 30 | extern int gDutFd; 31 | 32 | /// The appliation's cmd line args 33 | extern struct CmdLine gCmdLine; 34 | 35 | /// Tests are encouraged to use this instance for all register access 36 | extern Registers *gRegisters; 37 | 38 | /// Tests are encouraged to use this instance to allocate test resources 39 | extern RsrcMngr *gRsrcMngr; 40 | 41 | /// Tests are encouraged to use this instance to interface with ctrlr config 42 | extern CtrlrConfig *gCtrlrConfig; 43 | 44 | /// Tests are encouraged to use this instance to interface with ctrlr cap 45 | extern CtrlrCap *gCtrlrCap; 46 | 47 | /// Tests are encouraged to use this instance to learn common DUT parameters 48 | extern Informative *gInformative; 49 | 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /skiptest.cfg: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Intel Corporation. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # The skip test file is a list of individual test cases or an entire group of 17 | # tests to skip execution. The specified tests will never be run even if told 18 | # to do so via a cmd line option. This file can be used for various reasons: 19 | # 1) A known bug is failing a test case and a hardware vendor may wish to 20 | # execute the test suite without the nuisance of being reminded of this bug. 21 | # 2) Tests which are not supported by a simulated hardware environment, will 22 | # run against a real device, but there is value in running the entire test 23 | # suite against the simulated hardware without failing on unsupported 24 | # features. 25 | # 26 | # Rules: 27 | # 1) Char '#' denotes a comment, all characters following '#' are ignored 28 | # 2) Each line contain exactly 1 test case or 1 group of tests to skip 29 | # 3) A line may contain both a test case or group reference followed by comment 30 | # 4) The test case format string is: :. 31 | # 5) The group format string is: 32 | # 6) Whitespace is ignored every where. 33 | -------------------------------------------------------------------------------- /testRef.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include "testRef.h" 19 | #include "tnvme.h" 20 | 21 | using namespace std; 22 | 23 | 24 | TestRef::TestRef() 25 | { 26 | group = 0; xLev = 0; yLev = 0; zLev = 0; 27 | } 28 | 29 | 30 | TestRef::TestRef(size_t g, size_t x, size_t y, size_t z) 31 | { 32 | Init(g, x, y, z); 33 | } 34 | 35 | 36 | void 37 | TestRef::Init(size_t g, size_t x, size_t y, size_t z) 38 | { 39 | group = g; xLev = x; yLev = y; zLev = z; 40 | } 41 | 42 | 43 | bool 44 | TestRef::operator==(const TestRef &other) 45 | { 46 | if ((other.group == group) && (other.xLev == xLev) && 47 | (other.yLev == yLev) && (other.zLev == zLev)) { 48 | return true; 49 | } 50 | return false; 51 | } 52 | 53 | 54 | string 55 | TestRef::ToString() 56 | { 57 | string fmt = str(boost::format("TestRef: %ld:%ld.%ld.%ld") 58 | % group % xLev % yLev % zLev); 59 | return fmt; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /testRef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TESTREF_H_ 18 | #define _TESTREF_H_ 19 | 20 | #include 21 | 22 | 23 | /** 24 | * This structure describes an individual test case. For details about this 25 | * object see: https://github.com/nvmecompliance/tnvme/wiki/Test-Numbering 26 | * @note This class will not throw exceptions. 27 | */ 28 | struct TestRef { 29 | size_t group; 30 | size_t xLev; 31 | size_t yLev; 32 | size_t zLev; 33 | 34 | TestRef(); 35 | TestRef(size_t g, size_t x, size_t y, size_t z); 36 | 37 | void Init(size_t g, size_t x, size_t y, size_t z); 38 | bool operator==(const TestRef &other); 39 | std::string ToString(); 40 | }; 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /tnvme.spec: -------------------------------------------------------------------------------- 1 | %define _distro %(uname -r) 2 | 3 | Name: tnvme 4 | Version: %{_major}.%{_minor} 5 | Release: 1%{?dist} 6 | Summary: NVM Express hardware compliance test suite application 7 | Group: Applications/Engineering 8 | License: Commercial 9 | URL: http://www.intel.com 10 | Source0: %{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 12 | 13 | %description 14 | NVM Express hardware compliance test suite application. 15 | 16 | %prep 17 | %setup -q 18 | 19 | %build 20 | %configure 21 | make %{?_smp_mflags} 22 | 23 | %install 24 | rm -rf $RPM_BUILD_ROOT 25 | mkdir -p $RPM_BUILD_ROOT%{_bindir} 26 | make install DESTDIR=$RPM_BUILD_ROOT 27 | 28 | %clean 29 | rm -rf $RPM_BUILD_ROOT 30 | 31 | %files 32 | %defattr(755,root,root,755) 33 | %{_bindir}/%{name} 34 | 35 | %post 36 | 37 | %preun 38 | 39 | %postun 40 | 41 | %changelog 42 | -------------------------------------------------------------------------------- /tnvmeHelpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TNVMEHELPERS_H_ 18 | #define _TNVMEHELPERS_H_ 19 | 20 | #include 21 | #include "Utils/io.h" 22 | 23 | bool VerifySpecCompatibility(SpecRev specRev); 24 | bool SetFeaturesNumberOfQueues(NumQueues &numQueues); 25 | bool FormatDevice(Format &format); 26 | bool CompareGolden(Golden &golden); 27 | 28 | void ReportCompareResults(Golden &golden, SharedMemBufferPtr idMem, 29 | size_t idCmdNum, size_t *misCompList, int misCompCount); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /tnvmeParsers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TNVMEPARSERS_H_ 18 | #define _TNVMEPARSERS_H_ 19 | 20 | #include "group.h" 21 | #include 22 | #include 23 | 24 | 25 | bool ParseTargetCmdLine(TestTarget &target, const char *optarg); 26 | bool ParseSkipTestCmdLine(vector &skipTest, const char *optarg); 27 | bool ParseGoldenCmdLine(Golden &golden, const char *optarg); 28 | bool ParseFWImageCmdLine(FWImage &fwimage, const char *optarg); 29 | bool ParseFormatCmdLine(Format &format, const char *optarg); 30 | bool ParseRmmapCmdLine(RmmapIo &rmmap, const char *optarg); 31 | bool ParseWmmapCmdLine(WmmapIo &wmmap, const char *optarg); 32 | bool ParseQueuesCmdLine(NumQueues &numQueues, const char *optarg); 33 | bool ParseErrorCmdLine(ErrorRegs &errRegs, const char *optarg); 34 | bool SeekSpecificXMLNode(xmlpp::TextReader &xmlFile, string nodeName, 35 | int nodeDepth, string &nodeVal, vector &nodeAttrib); 36 | bool ExtractFormatXMLValue(xmlpp::TextReader &xmlFile, FormatDUT &cmd, 37 | string nodeName); 38 | bool ExtractIdentifyXMLValue(xmlpp::TextReader &xmlFile, IdentifyDUT &cmd, 39 | string nodeName); 40 | 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Intel Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * Specify the software release version numbers on their own line for use with 19 | * awk and the creation of RPM's while also being compatible with building 20 | * the binaries via the Makefile with *.cpp source code. 21 | * If the line numbers within this file change by the result of editing, then 22 | * you must modify both the Makefile and build.sh for awk parsing. Additionally 23 | * test this modification by running the Makefile rpm target. 24 | */ 25 | 26 | #define VER_MAJOR \ 27 | 2 28 | 29 | #define VER_MINOR \ 30 | 13 31 | --------------------------------------------------------------------------------