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:
Thanks,
Chao
On 2024/3/14 18:59, Gerd Hoffmann wrote:
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.
OK, I will adjust it next time.
+ //
+ // Ticks
+ // Time = --------- x 1,000,000,000
+ // Frequency
+ //
+ Status = SafeUint64Mult (
+ DivU64x64Remainder (Ticks, Frequency, &Remainder),
+ 1000000000u,
+ &NanoSeconds
+ );
Not checking Status here?
Oh, I forget, I will add the checking stage next time, thank you!
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116783): https://edk2.groups.io/g/devel/message/116783
Mute This Topic: https://groups.io/mt/104859876/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-