+/**\r
+ Internal function. Converts a memory range to the specified type.\r
+ The range must exist in the memory map.\r
+\r
+ @param Start The first address of the range Must be page\r
+ aligned\r
+ @param NumberOfPages The number of pages to convert\r
+ @param NewType The new type for the memory range\r
+\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter\r
+ @retval EFI_NOT_FOUND Could not find a descriptor cover the specified\r
+ range or convertion not allowed.\r
+ @retval EFI_SUCCESS Successfully converts the memory range to the\r
+ specified type.\r
+\r
+**/\r
+EFI_STATUS\r
+CoreConvertPages (\r
+ IN UINT64 Start,\r
+ IN UINT64 NumberOfPages,\r
+ IN EFI_MEMORY_TYPE NewType\r
+ )\r
+{\r
+ return CoreConvertPagesEx(Start, NumberOfPages, TRUE, NewType, FALSE, 0);\r
+}\r
+\r
+\r
+/**\r
+ Internal function. Converts a memory range to use new attributes.\r
+\r
+ @param Start The first address of the range Must be page\r
+ aligned\r
+ @param NumberOfPages The number of pages to convert\r
+ @param NewAttributes The new attributes value for the range.\r
+\r
+**/\r
+VOID\r
+CoreUpdateMemoryAttributes (\r
+ IN EFI_PHYSICAL_ADDRESS Start,\r
+ IN UINT64 NumberOfPages,\r
+ IN UINT64 NewAttributes\r
+ )\r
+{\r
+ CoreAcquireMemoryLock ();\r
+\r
+ //\r
+ // Update the attributes to the new value\r
+ //\r
+ CoreConvertPagesEx(Start, NumberOfPages, FALSE, (EFI_MEMORY_TYPE)0, TRUE, NewAttributes);\r
+\r
+ CoreReleaseMemoryLock ();\r
+}\r
+\r