/* Each AP perform the function called by BSP. */
VOID EFIAPI ParallelHashApExecute(IN VOID *ProcedureArgument)
/* Each AP perform the function called by BSP. */
VOID EFIAPI ParallelHashApExecute(IN VOID *ProcedureArgument)
{
  UINTN    Index;
  BOOLEAN  Status;
  for (Index = 0; Index < mBlockNum; Index++) {
    if (AcquireSpinLockOrFail (&mSpinLockList[Index])) {
      if (mBlockIsCompleted[Index]) {
        ReleaseSpinLock (&mSpinLockList[Index]);
        continue;
      }
      Status = CShake256HashAll (
                 mInput + Index * mBlockSize,
                 (Index == (mBlockNum - 1)) ? mLastBlockSize : mBlockSize,
                 mBlockResultSize,
                 NULL,
                 0,
                 NULL,
                 0,
                 mBlockHashResult + Index * mBlockResultSize
                 );
      if (!EFI_ERROR (Status)) {
        mBlockIsCompleted[Index] = TRUE;
      }
      ReleaseSpinLock (&mSpinLockList[Index]);
    }
  }
}