public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer
@ 2020-07-17 10:09 Masahisa Kojima
  2020-07-17 10:09 ` [PATCH edk2-platforms 1/2] Silicon/SynQuacer: add ACPI descriptor of MMIO TPM Masahisa Kojima
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Masahisa Kojima @ 2020-07-17 10:09 UTC (permalink / raw)
  To: devel, ard.biesheuvel, leif; +Cc: masahisa.kojima

This patches add the ACPI description of MMIO TPM on SynQuacer.
This also fixes the non CRLF line endings of Acpi.dsc.inc.

Masahisa Kojima (2):
  Silicon/SynQuacer: add ACPI descriptor of MMIO TPM
  Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc

 Silicon/Socionext/SynQuacer/Acpi.dsc.inc      | 89 ++++++++++---------
 .../Socionext/SynQuacer/AcpiTables/Dsdt.asl   | 14 +++
 2 files changed, 61 insertions(+), 42 deletions(-)

-- 
2.17.1


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

* [PATCH edk2-platforms 1/2] Silicon/SynQuacer: add ACPI descriptor of MMIO TPM
  2020-07-17 10:09 [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Masahisa Kojima
@ 2020-07-17 10:09 ` Masahisa Kojima
  2020-07-17 10:09 ` [PATCH edk2-platforms 2/2] Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc Masahisa Kojima
  2020-07-24 17:03 ` [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Leif Lindholm
  2 siblings, 0 replies; 5+ messages in thread
From: Masahisa Kojima @ 2020-07-17 10:09 UTC (permalink / raw)
  To: devel, ard.biesheuvel, leif; +Cc: masahisa.kojima

The second SPI controller is wired to the low speed 96boards
connector on Developerbox. SynQuacer platform can exposes
its SPI TPM via MMIO window that is backed by the SPI
command sequencer in the SPI bus controller.
This commit adds the MMIO TPM description to the DSDT.

If TPM2_ENABLE build option is not enabled, existing linux
SPI driver is used instead of MMIO TPM.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
 Silicon/Socionext/SynQuacer/Acpi.dsc.inc        |  7 ++++++-
 Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/Silicon/Socionext/SynQuacer/Acpi.dsc.inc b/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
index acd903553368..ce5a1f6c5007 100644
--- a/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
+++ b/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
@@ -39,4 +39,9 @@ [Components.common]
       gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
   }
   MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
-  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
+  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf {
+    <BuildOptions>
+!if $(TPM2_ENABLE) == TRUE
+      *_*_*_ASLPP_FLAGS = -DTPM2_ENABLE
+!endif
+  }
diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
index 50f1753c3565..bca484763d2c 100644
--- a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
+++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
@@ -262,6 +262,19 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR",
       Name (_HID, "PNP0C0C")
     }
 
+#ifdef TPM2_ENABLE
+    //
+    // TPM MMIO device.
+    // This is backed by the SPI command sequencer in the SPI bus controller.
+    //
+    Device (TPM0) {
+      Name (_HID, "SCX0009")
+      Name (_UID, Zero)
+      Name (_CRS, ResourceTemplate () {
+        Memory32Fixed (ReadWrite, SYNQUACER_SPI1_MMIO_BASE, SYNQUACER_SPI1_MMIO_SIZE)
+      })
+    }
+#else
     Device (SPI0) {
       Name (_HID, "SCX0004")
       Name (_UID, Zero)
@@ -280,5 +293,6 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR",
         }
       })
     }
+#endif
   } // Scope (_SB)
 }
-- 
2.17.1


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

* [PATCH edk2-platforms 2/2] Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc
  2020-07-17 10:09 [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Masahisa Kojima
  2020-07-17 10:09 ` [PATCH edk2-platforms 1/2] Silicon/SynQuacer: add ACPI descriptor of MMIO TPM Masahisa Kojima
@ 2020-07-17 10:09 ` Masahisa Kojima
  2020-07-24 17:03 ` [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Leif Lindholm
  2 siblings, 0 replies; 5+ messages in thread
From: Masahisa Kojima @ 2020-07-17 10:09 UTC (permalink / raw)
  To: devel, ard.biesheuvel, leif; +Cc: masahisa.kojima

All of line endings of Acpi.dsc.inc are not CRLF, resolve this.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
 Silicon/Socionext/SynQuacer/Acpi.dsc.inc | 94 ++++++++++----------
 1 file changed, 47 insertions(+), 47 deletions(-)

diff --git a/Silicon/Socionext/SynQuacer/Acpi.dsc.inc b/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
index ce5a1f6c5007..93e6f822e8b8 100644
--- a/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
+++ b/Silicon/Socionext/SynQuacer/Acpi.dsc.inc
@@ -1,47 +1,47 @@
-#
-#  Copyright (c) 2018, Linaro Limited. All rights reserved.
-#
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-
-################################################################################
-#
-# Pcd Section - list of all EDK II PCD Entries defined by this Platform
-#
-################################################################################
-
-[PcdsFeatureFlag]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
-
-[PcdsFixedAtBuild.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId|"SNI   "
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId|0x52434155514e5953 # SYNQUACR
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision|0x20180226
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x4f524e4c # LNRO
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision|1
-
-################################################################################
-#
-# Components Section - list of all EDK II Modules needed by this Platform
-#
-################################################################################
-
-[Components.common]
-  #
-  # ACPI support
-  #
-  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf {
-    <LibraryClasses>
-      NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
-
-    <PcdsFixedAtBuild>
-      # support ACPI v5.0 or later
-      gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
-  }
-  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
-  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf {
-    <BuildOptions>
-!if $(TPM2_ENABLE) == TRUE
-      *_*_*_ASLPP_FLAGS = -DTPM2_ENABLE
-!endif
-  }
+#
+#  Copyright (c) 2018, Linaro Limited. All rights reserved.
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+################################################################################
+#
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform
+#
+################################################################################
+
+[PcdsFeatureFlag]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
+
+[PcdsFixedAtBuild.common]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId|"SNI   "
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId|0x52434155514e5953 # SYNQUACR
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision|0x20180226
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x4f524e4c # LNRO
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision|1
+
+################################################################################
+#
+# Components Section - list of all EDK II Modules needed by this Platform
+#
+################################################################################
+
+[Components.common]
+  #
+  # ACPI support
+  #
+  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf {
+    <LibraryClasses>
+      NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
+
+    <PcdsFixedAtBuild>
+      # support ACPI v5.0 or later
+      gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
+  }
+  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf {
+    <BuildOptions>
+!if $(TPM2_ENABLE) == TRUE
+      *_*_*_ASLPP_FLAGS = -DTPM2_ENABLE
+!endif
+  }
-- 
2.17.1


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

* Re: [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer
  2020-07-17 10:09 [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Masahisa Kojima
  2020-07-17 10:09 ` [PATCH edk2-platforms 1/2] Silicon/SynQuacer: add ACPI descriptor of MMIO TPM Masahisa Kojima
  2020-07-17 10:09 ` [PATCH edk2-platforms 2/2] Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc Masahisa Kojima
@ 2020-07-24 17:03 ` Leif Lindholm
  2020-07-27  2:25   ` Masahisa Kojima
  2 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2020-07-24 17:03 UTC (permalink / raw)
  To: Masahisa Kojima; +Cc: devel, ard.biesheuvel

Masahisa,

Since this patch modifies line endings, and all of the CRs get lost in
transit, can you please provide a pointer to a branch where I can pull
these patches from?

Best Regards,

Leif

On Fri, Jul 17, 2020 at 19:09:10 +0900, Masahisa Kojima wrote:
> This patches add the ACPI description of MMIO TPM on SynQuacer.
> This also fixes the non CRLF line endings of Acpi.dsc.inc.
> 
> Masahisa Kojima (2):
>   Silicon/SynQuacer: add ACPI descriptor of MMIO TPM
>   Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc
> 
>  Silicon/Socionext/SynQuacer/Acpi.dsc.inc      | 89 ++++++++++---------
>  .../Socionext/SynQuacer/AcpiTables/Dsdt.asl   | 14 +++
>  2 files changed, 61 insertions(+), 42 deletions(-)
> 
> -- 
> 2.17.1
> 

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

* Re: [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer
  2020-07-24 17:03 ` [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Leif Lindholm
@ 2020-07-27  2:25   ` Masahisa Kojima
  0 siblings, 0 replies; 5+ messages in thread
From: Masahisa Kojima @ 2020-07-27  2:25 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel-groups-io, Ard Biesheuvel

Hi Leif,

> Since this patch modifies line endings, and all of the CRs get lost in
> transit, can you please provide a pointer to a branch where I can pull
> these patches from?

My working branch is here:
https://git.linaro.org/people/masahisa.kojima/edk2-platforms.git/log/?h=synquacer/add_tpm_mmio_acpi

Thanks,
Masahisa

On Sat, 25 Jul 2020 at 02:03, Leif Lindholm <leif@nuviainc.com> wrote:
>
> Masahisa,
>
> Since this patch modifies line endings, and all of the CRs get lost in
> transit, can you please provide a pointer to a branch where I can pull
> these patches from?
>
> Best Regards,
>
> Leif
>
> On Fri, Jul 17, 2020 at 19:09:10 +0900, Masahisa Kojima wrote:
> > This patches add the ACPI description of MMIO TPM on SynQuacer.
> > This also fixes the non CRLF line endings of Acpi.dsc.inc.
> >
> > Masahisa Kojima (2):
> >   Silicon/SynQuacer: add ACPI descriptor of MMIO TPM
> >   Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc
> >
> >  Silicon/Socionext/SynQuacer/Acpi.dsc.inc      | 89 ++++++++++---------
> >  .../Socionext/SynQuacer/AcpiTables/Dsdt.asl   | 14 +++
> >  2 files changed, 61 insertions(+), 42 deletions(-)
> >
> > --
> > 2.17.1
> >

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

end of thread, other threads:[~2020-07-27  2:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 10:09 [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Masahisa Kojima
2020-07-17 10:09 ` [PATCH edk2-platforms 1/2] Silicon/SynQuacer: add ACPI descriptor of MMIO TPM Masahisa Kojima
2020-07-17 10:09 ` [PATCH edk2-platforms 2/2] Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc Masahisa Kojima
2020-07-24 17:03 ` [PATCH edk2-platforms 0/2] Add ACPI support of MMIO TPM on SynQuacer Leif Lindholm
2020-07-27  2:25   ` Masahisa Kojima

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