[NFS]
[reactos.git] / reactos / boot / environ / include / bl.h
index 7b0d365..d41e706 100644 (file)
@@ -329,12 +329,14 @@ typedef enum _BL_MEMORY_TYPE
     BlUnusableMemory = 0xF0000002,
     BlReservedMemory = 0xF0000003,
     BlEfiBootMemory = 0xF0000004,
-    BlEfiRuntimeMemory = 0xF0000006,
+    BlConventionalZeroedMemory = 0xF000005,
+    BlEfiRuntimeCodeMemory = 0xF0000006,
     BlAcpiReclaimMemory = 0xF0000008,
     BlAcpiNvsMemory = 0xF0000009,
     BlDeviceIoMemory = 0xF000000A,
     BlDevicePortMemory = 0xF000000B,
     BlPalMemory = 0xF000000C,
+    BlEfiRuntimeDataMemory = 0xF000000E,
 } BL_MEMORY_TYPE;
 
 typedef enum _BL_MEMORY_ATTR
@@ -362,11 +364,11 @@ typedef enum _BL_MEMORY_ATTR
     //
     // Memory Allocation Attributes
     //
-    BlMemoryUnknown =           0x00010000,
-    BlMemoryNonFixed =          0x00020000,
+    BlMemoryLargePages =        0x00010000,
+    BlMemoryKernelRange =       0x00020000,
     BlMemoryFixed =             0x00040000,
     BlMemoryBelow1MB =          0x00080000,
-    BlMemoryValidAllocationAttributes       = BlMemoryNonFixed | BlMemoryFixed | BlMemoryBelow1MB | BlMemoryUnknown,
+    BlMemoryValidAllocationAttributes       = BlMemoryKernelRange | BlMemoryFixed | BlMemoryBelow1MB | BlMemoryLargePages,
     BlMemoryValidAllocationAttributeMask    = 0x00FF0000,
 
     //
@@ -1562,6 +1564,11 @@ BlTimeQueryPerformanceCounter (
     _Out_opt_ PLARGE_INTEGER Frequency
     );
 
+ULONGLONG
+BlArchGetPerformanceCounter (
+    VOID
+    );
+
 /* RESOURCE LOCALE INTERNATIONALIZATION ROUTINES *****************************/
 
 NTSTATUS
@@ -1655,6 +1662,18 @@ BlStatusError (
 
 /* UTILITY ROUTINES **********************************************************/
 
+VOID
+BlArchCpuId (
+    _In_ ULONG Function,
+    _In_ ULONG SubFunction,
+    _Out_ INT* Result
+    );
+
+BOOLEAN
+BlArchIsCpuIdFunctionSupported (
+    _In_ ULONG Function
+    );
+
 VOID
 BlUtlUpdateProgress (
     _In_ ULONG Percentage,
@@ -1808,6 +1827,12 @@ BlHtStore (
     _In_ ULONG DataSize
     );
 
+NTSTATUS
+BlHtDelete (
+    _In_ ULONG TableId,
+    _In_ PBL_HASH_ENTRY Entry
+    );
+
 NTSTATUS
 BlHtLookup (
     _In_ ULONG TableId,
@@ -1990,6 +2015,11 @@ BlpArchSwitchContext (
     _In_ BL_ARCH_MODE NewMode
     );
 
+VOID
+BlpArchEnableTranslation (
+    VOID
+    );
+
 VOID
 Archx86TransferTo32BitApplicationAsm (
     VOID
@@ -1997,6 +2027,12 @@ Archx86TransferTo32BitApplicationAsm (
 
 /* MEMORY DESCRIPTOR ROUTINES ************************************************/
 
+VOID
+MmMdDbgDumpList (
+    _In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList,
+    _In_opt_ ULONG MaxCount
+);
+
 VOID
 MmMdInitializeList (
     _In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList,
@@ -2059,6 +2095,13 @@ MmMdAddDescriptorToList (
     _In_ ULONG Flags
     );
 
+NTSTATUS
+MmMdTruncateDescriptors (
+    _In_ PBL_MEMORY_DESCRIPTOR_LIST MdList,
+    _In_ PBL_MEMORY_DESCRIPTOR_LIST NewList,
+    _In_ ULONGLONG BasePage
+    );
+
 VOID
 MmMdRemoveDescriptorFromList (
     _In_ PBL_MEMORY_DESCRIPTOR_LIST MdList,
@@ -2094,6 +2137,11 @@ MmMdFreeDescriptor (
 
 /* PAGE ALLOCATOR ROUTINES ***************************************************/
 
+NTSTATUS
+MmPaTruncateMemory (
+    _In_ ULONGLONG BasePage
+    );
+
 NTSTATUS
 BlMmAllocatePhysicalPages(
     _Inout_ PPHYSICAL_ADDRESS Address,
@@ -2174,6 +2222,30 @@ BlMmGetMemoryMap (
 
 /* VIRTUAL MEMORY ROUTINES ***************************************************/
 
+NTSTATUS
+MmSelectMappingAddress (
+    _Out_ PVOID* MappingAddress,
+    _In_ PVOID PreferredAddress,
+    _In_ ULONGLONG Size,
+    _In_ ULONG AllocationAttributes,
+    _In_ ULONG Flags,
+    _In_ PHYSICAL_ADDRESS PhysicalAddress
+    );
+
+NTSTATUS
+MmMapPhysicalAddress (
+    _Inout_ PPHYSICAL_ADDRESS PhysicalAddress,
+    _Out_ PVOID* VirtualAddress,
+    _Inout_ PULONGLONG Size,
+    _In_ ULONG CacheAttributes
+    );
+
+NTSTATUS
+MmUnmapVirtualAddress (
+    _Inout_ PVOID* VirtualAddress,
+    _Inout_ PULONGLONG Size
+    );
+
 NTSTATUS
 BlMmMapPhysicalAddressEx (
     _In_ PVOID* VirtualAddress,
@@ -2681,5 +2753,7 @@ extern BL_MEMORY_DESCRIPTOR_LIST MmMdlFreeVirtual;
 extern BL_MEMORY_DESCRIPTOR_LIST MmMdlMappingTrackers;
 extern ULONGLONG BlpTimePerformanceFrequency;
 extern LIST_ENTRY RegisteredFileSystems;
+extern BL_ADDRESS_RANGE MmArchKsegAddressRange;
+extern ULONG_PTR MmArchTopOfApplicationAddressSpace;
 
 #endif