/* Get ASCII format string exception name by exception type. */
STATIC CONST CHAR8* GetExceptionNameStr(IN EFI_EXCEPTION_TYPE ExceptionType)
/* Get ASCII format string exception name by exception type. */
STATIC CONST CHAR8* GetExceptionNameStr(IN EFI_EXCEPTION_TYPE ExceptionType)
{
  if (EXCEPT_RISCV_IS_IRQ (ExceptionType)) {
    if (EXCEPT_RISCV_IRQ_INDEX (ExceptionType) > EXCEPT_RISCV_MAX_IRQS) {
      return mExceptionOrIrqUnknown;
    }
    return mIrqNameStr[EXCEPT_RISCV_IRQ_INDEX (ExceptionType)];
  }
  if (ExceptionType > EXCEPT_RISCV_MAX_EXCEPTIONS) {
    return mExceptionOrIrqUnknown;
  }
  return mExceptionNameStr[ExceptionType];
}