+/**\r
+ Allocate pool of a particular type.\r
+\r
+ @param PoolType Type of pool to allocate.\r
+ @param Size The amount of pool to allocate.\r
+ @param Buffer The address to return a pointer to the allocated\r
+ pool.\r
+\r
+ @retval EFI_INVALID_PARAMETER PoolType not valid.\r
+ @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.\r
+ @retval EFI_SUCCESS Pool successfully allocated.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SmmAllocatePool (\r
+ IN EFI_MEMORY_TYPE PoolType,\r
+ IN UINTN Size,\r
+ OUT VOID **Buffer\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+\r
+ Status = SmmInternalAllocatePool (PoolType, Size, Buffer);\r
+ if (!EFI_ERROR (Status)) {\r
+ SmmCoreUpdateProfile ((EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0), MemoryProfileActionAllocatePool, PoolType, Size, *Buffer);\r
+ }\r
+ return Status;\r
+}\r
+\r