Index: branches/azimutz/CleanCut/doc/BootHelp.txt =================================================================== --- branches/azimutz/CleanCut/doc/BootHelp.txt (revision 334) +++ branches/azimutz/CleanCut/doc/BootHelp.txt (revision 335) @@ -14,8 +14,10 @@ kernel: kernel name (e.g. "mach_kernel" - must be in "/" ) - flags: -v (verbose) -s (single user mode), - -x (safe mode) -F (ignore boot configuration file) + flags: -v (verbose) -s (single user mode), + -x (safe mode) -F (ignore boot configuration file) + 32 (i386 arch) -legacy (no 64 bit apps - kernel flag) + 64 (x86_64 arch) "Graphics Mode"="WIDTHxHEIGHTxDEPTH" (e.g. "1024x768x32") Index: branches/azimutz/CleanCut/i386/boot2/boot.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/boot.c (revision 334) +++ branches/azimutz/CleanCut/i386/boot2/boot.c (revision 335) @@ -407,18 +407,25 @@ } } - if (platformCPUFeature(CPU_FEATURE_EM64T)) { - archCpuType = CPU_TYPE_X86_64; - } else { + // If cpu doesn't handle 64 bit instructions,... + if (!platformCPUFeature(CPU_FEATURE_EM64T) || + // ... user forced i386 kernel architecture on cpu with "em64t"... + getValueForKey(kArchI386Flag, &val, &len, &bootInfo->bootConfig) || + // ... or forced Legacy Mode... + getValueForKey(kLegacyModeFlag, &val, &len, &bootInfo->bootConfig)) + { + // ... use i386 kernel arch. archCpuType = CPU_TYPE_I386; } - if (getValueForKey(karch, &val, &len, &bootInfo->bootConfig)) { - if (strncmp(val, "i386", 4) == 0) { - archCpuType = CPU_TYPE_I386; - } + else + { + // Else use x86_64 kernel arch. + archCpuType = CPU_TYPE_X86_64; } - if (getValueForKey(k32BitModeFlag, &val, &len, &bootInfo->bootConfig)) { - archCpuType = CPU_TYPE_I386; + // Override i386/-legacy, if flagged on Boot.plist. + if (getValueForKey(kArchX86_64Flag, &val, &len, &bootInfo->bootConfig)) + { + archCpuType = CPU_TYPE_X86_64; } if (!getBoolForKey (kWake, &tryresume, &bootInfo->bootConfig)) { Index: branches/azimutz/CleanCut/i386/boot2/boot.h =================================================================== --- branches/azimutz/CleanCut/i386/boot2/boot.h (revision 334) +++ branches/azimutz/CleanCut/i386/boot2/boot.h (revision 335) @@ -98,14 +98,16 @@ #define kMD0Image "md0" // ramdisk.h /* - * Flags to the booter or kernel + * Flags to the booter and/or kernel - these end with "Flag". */ #define kVerboseModeFlag "-v" // options.c #define kSafeModeFlag "-x" // options.c #define kOldSafeModeFlag "-f" // options.c #define kIgnoreBootFileFlag "-F" // options.c #define kSingleUserModeFlag "-s" // options.c -#define k32BitModeFlag "-x32" // boot.c +#define kArchI386Flag "32" // boot.c +#define kLegacyModeFlag "-legacy" // boot.c +#define kArchX86_64Flag "64" // boot.c /* * Booter behavior control