summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon
Commit message (Collapse)AuthorAgeFilesLines
* SourceLevelDebugPkg: Remove X86 ASM and S filesLiming Gao2018-06-072-827/+0
| | | | | | | | | | | | NASM has replaced ASM and S files. 1. Remove ASM from all modules. 2. Remove S files from the drivers only. 3. https://bugzilla.tianocore.org/show_bug.cgi?id=881 After NASM is updated, S files can be removed from Library. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* SourceLevelDebugPkg DebugAgentLib: Rename IsBsp to DebugAgentIsBspStar Zeng2018-02-083-8/+8
| | | | | | | | | | | | For avoiding function name confliction, rename IsBsp to DebugAgentIsBsp. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* SourceLevelDebugPkg: Use Pcd for the revision of transfer protocolHao Wu2017-09-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | V3 changes: Add detailed description for the usage of the Pcd in package DEC file. Update the comment for the introduced Pcd in module INF files. V2 changes: Instead of using a global variable, use a Pcd for transfer protocol revision. Previously, the revision of the debug agent transfer protocol is reflected by a macro. This commit introduces a Pcd to reflect the revision in order to avoid the comparison of two macros, which will generate a constant result detected by code checkers. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* PeCoffGetEntryPointLib: Fix spelling issueJeff Fan2017-04-261-1/+1
| | | | | | | | | | | *Serach* should be *Search* Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@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>
* SourceLevelDebugPkg/DebugAgent.c: Consume PeCoffSerachImageBase()Jeff Fan2017-04-071-44/+6
| | | | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* UefiCpuPkg/LocalApic.h: Remove duplicated/conflicted definitionsJeff Fan2016-08-172-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | #define MSR_IA32_APIC_BASE_ADDRESS is duplicated with #define MSR_IA32_APIC_BASE defined in UefiCpuPkg/Include/Register/ArchitecturalMsr.h, so we could remove it and update the modules to use MSR_IA32_APIC_BASE from ArchitecturalMsr.h. Structure MSR_IA32_APIC_BASE conflicts with #define MSR_IA32_APIC_BASE defined in UefiCpuPkg/Include/Register/ArchitecturalMsr.h, so we could remove it and update the modules to use structure MSR_IA32_APIC_BASE_REGISTER from ArchitecturalMsr.h. v5: 1. Update SourceLevelDebugPkg to use APIC Base MSR from ArchitecturalMsr.h. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SourceLevelDebugPkg DebugAgentLib: Convert X64/AsmFuncs.asmLiming Gao2016-06-281-0/+405
| | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/AsmFuncs.asm to X64/AsmFuncs.nasm. And, manually update the wrong replacement with 0H. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com>
* SourceLevelDebugPkg DebugAgentLib: Convert Ia32/AsmFuncs.asmLiming Gao2016-06-281-0/+419
| | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/AsmFuncs.asm to Ia32/AsmFuncs.nasm. And, manually update the wrong replacement with 0H. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com>
* SourceLevelDebugPkg: DebugAgentCommon: remove set but unused variablesLaszlo Ersek2016-03-251-3/+0
| | | | | | | | | | Cc: Jeff Fan <jeff.fan@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* SourceLevelDebugPkg: DebugAgent: Set Local APIC SoftwareEnableMichael Kinney2015-10-301-0/+1
| | | | | | | | | | | | 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
* SourceLevelDebugPkg: Change the debug message to "v1.5" from "v1.4"Ruiyu Ni2015-09-241-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18534 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugTimer: Timer count value 0 not calculatedJeff Fan2015-08-272-9/+9
| | | | | | | | | | | Actually, TimerCycle is APIC timer's initial count. Timer count value 0 is missed when calculating Delta value. 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@18329 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugTimer: Fix the issue if CurrentTimer = TimerJeff Fan2015-08-271-1/+3
| | | | | | | | | | | | If CPU runs fast and timer runs slow, two GetApicTimerCurrentCount() may return the same timer count value. We need to consider timer roll-over not happened. Otherwise, one false timeout flag will be set. 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@18328 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugAgent: Disable Debug Timer as earlyJeff Fan2015-06-082-0/+6
| | | | | | | | | | | | | | | | 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
* SourceLevelDebugPkg/DebugTimer: Dump Debug Timer parameterJeff Fan2015-05-253-8/+13
| | | | | | | | | | | 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
* SourceLevelDebugPkg: Fix Serial Port connection cannot be setupRuiyu Ni2015-05-181-21/+25
| | | | | | | | | | | The root cause is SerialPortDebugCommunicationLib returns NULL debug port handle causing the CompressData() doesn't send the compressed data. The fix doesn't rely on the debug port handle value and uses Send parameter to indicate whether to send the compressed data. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17464 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugAgent: Support IA32 processors without DE or ↵Michael Kinney2015-04-274-9/+66
| | | | | | | | | | | | | | | FXSAVE/FXRESTOR Use CPUID Leaf 01 to detect support for debug extensions and FXSAVE/FXRESTOR instructions. Do not enable those features in CR4 if they are not supported. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17220 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/DebugAgent: Support IA32 processors without MSR_IA32_APIC_BASE_ADDRESSMichael Kinney2015-04-271-2/+11
| | | | | | | | | | | | Avoid use of Local APIC Base Address MSR (MSR_IA32_APIC_BASE_ADDRESS) if there is only 1 CPU present. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17218 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugAgent: Add some comments and debug messageJeff Fan2015-04-271-4/+22
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17206 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugAgent: Clear/Restore EFLAGS.IFJeff Fan2015-04-271-8/+41
| | | | | | | | | | | | | Clear EFLAGS.IF before executing Stepping command and save original value in DEBUG_AGENT_FLAG. It could avoid pending interrupt issued during executing Stepping command. Restore EFLAGS.IF after Stepping command execution finished. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17204 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugAgent: Add InterruptFlag fieldJeff Fan2015-04-271-1/+3
| | | | | | | | | | | Add InterruptFlag field in DEBUG_AGENT_FLAG. This field is used to save/restore EFLAGS.IF across Stepping command execution. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17203 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg: Clear Stepping flag as early as possibleJeff Fan2015-04-211-4/+4
| | | | | | | | | | | | It will avoid that exception issued by Debug Agent itself was skipped. 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@17190 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg: Fix calculate the checksum bug and add NULL pointer checkJeff Fan2015-04-101-1/+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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17160 6f19259b-4bc3-4df7-8a09-765794883524
* Add missing parameter in function header.Jeff Fan2015-04-072-2/+2
| | | | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17125 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg: Use CPU Local APIC timer to handle timeout.Jeff Fan2015-04-014-17/+196
| | | | | | | | | | | | | | | 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
* SourceLevelDebugPkg: Fix typo.Shumin Qiu2015-03-132-2/+2
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17046 6f19259b-4bc3-4df7-8a09-765794883524
* Use RLE (Run Length Encoding) to improve debugging performance.Ruiyu Ni2015-01-204-102/+265
| | | | | | | | | | | | | DEBUG_AGENT_REVISION is DEBUG_AGENT_REVISION_03 to disable this feature and will be changed to DEBUG_AGENT_REVISION_04 when new version of HOST is released. Reduce the stack usage by re-using the same buffer to send/receive packet. Zero out the buffer before fxsave so that the reserved field in the buffer remains 0 for better RLE compression ratio. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16628 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg DebugAgentLib: Fix build error with GNU assemblerJeff Fan2014-12-171-7/+7
| | | | | | | | | | Use mov instead of movw. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16531 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a bug in DebugAgent that hang happens when the ACK for GO is lost.Ruiyu Ni2014-11-101-13/+14
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16322 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Remove any references on other files from DebugTimer.c, to avoid un-used ↵Jeff Fan2014-11-044-91/+91
| | | | | | | | | | | | | | | | | 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
* SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errorsAnderw Fish2014-09-095-9/+9
| | | | | | | | | | | | | Move ExceptionStubHeaderSize from 16 to 32 bits to work around clang relocation limitation. Use movw, not move for 32-bit segment register operations. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16067 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/DebugAgent: fix trivial typo.Chen Fan2014-08-081-1/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15779 6f19259b-4bc3-4df7-8a09-765794883524
* Add type cast on variable before operation.Jeff Fan2014-08-081-7/+7
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Eric Dong <Eric.Dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15777 6f19259b-4bc3-4df7-8a09-765794883524
* Fix the potential address overflow issue when checking PE signature. Jeff Fan2014-06-301-3/+5
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15602 6f19259b-4bc3-4df7-8a09-765794883524
* Refine code to make it more safely.Eric Dong2014-06-251-2/+3
| | | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15591 6f19259b-4bc3-4df7-8a09-765794883524
* Fix CRLF formatTian, Hot2014-01-221-2/+2
| | | | | | Signed-off-by: Tian, Hot <hot.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15161 6f19259b-4bc3-4df7-8a09-765794883524
* Update Debug Agent initialization message to change the version string from ↵Ruiyu Ni2014-01-151-2/+2
| | | | | | | | "1.3.1" to "1.4" Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15118 6f19259b-4bc3-4df7-8a09-765794883524
* Update HostSequenceNo for Command packet instead for Response packet.Jeff Fan2013-12-271-1/+1
| | | | | | | 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@15026 6f19259b-4bc3-4df7-8a09-765794883524
* Remove Debug message output from UpdateMailboxContent(), it may cause ↵Jeff Fan2013-12-271-1/+0
| | | | | | | | | Mailbox locker nested issue. 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@15025 6f19259b-4bc3-4df7-8a09-765794883524
* Only save HostSequenceNo for new command in Debug Timer handler.Jeff Fan2013-12-201-3/+18
| | | | | | | | 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@15013 6f19259b-4bc3-4df7-8a09-765794883524
* 1. DebugAgentLib will install reserved vector table to persist vectors.Jeff Fan2013-11-226-13/+215
| | | | | | | | | | | 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
* Updated connecting HOST version information from 1.3 to 1.3.1.vanjeff2013-05-081-1/+1
| | | | | | | 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@14328 6f19259b-4bc3-4df7-8a09-765794883524
* Read/Write memory space including MMIO range with the width requested from HOST.vanjeff2013-05-061-27/+125
| | | | | | | | Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14324 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Add CPU arch type in Mailbox, debug agent will not access HOB if CPU arch ↵vanjeff2013-04-201-2/+3
| | | | | | | | | | | | | 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
* This revision can only work with Intel(c) UDK Debugger Tool version 1.3 or ↵vanjeff2013-01-2511-474/+1103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Roll back r13823.vanjeff2012-10-111-5/+9
| | | | | | | | | signed-off-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13825 6f19259b-4bc3-4df7-8a09-765794883524
* git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13823 ↵vanjeff2012-10-111-9/+5
| | | | 6f19259b-4bc3-4df7-8a09-765794883524
* Add missing braces around initializer.lzeng142012-10-111-1/+1
| | | | | | | | | | | Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Qian Ouyang <qian.ouyang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13817 6f19259b-4bc3-4df7-8a09-765794883524
* This revision can only work with Intel(c) UDK Debugger Tool version 1.2 or ↵vanjeff2012-06-1116-1834/+1138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Generic solution to handle reset failure in some special platforms.niruiyu2012-02-072-4/+7
| | | | | | | | | Upon receiving RESET packet from HOST side, TARGET either sends OK packet and resets, or sends OK packet followed by TIMEOUT packet in 2 seconds indicating the reset failure. Signed-off-by: niruiyu Reviewed-by: vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12984 6f19259b-4bc3-4df7-8a09-765794883524