public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
To: devel@edk2.groups.io
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [PATCH V1 2/2] MdePkg PiPeiCis.h: Improve PeiInstallPeiMemory() description
Date: Mon, 18 Nov 2019 23:11:41 -0800	[thread overview]
Message-ID: <20191119071141.17192-3-michael.a.kubacki@intel.com> (raw)
In-Reply-To: <20191119071141.17192-1-michael.a.kubacki@intel.com>

Updates the function description for PeiInstallPeiMemory () to be
more helpful. The description is based on that given in the PI
Specification Version 1.7.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 MdePkg/Include/Pi/PiPeiCis.h | 26 ++++++++++++++++----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h
index d9d4ed7d41..e8c48acb21 100644
--- a/MdePkg/Include/Pi/PiPeiCis.h
+++ b/MdePkg/Include/Pi/PiPeiCis.h
@@ -422,13 +422,29 @@ EFI_STATUS
   );
 
 /**
-  This function registers the found memory configuration with the PEI Foundation.
+  Registers the found memory configuration with the PEI Foundation.
 
-  @param  PeiServices      An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
-  @param  MemoryBegin      The value of a region of installed memory.
-  @param  MemoryLength     The corresponding length of a region of installed memory.
+  This service enables PEIMs to register the permanent memory configuration that has been initialized
+  with the PEI Foundation. The result of this call-set is the creation of the appropriate Hand-Off Block
+  (HOB) describing the physical memory.
 
-  @retval EFI_SUCCESS           The region was successfully installed in a HOB.
+  The usage model is that the PEIM that discovers the permanent memory shall invoke this service.
+  This routine will store discovered memory information in the PeiCore's private data, and set the
+  SwitchStackSignal flag. After the PEIM who discovered memory is dispatched, the PeiDispatcher will
+  migrate temporary memory to permanent memory.
+
+  The memory reported is a single contiguous run. It should be enough to allocate a PEI stack and
+  some HOB list. The full memory map will be reported using the appropriate memory HOBs. The
+  PEI Foundation will follow up with an installation of EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI.
+
+  Any invocations of this service after the first invocation which returns EFI_SUCCESS will be ignored.
+
+  @param[in] PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
+  @param[in] MemoryBegin     Start of memory address.
+  @param[in] MemoryLength    Length of memory.
+
+  @retval EFI_SUCCESS           The region was successfully installed in a HOB or this service was successfully
+                                invoked earlier and no HOB modification will occur.
   @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.
   @retval EFI_OUT_OF_RESOURCES  There is no additional space for HOB creation.
 
-- 
2.16.2.windows.1


  parent reply	other threads:[~2019-11-19  7:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  7:11 [PATCH V1 0/2] Improve PeiInstallPeiMemory() description Kubacki, Michael A
2019-11-19  7:11 ` [PATCH V3 1/2] MdeModulePkg PeiCore: " Kubacki, Michael A
2019-11-19  7:11 ` Kubacki, Michael A [this message]
2019-11-19 14:14 ` [edk2-devel] [PATCH V1 0/2] " Liming Gao

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=20191119071141.17192-3-michael.a.kubacki@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