mirror of https://github.com/acidanthera/audk.git
Not to copy mailbox into new space when debug agent initialization for S3 Boot Script.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15402 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
90651f7773
commit
3bf04a71bf
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Debug Agent library implementition for Dxe Core and Dxr modules.
|
Debug Agent library implementition for Dxe Core and Dxr modules.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -283,16 +283,21 @@ SetupDebugAgentEnviroment (
|
||||||
//
|
//
|
||||||
InitializeDebugIdt ();
|
InitializeDebugIdt ();
|
||||||
|
|
||||||
if (Mailbox != NULL) {
|
//
|
||||||
//
|
// If mMailboxPointer is not set before, set it
|
||||||
// If Mailbox exists, copy it into one global variable,
|
//
|
||||||
//
|
if (mMailboxPointer == NULL) {
|
||||||
CopyMem (&mMailbox, Mailbox, sizeof (DEBUG_AGENT_MAILBOX));
|
if (Mailbox != NULL) {
|
||||||
} else {
|
//
|
||||||
ZeroMem (&mMailbox, sizeof (DEBUG_AGENT_MAILBOX));
|
// If Mailbox exists, copy it into one global variable
|
||||||
}
|
//
|
||||||
|
CopyMem (&mMailbox, Mailbox, sizeof (DEBUG_AGENT_MAILBOX));
|
||||||
|
} else {
|
||||||
|
ZeroMem (&mMailbox, sizeof (DEBUG_AGENT_MAILBOX));
|
||||||
|
}
|
||||||
|
mMailboxPointer = &mMailbox;
|
||||||
|
}
|
||||||
|
|
||||||
mMailboxPointer = &mMailbox;
|
|
||||||
//
|
//
|
||||||
// Initialize debug communication port
|
// Initialize debug communication port
|
||||||
//
|
//
|
||||||
|
@ -521,6 +526,10 @@ InitializeDebugAgent (
|
||||||
VerifyMailboxChecksum (Mailbox);
|
VerifyMailboxChecksum (Mailbox);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
// Save Mailbox pointer in global variable
|
||||||
|
//
|
||||||
|
mMailboxPointer = Mailbox;
|
||||||
|
//
|
||||||
// Set up IDT table and prepare for IDT entries
|
// Set up IDT table and prepare for IDT entries
|
||||||
//
|
//
|
||||||
SetupDebugAgentEnviroment (Mailbox);
|
SetupDebugAgentEnviroment (Mailbox);
|
||||||
|
|
Loading…
Reference in New Issue