UefiCpuPkg: RiscV64: initialize FPU

The OpenSSL library uses floating point registers.
The is no guarantee that a prior firmware stage has enabled the FPU.

Provide a library BaseRiscVFpuLib to

* Enable the FPU and set it to state 'dirty'.
* Clear the fcsr CSR.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt
2024-09-16 23:12:18 +02:00
committed by mergify[bot]
parent 28dd588ca8
commit f8c738577f
8 changed files with 80 additions and 0 deletions

View File

@@ -75,6 +75,8 @@
SmmRelocationLib|Include/Library/SmmRelocationLib.h
[LibraryClasses.RISCV64]
## @libraryclass Provides function to initialize the FPU.
RiscVFpuLib|Include/Library/BaseRiscVFpuLib.h
## @libraryclass Provides functions to manage MMU features on RISCV64 CPUs.
##
RiscVMmuLib|Include/Library/BaseRiscVMmuLib.h