audk/MdePkg/Library/BaseLib
Takuto Naito 037090cb7c MdePkg: Fix AsmReadMsr64() and AsmWriteMsr64() with GCC toolchain
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3325

1. AsmReadMsr64() in X64/GccInlinePriv.c
AsmReadMsr64 can return uninitialized value if FilterBeforeMsrRead
returns False. This causes build error with the CLANG toolchain.

2. AsmWriteMsr64() in X64/GccInlinePriv.c
In the case that FilterBeforeMsrWrite changes Value and returns True,
The original Value, not the changed Value, is written to the MSR.
This behavior is different from the one of AsmWriteMsr64() in
X64/WriteMsr64.c for the MSFT toolchain.

Signed-off-by: Takuto Naito <naitaku@gmail.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-04-14 01:50:19 +00:00
..
AArch64 MdePkg/BaseLib: Fix invalid memory access in AArch64 SetJump/LongJump 2020-10-13 03:20:49 +00:00
Arm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Ebc MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Ia32 MdePkg/Baseib: Filter/trace MSR access for IA32/X64 2021-04-08 02:02:57 +00:00
RiscV64 BaseLib:Fix RISC-V Supervisor mode (S-Mode) trap handler reentry issue. 2020-08-12 04:01:39 +00:00
X64 MdePkg: Fix AsmReadMsr64() and AsmWriteMsr64() with GCC toolchain 2021-04-14 01:50:19 +00:00
ARShiftU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseLib.inf MdePkg/Baseib: Filter/trace MSR access for IA32/X64 2021-04-08 02:02:57 +00:00
BaseLib.uni MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseLibInternals.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BitField.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CheckSum.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ChkStkGcc.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Cpu.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuDeadLoop.c MdePkg: use CpuPause() in CpuDeadLoop() 2021-03-25 03:40:17 +00:00
DivS64x64Remainder.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x32Remainder.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x64Remainder.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FilePaths.c MdePkg: Fix spelling mistake for occurred 2020-08-19 00:54:23 +00:00
GetPowerOfTwo32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
GetPowerOfTwo64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
HighBitSet32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
HighBitSet64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LRotU32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LRotU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LShiftU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LinkedList.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LongJump.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LowBitSet32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LowBitSet64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Math64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ModU64x32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultS64x64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultU64x32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultU64x64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RRotU32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RRotU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RShiftU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeString.c MdePkg: Fix SafeString performing assertions on runtime checks 2020-05-22 00:03:14 +00:00
SetJump.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
String.c MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES 2020-10-13 01:35:03 +00:00
SwapBytes16.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SwapBytes32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SwapBytes64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SwitchStack.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Unaligned.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UnitTestHost.c MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
UnitTestHost.h MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
UnitTestHostBaseLib.inf MdePkg/Library/UnitTestHostBaseLib: Add missing services 2020-07-28 19:03:09 +00:00
UnitTestHostBaseLib.uni MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
X86DisablePaging32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86DisablePaging64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86EnablePaging32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86EnablePaging64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86FxRestore.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86FxSave.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86GetInterruptState.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86MemoryFence.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86Msr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86PatchInstruction.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86RdRand.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86ReadGdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86ReadIdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86SpeculationBarrier.c MdePkg/BaseLib: Use PcdSpeculationBarrierType 2019-04-30 16:39:15 -07:00
X86Thunk.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86UnitTestHost.c MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
X86WriteGdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86WriteIdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00