/* This function is the entry point of MM Status Code Driver. */
EFI_STATUS StatusCodeHandlerCommonEntry(VOID)
/* This function is the entry point of MM Status Code Driver. */
EFI_STATUS StatusCodeHandlerCommonEntry(VOID)
{
  EFI_STATUS  Status;
  Status = gMmst->MmLocateProtocol (
                    &gEfiMmRscHandlerProtocolGuid,
                    NULL,
                    (VOID **)&mRscHandlerProtocol
                    );
  ASSERT_EFI_ERROR (Status);
  InitializationDispatcherWorker ();
  if (PcdGetBool (PcdStatusCodeUseSerial)) {
    mRscHandlerProtocol->Register (SerialStatusCodeReportWorker);
  }
  if (PcdGetBool (PcdStatusCodeUseMemory)) {
    mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker);
  }
  return EFI_SUCCESS;
}