public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Zhichao Gao <zhichao.gao@intel.com>
To: edk2-devel@lists.01.org
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Star Zeng <star.zeng@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>, Hao Wu <hao.a.wu@intel.com>,
	Ray Ni <ray.ni@intel.com>, Liming Gao <liming.gao@intel.com>,
	Sean Brogan <sean.brogan@microsoft.com>,
	Michael Turner <Michael.Turner@microsoft.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: [PATCH V7 00/17] Add new APIs DebugVPrint for DebugLib
Date: Mon,  1 Apr 2019 09:08:04 +0800	[thread overview]
Message-ID: <20190401010821.6244-1-zhichao.gao@intel.com> (raw)

Add a new API DebugVPrint to all the instances of DebugLib.
This API is added to provide a function who want to implement
special debug function with '...' parameter.
Add a PEIM to install gEdkiiDebugPpiGuid, and implement a PEI
debug library instance base on it. All PEIMs except pei core
type can use the PeiDebugLibDebugPpi to reduce its image size.

V2: 
Remove redundant code in DebugPrint.
Fix some coding sytle issues.
Remove some unenforced descirption in the comments of DebugVPrint.

V3:
Add the new API DebugBPrint, it is more useful for consumers which
are care of compatible issue.
Change the interface in gEdkiiDebugPpiGuid. VA_LIST is inappropriate
to appeared in protocol or ppi because different compilers compile
it to different type. It may be a pointer or a structure.

V4:
Sync the implement on MdeModulePkg/PeiDxeDebugLibReportStatusCode to
IntelFramworkModulePkg/PeiDxeDebugLibReportStatusCode. While the format
string is too long just truncate it instead of return.
Fix and update some functions' comments.

V5:
Correct some comments of inf file.
Put all implement into one C file for DebugServicePei.
Use the directly return instead of CpuDeadLoop in PeiDebugLibDebugPpi.
Rename the mDebugPpi to mEdkiiDebugPpi because it has a same name in DeubServicePpi.

V6: Changed patch 16/17
Remove the global variable and use the local variable insteaded.
Because PEIM may run in the flash which is read only. The global variable cannot
be changed at this situation.
Update the description of PeiDebugLibDebugPpi.inf.

V7: Changed patch 16/17
Generate a Breakpoint, DeadLoop, or NOP based on PCD(PcdDebugPropertyMask) settings
while do not locate the gEdkiiDebugPpiGuid.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>

Bret Barkelew (13):
  MdePkg/DebugLib.h: Add new APIs for DebugLib
  MdePkg/BaseDebugLibNull: Add new APIs for DebugLib
  MdePkg/BaseDebugLibSerialPort: Add new APIs
  MdePkg/UefidebugLibConOut: Add new APIs
  MdePkg/UefiDebugLibStdErr: Add new APIs
  MdePkg/DxeRuntimeDebugLibSerialPort: Add new APIs
  MdePkg/UefiDebuglibDebugPortProtocol: Add new APIs
  ArmPkg/SemiHostingDebugLib: Add new APIs
  OvmfPkg/PlatformDebugLibIoPort: Add new APIs
  IntelFsp2Pkg/BaseFspDebugLibSerialPort: Add new APIs
  IntelFspPkg/BaseFspDebugLibSerialPort: Add new APIs
  IntelFramworkModulePkg/PeiDxeDebugLibReportStatusCode: Add new APIs
  MdeModulePkg/PeiDxeDebugLibReportStatusCode: Add new APIs

Liming Gao (1):
  MdeModulePkg/PeiDebugLibDebugPpi: Add PEI debug lib

Zhichao Gao (3):
  MdeModulePkg: Add definitions for EDKII DEBUG PPI
  MdeModulePkg: Add a PEIM to install Debug PPI
  MdeModulePkg: Add PEIM and lib to dsc file

 ArmPkg/Library/SemiHostingDebugLib/DebugLib.c | 106 +++-
 .../PeiDxeDebugLibReportStatusCode/DebugLib.c | 179 +++++--
 .../BaseFspDebugLibSerialPort/DebugLib.c      | 103 +++-
 .../BaseFspDebugLibSerialPort/DebugLib.c      | 103 +++-
 MdeModulePkg/Include/Ppi/Debug.h              |  82 ++++
 .../Library/PeiDebugLibDebugPpi/DebugLib.c    | 460 ++++++++++++++++++
 .../PeiDebugLibDebugPpi.inf                   |  64 +++
 .../PeiDxeDebugLibReportStatusCode/DebugLib.c | 177 +++++--
 MdeModulePkg/MdeModulePkg.dec                 |   3 +
 MdeModulePkg/MdeModulePkg.dsc                 |   3 +
 .../Universal/DebugServicePei/DebugService.h  |  56 +++
 .../DebugServicePei/DebugServicePei.c         | 100 ++++
 .../DebugServicePei/DebugServicePei.inf       |  51 ++
 .../DebugServicePei/DebugServicePei.uni       |  20 +
 MdePkg/Include/Library/DebugLib.h             |  52 +-
 MdePkg/Library/BaseDebugLibNull/DebugLib.c    |  56 ++-
 .../Library/BaseDebugLibSerialPort/DebugLib.c | 106 +++-
 .../DxeRuntimeDebugLibSerialPort/DebugLib.c   | 106 +++-
 MdePkg/Library/UefiDebugLibConOut/DebugLib.c  | 106 +++-
 .../UefiDebugLibDebugPortProtocol/DebugLib.c  | 106 +++-
 MdePkg/Library/UefiDebugLibStdErr/DebugLib.c  | 107 +++-
 .../Library/PlatformDebugLibIoPort/DebugLib.c | 106 +++-
 22 files changed, 2144 insertions(+), 108 deletions(-)
 create mode 100644 MdeModulePkg/Include/Ppi/Debug.h
 create mode 100644 MdeModulePkg/Library/PeiDebugLibDebugPpi/DebugLib.c
 create mode 100644 MdeModulePkg/Library/PeiDebugLibDebugPpi/PeiDebugLibDebugPpi.inf
 create mode 100644 MdeModulePkg/Universal/DebugServicePei/DebugService.h
 create mode 100644 MdeModulePkg/Universal/DebugServicePei/DebugServicePei.c
 create mode 100644 MdeModulePkg/Universal/DebugServicePei/DebugServicePei.inf
 create mode 100644 MdeModulePkg/Universal/DebugServicePei/DebugServicePei.uni

-- 
2.21.0.windows.1



             reply	other threads:[~2019-04-01  1:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01  1:08 Zhichao Gao [this message]
2019-04-01  1:08 ` [PATCH V7 01/17] MdePkg/DebugLib.h: Add new APIs for DebugLib Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 02/17] MdePkg/BaseDebugLibNull: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 03/17] MdePkg/BaseDebugLibSerialPort: Add new APIs Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 04/17] MdePkg/UefidebugLibConOut: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 05/17] MdePkg/UefiDebugLibStdErr: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 06/17] MdePkg/DxeRuntimeDebugLibSerialPort: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 07/17] MdePkg/UefiDebuglibDebugPortProtocol: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 08/17] ArmPkg/SemiHostingDebugLib: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 09/17] OvmfPkg/PlatformDebugLibIoPort: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 10/17] IntelFsp2Pkg/BaseFspDebugLibSerialPort: " Zhichao Gao
2019-04-01  1:56   ` Chiu, Chasel
2019-04-01  5:19   ` Desimone, Nathaniel L
2019-04-01  1:08 ` [PATCH V7 11/17] IntelFspPkg/BaseFspDebugLibSerialPort: " Zhichao Gao
2019-04-01  1:56   ` Chiu, Chasel
2019-04-01  5:19   ` Desimone, Nathaniel L
2019-04-01  1:08 ` [PATCH V7 12/17] IntelFramworkModulePkg/PeiDxeDebugLibReportStatusCode: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 13/17] MdeModulePkg/PeiDxeDebugLibReportStatusCode: " Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 14/17] MdeModulePkg: Add definitions for EDKII DEBUG PPI Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 15/17] MdeModulePkg: Add a PEIM to install Debug PPI Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 16/17] MdeModulePkg/PeiDebugLibDebugPpi: Add PEI debug lib Zhichao Gao
2019-04-01  1:08 ` [PATCH V7 17/17] MdeModulePkg: Add PEIM and lib to dsc file Zhichao Gao
2019-04-01  1:17 ` [PATCH V7 00/17] Add new APIs DebugVPrint for DebugLib Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190401010821.6244-1-zhichao.gao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox