+
+ // Always HW map the module data
+ ofs = mods[i].Start&0xFFF;
+ gaArch_BootModules[i].Base = (void*)( MM_MapHWPages(mods[i].Start,
+ (gaArch_BootModules[i].Size+ofs+0xFFF) / 0x1000
+ ) + ofs );
+
+ // Only map the string if needed
+ if( (tVAddr)mods[i].String > MAX_ARGSTR_POS )
+ {
+ // Assumes the string is < 4096 bytes long)
+ gaArch_BootModules[i].ArgString = (void*)(
+ MM_MapHWPages(mods[i].String, 2) + (mods[i].String&0xFFF)
+ );
+ }
+ else
+ gaArch_BootModules[i].ArgString = (char *)mods[i].String + KERNEL_BASE;