33c81c25bb
Resolves a new CodeQL error due to the value being incremented in the loop being a narrower type than the variable it is being compared against. The variable is changed to a UINT32 type so it has the same width as the type it is being compared against. Issue explanation: In a loop condition, comparison of a value of a narrow type with a value of a wide type may result in unexpected behavior if the wider value is sufficiently large (or small). This is because the narrower value may overflow. This can lead to an infinite loop. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Gua Guo <gua.guo@intel.com> Cc: Prakashan Krishnadas Veliyathuparambil <krishnadas.veliyathuparambil.prakashan@intel.com> Cc: K N Karthik <karthik.k.n@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Gua Guo <gua.guo@intel.com> |
||
---|---|---|
.. | ||
BaseTraceHubDebugSysTLib.c | ||
BaseTraceHubDebugSysTLib.inf | ||
DxeSmmTraceHubDebugSysTLib.c | ||
DxeSmmTraceHubDebugSysTLib.inf | ||
InternalTraceHubApi.c | ||
InternalTraceHubApi.h | ||
InternalTraceHubApiCommon.c | ||
InternalTraceHubApiCommon.h | ||
PeiTraceHubDebugSysTLib.c | ||
PeiTraceHubDebugSysTLib.inf | ||
Readme.md |
Readme.md
Introduction of TrcaceHubDebugSysTLib
TrcaceHubDebugSysTLib library is a top level library for dumping Trace Hub messages. It provides Trace Hub related APIs to dump Trace Hub message via MIPI SYS-T submodule. User need to properly configure following Trace Hub related PCDs and HOB. (See MdeModulePkg.dec to get detailed definition for PCDs below)
- PcdTraceHubDebugLevel
- PcdEnableTraceHubDebugMsg
- PcdTraceHubDebugMmioAddress (See TraceHubDebugInfoHob.h to get detailed definition for HOB below)
- gTraceHubDebugInfoHobGuid
BaseTraceHubDebugSysTLib.inf
System prints Trace Hub message in SEC/PEI/DXE/SMM based on fixed PCDs. Only support single Trace Hub debug instance.
PeiTraceHubDebugSysTLib.inf
System prints Trace Hub message in PEI based on fixed PCDs and HOB. System applies Trace Hub HOB once it detect gTraceHubDebugInfoHobGuid HOB. Trace Hub PCDs will be applied if no HOB exist.
DxeSmmTraceHubDebugSysTLib.inf
System prints Trace Hub message in DXE/SMM based on fixed PCDs and HOB. Trace Hub PCDs will be applied if no HOB exist.
Note
Trace Hub debug library not support DXE_RUNTIME_DRIVER type of module currently.