@Chan, Laura<mailto:laura.c...@intel.com>, @Prakashan, Krishnadas 
Veliyathuparambil<mailto:krishnadas.veliyathuparambil.prakas...@intel.com> and 
@K N, Karthik<mailto:karthik....@intel.com>

In parallel, please also help to review PR: 
https://github.com/tianocore/edk2/pull/3793 from TraceHubDebugLib owner 
viewpoint.

TraceHubDebugLib.h API Change
Origin
firmware.boot.uefi.iafw.intel/TraceHubDebugLib.h at main * 
intel-restricted/firmware.boot.uefi.iafw.intel * 
GitHub<https://github.com/intel-restricted/firmware.boot.uefi.iafw.intel/blob/main/ClientOneSiliconPkg/Include/Library/TraceHubDebugLib.h>

  *   TraceHubWriteCataLog64_0 (SeverityType, Id, )
  *   TraceHubWriteCataLog64_1 (SeverityType, Id, Param1, Param2)
  *   TraceHubWriteCataLog64_2 (SeverityType, Id, Param1, Param2)
  *   TraceHubWriteCataLog64_3 (SeverityType, Id, Param1, Param2, Param3)
  *   TraceHubWriteCataLog64_4 (SeverityType, Id, Param1, Param2, Param3, 
Param4)
  *   TraceHubWriteCataLog64_5 (SeverityType, Id, Param1, Param2, Param3, 
Param4, Param5)
  *   TraceHubWriteCataLog64_6 (SeverityType, Id, Param1, Param2, Param3, 
Param4, Param5, Param6)


Modify
edk2_EXP/TraceHubDebugLib.h at th_leverageMIPI_v2 * hsuc1x/edk2_EXP * 
GitHub<https://github.com/hsuc1x/edk2_EXP/blob/th_leverageMIPI_v2/MdeModulePkg/Include/Library/TraceHubDebugLib.h>

  *   TraceHubWriteCataLog64 (SeverityType, Id, 0)
  *   TraceHubWriteCataLog64 (SeverityType, Id, 1, Param1)
  *   TraceHubWriteCataLog64 (SeverityType, Id, 2, Param1, Param2)
  *   TraceHubWriteCataLog64 (SeverityType, Id, 3, Param1, Param2, Param3)
  *   TraceHubWriteCataLog64 (SeverityType, Id, 4, Param1, Param2, Param3, 
Param4)
  *   TraceHubWriteCataLog64 (SeverityType, Id, 5, Param1, Param2, Param3, 
Param4, Param5)
  *   TraceHubWriteCataLog64 (SeverityType, Id, 6, Param1, Param2, Param3, 
Param4, Param5, Param6)

Thanks,
Gua

From: Hsu, VictorX <victorx....@intel.com>
Sent: Wednesday, December 28, 2022 5:51 PM
To: Guo, Gua <gua....@intel.com>; Kinney, Michael D 
<michael.d.kin...@intel.com>; Gao, Liming <gaolim...@byosoft.com.cn>; 
devel@edk2.groups.io
Cc: Chan, Laura <laura.c...@intel.com>; Prakashan, Krishnadas Veliyathuparambil 
<krishnadas.veliyathuparambil.prakas...@intel.com>; K N, Karthik 
<karthik....@intel.com>; Lu, James <james...@intel.com>; Chen, Arthur G 
<arthur.g.c...@intel.com>; Chiu, Chasel <chasel.c...@intel.com>; Zimmer, 
Vincent <vincent.zim...@intel.com>
Subject: RE: Edk2 support MIPI SyS-T TraceHub Debug Library 
[TraceHubDebugLibSysT]

Hi @Kinney, Michael D<mailto:michael.d.kin...@intel.com>

Please review https://github.com/tianocore/edk2/pull/3793 for below questions.


  1.  Need to add TraceHub PCD into edk2/MdeModulePkg.uni at master * 
tianocore/edk2 * 
GitHub<https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.uni>

Answer: Done

  1.  What about the license ?

Answer: It's BSD license, based on public-mipi-sys-t/LICENSE at master * 
MIPI-Alliance/public-mipi-sys-t 
(github.com)<https://github.com/MIPI-Alliance/public-mipi-sys-t/blob/master/LICENSE>

  1.  Is PcdTraceHubDebugAddress MMIO address ? If yes, why we use UINT32

Answer: Done

  1.  For TraceHubWriteCataLog64_[0-6] try to use below macro to implement it.

#define VA_START va_start

#define VA_ARG   va_arg

#define VA_END   va_end

#define VA_LIST  va_list

Answer: Done

  1.  Is have SMM or MM version ?

Answer: Done, renamed to DxeSmmTraceHubDebugLibSyst.inf.

  1.  Whether have any chance to use .gitsubmodule to leverage 
https://github.com/MIPI-Alliance/public-mipi-sys-t.

Answer:. https://github.com/tianocore/edk2/pull/3793

thanks

From: Guo, Gua <gua....@intel.com<mailto:gua....@intel.com>>
Sent: Thursday, December 1, 2022 11:29 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; Gao, Liming 
<gaolim...@byosoft.com.cn<mailto:gaolim...@byosoft.com.cn>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Chan, Laura <laura.c...@intel.com<mailto:laura.c...@intel.com>>; Prakashan, 
Krishnadas Veliyathuparambil 
<krishnadas.veliyathuparambil.prakas...@intel.com<mailto:krishnadas.veliyathuparambil.prakas...@intel.com>>;
 K N, Karthik <karthik....@intel.com<mailto:karthik....@intel.com>>; Lu, James 
<james...@intel.com<mailto:james...@intel.com>>; Chen, Arthur G 
<arthur.g.c...@intel.com<mailto:arthur.g.c...@intel.com>>; Chiu, Chasel 
<chasel.c...@intel.com<mailto:chasel.c...@intel.com>>; Zimmer, Vincent 
<vincent.zim...@intel.com<mailto:vincent.zim...@intel.com>>; Hsu, VictorX 
<victorx....@intel.com<mailto:victorx....@intel.com>>
Subject: RE: Edk2 support MIPI SyS-T TraceHub Debug Library 
[TraceHubDebugLibSysT]

@Kinney, Michael D<mailto:michael.d.kin...@intel.com>

As we offline sync, there are below opens like below. Have any open, please 
also share for us.


  1.  Need to add TraceHub PCD into edk2/MdeModulePkg.uni at master * 
tianocore/edk2 * 
GitHub<https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.uni>

Answer: Will update it in next patch

  1.  What about the license ?

Answer: It's BSD license, based on public-mipi-sys-t/LICENSE at master * 
MIPI-Alliance/public-mipi-sys-t 
(github.com)<https://github.com/MIPI-Alliance/public-mipi-sys-t/blob/master/LICENSE>

  1.  Is PcdTraceHubDebugAddress MMIO address ? If yes, why we use UINT32

Answer: It's MMIO address, we can change it to UINT64, it make sense to let the 
PCH more generic. Will update it in next patch.

  1.  For TraceHubWriteCataLog64_[0-6] try to use below macro to implement it.

#define VA_START va_start

#define VA_ARG   va_arg

#define VA_END   va_end

#define VA_LIST  va_list

Answer: Will update it in next patch

  1.  Is have SMM or MM version ?

Answer: MdeModulePkg/Library/TraceHubDebugLibSysT/DxeTraceHubDebugLibSyst.inf 
can take care for SMM case. We can rename it like below to make it more clearly.

MdeModulePkg/Library/TraceHubDebugLibSysT/DxeSmmTraceHubDebugLibSyst.inf

  1.  Whether have any chance to use .gitsubmodule to leverage 
https://github.com/MIPI-Alliance/public-mipi-sys-t.

Answer: Will draft another PR and try to use gitsubmodule to check whether 
exist any predicament.

Thanks
Gua

From: Guo, Gua
Sent: Wednesday, November 23, 2022 3:29 PM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; gaoliming 
<gaolim...@byosoft.com.cn<mailto:gaolim...@byosoft.com.cn>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Chan, Laura <laura.c...@intel.com<mailto:laura.c...@intel.com>>; Prakashan, 
Krishnadas Veliyathuparambil 
<krishnadas.veliyathuparambil.prakas...@intel.com<mailto:krishnadas.veliyathuparambil.prakas...@intel.com>>;
 K N, Karthik <karthik....@intel.com<mailto:karthik....@intel.com>>; Lu, James 
<james...@intel.com<mailto:james...@intel.com>>; Chen, Arthur G 
<arthur.g.c...@intel.com<mailto:arthur.g.c...@intel.com>>; Chiu, Chasel 
<chasel.c...@intel.com<mailto:chasel.c...@intel.com>>; Zimmer, Vincent 
<vincent.zim...@intel.com<mailto:vincent.zim...@intel.com>>; Hsu, VictorX 
<victorx....@intel.com<mailto:victorx....@intel.com>>
Subject: Edk2 support MIPI SyS-T TraceHub Debug Library [TraceHubDebugLibSysT]


@Kinney, Michael D<mailto:michael.d.kin...@intel.com> and 
@gaoliming<mailto:gaolim...@byosoft.com.cn>

We want to add TraceHubDebug library support on Edk2. It's new added library on 
Edk2, so it doesn't have any backward and forward issue.

May I know have any process we may need to follow up. Have any comment or 
concern please also share for me.



Reviewers/Maintainers: @Prakashan, Krishnadas 
Veliyathuparambil<mailto:krishnadas.veliyathuparambil.prakas...@intel.com>, 
@Chan, Laura<mailto:laura.c...@intel.com>, @K N, 
Karthik<mailto:karthik....@intel.com>.



USF UPL spec update: 
https://github.com/UniversalScalableFirmware/documentation/pull/52 (Done)

Edk2 Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4144 (On-Going)

Edk2 PR: https://github.com/tianocore/edk2/pull/3613 (On-Going)



Background:

  *     Problem: In the UPL (Universal Payload) binary which contains only the 
Edk2 drivers, Tracehub debug message are missing during the execution of early 
DXE Core modules (before ReportStatusCode is ready).
  *     Solution: Add TraceHub lib on Edk2, to be consumed by the UPL.


About TraceHubDebugLibSysT:

  *   Library is consumed by the DebugLib and StatusCodeHandler to send the 
PostCodes, ProgressCodes and DEBUG messages to the TraceHub/NPK in MIPI SyS-T 
format.
  *   The MIPI SyS-T APIs in this library are taken from the OpenSource 
implementation: https://github.com/MIPI-Alliance/public-mipi-sys-t.
  *   Library changes done for upstreaming:  MipiSystLib is rewritten to comply 
EDK2 coding standards and changed ways to pass trace address/verbosity with HOB 
directly instead of calling into TraceHubHookLib to get these info.
  *   Proposal With UPL: consume HOB gUniversalPayloadTraceHubDebugInfoGuid to 
print TraceHub Debug message in DXE Core

Thanks,
Gua


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97850): https://edk2.groups.io/g/devel/message/97850
Mute This Topic: https://groups.io/mt/95213711/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to