public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2 0/6] Add new EfiLocateXXXAcpiTable() APIs
@ 2018-09-13 10:26 Star Zeng
  2018-09-13 10:26 ` [PATCH V2 1/6] MdePkg UefiLib: " Star Zeng
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Star Zeng @ 2018-09-13 10:26 UTC (permalink / raw)
  To: edk2-devel
  Cc: Star Zeng, Younas khan, Michael D Kinney, Liming Gao, Jiewen Yao,
	Jian J Wang, Ruiyu Ni, Dandan Bi, Eric Dong, Laszlo Ersek

It is the V2 patch series of
https://lists.01.org/pipermail/edk2-devel/2018-August/029214.html
It is according to the discussion at
https://lists.01.org/pipermail/edk2-devel/2018-September/029348.html

V2:
1. Add EfiLocateFirstAcpiTable() and EfiLocateNextAcpiTable() instead
   of EfiFindAcpiTableBySignature() to support locating both single
   ACPI table instance and multiple ACPI table instances cases.
2. Support locating DSDT.
3. Support locating multiple ACPI table instances case by
   EfiLocateNextAcpiTable().

Test done:
1. Call EfiLocateFirstAcpiTable() before ACPI configuration table is
   installed, NULL is returned.
2. Call EfiLocateFirstAcpiTable() to locate FACS after FACS is installed
   but FADT is not installed, NULL is returned.
3. Call EfiLocateFirstAcpiTable() to locate FADT/DSDT/FACS/FPDT/DMAR
   at late phase, correct ACPI table pointer is returned.
4. Call EfiLocateNextAcpiTable() to locate SSDTs at late phase, all
   SSDTs are returned correctly.
5. Run same test cases above after setting PcdAcpiExposedTableVersions
   to 0x2, same results are with above.

The code for this patch series is also at
git@github.com:lzeng14/edk2.git branch LocateAcpiTable_UefiLibV2

https://bugzilla.tianocore.org/show_bug.cgi?id=967
Request to add a library function for GetAcpiTable() in order
to get ACPI table using signature as input.

After evaluation, we found there are many duplicated code to
find ACPI table by signature in different modules.

This patch adds new EfiLocateXXXAcpiTable() API in UefiLib
for the request and removing the duplicated code.

Cc: Younas khan <pmdyounaskhan786@gmail.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>

Star Zeng (6):
  MdePkg UefiLib: Add new EfiLocateXXXAcpiTable() APIs
  IntelSiliconPkg IntelVTdDxe: Use new EfiLocateFirstAcpiTable()
  MdeModulePkg S3SaveStateDxe: Use new EfiLocateFirstAcpiTable()
  PcAtChipsetPkg PcRtc: Use new EfiLocateFirstAcpiTable()
  ShellPkg DpDynamicCommand: Use new EfiLocateFirstAcpiTable()
  UefiCpuPkg PiSmmCpuDxeSmm: Use new EfiLocateFirstAcpiTable()

 .../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c        | 136 +-----
 .../Acpi/S3SaveStateDxe/AcpiS3ContextSave.c        | 208 +--------
 .../Acpi/S3SaveStateDxe/S3SaveStateDxe.inf         |   3 +-
 MdePkg/Include/Library/UefiLib.h                   |  68 +++
 MdePkg/Library/UefiLib/Acpi.c                      | 488 +++++++++++++++++++++
 MdePkg/Library/UefiLib/UefiLib.inf                 |   3 +
 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c |  80 +---
 ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c      | 136 +-----
 ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h      |   1 -
 ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni    |   1 -
 ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf |   2 -
 .../DpDynamicCommand/DpDynamicCommand.inf          |   2 -
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf       |   4 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c             |  84 +---
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h     |   3 +-
 15 files changed, 579 insertions(+), 640 deletions(-)
 create mode 100644 MdePkg/Library/UefiLib/Acpi.c

-- 
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-09-17  7:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13 10:26 [PATCH V2 0/6] Add new EfiLocateXXXAcpiTable() APIs Star Zeng
2018-09-13 10:26 ` [PATCH V2 1/6] MdePkg UefiLib: " Star Zeng
2018-09-14  4:40   ` Ni, Ruiyu
2018-09-17  7:13     ` Zeng, Star
2018-09-13 10:26 ` [PATCH V2 2/6] IntelSiliconPkg IntelVTdDxe: Use new EfiLocateFirstAcpiTable() Star Zeng
2018-09-13 10:26 ` [PATCH V2 3/6] MdeModulePkg S3SaveStateDxe: " Star Zeng
2018-09-13 10:26 ` [PATCH V2 4/6] PcAtChipsetPkg PcRtc: " Star Zeng
2018-09-14  4:41   ` Ni, Ruiyu
2018-09-14  4:42     ` Ni, Ruiyu
2018-09-13 10:26 ` [PATCH V2 5/6] ShellPkg DpDynamicCommand: " Star Zeng
2018-09-17  6:54   ` Ni, Ruiyu
2018-09-13 10:27 ` [PATCH V2 6/6] UefiCpuPkg PiSmmCpuDxeSmm: " Star Zeng
2018-09-13 10:38   ` Laszlo Ersek
2018-09-14  0:19   ` Dong, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox