History log of /device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
df60fb4cc2ca896fcea9e37b06c276d569f1a6b8 30-Oct-2015 Michael Kinney <michael.d.kinney@intel.com> SourceLevelDebugPkg: DebugAgent: Set Local APIC SoftwareEnable

Update DebugAgent to make sure the Local APIC SoftwareEnable bit is set
before using the Local APIC Timer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18712 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
fe0c434eb150ac8af9ecce10696585bdf0a169fe 26-Jun-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg/DebugAgent: Add typecast to fix sign extension

OffsetHigh is 16bit value and its type is UINT32 and defined in structure.
It will be 32bit int type after do 16-bit left-shift operation. Then it will
sign extension if cast it to UINT64 if its high bit is 1.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Scott Duplichan <scott@notabs.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17716 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
e2c8d3cff7538db66931e32fc76f91b116b00bee 10-Jun-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg/DxeDebugAgent: Initialize Local APIC Timer

Now Debug Agent library uses Local APIC Timer to implement time-out mechanism.
For AP, its local APIC timer may not work. This fix is to initialize Local
APIC timer if it doesn't work as expected when debugging AP function.

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@17604 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
2befbc82ccd6ebbba35bafe21f6ab929ef2cff31 08-Jun-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg/DebugAgent: Disable Debug Timer as early

InitializeApicTimer() will enable Local APIC timer interrupt. Even though we
disable CPU interrupt at the beginning and enable CPU Interrupt after debug
agent initialized completely, some Boot Service may invoke RestoreTpl () which
may enable CPU interrupt.
We should disable Local APIC timer in InitializeDebugTimer () to avoid Debug
Timer interrupt happens during debug port and debug agent initialization phase.
And enable Debug Timer interrupt after debug agent is initialized.

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@17572 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
86d1365287e606e8ce23c6168d69f470dfd0ebc8 25-May-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg/DebugTimer: Dump Debug Timer parameter

Add one parameter DumpFlag to indicate if need to dump Local APIC time's
parameter.

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@17501 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
b057be47f732b86496e2c1b997972d31953a1198 18-May-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg/DebugAgentDxe: Move help info from DxeDebugAgent

Now DxeDebugAgent Library instance will print help information on how to load
DebugAgentDxe.efi in UEFI shell. But it is printed after Target connected to
Host side. This fix is to move help info print to DebugAgentDxe module before
Target tries to connect HOST. It could help developer to get useful information
as early as possible.

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@17458 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
adcc2727dfef1fce28cae61960ecf7b4eea889c6 18-May-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg/DxeDebugAgent: Initialize Local APIC Timer early

Now Debug Agent library uses Local APIC Timer to implement time-out mechanism.
But it does not initialize Local APIC Timer before transfer data with HOST.
This fix is to move Local APIC Timer initialization to
SetupDebugAgentEnvironment().
This fix also updates function header and fixed one typo of
SetupDebugAgentEnvironment() name.

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@17457 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
08021523f8a581437b07986d2c1876a7b6f0d282 01-Apr-2015 Jeff Fan <jeff.fan@intel.com> SourceLevelDebugPkg: Use CPU Local APIC timer to handle timeout.

Use CPU Local APIC timer to handle timeout when read data from debug port, instead of the TimerLib in Debug Communication lib instances.
It could remove much duplicated code in Debug Communication Lib instances.

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@17089 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
4fe43eb3e99590c05ab0e4f73dd9d734b0e110ac 04-Nov-2014 Jeff Fan <jeff.fan@intel.com> 1. Remove any references on other files from DebugTimer.c, to avoid un-used symbols linked.
2. Add GLOBAL_REMOVE_IF_UNREFERENCED for all global variables.

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@16298 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
3bf04a71bff3d414cd3f880ccf7243c12d0f7268 27-Mar-2014 Jeff Fan <jeff.fan@intel.com> 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
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
8cc26df4a60ec3a3b7f9d58ccefc12a1a5b6e199 22-Nov-2013 Jeff Fan <jeff.fan@intel.com> 1. DebugAgentLib will install reserved vector table to persist vectors.
2. Update PeCoffExtraActionLib to detect if debug agent initialized or not by checking each IDT entry instead of whole IDT table.

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@14886 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
0a48876599712cdc3cbbed1d73313d1142d3cb08 20-Apr-2013 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. Add CPU arch type in Mailbox, debug agent will not access HOB if CPU arch changed.
2. Updated DxeDebugAgentLib instance to copy DebugPortHandler buffer into allocated ACPIMemoryNVS besides the mailbox.
3. Remove deprecated SendingPacket from mailbox.

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@14302 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
b422b62c01a490e7892864c04280d430a2566e3f 25-Jan-2013 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> This revision can only work with Intel(c) UDK Debugger Tool version 1.3 or greater. Detailed change log is as below:
1. Add DebugAgentPei driver to initialize Debug Agent in PEI phase.
Add DebugAgentDxe driver to initialize Debug Agent in DXE phase.
DebugAgentDxe driver could be loaded and unloaded in shell.
2. Update the SourceLevelDebugPkg so that the debug agent can be initialized in any phase: SEC, PEI or DXE.
3. Add an enhanced retry algorithm that provides a robust connection when data loss happens in the debug channel.
4. Clear DR7 register in exception handler.
5. Set the default serial port parameter to 0 instead of PCDs.
6. Build pointer of Mailbox in HOB instead of Mailbox itself, since HOB may be moved at DXE entry point function.
7. Raise TPL to prevent recursion from EFI timer interrupts in SerialIo.c.
8. Add one spin lock for accessing Mailbox when MP debugging supported.
9. Use more non-NULL library instances in SourceLevelDebugPkg DSC file, thus DebugAgentDxe.efi built from SourceLevelDebugPkg could work in shell.
10.Separate all operations about IDT table entry from SecDebugAgentLib.c into DebugAgent\DebugAgentCommon's arch sub-directory.
11.Enhance Debug Agent to avoid breaking by hardware SMI during DXE debugging phase.
12.Add supporting on mode switch code debugging.
13.Remove reset Host Controller operation in DebugCommunicationLibUsb.c to avoid impacting EDKII usb stack.
14.Fix debug timer interrupt missing issue after back from legacy code.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14083 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
93c0bdec2807cd968a89a0ac01a379a90fa50f93 11-Jun-2012 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> This revision can only work with Intel(c) UDK Debugger Tool version 1.2 or greater. Detailed change log is as below:
1. Define the transfer protocol revision mechanism. Increase the revision number to 0.2 and inform user to use the latest one when the HOST software is too old.
New HOST software will implement logic to handle all other revision mismatch cases.
2. Define new debug message packet to print the debug agent trace information by debug port channel.
3. Add check sum mechanism in the communication protocol between TARGET/HOST.
4. Introduced one "try" mechanism to avoid Debug Agent crashed by some invalid HOST command.
5. Enable the late-attach feature: Change the break in from "!" to "\xFC". Add a new short symbol "\xFA" for attach and a new debug command for detach.
6. Support Terminal work on debug port by install EFI Serial IO protocol upon Debug Communication Library.
7. Enable CPUID feature.
8. Enable the hardware data breakpoint.
9. add handshake to improve usb debug cable identify stability issue.
10.Refine all the communication protocol packet to improve extensibility and debugging performance.
a. Use 64bit for IO port address.
b. Add additional Width field to READ_MEMORY/WRITE_MEMORY.
c. Add SEARCH_SIGNATURE support to speed the symbol finding for late attach.
d. Remove READ_GROUP register.
e. Add READ_ALL_REGISTERS support (WinDbg always requests to read all registers).
11.Move AcquireDebugPortControl () in advance to fix resource collision on IpiSentByApFlag.
12.Fix IO break point does not work issue in PEI phase.
13.Avoid BSP/APs collision when they met break point at the same time.
14.Solve a bug of calculating debug handle in sec phase.
15.Use mailbox content at Dxe phase but not clear it and reinitialize again.
16.Fix FP/MMX/XMM/IO/MSR access issue in both Gdb and WinDbg.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13437 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
18b144ea424e476f14839e9d9d3b81fb4820a613 12-Sep-2010 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> Import SourceLevelDebugPkg.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10867 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c