+ int i, j, numPages;
+ Log("gsBootCmdLine = '%s'", gsBootCmdLine);
+ for( i = 0; i < giArch_NumBootModules; i ++ )
+ {
+ Log_Log("Arch", "Loading '%s'", gaArch_BootModules[i].ArgString);
+
+ if( !Module_LoadMem( gaArch_BootModules[i].Base,
+ gaArch_BootModules[i].Size, gaArch_BootModules[i].ArgString
+ ) )
+ {
+ Log_Warning("Arch", "Unable to load module");
+ }
+
+ // Unmap and free
+ numPages = (gaArch_BootModules[i].Size + ((Uint)gaArch_BootModules[i].Base&0xFFF) + 0xFFF) >> 12;
+ MM_UnmapHWPages( (tVAddr)gaArch_BootModules[i].Base, numPages );
+
+ for( j = 0; j < numPages; j++ )
+ MM_DerefPhys( gaArch_BootModules[i].PBase + (j << 12) );
+
+ if( (tVAddr) gaArch_BootModules[i].ArgString < KERNEL_BASE )
+ MM_UnmapHWPages( (tVAddr)gaArch_BootModules[i].ArgString, 2 );
+ }
+ Log_Log("Arch", "Boot modules loaded");
+ if( gaArch_BootModules )
+ free( gaArch_BootModules );