175{
176 PFN_NUMBER i, PagesCount, MemoryMapSizeInPages, NoEntries;
180
182
183
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
211
212
215 {
216 UiMessageBox(
"Can not retrieve the current memory map.");
218 }
219
220
223
224 TRACE(
"Got memory map with %d entries\n", NoEntries);
225
226
229 {
230 ERR(
"Error during MempSetupPaging of first page\n");
232 }
233
234
235 LastPageIndex = 1;
236 LastPageType =
MemoryMap[1].PageAllocated;
237 for (
i = 2;
i < NoEntries;
i++)
238 {
239 if ((
MemoryMap[
i].PageAllocated != LastPageType) ||
240 (
i == NoEntries - 1))
241 {
245 }
246 }
247
248
249
250
251
252 PagesCount = 1;
253 LastPageIndex = 0;
254 LastPageType =
MemoryMap[0].PageAllocated;
255 for (
i = 1;
i < NoEntries;
i++)
256 {
257
258 if (
i >= MemoryMapStartPage &&
259 i < (MemoryMapStartPage+MemoryMapSizeInPages))
260 {
261
263 }
264
265
266 if (
MemoryMap[
i].PageAllocated == LastPageType &&
268 {
269 PagesCount++;
270 }
271 else
272 {
273
275
276
279 PagesCount = 1;
280 }
281 }
282
283
284
285#if 0
286 {
292
298
304 }
305#endif
308
310
311
313 {
314
316 {
317
322 }
323 }
324
326
328
329
330
331
332
333
334
335
336
337
338
339 TRACE(
"Memory Descriptor List prepared, printing PDE\n");
340 List_PaToVa(&LoaderBlock->MemoryDescriptorListHead);
341
342#if DBG
344#endif
345
347}
BIOS_MEMORY_MAP MemoryMap[32]
PVOID MmAllocateMemoryWithType(SIZE_T MemorySize, TYPE_OF_MEMORY MemoryType)
ULONG MmGetBiosMemoryMap(_Out_ PFREELDR_MEMORY_DESCRIPTOR *MemoryMap)
PPAGE_LOOKUP_TABLE_ITEM MmGetMemoryMap(PFN_NUMBER *NoEntries)
PFN_NUMBER MmGetHighestPhysicalPage(VOID)
VOID FrLdrHeapCleanupAll(VOID)
VOID UiMessageBox(_In_ PCSTR Format,...)
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
VOID List_PaToVa(_In_ LIST_ENTRY *ListEntry)
PFREELDR_MEMORY_DESCRIPTOR BiosMemoryMap
ULONG BiosMemoryMapEntryCount
TYPE_OF_MEMORY MemoryType
VOID WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock)
VOID MempSetupPagingForRegion(PFN_NUMBER BasePage, PFN_NUMBER PageCount, ULONG Type)
VOID MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, PFN_NUMBER BasePage, PFN_NUMBER PageCount, ULONG Type)