summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/WatchdogTimerDxe
diff options
context:
space:
mode:
authorRay Ni <ray.ni@intel.com>2024-06-11 15:00:41 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-12 07:18:12 +0000
commitd3b32dca06b987d7214637f3952c2ce1ce69f308 (patch)
treee9ec5dffb4478cf8031b1e9a75b02840a4d29e1c /MdeModulePkg/Universal/WatchdogTimerDxe
parent0982da4f50279bfb2be479f97821b86feb87c336 (diff)
downloadedk2-master.tar.gz
edk2-master.tar.bz2
edk2-master.zip
MdePkg/BaseLib: Let CpuDeadLoop() be breakable in debuggerHEADmaster
Starting from certain version of Visual Studio C compiler (I don’t have the exact version. I am using VS2019), CpuDeadLoop is optimized quite well by compiler. The compiler does not generate instructions that jump out of the loop when the "Index" is non-zero. It becomes harder/impossible for developers to break out of the dead-loop in debugger. The new version of CpuDeadLoop() compares a volatile global to a volatile local. This forces 2 reads and a comparison on every loop iteration. The local variable can be set to 1 to exit the loop without modifying the global variable. Using VS2019 with max opt enabled, The dead-loop can be exit by setting Index to 1 in a debugger. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/WatchdogTimerDxe')
0 files changed, 0 insertions, 0 deletions