In reply to sj1992:
If you mean you are calling your firmware C code by importing a DPI-C routine and calling it from your test, you can export the ovm_pkg::ovm_report_error routine to C and call it from there.
If that is not how you are calling the C code, you'll need to explain better.