/** @file\r
CpuBreakpoint function.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.\r
**/\r
\r
+#include <Library/RegisterFilterLib.h>\r
+\r
unsigned __int64 __readmsr (int register);\r
\r
#pragma intrinsic(__readmsr)\r
IN UINT32 Index\r
)\r
{\r
- return __readmsr (Index);\r
+ UINT64 Value;\r
+ BOOLEAN Flag;\r
+\r
+ Flag = FilterBeforeMsrRead (Index, &Value);\r
+ if (Flag) {\r
+ Value = __readmsr (Index);\r
+ }\r
+ FilterAfterMsrRead (Index, &Value);\r
+\r
+ return Value;\r
}\r
\r