1. Add debug init flag DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64 in Debug Agent Library.

2. Update Capsule modules to consume debug agent library to support source debugging in x64 code.
3. Update BootScriptExecutorDxe module to support source debugging on S3 path.

signed-off-by: Jeff Fan <jeff.fan@intel.com>
reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13680 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2012-08-27 08:36:23 +00:00
parent 5df0877aff
commit 933d80a149
7 changed files with 36 additions and 16 deletions

View File

@@ -15,9 +15,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/CpuExceptionHandlerLib.h>
#include <Library/DebugAgentLib.h>
#include "CommonHeader.h"
#define EXCEPTION_VECTOR_NUMBER 0x20
#define EXCEPTION_VECTOR_NUMBER 0x22
/**
The X64 entrypoint is used to process capsule in long mode then
@@ -58,6 +59,11 @@ _ModuleEntryPoint (
// Setup the default CPU exception handlers
//
SetupCpuExceptionHandlers ();
//
// Initialize Debug Agent to support source level debug
//
InitializeDebugAgent (DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64, (VOID *) &Ia32Idtr, NULL);
//
// Call CapsuleDataCoalesce to process capsule.
@@ -71,6 +77,10 @@ _ModuleEntryPoint (
ReturnContext->ReturnStatus = Status;
//
// Disable interrupt of Debug timer, since the new IDT table cannot work in long mode
//
SaveAndSetDebugTimerInterrupt (FALSE);
//
// Restore IA32 IDT table
//