From: "Zhang, Hongbin1" <hongbin1.zhang@intel.com>
To: devel@edk2.groups.io
Cc: "Zhang, Hongbin1" <hongbin1.zhang@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>, Ray Ni <ray.ni@intel.com>,
Star Zeng <star.zeng@intel.com>, Jiaxin Wu <jiaxin.wu@intel.com>,
Sami Mujawar <sami.mujawar@arm.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Subject: [PATCH v4 5/5] StandaloneMmPkg: Add StandaloneMmIplPei driver.
Date: Mon, 19 Jun 2023 15:46:39 +0800 [thread overview]
Message-ID: <20230619074639.1569-5-hongbin1.zhang@intel.com> (raw)
In-Reply-To: <20230619074639.1569-1-hongbin1.zhang@intel.com>
Add StandaloneMmIplPei IA32/X64 driver at PEI stage.
FSP will use this driver to load Standalone MM code
to dispatch other Standalone MM drivers.
Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
---
StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
index 0d0c678f90..78939faeea 100644
--- a/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
+++ b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
@@ -626,5 +626,16 @@ StandaloneMmIplPeiEntry (
DEBUG ((DEBUG_ERROR, "SMM IPL could not find a large enough SMRAM region to load SMM Core\n"));
}
+ //
+ // Close and lock all SMRAM ranges.
+ //
+ for (Index = 0; Index < mSmramRangeCount; Index++) {
+ Status = mSmmAccess->Close ((EFI_PEI_SERVICES **)PeiServices, mSmmAccess, Index);
+ ASSERT_EFI_ERROR (Status);
+
+ Status = mSmmAccess->Lock ((EFI_PEI_SERVICES **)PeiServices, mSmmAccess, Index);
+ ASSERT_EFI_ERROR (Status);
+ }
+
return EFI_SUCCESS;
}
--
2.37.0.windows.1
prev parent reply other threads:[~2023-06-19 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 7:46 [PATCH v4 1/5] StandaloneMmPkg: Add StandaloneMmIplPei driver Zhang, Hongbin1
2023-06-19 7:46 ` [PATCH v4 2/5] " Zhang, Hongbin1
2023-06-19 7:46 ` [PATCH v4 3/5] " Zhang, Hongbin1
2023-06-19 7:46 ` [PATCH v4 4/5] " Zhang, Hongbin1
2023-06-19 7:46 ` Zhang, Hongbin1 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230619074639.1569-5-hongbin1.zhang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox