Revision: 17219
http://sourceforge.net/p/edk2/code/17219
Author: mdkinney
Date: 2015-04-27 19:51:46 +0000 (Mon, 27 Apr 2015)
Log Message:
-----------
SourceLevelDebugPkg/PeCoffExtraActionLibDebug: Support IA32 processors without
debug extensions
Use CPUID Leaf 01 to detect support for debug extensions.
Force use of software breakpoints if debug extensions are not supported.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Modified Paths:
--------------
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
Modified:
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c
===================================================================
---
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c
2015-04-27 19:49:25 UTC (rev 17218)
+++
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c
2015-04-27 19:51:46 UTC (rev 17219)
@@ -1,7 +1,7 @@
/** @file
PE/Coff Extra Action library instances.
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -65,6 +65,7 @@
IA32_DESCRIPTOR IdtDescriptor;
IA32_IDT_GATE_DESCRIPTOR OriginalIdtEntry;
BOOLEAN IdtEntryHooked;
+ UINT32 RegEdx;
ASSERT (ImageContext != NULL);
@@ -79,6 +80,16 @@
IdtEntryHooked = FALSE;
LoadImageMethod = PcdGet8 (PcdDebugLoadImageMethod);
+ if (LoadImageMethod == DEBUG_LOAD_IMAGE_METHOD_IO_HW_BREAKPOINT) {
+ //
+ // If the CPU does not support Debug Extensions(CPUID:01 EDX:BIT2)
+ // then force use of DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3
+ //
+ AsmCpuid (1, NULL, NULL, NULL, &RegEdx);
+ if ((RegEdx & BIT2) == 0) {
+ LoadImageMethod = DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3;
+ }
+ }
AsmReadIdtr (&IdtDescriptor);
if (LoadImageMethod == DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3) {
if (!CheckDebugAgentHandler (&IdtDescriptor, SOFT_INT_VECTOR_NUM)) {
Modified:
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
===================================================================
---
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
2015-04-27 19:49:25 UTC (rev 17218)
+++
trunk/edk2/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
2015-04-27 19:51:46 UTC (rev 17219)
@@ -1,7 +1,7 @@
## @file
# PeCoffExtraAction Library to support source level debug.
#
-# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD
License
@@ -19,7 +19,7 @@
MODULE_UNI_FILE = PeCoffExtraActionLib.uni
FILE_GUID = 8F01CBD5-E069-44d7-90C9-35F0318603AD
MODULE_TYPE = BASE
- VERSION_STRING = 0.7
+ VERSION_STRING = 0.8
LIBRARY_CLASS = PeCoffExtraActionLib
#
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits