PrmPkg: Remove ALLOCATE_CONTEXT_BUFFER_IN_FW build flag

The POR is firmly to use an OS allocated context buffer now so the
build flag that allows firmware to allocate the context buffer
is removed along with supporting code.

Cc: Andrew Fish <afish@apple.com>
Cc: Kang Gao <kang.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
This commit is contained in:
Michael Kubacki
2020-06-08 11:06:44 -07:00
committed by mergify[bot]
parent a409f4b67d
commit 0797989c5d
6 changed files with 4 additions and 107 deletions

View File

@ -151,16 +151,7 @@ ContextBufferModuleConfigLibConstructor (
//
// Allocate and populate the context buffer
//
#ifdef ALLOCATE_CONTEXT_BUFFER_IN_FW
//
// The context buffer allocated in FW will continue being used at OS runtime so it must
// be a runtime services data buffer.
//
// This sample module uses a single context buffer for all the handlers
// Todo: This can be done more elegantly in the future. Likely though a library service.
//
PrmContextBuffer = AllocateRuntimeZeroPool (sizeof (*PrmContextBuffer));
#else
//
// This context buffer is not actually used by PRM handler at OS runtime. The OS will allocate
// the actual context buffer passed to the PRM handler.
@ -170,7 +161,6 @@ ContextBufferModuleConfigLibConstructor (
// PRM_HANDLER_INFORMATION_STRUCT and PRM_MODULE_INFORMATION_STRUCT respectively for the PRM handler.
//
PrmContextBuffer = AllocateZeroPool (sizeof (*PrmContextBuffer));
#endif
ASSERT (PrmContextBuffer != NULL);
if (PrmContextBuffer == NULL) {
Status = EFI_OUT_OF_RESOURCES;