现在我的ini文件中已经设置bootExitType=securewithsk,可是我在执行setuserkey()函数中的resultval=SK——registerscwp()函数时总是返回的值和scw不相等是什么原因呢?
Tony Tang:
看一下返回值到底是什么,对照下面说明,看是出的什么错。
Syntax int SK_registerSCWP(scwp, numSC);Parameters int *scwp – pointer to an integer owned by the Operating System that tracks the current secure context.unsigned numSC – number of secure contexts into which the single secure stack block is dividedReturn Value SCWP, if no errorSK_EPRIV if not called from supervisor privilege levelSK_EINUSE if any secure contexts are currently allocatedSK_EINVAL if scwp is not word-alignedSK_ECTX if numSC is bad (can only be 1, 2, 4 or 8)Constraints Must be called from supervisor privilege
li li:
回复 Tony Tang:
返回的是-1(#define SK_ESTACK -1 /* bad secure/non-secure stack */),例程是按照指导文档编写的。请问这个是什么原因引起的?