MdePkg: Add LoongArch64 instance in BaseRngLib

LoongArch64 currently dose not support HW or a standards-compliant RNG.
Read the stable time twice performs an XOR, and then use xorshift
algorithm(from Marsaglia's xorshift generator) to generate a
pseudo-random number.

It's not random enough, but it's definitely better than just using a
timer(BaseRngLibTimerLib).

Signed-off-by: Chao Li <lichao@loongson.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
3 files changed