Author: hpoussin Date: Fri Dec 21 17:57:31 2007 New Revision: 31375
URL: http://svn.reactos.org/svn/reactos?rev=31375&view=rev Log: Rename ASMCODE to ROS_KERNEL_ENTRY_POINT
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c Fri Dec 21 17:57:31 2007 @@ -34,7 +34,7 @@ ULONG_PTR KernelBase;
/* Kernel Entrypoint in Virtual Memory */ -ULONG_PTR KernelEntryPoint; +ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
/* Page Directory and Tables for non-PAE Systems */ extern PAGE_DIRECTORY_X86 startup_pagedirectory; @@ -108,7 +108,6 @@ FrLdrSetupPae(ULONG Magic) { ULONG_PTR PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectory; - ASMCODE PagedJump;
/* Set the PDBR */ __writecr3(PageDirectoryBaseAddress); @@ -117,8 +116,7 @@ __writecr0(__readcr0() | X86_CR0_PG | X86_CR0_WP);
/* Jump to Kernel */ - PagedJump = (ASMCODE)(PVOID)(KernelEntryPoint); - PagedJump(Magic, &LoaderBlock); + (*KernelEntryPoint)(Magic, &LoaderBlock); }
/*++
Modified: trunk/reactos/boot/freeldr/freeldr/include/reactos.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/reactos.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h Fri Dec 21 17:57:31 2007 @@ -100,7 +100,7 @@ ULONG_PTR NTAPI FrLdrLoadModule(FILE *ModuleImage, LPCSTR ModuleName, PULONG ModuleSize); BOOLEAN NTAPI FrLdrCloseModule(ULONG_PTR ModuleBase, ULONG dwModuleSize); VOID NTAPI FrLdrStartup(ULONG Magic); -typedef VOID (FASTCALL *ASMCODE)(ULONG Magic, PROS_LOADER_PARAMETER_BLOCK LoaderBlock); +typedef VOID (FASTCALL *ROS_KERNEL_ENTRY_POINT)(ULONG Magic, PROS_LOADER_PARAMETER_BLOCK LoaderBlock);
PVOID NTAPI
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/reacto... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Fri Dec 21 17:57:31 2007 @@ -42,7 +42,8 @@ CHAR SystemRoot[255]; static CHAR szLoadingMsg[] = "Loading ReactOS..."; BOOLEAN FrLdrBootType; -extern ULONG_PTR KernelBase, KernelEntryPoint; +extern ULONG_PTR KernelBase; +extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
BOOLEAN FrLdrLoadDriver(PCHAR szFileName, @@ -772,7 +773,7 @@ /* Get the NT header, kernel base and kernel entry */ NtHeader = RtlImageNtHeader(LoadBase); KernelBase = SWAPD(NtHeader->OptionalHeader.ImageBase); - KernelEntryPoint = KernelBase + SWAPD(NtHeader->OptionalHeader.AddressOfEntryPoint); + KernelEntryPoint = (ROS_KERNEL_ENTRY_POINT)(KernelBase + SWAPD(NtHeader->OptionalHeader.AddressOfEntryPoint)); LoaderBlock.KernelBase = KernelBase;
/*
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/reacto... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Fri Dec 21 17:57:31 2007 @@ -34,7 +34,8 @@ char szBootPath[256]; char szHalName[256]; CHAR SystemRoot[255]; -extern ULONG_PTR KernelBase, KernelEntryPoint; +extern ULONG_PTR KernelBase; +extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
extern BOOLEAN FrLdrLoadDriver(PCHAR szFileName, INT nPos);
@@ -86,7 +87,7 @@ /* Get the NT header, kernel base and kernel entry */ NtHeader = RtlImageNtHeader(LoadBase); KernelBase = NtHeader->OptionalHeader.ImageBase; - KernelEntryPoint = KernelBase + NtHeader->OptionalHeader.AddressOfEntryPoint; + KernelEntryPoint = (ROS_KERNEL_ENTRY_POINT)(KernelBase + NtHeader->OptionalHeader.AddressOfEntryPoint); LoaderBlock.KernelBase = KernelBase;
/* Update Processbar and return success */