/* Check whether a handle is a valid EFI_HANDLE */
EFI_STATUS SmmValidateHandle(IN EFI_HANDLE UserHandle)
/* Check whether a handle is a valid EFI_HANDLE */
EFI_STATUS SmmValidateHandle(IN EFI_HANDLE UserHandle)
{
  IHANDLE  *Handle;
  Handle = (IHANDLE *)UserHandle;
  if (Handle == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  if (Handle->Signature != EFI_HANDLE_SIGNATURE) {
    return EFI_INVALID_PARAMETER;
  }
  return EFI_SUCCESS;
}