mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[FREELDR] Pass VA instead of PA to PeLdrAllocateDataTableEntry
This allows to create DTEs for loader modules.
This commit is contained in:
parent
8a5ef4c1cc
commit
6eac9b5891
3 changed files with 10 additions and 6 deletions
|
@ -44,7 +44,7 @@ PeLdrAllocateDataTableEntry(
|
||||||
IN OUT PLIST_ENTRY ModuleListHead,
|
IN OUT PLIST_ENTRY ModuleListHead,
|
||||||
IN PCCH BaseDllName,
|
IN PCCH BaseDllName,
|
||||||
IN PCCH FullDllName,
|
IN PCCH FullDllName,
|
||||||
IN PVOID BasePA,
|
IN PVOID BaseVA,
|
||||||
OUT PLDR_DATA_TABLE_ENTRY *NewEntry);
|
OUT PLDR_DATA_TABLE_ENTRY *NewEntry);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -418,7 +418,7 @@ PeLdrpLoadAndScanReferencedDll(
|
||||||
Success = PeLdrAllocateDataTableEntry(Parent ? Parent->Blink : ModuleListHead,
|
Success = PeLdrAllocateDataTableEntry(Parent ? Parent->Blink : ModuleListHead,
|
||||||
ImportName,
|
ImportName,
|
||||||
FullDllName,
|
FullDllName,
|
||||||
BasePA,
|
PaToVa(BasePA),
|
||||||
DataTableEntry);
|
DataTableEntry);
|
||||||
if (!Success)
|
if (!Success)
|
||||||
{
|
{
|
||||||
|
@ -682,10 +682,10 @@ PeLdrAllocateDataTableEntry(
|
||||||
IN OUT PLIST_ENTRY ModuleListHead,
|
IN OUT PLIST_ENTRY ModuleListHead,
|
||||||
IN PCCH BaseDllName,
|
IN PCCH BaseDllName,
|
||||||
IN PCCH FullDllName,
|
IN PCCH FullDllName,
|
||||||
IN PVOID BasePA,
|
IN PVOID BaseVA,
|
||||||
OUT PLDR_DATA_TABLE_ENTRY *NewEntry)
|
OUT PLDR_DATA_TABLE_ENTRY *NewEntry)
|
||||||
{
|
{
|
||||||
PVOID BaseVA = PaToVa(BasePA);
|
PVOID BasePA = VaToPa(BaseVA);
|
||||||
PWSTR BaseDllNameBuffer, Buffer;
|
PWSTR BaseDllNameBuffer, Buffer;
|
||||||
PLDR_DATA_TABLE_ENTRY DataTableEntry;
|
PLDR_DATA_TABLE_ENTRY DataTableEntry;
|
||||||
PIMAGE_NT_HEADERS NtHeaders;
|
PIMAGE_NT_HEADERS NtHeaders;
|
||||||
|
|
|
@ -342,7 +342,11 @@ WinLdrLoadDeviceDriver(PLIST_ENTRY LoadOrderListHead,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allocate a DTE for it
|
// Allocate a DTE for it
|
||||||
Success = PeLdrAllocateDataTableEntry(LoadOrderListHead, DllName, DllName, DriverBase, DriverDTE);
|
Success = PeLdrAllocateDataTableEntry(LoadOrderListHead,
|
||||||
|
DllName,
|
||||||
|
DllName,
|
||||||
|
PaToVa(DriverBase),
|
||||||
|
DriverDTE);
|
||||||
if (!Success)
|
if (!Success)
|
||||||
{
|
{
|
||||||
/* Cleanup and bail out */
|
/* Cleanup and bail out */
|
||||||
|
@ -542,7 +546,7 @@ LoadModule(
|
||||||
Success = PeLdrAllocateDataTableEntry(&LoaderBlock->LoadOrderListHead,
|
Success = PeLdrAllocateDataTableEntry(&LoaderBlock->LoadOrderListHead,
|
||||||
ImportName,
|
ImportName,
|
||||||
FullFileName,
|
FullFileName,
|
||||||
BaseAddress,
|
PaToVa(BaseAddress),
|
||||||
Dte);
|
Dte);
|
||||||
if (!Success)
|
if (!Success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue