* [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