mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
Fix the detection of /3GB switch.
svn path=/trunk/; revision=13633
This commit is contained in:
parent
d10dba35e6
commit
299de40214
1 changed files with 10 additions and 13 deletions
|
@ -4,7 +4,7 @@
|
||||||
* FILE: boot/freeldr/freeldr/multiboot.c
|
* FILE: boot/freeldr/freeldr/multiboot.c
|
||||||
* PURPOSE: ReactOS Loader
|
* PURPOSE: ReactOS Loader
|
||||||
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
|
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
|
||||||
* Hartmutt Birr - SMP/PAE Code
|
* Hartmut Birr - SMP/PAE Code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
#define ApicPageTableIndexPae (APIC_BASE >> 21)
|
#define ApicPageTableIndexPae (APIC_BASE >> 21)
|
||||||
|
|
||||||
|
|
||||||
#define KernelEntryPoint (KernelEntry - KERNEL_BASE_PHYS) + KernelBase
|
#define KernelEntryPoint (KernelEntry - KERNEL_BASE_PHYS) + KernelBase
|
||||||
|
|
||||||
/* Load Address of Next Module */
|
/* Load Address of Next Module */
|
||||||
ULONG_PTR NextModuleBase = 0;
|
ULONG_PTR NextModuleBase = 0;
|
||||||
|
@ -217,7 +217,7 @@ FrLdrSetupPae(ULONG Magic)
|
||||||
/* Jump to Kernel */
|
/* Jump to Kernel */
|
||||||
PagedJump = (ASMCODE)KernelEntryPoint;
|
PagedJump = (ASMCODE)KernelEntryPoint;
|
||||||
PagedJump(Magic, &LoaderBlock);
|
PagedJump(Magic, &LoaderBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*++
|
/*++
|
||||||
* FrLdrGetKernelBase
|
* FrLdrGetKernelBase
|
||||||
|
@ -239,27 +239,24 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
FrLdrGetKernelBase(VOID)
|
FrLdrGetKernelBase(VOID)
|
||||||
{
|
{
|
||||||
PCHAR p1;
|
PCHAR p;
|
||||||
PCHAR p2;
|
|
||||||
|
|
||||||
/* Read Command Line */
|
/* Read Command Line */
|
||||||
for(p1 = (PCHAR)&LoaderBlock.CommandLine; *p1 && (p2 = strchr(p1, '/')); p2++) {
|
p = (PCHAR)LoaderBlock.CommandLine;
|
||||||
|
while ((p = strchr(p, '/')) != NULL) {
|
||||||
|
|
||||||
/* Find "/3GB" */
|
/* Find "/3GB" */
|
||||||
if (!strnicmp(p2, "3GB", 3)) {
|
if (!strnicmp(p + 1, "3GB", 3)) {
|
||||||
|
|
||||||
/* Make sure there's nothing following it */
|
/* Make sure there's nothing following it */
|
||||||
if (p2[3] == ' ' || p2[3] == 0) {
|
if (p[4] == ' ' || p[4] == 0) {
|
||||||
|
|
||||||
/* Use 3GB */
|
/* Use 3GB */
|
||||||
KernelBase = 0xC0000000;
|
KernelBase = 0xC0000000;
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
/* Use 2GB */
|
|
||||||
KernelBase = 0x80000000;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set KernelBase */
|
/* Set KernelBase */
|
||||||
|
|
Loading…
Reference in a new issue