mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
We now setup NLS data in the loader block, as well as setup the minimal loader block extension fields to pass ExpIsLoaderValid validation.
svn path=/trunk/; revision=32376
This commit is contained in:
parent
4757f67815
commit
e38c335520
2 changed files with 29 additions and 7 deletions
|
@ -22,11 +22,13 @@ CHAR ArmArcBootPath[64];
|
||||||
CHAR ArmArcHalPath[64];
|
CHAR ArmArcHalPath[64];
|
||||||
CHAR ArmNtHalPath[64];
|
CHAR ArmNtHalPath[64];
|
||||||
CHAR ArmNtBootPath[64];
|
CHAR ArmNtBootPath[64];
|
||||||
|
PNLS_DATA_BLOCK ArmNlsDataBlock;
|
||||||
PLOADER_PARAMETER_EXTENSION ArmExtension;
|
PLOADER_PARAMETER_EXTENSION ArmExtension;
|
||||||
extern ARM_TRANSLATION_TABLE ArmTranslationTable;
|
extern ARM_TRANSLATION_TABLE ArmTranslationTable;
|
||||||
extern ARM_COARSE_PAGE_TABLE BootTranslationTable, KernelTranslationTable;
|
extern ARM_COARSE_PAGE_TABLE BootTranslationTable, KernelTranslationTable;
|
||||||
extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
|
extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
|
||||||
extern ULONG_PTR KernelBase;
|
extern ULONG_PTR KernelBase;
|
||||||
|
extern ULONG_PTR AnsiData, OemData, UnicodeData;
|
||||||
|
|
||||||
ULONG SizeBits[] =
|
ULONG SizeBits[] =
|
||||||
{
|
{
|
||||||
|
@ -142,8 +144,6 @@ ArmSetupPageDirectory(VOID)
|
||||||
// Now create the template PTE for the coarse page tables for the next 6MB
|
// Now create the template PTE for the coarse page tables for the next 6MB
|
||||||
//
|
//
|
||||||
Pte.L1.Coarse.BaseAddress = (ULONG)KernelTable >> CPT_SHIFT;
|
Pte.L1.Coarse.BaseAddress = (ULONG)KernelTable >> CPT_SHIFT;
|
||||||
TuiPrintf("Coarse Table at: %x\n", KernelTable);
|
|
||||||
TuiPrintf("Coarse Table at: %x\n", Pte.L1.Coarse.BaseAddress);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Map 0x00800000 - 0x00DFFFFF to 0x80800000 - 0x80DFFFFF
|
// Map 0x00800000 - 0x00DFFFFF to 0x80800000 - 0x80DFFFFF
|
||||||
|
@ -200,7 +200,6 @@ ArmSetupPageDirectory(VOID)
|
||||||
// Now create the template PTE for the pages mapping the next 6MB
|
// Now create the template PTE for the pages mapping the next 6MB
|
||||||
//
|
//
|
||||||
Pte.L2.Small.BaseAddress = (ULONG)KERNEL_BASE_PHYS >> PTE_SHIFT;
|
Pte.L2.Small.BaseAddress = (ULONG)KERNEL_BASE_PHYS >> PTE_SHIFT;
|
||||||
TuiPrintf("First Kernel PFN at: %x\n", Pte.L2.Small.BaseAddress);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Loop each kernel coarse page table (i).
|
// Loop each kernel coarse page table (i).
|
||||||
|
@ -225,7 +224,6 @@ ArmSetupPageDirectory(VOID)
|
||||||
// Next iteration
|
// Next iteration
|
||||||
//
|
//
|
||||||
KernelTable++;
|
KernelTable++;
|
||||||
TuiPrintf("Coarse Table at: %x\n", KernelTable);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,16 +298,26 @@ ArmPrepareForReactOS(IN BOOLEAN Setup)
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
// TODO: Setup NLS data
|
// Setup NLS data
|
||||||
//
|
//
|
||||||
|
ArmNlsDataBlock = MmAllocateMemoryWithType(sizeof(NLS_DATA_BLOCK),
|
||||||
|
LoaderOsloaderHeap);
|
||||||
|
ArmLoaderBlock->NlsData = ArmNlsDataBlock;
|
||||||
|
ArmLoaderBlock->NlsData->AnsiCodePageData = (PVOID)(AnsiData | KSEG0_BASE);
|
||||||
|
ArmLoaderBlock->NlsData->OemCodePageData = (PVOID)(OemData | KSEG0_BASE);
|
||||||
|
ArmLoaderBlock->NlsData->UnicodeCodePageData = (PVOID)(UnicodeData | KSEG0_BASE);
|
||||||
|
ArmLoaderBlock->NlsData = (PVOID)((ULONG_PTR)ArmLoaderBlock->NlsData | KSEG0_BASE);
|
||||||
|
|
||||||
//
|
//
|
||||||
// TODO: Setup boot-driver data
|
// TODO: Setup boot-driver data
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
// TODO: Setup extension parameters
|
// Setup extension parameters
|
||||||
//
|
//
|
||||||
|
ArmExtension->Size = sizeof(LOADER_PARAMETER_EXTENSION);
|
||||||
|
ArmExtension->MajorVersion = 5;
|
||||||
|
ArmExtension->MinorVersion = 2;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make a copy of the command line
|
// Make a copy of the command line
|
||||||
|
|
|
@ -16,7 +16,7 @@ LdrPEGetExportByName(
|
||||||
);
|
);
|
||||||
|
|
||||||
extern BOOLEAN FrLdrLoadDriver(PCHAR szFileName, INT nPos);
|
extern BOOLEAN FrLdrLoadDriver(PCHAR szFileName, INT nPos);
|
||||||
|
PVOID AnsiData, OemData, UnicodeData;
|
||||||
/* MODULE MANAGEMENT **********************************************************/
|
/* MODULE MANAGEMENT **********************************************************/
|
||||||
|
|
||||||
PLOADER_MODULE
|
PLOADER_MODULE
|
||||||
|
@ -97,6 +97,20 @@ FrLdrLoadModule(FILE *ModuleImage,
|
||||||
strcpy(NameBuffer, ModuleName);
|
strcpy(NameBuffer, ModuleName);
|
||||||
ModuleData->String = (ULONG_PTR)NameBuffer;
|
ModuleData->String = (ULONG_PTR)NameBuffer;
|
||||||
|
|
||||||
|
/* NLS detection for NT Loader Block */
|
||||||
|
if (!_stricmp(NameBuffer, "ansi.nls"))
|
||||||
|
{
|
||||||
|
AnsiData = (PVOID)NextModuleBase;
|
||||||
|
}
|
||||||
|
else if (!_stricmp(NameBuffer, "oem.nls"))
|
||||||
|
{
|
||||||
|
OemData = (PVOID)NextModuleBase;
|
||||||
|
}
|
||||||
|
else if (!_stricmp(NameBuffer, "casemap.nls"))
|
||||||
|
{
|
||||||
|
UnicodeData = (PVOID)NextModuleBase;
|
||||||
|
}
|
||||||
|
|
||||||
/* Load the file image */
|
/* Load the file image */
|
||||||
FsReadFile(ModuleImage, LocalModuleSize, NULL, (PVOID)NextModuleBase);
|
FsReadFile(ModuleImage, LocalModuleSize, NULL, (PVOID)NextModuleBase);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue