mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Display new stack base and size
Dump new stack base and size information could help developer to narrow down stack crash issue. Cc: Feng Tian <feng.tian@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
parent
d945390d5f
commit
6fb389d0a1
|
@ -317,6 +317,14 @@ HandOffToDxeCore (
|
||||||
|
|
||||||
AsmWriteIdtr (&gLidtDescriptor);
|
AsmWriteIdtr (&gLidtDescriptor);
|
||||||
|
|
||||||
|
DEBUG ((
|
||||||
|
DEBUG_INFO,
|
||||||
|
"%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",
|
||||||
|
__FUNCTION__,
|
||||||
|
BaseOfStack,
|
||||||
|
STACK_SIZE
|
||||||
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Go to Long Mode and transfer control to DxeCore.
|
// Go to Long Mode and transfer control to DxeCore.
|
||||||
// Interrupts will not get turned on until the CPU AP is loaded.
|
// Interrupts will not get turned on until the CPU AP is loaded.
|
||||||
|
@ -387,6 +395,14 @@ HandOffToDxeCore (
|
||||||
//
|
//
|
||||||
UpdateStackHob (BaseOfStack, STACK_SIZE);
|
UpdateStackHob (BaseOfStack, STACK_SIZE);
|
||||||
|
|
||||||
|
DEBUG ((
|
||||||
|
DEBUG_INFO,
|
||||||
|
"%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",
|
||||||
|
__FUNCTION__,
|
||||||
|
BaseOfStack,
|
||||||
|
STACK_SIZE
|
||||||
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Transfer the control to the entry point of DxeCore.
|
// Transfer the control to the entry point of DxeCore.
|
||||||
//
|
//
|
||||||
|
|
|
@ -321,6 +321,14 @@ Thunk32To64 (
|
||||||
//
|
//
|
||||||
AsmWriteCr3 ((UINTN) PageTableAddress);
|
AsmWriteCr3 ((UINTN) PageTableAddress);
|
||||||
|
|
||||||
|
DEBUG ((
|
||||||
|
DEBUG_INFO,
|
||||||
|
"%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",
|
||||||
|
__FUNCTION__,
|
||||||
|
Context->StackBufferBase,
|
||||||
|
Context->StackBufferLength
|
||||||
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Disable interrupt of Debug timer, since the IDT table cannot work in long mode
|
// Disable interrupt of Debug timer, since the IDT table cannot work in long mode
|
||||||
//
|
//
|
||||||
|
|
|
@ -265,6 +265,14 @@ _ModuleEntryPoint (
|
||||||
|
|
||||||
ReturnContext->ReturnStatus = Status;
|
ReturnContext->ReturnStatus = Status;
|
||||||
|
|
||||||
|
DEBUG ((
|
||||||
|
DEBUG_INFO,
|
||||||
|
"%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",
|
||||||
|
__FUNCTION__,
|
||||||
|
EntrypointContext->StackBufferBase,
|
||||||
|
EntrypointContext->StackBufferLength
|
||||||
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Disable interrupt of Debug timer, since the new IDT table cannot work in long mode
|
// Disable interrupt of Debug timer, since the new IDT table cannot work in long mode
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue