Hi Gerd,
This email was not send by EDK2 community, but other emails which you send were by EDK2 community, I don't know what happened. Regardless, I'll respond your question about this changes via this email.
Here is my comments:
OK, I will adjust it next time.Hi,+ if ((BaseFreq == 0x0) || (ClockMultiplier == 0x0) || (ClockDivide == 0x0)) { + DEBUG (( + DEBUG_ERROR, + "LoongArch Stable Timer is not available in the CPU, hence this library cannot be used.\n" + )); + ASSERT (FALSE); + CpuDeadLoop (); + } + + StableTimerFreq = ((ClockMultiplier * BaseFreq) / ClockDivide); + + if (StableTimerFreq == 0x0) { + ASSERT (FALSE); + }If you don't want to log a message (as in the case above) you can simplify this to "ASSERT(StableTimerFreq != 0);" Additional benefit is that it'll give a more helpful log message.
Oh, I forget, I will add the checking stage next time, thank you!+ // + // Ticks + // Time = --------- x 1,000,000,000 + // Frequency + // + Status = SafeUint64Mult ( + DivU64x64Remainder (Ticks, Frequency, &Remainder), + 1000000000u, + &NanoSeconds + );Not checking Status here?
take care, Gerd