From: Achin Gupta achin.gupta@arm.com
This patchset adds support for creating a MM Standalone image suitable for running on a Base FVP in the AArch64 execution state.
The core support for instantiating MM Standalone mode is being developed in the following edk2-staging branch:
https://github.com/tianocore/edk2-staging/tree/AArch64StandaloneMm
This branch and the patchset should be combined to build a MM Standalone image. The instructions for this will be updated in edk2-staging later.
The changes in this series are aimed at:
1. partitioning DRAM to set aside memory for the MM Standalone image 2. including the necessary modules to instantiate the Standalone MM on the Base FVP
This patchset should be staged in a separate branch until it is clearer how the MM Standalone image should be supported on common ARM platforms. The name of the branch should be the same as the edk2-staging branch i.e. AArch64StandaloneMm.
Changelog since v1: - Introduced ARM_STANDALONE_MM_ENABLE define to encapsulate changes introduced in this series
Achin Gupta (4): Platforms/ARM/VExpress: Size DRAM to accommodate Standalone MM image Platforms/ARM/VExpress: Define extents of MM communication buffer Platforms/ARM/VExpress: Include MM communication protocol driver Platforms/ARM/VExpress: Include UEFI Info application in FVP build
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 19 +++++++++++++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 6 ++++++ 2 files changed, 25 insertions(+)
-- 1.9.1
From: Achin Gupta achin.gupta@arm.com
This patch reduces the size of the DRAM available to UEFI so that the freed memory can be used to load the Standalone MM image in the secure world.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com --- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index cf4b803..82acd87 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -108,8 +108,13 @@ gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x0
# System Memory (2GB - 16MB of Trusted DRAM at the top of the 32bit address space) + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 +!if $(ARM_STANDALONE_MM_ENABLE) == FALSE gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000 +!else + gArmTokenSpaceGuid.PcdSystemMemorySize|0x74000000 +!endif
# Size of the region used by UEFI in permanent memory (Reserved 64MB) gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch reduces the size of the DRAM available to UEFI so that the freed memory can be used to load the Standalone MM image in the secure world.
What is "MM"?
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index cf4b803..82acd87 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -108,8 +108,13 @@ gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x0
# System Memory (2GB - 16MB of Trusted DRAM at the top of the 32bit address space)
- gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
+!if $(ARM_STANDALONE_MM_ENABLE) == FALSE
Why did you not make it check for the new flag being set and defaulting to the new behaviour if the platform hasn't set it to false, rather than change the behaviour only if the platform specifically enabled the new feature?
gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000 +!else
- gArmTokenSpaceGuid.PcdSystemMemorySize|0x74000000
+!endif
# Size of the region used by UEFI in permanent memory (Reserved 64MB) gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 -- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
From: Achin Gupta achin.gupta@arm.com
The secure world firmware (e.g. ARM Trusted Firmware) allocates the communication buffer used in the MM Communicate SMC. EDK2 is expected to map this buffer in its own address map. In the absence of a mechanism where ARM TF can pass the extents of this buffer at runtime to EDK2, this patch hard codes this information in the UEFI binary for the ARM FVP.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com --- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index 82acd87..c76da5d 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -127,6 +127,11 @@ ## Trustzone enable (to make the transition from EL3 to NS EL2 in ArmPlatformPkg/Sec) gArmTokenSpaceGuid.PcdTrustzoneSupport|TRUE
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE + gArmTokenSpaceGuid.PcdMmBufferBase|0xFBE00000 + gArmTokenSpaceGuid.PcdMmBufferSize|0x200000 +!endif + # # ARM PrimeCell #
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
The secure world firmware (e.g. ARM Trusted Firmware) allocates the communication buffer used in the MM Communicate SMC.
As a follow on from "What's an MM?" in my previous reply, what's an "MM Communicate SMC"?
EDK2 is expected to map this buffer in its own address map. In the absence of a mechanism where ARM TF can pass the extents of this buffer at runtime to EDK2, this patch hard codes this information in the UEFI binary for the ARM FVP.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index 82acd87..c76da5d 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -127,6 +127,11 @@ ## Trustzone enable (to make the transition from EL3 to NS EL2 in ArmPlatformPkg/Sec) gArmTokenSpaceGuid.PcdTrustzoneSupport|TRUE
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- gArmTokenSpaceGuid.PcdMmBufferBase|0xFBE00000
- gArmTokenSpaceGuid.PcdMmBufferSize|0x200000
+!endif
- # # ARM PrimeCell #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com --- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE + ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf +!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE + # Standalone MM Support + ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf +!endif + # # Semi-hosting filesystem # diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE + # Standalone MM Support + INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf +!endif + # # Platform Driver #
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
+!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
+!endif
- # # Semi-hosting filesystem #
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
+!endif
- # # Platform Driver #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
On 4 January 2017 at 17:22, Ryan Harkin ryan.harkin@linaro.org wrote:
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
+!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
Actually, I can't find MmCommunicationDxe added in this patch series and it isn't already in the tree. I don't see any other reference to it in my inbox either... :-/
+!endif
- # # Semi-hosting filesystem #
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
+!endif
- # # Platform Driver #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
On 4 January 2017 at 17:27, Ryan Harkin ryan.harkin@linaro.org wrote:
On 4 January 2017 at 17:22, Ryan Harkin ryan.harkin@linaro.org wrote:
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
+!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
Actually, I can't find MmCommunicationDxe added in this patch series and it isn't already in the tree. I don't see any other reference to it in my inbox either... :-/
OK, so I've now read 0/4 and assume it's in the github tree... sorry about that.
+!endif
- # # Semi-hosting filesystem #
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
+!endif
- # # Platform Driver #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
Hi Ryan,
On Wed, Jan 04, 2017 at 06:06:38PM +0000, Ryan Harkin wrote:
On 4 January 2017 at 17:27, Ryan Harkin ryan.harkin@linaro.org wrote:
On 4 January 2017 at 17:22, Ryan Harkin ryan.harkin@linaro.org wrote:
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
+!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
Actually, I can't find MmCommunicationDxe added in this patch series and it isn't already in the tree. I don't see any other reference to it in my inbox either... :-/
OK, so I've now read 0/4 and assume it's in the github tree... sorry about that.
No worries and thanks for the feedback. This patchset is still a WIP but I will make sure that I roll in your comments before pushing them to master. I hope that is ok.
cheers, Achin
+!endif
- # # Semi-hosting filesystem #
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
+!endif
- # # Platform Driver #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
Hi Achin,
On 5 January 2017 at 09:49, Achin Gupta achin.gupta@arm.com wrote:
Hi Ryan,
On Wed, Jan 04, 2017 at 06:06:38PM +0000, Ryan Harkin wrote:
On 4 January 2017 at 17:27, Ryan Harkin ryan.harkin@linaro.org wrote:
On 4 January 2017 at 17:22, Ryan Harkin ryan.harkin@linaro.org wrote:
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
+!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
Actually, I can't find MmCommunicationDxe added in this patch series and it isn't already in the tree. I don't see any other reference to it in my inbox either... :-/
OK, so I've now read 0/4 and assume it's in the github tree... sorry about that.
No worries and thanks for the feedback. This patchset is still a WIP but I will make sure that I roll in your comments before pushing them to master. I hope that is ok.
That's fine with me.
But could you tell me what MM stands for? I'm assuming it's not multimedia and that one of the Ms is Memory.
Cheers, Ryan.
cheers, Achin
+!endif
- # # Semi-hosting filesystem #
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
+!endif
- # # Platform Driver #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
Hi Ryan,
On Thu, Jan 05, 2017 at 09:50:36AM +0000, Ryan Harkin wrote:
Hi Achin,
On 5 January 2017 at 09:49, Achin Gupta achin.gupta@arm.com wrote:
Hi Ryan,
On Wed, Jan 04, 2017 at 06:06:38PM +0000, Ryan Harkin wrote:
On 4 January 2017 at 17:27, Ryan Harkin ryan.harkin@linaro.org wrote:
On 4 January 2017 at 17:22, Ryan Harkin ryan.harkin@linaro.org wrote:
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patch includes the DXE runtime driver that exports the EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible for handling communication with the MM environment in the secure world. An implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ 2 files changed, 13 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index c76da5d..bc115e1 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -40,6 +40,9 @@
[LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
+!endif ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -294,6 +297,11 @@
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
Actually, I can't find MmCommunicationDxe added in this patch series and it isn't already in the tree. I don't see any other reference to it in my inbox either... :-/
OK, so I've now read 0/4 and assume it's in the github tree... sorry about that.
No worries and thanks for the feedback. This patchset is still a WIP but I will make sure that I roll in your comments before pushing them to master. I hope that is ok.
That's fine with me.
But could you tell me what MM stands for? I'm assuming it's not multimedia and that one of the Ms is Memory.
sorry about that! MM stands for Management Mode. It is better known as System Management Mode (SMM) on x86 platforms. It has been traditionally used to implementing OS agnostic firmware services. The PI Vol4. spec. defines interfaces for instantiating SW support for MM. I am working on doing this for AArch64 platforms.
I hope that makes it a bit clearer. Please let me know if you need more information.
Thanks, Achin
Cheers, Ryan.
cheers, Achin
+!endif
- # # Semi-hosting filesystem #
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 2ace4d8..0d9895b 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!if $(ARM_STANDALONE_MM_ENABLE) == TRUE
- # Standalone MM Support
- INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
+!endif
- # # Platform Driver #
-- 1.9.1
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
Thanks Achin,
On 5 January 2017 at 10:06, Achin Gupta achin.gupta@arm.com wrote:
Hi Ryan,
On Thu, Jan 05, 2017 at 09:50:36AM +0000, Ryan Harkin wrote:
Hi Achin,
On 5 January 2017 at 09:49, Achin Gupta achin.gupta@arm.com wrote:
Hi Ryan,
On Wed, Jan 04, 2017 at 06:06:38PM +0000, Ryan Harkin wrote:
On 4 January 2017 at 17:27, Ryan Harkin ryan.harkin@linaro.org wrote:
On 4 January 2017 at 17:22, Ryan Harkin ryan.harkin@linaro.org wrote:
Hi Achin,
On 4 January 2017 at 15:50, achin.gupta@arm.com wrote: > From: Achin Gupta achin.gupta@arm.com > > This patch includes the DXE runtime driver that exports the > EFI_MM_COMMUNICATION_PROTOCOL for the FVP platform. This driver is responsible > for handling communication with the MM environment in the secure world. An > implementation of the ARM SVC lib is also include in the FVP build.
s/include/included/
> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Achin Gupta achin.gupta@arm.com > --- > Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 8 ++++++++ > Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 5 +++++ > 2 files changed, 13 insertions(+) > > diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc > index c76da5d..bc115e1 100644 > --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc > +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc > @@ -40,6 +40,9 @@ > > [LibraryClasses.common] > ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf > +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE > + ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf > +!endif > ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf > ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf > ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf > @@ -294,6 +297,11 @@ > > MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > > +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE > + # Standalone MM Support > + ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
I've just spotted the .inf filename. I think "convention" tells us the .inf is the same name as the higher level directory name, ie. MmCommunicationDxe.inf. Not sure if it's anything more than common practice, but it's worth checking.
Actually, I can't find MmCommunicationDxe added in this patch series and it isn't already in the tree. I don't see any other reference to it in my inbox either... :-/
OK, so I've now read 0/4 and assume it's in the github tree... sorry about that.
No worries and thanks for the feedback. This patchset is still a WIP but I will make sure that I roll in your comments before pushing them to master. I hope that is ok.
That's fine with me.
But could you tell me what MM stands for? I'm assuming it's not multimedia and that one of the Ms is Memory.
sorry about that! MM stands for Management Mode. It is better known as System Management Mode (SMM) on x86 platforms. It has been traditionally used to implementing OS agnostic firmware services. The PI Vol4. spec. defines interfaces for instantiating SW support for MM. I am working on doing this for AArch64 platforms.
I hope that makes it a bit clearer. Please let me know if you need more information.
That's what I wanted to know. I can work it out from there (or ignore it until it becomes a hot topic!).
Cheers, Ryan.
Thanks, Achin
Cheers, Ryan.
cheers, Achin
> +!endif > + > # > # Semi-hosting filesystem > # > diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf > index 2ace4d8..0d9895b 100644 > --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf > +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf > @@ -142,6 +142,11 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 > # > INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > > +!if $(ARM_STANDALONE_MM_ENABLE) == TRUE > + # Standalone MM Support > + INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf > +!endif > + > # > # Platform Driver > # > -- > 1.9.1 > > _______________________________________________ > Linaro-uefi mailing list > Linaro-uefi@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/linaro-uefi
From: Achin Gupta achin.gupta@arm.com
This patch includes the UEFI Info application in the FVP build to demonstrate communication with the MM environment in the secure world through the DXE runtime driver that exports the EFI_MM_COMMUNICATE_PROTOCOL.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta achin.gupta@arm.com
Conflicts: Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf --- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 1 + Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 1 + 2 files changed, 2 insertions(+)
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index bc115e1..fbed919 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -300,6 +300,7 @@ !if $(ARM_STANDALONE_MM_ENABLE) == TRUE # Standalone MM Support ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf + MdeModulePkg/Application/UefiInfoApp/UefiInfo.inf !endif
# diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 0d9895b..56bf0e6 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -145,6 +145,7 @@ FvNameGuid = 87940482-fc81-41c3-87e6-399cf85ac8a0 !if $(ARM_STANDALONE_MM_ENABLE) == TRUE # Standalone MM Support INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf + INF MdeModulePkg/Application/UefiInfoApp/UefiInfo.inf !endif
#
Hi Achin,
Happy with the content, but I cleaned up the commit messages somewhat. Pushed to. https://git.linaro.org/uefi/OpenPlatformPkg.git/log/?h=AArch64StandaloneMm
edk2/BaseTools/Scripts/PatchCheck.py can help you spot common issues in future.
Regards,
Leif
On Wed, Jan 04, 2017 at 03:50:40PM +0000, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patchset adds support for creating a MM Standalone image suitable for running on a Base FVP in the AArch64 execution state.
The core support for instantiating MM Standalone mode is being developed in the following edk2-staging branch:
https://github.com/tianocore/edk2-staging/tree/AArch64StandaloneMm
This branch and the patchset should be combined to build a MM Standalone image. The instructions for this will be updated in edk2-staging later.
The changes in this series are aimed at:
- partitioning DRAM to set aside memory for the MM Standalone image
- including the necessary modules to instantiate the Standalone MM on the Base FVP
This patchset should be staged in a separate branch until it is clearer how the MM Standalone image should be supported on common ARM platforms. The name of the branch should be the same as the edk2-staging branch i.e. AArch64StandaloneMm.
Changelog since v1:
- Introduced ARM_STANDALONE_MM_ENABLE define to encapsulate changes introduced in this series
Achin Gupta (4): Platforms/ARM/VExpress: Size DRAM to accommodate Standalone MM image Platforms/ARM/VExpress: Define extents of MM communication buffer Platforms/ARM/VExpress: Include MM communication protocol driver Platforms/ARM/VExpress: Include UEFI Info application in FVP build
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 19 +++++++++++++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 6 ++++++ 2 files changed, 25 insertions(+)
-- 1.9.1
Hi Leif,
On Wed, Jan 04, 2017 at 05:47:30PM +0000, Leif Lindholm wrote:
Hi Achin,
Happy with the content, but I cleaned up the commit messages somewhat. Pushed to. https://git.linaro.org/uefi/OpenPlatformPkg.git/log/?h=AArch64StandaloneMm
edk2/BaseTools/Scripts/PatchCheck.py can help you spot common issues in future.
Thanks for a lot! Apologies for the artefacts. I will use the script next time.
cheers, Achin
Regards,
Leif
On Wed, Jan 04, 2017 at 03:50:40PM +0000, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
This patchset adds support for creating a MM Standalone image suitable for running on a Base FVP in the AArch64 execution state.
The core support for instantiating MM Standalone mode is being developed in the following edk2-staging branch:
https://github.com/tianocore/edk2-staging/tree/AArch64StandaloneMm
This branch and the patchset should be combined to build a MM Standalone image. The instructions for this will be updated in edk2-staging later.
The changes in this series are aimed at:
- partitioning DRAM to set aside memory for the MM Standalone image
- including the necessary modules to instantiate the Standalone MM on the Base FVP
This patchset should be staged in a separate branch until it is clearer how the MM Standalone image should be supported on common ARM platforms. The name of the branch should be the same as the edk2-staging branch i.e. AArch64StandaloneMm.
Changelog since v1:
- Introduced ARM_STANDALONE_MM_ENABLE define to encapsulate changes introduced in this series
Achin Gupta (4): Platforms/ARM/VExpress: Size DRAM to accommodate Standalone MM image Platforms/ARM/VExpress: Define extents of MM communication buffer Platforms/ARM/VExpress: Include MM communication protocol driver Platforms/ARM/VExpress: Include UEFI Info application in FVP build
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 19 +++++++++++++++++++ Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 6 ++++++ 2 files changed, 25 insertions(+)
-- 1.9.1