ReactOS
0.4.16-dev-433-g6363f78
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
dynamic.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS Kernel
3
* LICENSE: BSD - See COPYING.ARM in the top level directory
4
* FILE: ntoskrnl/mm/ARM3/dynamic.c
5
* PURPOSE: ARM Memory Manager Dynamic Physical Memory Support
6
* PROGRAMMERS: ReactOS Portable Systems Group
7
*/
8
9
/* INCLUDES *******************************************************************/
10
11
#include <ntoskrnl.h>
12
#define NDEBUG
13
#include <debug.h>
14
15
#define MODULE_INVOLVED_IN_ARM3
16
#include <
mm/ARM3/miarm.h
>
17
18
/* FUNCTIONS *****************************************************************/
19
20
/*
21
* @unimplemented
22
*/
23
NTSTATUS
24
NTAPI
25
MmAddPhysicalMemory
(
IN
PPHYSICAL_ADDRESS
StartAddress,
26
IN
OUT
PLARGE_INTEGER
NumberOfBytes
)
27
{
28
UNIMPLEMENTED
;
29
return
STATUS_NOT_IMPLEMENTED
;
30
}
31
32
/*
33
* @unimplemented
34
*/
35
NTSTATUS
36
NTAPI
37
MmMarkPhysicalMemoryAsBad
(
IN
PPHYSICAL_ADDRESS
StartAddress,
38
IN
OUT
PLARGE_INTEGER
NumberOfBytes
)
39
{
40
UNIMPLEMENTED
;
41
return
STATUS_NOT_IMPLEMENTED
;
42
}
43
44
/*
45
* @unimplemented
46
*/
47
NTSTATUS
48
NTAPI
49
MmMarkPhysicalMemoryAsGood
(
IN
PPHYSICAL_ADDRESS
StartAddress,
50
IN
OUT
PLARGE_INTEGER
NumberOfBytes
)
51
{
52
UNIMPLEMENTED
;
53
return
STATUS_NOT_IMPLEMENTED
;
54
}
55
56
/*
57
* @unimplemented
58
*/
59
NTSTATUS
60
NTAPI
61
MmRemovePhysicalMemory
(
IN
PPHYSICAL_ADDRESS
StartAddress,
62
IN
OUT
PLARGE_INTEGER
NumberOfBytes
)
63
{
64
UNIMPLEMENTED
;
65
return
STATUS_NOT_IMPLEMENTED
;
66
}
67
68
/*
69
* @implemented
70
*/
71
PPHYSICAL_MEMORY_RANGE
72
NTAPI
73
MmGetPhysicalMemoryRanges
(
VOID
)
74
{
75
ULONG
Size
,
i
;
76
PPHYSICAL_MEMORY_RANGE
Entry
,
Buffer
;
77
KIRQL
OldIrql
;
78
ASSERT
(
KeGetCurrentIrql
() ==
PASSIVE_LEVEL
);
79
80
//
81
// Calculate how much memory we'll need
82
//
83
Size
=
sizeof
(
PHYSICAL_MEMORY_RANGE
) * (
MmPhysicalMemoryBlock
->
NumberOfRuns
+ 1);
84
85
//
86
// Allocate a copy
87
//
88
Entry
=
Buffer
=
ExAllocatePoolWithTag
(
NonPagedPool
,
Size
,
'hPmM'
);
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
//
99
ASSERT
(
Size
== (
sizeof
(
PHYSICAL_MEMORY_RANGE
) *
100
(
MmPhysicalMemoryBlock
->
NumberOfRuns
+ 1)));
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
}
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
UNIMPLEMENTED
#define UNIMPLEMENTED
Definition:
ntoskrnl.c:15
Buffer
Definition:
bufpool.h:45
STATUS_NOT_IMPLEMENTED
#define STATUS_NOT_IMPLEMENTED
Definition:
d3dkmdt.h:42
NULL
#define NULL
Definition:
types.h:112
MmMarkPhysicalMemoryAsBad
NTSTATUS NTAPI MmMarkPhysicalMemoryAsBad(IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
Definition:
dynamic.c:37
MmGetPhysicalMemoryRanges
PPHYSICAL_MEMORY_RANGE NTAPI MmGetPhysicalMemoryRanges(VOID)
Definition:
dynamic.c:73
MmAddPhysicalMemory
NTSTATUS NTAPI MmAddPhysicalMemory(IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
Definition:
dynamic.c:25
MmRemovePhysicalMemory
NTSTATUS NTAPI MmRemovePhysicalMemory(IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
Definition:
dynamic.c:61
MmMarkPhysicalMemoryAsGood
NTSTATUS NTAPI MmMarkPhysicalMemoryAsGood(IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes)
Definition:
dynamic.c:49
ExAllocatePoolWithTag
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition:
env_spec_w32.h:350
PASSIVE_LEVEL
#define PASSIVE_LEVEL
Definition:
env_spec_w32.h:693
KIRQL
UCHAR KIRQL
Definition:
env_spec_w32.h:591
PAGE_SHIFT
#define PAGE_SHIFT
Definition:
env_spec_w32.h:45
KeGetCurrentIrql
#define KeGetCurrentIrql()
Definition:
env_spec_w32.h:706
NonPagedPool
#define NonPagedPool
Definition:
env_spec_w32.h:307
i
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
void
Definition:
nsiface.idl:2307
miarm.h
ASSERT
#define ASSERT(a)
Definition:
mode.c:44
MmPhysicalMemoryBlock
PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock
Definition:
init.c:45
Entry
base of all file and directory entries
Definition:
entries.h:83
_PHYSICAL_MEMORY_DESCRIPTOR::NumberOfRuns
ULONG NumberOfRuns
Definition:
miarm.h:438
_PHYSICAL_MEMORY_DESCRIPTOR::Run
PHYSICAL_MEMORY_RUN Run[1]
Definition:
miarm.h:440
_PHYSICAL_MEMORY_RUN::PageCount
PFN_NUMBER PageCount
Definition:
miarm.h:433
_PHYSICAL_MEMORY_RUN::BasePage
PFN_NUMBER BasePage
Definition:
miarm.h:432
NTAPI
#define NTAPI
Definition:
typedefs.h:36
IN
#define IN
Definition:
typedefs.h:39
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
OUT
#define OUT
Definition:
typedefs.h:40
_LARGE_INTEGER
Definition:
typedefs.h:103
Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition:
wdfdevice.h:4533
NumberOfBytes
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition:
iotypes.h:1036
OldIrql
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition:
kefuncs.h:778
PPHYSICAL_MEMORY_RANGE
* PPHYSICAL_MEMORY_RANGE
Definition:
mmtypes.h:162
PHYSICAL_MEMORY_RANGE
PHYSICAL_MEMORY_RANGE
Definition:
mmtypes.h:162
ntoskrnl
mm
ARM3
dynamic.c
Generated on Tue Jan 7 2025 06:16:03 for ReactOS by
1.9.6