UEFI Debug With Intel Architectural Event Trace

2y ago
479.41 KB
16 Pages
Last View : 1m ago
Last Download : 5m ago
Upload by : Kaydence Vann

presented byUEFI Debug with Intel ArchitecturalEvent TraceUEFI 2021 Virtual PlugfestFebruary 25, 2021Presented by Alan Sguigna, ASSET InterTech, Inc.www.uefi.org1

Debug vs Trace Debug (Static)– Run-control (Break, Halt, Go)– Code Walking (stepping andrunning to a break) Trace (Dynamic)– Root causing more obscure (hardto find) bugs– These are the few bugs that reallyblow up the schedule– Finding these bugs is where Traceshineswww.uefi.org4

“New” Intel Trace Features Instruction Trace (Intel Processor Trace) Event Trace (Intel Trace Hub)www.uefi.org5

Intel Trace Hub Logic that comprises trace sources, aglobal hub with timestamp, tracedestinations, and a trigger unit A sink for writes from cores and anyother trace sources Acts as a PCI device, and alignedwith industry standards Trace destinations include:– MTB (8kB, out of reset)– System Memory (after MRC)– Direct Connect Interface (out ofreset, supports streaming trace)www.uefi.org6

AETEvent TypeHW/SW InterruptIRETExceptionMSRPower ManagementIOSGXCODE BPDATA BPFIXED INTSW POWERWBINVDEvent SubTypesHW INTRIRETExceptionRDMSR, WRMSRPOWER ENTRY, POWER EXITPORT IN, PORT OUT, PORT IN ADDRAEX, EENTER, ERESUME, EEXITCODE BPDATA BPSMI, RSM, NMIMONITOR/MWAITWBINVD BEGIN, WBINVD ENDwww.uefi.orgDescriptionHW interrupt traceIRET traceException, fault, trap traceMSR tracePower managementIO traceSGX traceCode breakpoint traceData breakpoint“Fixed” interrupt traceMONITOR/MWAIT traceWrite-back invalidate trace7

AET Tips #1 Probe-mode (JTAG) needed to initialize AET – use outside ofprobe mode (i.e. BIOS, device driver) causes #GP. AET is implemented in CPU microcode and does not modify thearchitectural behavior* of the processors – no need toinstrument code!– * Enabling CODE/DATA BP changes the behavior of normalbreakpoints – causes a trace event rather than a debug exception.Great for critical sections of code, concurrency issues, debuggingmemory accesses, etc. This is event trace, not instruction trace - source code/ symbolsnot required (but it’s great if you have them!)www.uefi.org8

AET Tips #2 A Last Branch Record (LBR) instruction trace stack can be added to allevent traces – a fast way to trace back 160 instructions Intel Processor Trace and AET can run concurrently LBR uses MSRs to track from address and to address pairs, so operates out of reset –no need for system memoryIPT places trace data in system memoryOn Ice Lake processors, both AET LBR tracing and Intel Processor Tracecan be enabled at the same timeAET using XDP access became available initially on Skylake Client andServerAET Streaming through DCI (USB) first became available on Ice Lake Client(not available on Purley or Whitley platforms)www.uefi.org9

Other Trace Hub Trace SW/FW Trace– Replacement for printf– Avoids backpressurefrom serial port– Great for “Heisenbugs” CSME (ManagementEngine) All timestamped andcorrelated*www.uefi.orgSW/FW Trace timestamp correlation onlyavailable on later silicon.10

Demo ConfigurationSourcePoint debugger“Special” USB cableIntel DesignInToolsIce Lake Clientwww.uefi.org11


Call to Action Take advantage of open source UEFIlearning/ development opportunities– Debugging Intel Firmware using DCI & USB3.0– Advanced Capabilities of ArchitecturalEvent Tracewww.uefi.org13


More Questions?Following today’s webinar, join the live, interactiveWebEx Q&A for the opportunity to chat with thepresenterVisit this link to attend: https://bit.ly/38JIx9RMeeting number (access code): 126 016 9253Meeting password: UEFIForum (83343678 from phonesand video systems)www.uefi.org15

Thanks for attending the UEFI 2021 Virtual PlugfestFor more information on UEFI Forum and UEFISpecifications, visit http://www.uefi.orgpresented bywww.uefi.org16

Intel Processor Trace and AET can run concurrently IPT places trace data in system memory On Ice Lake processors, both AET LBR tracing and Intel Processor Trace can be enabled at the same time AET using XDP acces

Related Documents:

UEFI Driver Writer’s Guide UEFI Driver Development Guides Documentation EFI Development Kit (EDK II) Open Source UEFI Development Kit (UDK2010) UEFI Self Certification Test (SCT) UEFI 2.3.1 Developer Platforms & Debug Tools UEFI Driver Wizard Development UEFI Plugfest – February 2012 www.uefi.org 16

UEFI Capsule Publish UEFI Capsule Distribute UEFI Capsule Process UEFI Capsule Linux* Vendor Firmware . Run Time (RT)? OS-Present App Final OS Environment Final OS Boot Loader OS-Absent App Transient OS . using configuration data and small libraries.

Send documentation comments to mdsfeedback-doc@cisco.com. Contents x Cisco MDS 9000 Family Command Reference OL-6970-03, Cisco MDS SAN-OS Release 2.x debug klm 6-70 debug license 6-72 debug logfile 6-73 debug mcast 6-75 debug mip 6-77 debug module 6-78 debug ntp 6-79

Intel C Compiler Intel Fortran Compiler Intel Distribution for Python* Intel Math Kernel Library Intel Integrated Performance Primitives Intel Threading Building Blocks Intel Data Analytics Acceleration Library Included in Composer Edition SCALE Intel MPI Library Intel Trace Analyze

"Wind River is excited about the release of Intel System Studio which includes support for the Wind River Linux operating system", said . Source level debug of OS kernel software, drivers, firmware, BIOS, UEFI . EFI/UEFI Firmware, bootloader debug, Linux* OS awareness Flashing and peripheral register support

configurations: UEFI Mode and Legacy BIOS Mode. Certain boot options described in this guide require that you select a specific boot mode. By default, the boot mode is set to UEFI Mode. The system must boot in UEFI Mode to use the following options: Secure Boot, UEFI Optimized Boot, Generic USB Boot, IPv6 PXE Boot, iSCSI Boot, and Boot from URL

Secure Boot Databases Platform Key (PK) Key Exchange Key Database (KEK) Secure Boot Signature Database (db) Secure Boot Blacklist Signature Database (dbx) Secure Boot Timestamp Signature Database (dbt) Secure Boot Authorized Recovery Signature Database (dbr) UEFI Plugfest -March 2016 www.uefi.org 20 2.3.1 2.3.1 2.5 2.4 .

Document Number: 337029 -009 Intel RealSenseTM Product Family D400 Series Datasheet Intel RealSense Vision Processor D4, Intel RealSense Vision Processor D4 Board, Intel RealSense Vision Processor D4 Board V2, Intel RealSense Vision Processor D4 Board V3, Intel RealSense Depth Module D400, Intel RealSense Depth Module D410, Intel