PrmPkg: Add initial PrmSampleMemoryAllocationModule

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3812

DEPRECATED: This module is no longer relevant since OS Services that
allow memory allocation have been removed. It is still present in the
source tree in the event dynamic memory allocation at OS runtime is
needed again.

  Adds a sample PRM module that demonstrates:
  1. How to write a PRM module
  2. How to use a basic PRM OS service
  3. How to dynamically allocate memory at OS runtime

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-04-07 11:30:21 -07:00
committed by mergify[bot]
parent 9276e0d2b9
commit c63905aba7
2 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1,41 @@
## @file
# Sample PRM Driver
#
# This driver simply uses an OS-provided debug message print service to write
# a debug message. Three PRM handlers are provided that each print a unique
# debug message.
#
# Copyright (c) Microsoft Corporation
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = PrmSampleMemoryAllocationModule
FILE_GUID = C6B3E74A-12E3-4364-8FB4-8C8B34DD153B
MODULE_TYPE = DXE_RUNTIME_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = PrmSampleMemoryAllocationModuleInit
[Sources]
PrmSampleMemoryAllocationModule.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
PrmPkg/PrmPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
PrintLib
UefiDriverEntryPoint
UefiLib
[Depex]
TRUE
[BuildOptions.common]
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE