public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer
@ 2018-05-31 10:46 Ard Biesheuvel
  2018-05-31 10:46 ` [PATCH edk2-platforms 1/2] Platform/DeveloperBox: wire up status code reporting for DXE phase Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2018-05-31 10:46 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, graeme.gregory, Ard Biesheuvel

Enable some of the status code reporting infrastructure in patch #1 so
we can include the FPDT DXE driver in patch #2 which produces the FPDT
diagnostic table which tells us how much time was spent in the firmware,
in the OS loader, and in ExitBootServices().

Ard Biesheuvel (2):
  Platform/DeveloperBox: wire up status code reporting for DXE phase
  Platform/DeveloperBox: enable FPDT table

 Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 12 ++++++++++++
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf |  2 ++
 Silicon/Socionext/SynQuacer/Acpi.dsc.inc         |  6 ++++++
 3 files changed, 20 insertions(+)

-- 
2.17.0



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

* [PATCH edk2-platforms 1/2] Platform/DeveloperBox: wire up status code reporting for DXE phase
  2018-05-31 10:46 [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Ard Biesheuvel
@ 2018-05-31 10:46 ` Ard Biesheuvel
  2018-05-31 10:46 ` [PATCH edk2-platforms 2/2] Platform/DeveloperBox: enable FPDT table Ard Biesheuvel
  2018-05-31 21:16 ` [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Leif Lindholm
  2 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2018-05-31 10:46 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, graeme.gregory, Ard Biesheuvel

Wire up minimal support for status code reporting in the DXE phase,
to the extent required for supporting the FPDT ACPI table, which
we will enable in a subsequent patch.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 10 ++++++++++
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf |  1 +
 2 files changed, 11 insertions(+)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 3decc22e25b1..1d501e89290d 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -101,6 +101,7 @@ [LibraryClasses.common]
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
+  OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
@@ -163,12 +164,14 @@ [LibraryClasses.common.DXE_CORE]
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
+  ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   DtPlatformDtbLoaderLib|Silicon/Socionext/SynQuacer/Library/SynQuacerDtbLoaderLib/SynQuacerDtbLoaderLib.inf
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
+  ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
   #
   # Firmware update
@@ -186,6 +189,9 @@ [LibraryClasses.common.DXE_DRIVER]
   PciHostBridgeLib|Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLib.inf
   NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
 
+[LibraryClasses.common.UEFI_DRIVER]
+  ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+
 [LibraryClasses.common.UEFI_APPLICATION]
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
@@ -209,6 +215,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
 !if $(TARGET) != RELEASE
   DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
 !endif
+  ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
 
 ################################################################################
 #
@@ -330,6 +337,8 @@ [PcdsFixedAtBuild.common]
   #  DEBUG_ERROR     0x80000000  // Error
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
 
+  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
+
   #
   # Optional feature to help prevent EFI memory map fragments
   # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob
@@ -497,6 +506,7 @@ [Components.common]
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
   ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
 
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index c36104da3b46..b8a4a1955674 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -108,6 +108,7 @@ [FV.FvMain]
   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
   INF ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
 
   INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-- 
2.17.0



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

* [PATCH edk2-platforms 2/2] Platform/DeveloperBox: enable FPDT table
  2018-05-31 10:46 [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Ard Biesheuvel
  2018-05-31 10:46 ` [PATCH edk2-platforms 1/2] Platform/DeveloperBox: wire up status code reporting for DXE phase Ard Biesheuvel
@ 2018-05-31 10:46 ` Ard Biesheuvel
  2018-05-31 21:16 ` [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Leif Lindholm
  2 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2018-05-31 10:46 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, graeme.gregory, Ard Biesheuvel

Enable runtime generation of the ACPI FPDT table, which contains some
performance data regarding how much time was spent in the various boot
phases.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 2 ++
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 1 +
 Silicon/Socionext/SynQuacer/Acpi.dsc.inc         | 6 ++++++
 3 files changed, 9 insertions(+)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 1d501e89290d..ed2404006799 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -190,6 +190,7 @@ [LibraryClasses.common.DXE_DRIVER]
   NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
+  PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common.UEFI_APPLICATION]
@@ -215,6 +216,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
 !if $(TARGET) != RELEASE
   DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
 !endif
+  PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
 
 ################################################################################
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index b8a4a1955674..42bcbf2f9452 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -261,6 +261,7 @@ [FV.FvMain]
   #
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+  INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
   INF RuleOverride = ACPITABLE Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
 
   #
diff --git a/Silicon/Socionext/SynQuacer/Acpi.dsc.inc b/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
index 73a5ea40e313..2fcde7dba905 100644
--- a/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
+++ b/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
@@ -45,4 +45,10 @@ [Components.common]
       gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
   }
   MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+  MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf {
+    <PcdsFeatureFlag>
+      gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwarePerformanceDataTableS3Support|FALSE
+    <LibraryClasses>
+      LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
+  }
   Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
-- 
2.17.0



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

* Re: [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer
  2018-05-31 10:46 [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Ard Biesheuvel
  2018-05-31 10:46 ` [PATCH edk2-platforms 1/2] Platform/DeveloperBox: wire up status code reporting for DXE phase Ard Biesheuvel
  2018-05-31 10:46 ` [PATCH edk2-platforms 2/2] Platform/DeveloperBox: enable FPDT table Ard Biesheuvel
@ 2018-05-31 21:16 ` Leif Lindholm
  2018-06-01 10:18   ` Leif Lindholm
  2 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2018-05-31 21:16 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel, graeme.gregory

On Thu, May 31, 2018 at 12:46:32PM +0200, Ard Biesheuvel wrote:
> Enable some of the status code reporting infrastructure in patch #1 so
> we can include the FPDT DXE driver in patch #2 which produces the FPDT
> diagnostic table which tells us how much time was spent in the firmware,
> in the OS loader, and in ExitBootServices().
> 
> Ard Biesheuvel (2):
>   Platform/DeveloperBox: wire up status code reporting for DXE phase
>   Platform/DeveloperBox: enable FPDT table

For the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

>  Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 12 ++++++++++++
>  Platform/Socionext/DeveloperBox/DeveloperBox.fdf |  2 ++
>  Silicon/Socionext/SynQuacer/Acpi.dsc.inc         |  6 ++++++
>  3 files changed, 20 insertions(+)
> 
> -- 
> 2.17.0
> 


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

* Re: [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer
  2018-05-31 21:16 ` [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Leif Lindholm
@ 2018-06-01 10:18   ` Leif Lindholm
  0 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2018-06-01 10:18 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel, graeme.gregory

On Thu, May 31, 2018 at 10:16:08PM +0100, Leif Lindholm wrote:
> On Thu, May 31, 2018 at 12:46:32PM +0200, Ard Biesheuvel wrote:
> > Enable some of the status code reporting infrastructure in patch #1 so
> > we can include the FPDT DXE driver in patch #2 which produces the FPDT
> > diagnostic table which tells us how much time was spent in the firmware,
> > in the OS loader, and in ExitBootServices().
> > 
> > Ard Biesheuvel (2):
> >   Platform/DeveloperBox: wire up status code reporting for DXE phase
> >   Platform/DeveloperBox: enable FPDT table
> 
> For the series:
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

Hmm, after a side discussion with Ard, I have asked him _not_ to push
this set for now. The reason for this is that its use under Linux is
dependent on the fundamentally broken concept of directly mapping
physical address regions into non-privileged processes using /dev/mem.

I want to get a sane kernel interface in place for accessing this data
before we start encouraging its use.

If this holds anyone back for other operating systems, please speak up
(off-list if needs be). The Reviewed-by still applies, and the patches
are ready to go.

/
    Leif

> >  Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 12 ++++++++++++
> >  Platform/Socionext/DeveloperBox/DeveloperBox.fdf |  2 ++
> >  Silicon/Socionext/SynQuacer/Acpi.dsc.inc         |  6 ++++++
> >  3 files changed, 20 insertions(+)
> > 
> > -- 
> > 2.17.0
> > 


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

end of thread, other threads:[~2018-06-01 10:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-31 10:46 [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Ard Biesheuvel
2018-05-31 10:46 ` [PATCH edk2-platforms 1/2] Platform/DeveloperBox: wire up status code reporting for DXE phase Ard Biesheuvel
2018-05-31 10:46 ` [PATCH edk2-platforms 2/2] Platform/DeveloperBox: enable FPDT table Ard Biesheuvel
2018-05-31 21:16 ` [PATCH edk2-platforms 0/2] enable FPDT table for SynQuacer Leif Lindholm
2018-06-01 10:18   ` Leif Lindholm

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