From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=sughosh.ganu@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 3DDAB2119EF34 for ; Thu, 13 Dec 2018 03:46:29 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0ECFBEBD; Thu, 13 Dec 2018 03:46:29 -0800 (PST) Received: from usa.arm.com (a074948-lin.blr.arm.com [10.162.4.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 83F8B3F575; Thu, 13 Dec 2018 03:46:27 -0800 (PST) From: Sughosh Ganu To: edk2-devel@lists.01.org, Ard Biesheuvel , Leif Lindholm Date: Thu, 13 Dec 2018 17:16:08 +0530 Message-Id: <1544701569-13334-3-git-send-email-sughosh.ganu@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544701569-13334-1-git-send-email-sughosh.ganu@arm.com> References: <1544701569-13334-1-git-send-email-sughosh.ganu@arm.com> Subject: [PATCH edk2-platforms 2/3] Platform/ARM/SgiPkg: Setup memory buffers for MmCommunicate X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 X-List-Received-Date: Thu, 13 Dec 2018 11:46:29 -0000 Add memory regions for MmCommuncate buffers into the virtual memory table. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sughosh Ganu --- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 4 ++++ Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf index 260be58fb38c..c0fcc8198201 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf @@ -25,6 +25,7 @@ [Packages] MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec Platform/ARM/SgiPkg/SgiPlatform.dec + StandaloneMmPkg/StandaloneMmPkg.dec [LibraryClasses] ArmLib @@ -62,6 +63,9 @@ [FixedPcd] gArmTokenSpaceGuid.PcdPciMmio64Base gArmTokenSpaceGuid.PcdPciMmio64Size + gArmTokenSpaceGuid.PcdMmBufferBase + gArmTokenSpaceGuid.PcdMmBufferSize + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress [Guids] diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c index 6ec2e8a7096d..11e0811fccc8 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c @@ -136,6 +136,12 @@ ArmPlatformGetVirtualMemoryMap ( SIZE_1MB; VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + // MM Memory Space + VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdMmBufferBase); + VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdMmBufferBase); + VirtualMemoryTable[Index].Length = PcdGet64 (PcdMmBufferSize); + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED; + // End of Table VirtualMemoryTable[++Index].PhysicalBase = 0; VirtualMemoryTable[Index].VirtualBase = 0; -- 2.7.4