X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Farch%2Fx86%2Fmboot.c;h=b7cebbd4f45e570a3784ecfe06577404385503d2;hb=819ea8133d95cd688c47b4f688c2503db9a9bccd;hp=08331a10a6134912c559e7a6948ac11cfc13a3e6;hpb=b806b8f55067584cb90fe20277235369a1111c66;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/arch/x86/mboot.c b/KernelLand/Kernel/arch/x86/mboot.c index 08331a10..b7cebbd4 100644 --- a/KernelLand/Kernel/arch/x86/mboot.c +++ b/KernelLand/Kernel/arch/x86/mboot.c @@ -139,16 +139,15 @@ tBootModule *Multiboot_LoadModules(tMBoot_Info *MBInfo, tVAddr MapOffset, int *M // Always HW map the module data ofs = mods[i].Start&0xFFF; - ret[i].Base = (void*)( MM_MapHWPages(mods[i].Start, - (ret[i].Size+ofs+0xFFF) / 0x1000 - ) + ofs ); + ret[i].Base = (void*)( (tVAddr)MM_MapHWPages(mods[i].Start, (ret[i].Size+ofs+0xFFF) / 0x1000) + + ofs ); // Only map the string if needed if( !MM_GetPhysAddr( (void*)(mods[i].String + MapOffset) ) ) { // Assumes the string is < 4096 bytes long) ret[i].ArgString = (void*)( - MM_MapHWPages(mods[i].String, 2) + (mods[i].String&0xFFF) + (tVAddr)MM_MapHWPages(mods[i].String, 2) + (mods[i].String&0xFFF) ); } else