Skip to content

Commit

Permalink
MdeModulePkg: Added PcdMaxMemoryType.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Krichanov committed Feb 6, 2025
1 parent 25c0b47 commit c8b2829
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions MdeModulePkg/Core/Dxe/DxeUserSpace/DxeUserSpace.inf
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,8 @@
gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMES
gEfiUnicodeCollationProtocolGuid ## SOMETIMES_CONSUMES

[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxMemoryType ## CONSUMES

[Depex]
TRUE
2 changes: 1 addition & 1 deletion MdeModulePkg/Include/Library/MemoryPoolLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define GUARD_HEAP_TYPE_ALL \
(GUARD_HEAP_TYPE_PAGE|GUARD_HEAP_TYPE_POOL|GUARD_HEAP_TYPE_FREED)

#define MAX_MEMORY_TYPE 100
#define MAX_MEMORY_TYPE FixedPcdGet32 (PcdMaxMemoryType)

/**
Called to initialize the pool.
Expand Down
1 change: 1 addition & 0 deletions MdeModulePkg/Library/MemoryPoolLib/MemoryPoolLib.inf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPageType ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPoolType ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxMemoryType ## CONSUMES
6 changes: 6 additions & 0 deletions MdeModulePkg/MdeModulePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,12 @@
# @Prompt Enable User Space.
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableUserSpace|FALSE|BOOLEAN|0x30001061

## Sets the size of mPoolHead array in MemoryPoolLib. It must be greater than EfiMaxMemoryType.
# In DxeMain this array manages Pools of different memory types.
# In DxeUserSpace this array manages Pools in different User address spaces.
# @Prompt Max number of memory types (or User address spaces).
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxMemoryType|100|UINT32|0x30001062

[PcdsFixedAtBuild, PcdsPatchableInModule]
## Dynamic type PCD can be registered callback function for Pcd setting action.
# PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of callback function
Expand Down

0 comments on commit c8b2829

Please sign in to comment.