Added LoongArch64 support. Currently, LoongArch64 doesn't supports TRNG,
it uses the `RDTIME` instruction and a xorshif64 alorithms to compose a
PRNG(RngLib).
It may supports the SE TRNG in the future, and will change to the TRNG
when SE support becomes available.
Signed-off-by: Chao Li <lichao@loongson.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
[Sources] appears twice in BaseMemoryLibOptDxe.inf, [Sources.X64]
appears twice in StandaloneMmCoreEntryPoint.inf, remove the redundant
ones to make the files more concise.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
SEC, PEI_CORE and PEIM type modules generally execute in place from
memory that is not writable. This means that it is not generally
possible to use an entrypoint implementation that stores a dynamically
generated stack cookie into a global variable. For PEIMs in particular,
there may be other options, such as a DEPEX on the permanent memory PPI,
but the current dynamic implementations of the stack checking library
entrypoints for PEI_CORE and PEIM modules must not be used as-is.
So remove them, and update the readme accordingly.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Remove some source files that were part of an earlier incarnation of
DynamicStackCookieEntryPointLib but are no longer actually in use.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Adds dynamic stack cookies in the form of copies of the entry
point libraries that use shared logic to update stack cookies
at runtime.
This relies on RDRAND on IA32/X64 and RNDR on AARCH64 to get a
random number to apply to the stack cookie on module entry point.
This simplifies the logic a platform must do to include stack
check functionality.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>