ReactOS 0.4.15-dev-7907-g95bf896
dynamic.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
#include <mm/ARM3/miarm.h>
Include dependency graph for dynamic.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define MODULE_INVOLVED_IN_ARM3
 

Functions

NTSTATUS NTAPI MmAddPhysicalMemory (IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
 
NTSTATUS NTAPI MmMarkPhysicalMemoryAsBad (IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
 
NTSTATUS NTAPI MmMarkPhysicalMemoryAsGood (IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
 
NTSTATUS NTAPI MmRemovePhysicalMemory (IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
 
PPHYSICAL_MEMORY_RANGE NTAPI MmGetPhysicalMemoryRanges (VOID)
 

Macro Definition Documentation

◆ MODULE_INVOLVED_IN_ARM3

#define MODULE_INVOLVED_IN_ARM3

Definition at line 15 of file dynamic.c.

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file dynamic.c.

Function Documentation

◆ MmAddPhysicalMemory()

NTSTATUS NTAPI MmAddPhysicalMemory ( IN PPHYSICAL_ADDRESS  StartAddress,
IN OUT PLARGE_INTEGER  NumberOfBytes 
)

Definition at line 25 of file dynamic.c.

27{
30}
#define UNIMPLEMENTED
Definition: debug.h:115
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239

◆ MmGetPhysicalMemoryRanges()

PPHYSICAL_MEMORY_RANGE NTAPI MmGetPhysicalMemoryRanges ( VOID  )

Definition at line 73 of file dynamic.c.

74{
75 ULONG Size, i;
79
80 //
81 // Calculate how much memory we'll need
82 //
84
85 //
86 // Allocate a copy
87 //
89 if (!Buffer) return NULL;
90
91 //
92 // Lock the PFN database
93 //
94 OldIrql = MiAcquirePfnLock();
95
96 //
97 // Make sure it hasn't changed before we had acquired the lock
98 //
101
102 //
103 // Now loop our block
104 //
105 for (i = 0; i < MmPhysicalMemoryBlock->NumberOfRuns; i++)
106 {
107 //
108 // Copy the data, but format it into bytes
109 //
110 Entry->BaseAddress.QuadPart = MmPhysicalMemoryBlock->Run[i].BasePage << PAGE_SHIFT;
111 Entry->NumberOfBytes.QuadPart = MmPhysicalMemoryBlock->Run[i].PageCount << PAGE_SHIFT;
112 Entry++;
113 }
114
115 //
116 // Last entry is empty
117 //
118 Entry->BaseAddress.QuadPart = 0;
119 Entry->NumberOfBytes.QuadPart = 0;
120
121 //
122 // Release the lock and return
123 //
124 MiReleasePfnLock(OldIrql);
125 return Buffer;
126}
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define NonPagedPool
Definition: env_spec_w32.h:307
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ASSERT(a)
Definition: mode.c:44
PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock
Definition: init.c:45
base of all file and directory entries
Definition: entries.h:83
PHYSICAL_MEMORY_RUN Run[1]
Definition: miarm.h:426
PFN_NUMBER PageCount
Definition: miarm.h:419
PFN_NUMBER BasePage
Definition: miarm.h:418
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
* PPHYSICAL_MEMORY_RANGE
Definition: mmtypes.h:162
PHYSICAL_MEMORY_RANGE
Definition: mmtypes.h:162

◆ MmMarkPhysicalMemoryAsBad()

NTSTATUS NTAPI MmMarkPhysicalMemoryAsBad ( IN PPHYSICAL_ADDRESS  StartAddress,
IN OUT PLARGE_INTEGER  NumberOfBytes 
)

Definition at line 37 of file dynamic.c.

39{
42}

◆ MmMarkPhysicalMemoryAsGood()

NTSTATUS NTAPI MmMarkPhysicalMemoryAsGood ( IN PPHYSICAL_ADDRESS  StartAddress,
IN OUT PLARGE_INTEGER  NumberOfBytes 
)

Definition at line 49 of file dynamic.c.

51{
54}

◆ MmRemovePhysicalMemory()

NTSTATUS NTAPI MmRemovePhysicalMemory ( IN PPHYSICAL_ADDRESS  StartAddress,
IN OUT PLARGE_INTEGER  NumberOfBytes 
)

Definition at line 61 of file dynamic.c.

63{
66}