ReactOS  0.4.14-dev-317-g96040ec
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 STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114

◆ MmGetPhysicalMemoryRanges()

PPHYSICAL_MEMORY_RANGE NTAPI MmGetPhysicalMemoryRanges ( VOID  )

Definition at line 73 of file dynamic.c.

74 {
75  ULONG Size, i;
77  KIRQL OldIrql;
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  //
95 
96  //
97  // Make sure it hasn't changed before we had acquired the lock
98  //
99  ASSERT(Size == (sizeof(PHYSICAL_MEMORY_RANGE) *
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  //
125  return Buffer;
126 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
PHYSICAL_MEMORY_RANGE
Definition: mmtypes.h:162
struct _Entry Entry
Definition: kefuncs.h:640
PFN_NUMBER PageCount
Definition: miarm.h:433
FORCEINLINE KIRQL MiAcquirePfnLock(VOID)
Definition: mm.h:901
PHYSICAL_MEMORY_RUN Run[1]
Definition: miarm.h:440
FORCEINLINE VOID MiReleasePfnLock(_In_ KIRQL OldIrql)
Definition: mm.h:908
UCHAR KIRQL
Definition: env_spec_w32.h:591
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
PFN_NUMBER BasePage
Definition: miarm.h:432
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock
Definition: init.c:45
* PPHYSICAL_MEMORY_RANGE
Definition: mmtypes.h:162
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
base of all file and directory entries
Definition: entries.h:82

◆ MmMarkPhysicalMemoryAsBad()

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

Definition at line 37 of file dynamic.c.

39 {
42 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114

◆ MmMarkPhysicalMemoryAsGood()

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

Definition at line 49 of file dynamic.c.

51 {
54 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114

◆ MmRemovePhysicalMemory()

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

Definition at line 61 of file dynamic.c.

63 {
66 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114