/** @file\r
Debug Agent library implementition.\r
\r
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
UINT16 IdtEntryCount;\r
DEBUG_AGENT_MAILBOX *Mailbox;\r
UINT64 *MailboxLocation;\r
+ UINT32 DebugTimerFrequency;\r
\r
switch (InitFlag) {\r
case DEBUG_AGENT_INIT_SMM:\r
// Initialized Debug Agent\r
//\r
InitializeDebugIdt ();\r
+ //\r
+ // Initialize Debug Timer hardware and save its frequency\r
+ //\r
+ InitializeDebugTimer (&DebugTimerFrequency);\r
+ UpdateMailboxContent (mMailboxPointer, DEBUG_MAILBOX_DEBUG_TIMER_FREQUENCY, DebugTimerFrequency);\r
+\r
DebugPortHandle = (UINT64) (UINTN)DebugPortInitialize ((DEBUG_PORT_HANDLE) (UINTN)Mailbox->DebugPortHandle, NULL);\r
UpdateMailboxContent (Mailbox, DEBUG_MAILBOX_DEBUG_PORT_HANDLE_INDEX, DebugPortHandle);\r
mMailboxPointer = Mailbox;\r
\r
InitializeDebugIdt ();\r
//\r
- // Initialize Debug Timer hardware and enable interrupt.\r
+ // Initialize Debug Timer hardware and save its frequency\r
//\r
- InitializeDebugTimer ();\r
+ InitializeDebugTimer (&DebugTimerFrequency);\r
+ UpdateMailboxContent (mMailboxPointer, DEBUG_MAILBOX_DEBUG_TIMER_FREQUENCY, DebugTimerFrequency);\r
EnableInterrupts ();\r
\r
FindAndReportModuleImageInfo (SIZE_4KB);\r