mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 23:13:04 +00:00
- MiGetLastKernelAddress was totally broken on x86 and always returned the highest available physical page, thus the PFN database always end up at the address 0x80000000 and higher (just before the kernel). And when PFN database's size was bigger than usual (e.g. 1Gb of RAM and more), the PFN database zeroed out the kernel. This logic was introduced by 32640 commit.
- Fix the logic so it really gives the last kernel address, as function name suggests. If you want to change the logic of the function, then rename it accordingly. See issue #3507 for more details. svn path=/trunk/; revision=34737
This commit is contained in:
parent
e928cd52fd
commit
a6b1581db5
1 changed files with 7 additions and 4 deletions
|
@ -348,7 +348,10 @@ MiGetLastKernelAddress(VOID)
|
|||
NextEntry = NextEntry->Flink)
|
||||
{
|
||||
Md = CONTAINING_RECORD(NextEntry, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry);
|
||||
if (Md->MemoryType != LoaderFree)
|
||||
|
||||
if (Md->MemoryType != LoaderFree &&
|
||||
Md->MemoryType != LoaderFirmwareTemporary &&
|
||||
Md->MemoryType != LoaderSpecialMemory)
|
||||
{
|
||||
if (Md->BasePage+Md->PageCount > LastKrnlPhysAddr)
|
||||
LastKrnlPhysAddr = Md->BasePage+Md->PageCount;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue