Chameleon

Chameleon Commit Details

Date:2010-09-14 15:01:48 (13 years 7 months ago)
Author:Azimutz
Commit:529
Parents: 528
Message:Returning setting arch changes from rev 520 (Chazi).
Changes:
M/branches/azimutz/CleanCut/doc-azi/CHANGES.txt
M/branches/azimutz/CleanCut/doc-azi/README.txt
M/branches/azimutz/CleanCut/i386/boot2/boot.c
M/branches/azimutz/CleanCut/i386/boot2/boot.h

File differences

branches/azimutz/CleanCut/doc-azi/CHANGES.txt
4949
5050
5151
52
52
5353
5454
55
56
5755
5856
5957
......
6967
7068
7169
72
70
7371
7472
7573
7674
7775
78
76
7977
8078
8179
82
83
8480
8581
8682
......
9187
9288
9389
94
90
9591
9692
9793
......
280276
281277
282278
279
280
281
282
283
284
285
283286
287
284288
289
285290
291
292
286293
287294
288295
---------------//---------------//---------------
- (rev 335)
- (rev 335) (REVERTED to trunk way, rev 520)
Change: merged the educational side of arch=i386 + the practical one of -x32, into a simple 32
booter flag.
Type just 32 to get you booted into i386 arch.
Note: -x32 was removed from trunk on rev 377.
---------------//---------------//---------------
- (rev 335)
- (rev 335) (REMOVED, rev 520)
Change: added -legacy kernel flag. This flag tells the booter to load i386 arch before is passed to
the kernel. This procedure only needs to be done on Snow Leopard. -legacy tells the kernel
to disable "64 Bit Mode", which allows 64 bit processors to run 64 bit apps under i386
mach kernel.
Type -legacy to get you booted into i386 arch, Legacy Mode.
Type -legacy to get you booted into Legacy Mode.
Note: only useful on 64 bit processors.
Note: this flag is not really needed; typing "32 -legacy" (no "") does the trick. It's just handy!
Note: just out of curiosity and for those who don't know, Legacy Mode is in fact the mode used
by 32 bit "only" processors! Since OS X kernel can handle 64 bit apps even on i386 arch,
64 bit processors need this flag to disable any handling of 64 bit instructions, when
---------------//---------------//---------------
- (rev 335)
- (rev 335) (REVERTED to trunk way, rev 520)
Change: added 64 bit booter flag, to keep company to the 32 one :)
Motif: mainly to override 32 or -legacy if they are flagged on the Boot.plist.
trunk. More details on the README.txt , under Chazi project.
---------------//---------------//---------------
- (rev 520)
Change: removed -legacy flag interaction with the booter and reverted 32/64 flags to the trunk way.
Type arch=i386 to load i386 kernel architecture.
arch=x86_64 overrides i386 arch, if flagged on Boot.plist.
On Snow type arch=i386 -legacy to load i386 arch Legacy Mode.
Motif: don't want to contribute to confusion... and laziness ;)
---------------//---------------//---------------
Azimutz
branches/azimutz/CleanCut/doc-azi/README.txt
1
1
22
33
44
About the CleanCut:
About CleanCut:
This is a "clean" cut of the Chazi project, it's not meant to be used!
If you want to test something, head to Chazi folder.
branches/azimutz/CleanCut/i386/boot2/boot.c
396396
397397
398398
399
400
401
402
403
404
399
400
405401
406
407
402
403
408404
409405
410406
411
412
407
408
413409
414
415
410
411
416412
417
413
414
415
416
417
418
418419
419420
420421
// Other status (e.g. 0) means that we should proceed with boot.
// 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))
// If cpu handles 64 bit instructions...
if (platformCPUFeature(CPU_FEATURE_EM64T))
{
// ... use i386 kernel arch.
archCpuType = CPU_TYPE_I386;
// use x86_64 kernel arch,...
archCpuType = CPU_TYPE_X86_64;
}
else
{
// Else use x86_64 kernel arch.
archCpuType = CPU_TYPE_X86_64;
// else use i386 kernel arch.
archCpuType = CPU_TYPE_I386;
}
// Override i386/-legacy, if flagged on Boot.plist.
if (getValueForKey(kArchX86_64Flag, &val, &len, &bootInfo->bootConfig))
// If user override...
if (getValueForKey(kArchKey, &val, &len, &bootInfo->bootConfig))
{
archCpuType = CPU_TYPE_X86_64;
// matches i386...
if (strncmp(val, "i386", 4) == 0)
{
// use i386 kernel arch.
archCpuType = CPU_TYPE_I386;
}
}
if (!getBoolForKey (kWake, &tryresume, &bootInfo->bootConfig)) {
branches/azimutz/CleanCut/i386/boot2/boot.h
6767
6868
6969
70
7071
7172
7273
......
105106
106107
107108
108
109
110
111109
112110
113111
#define kForceWake"ForceWake"// boot.c
#define kWakeImage"WakeImage"// boot.c
#define kProductVersion"ProductVersion"// boot.c
#define kArchKey"arch"// boot.c
#define kDSDTKey"DSDT"// acpi_patcher.c
#define kDropSSDT"DropSSDT"// acpi_patcher.c
#define kRestartFix"RestartFix" // acpi_patcher.c
#define kIgnoreCachesFlag"-f"// options.c
#define kIgnoreBootFileFlag"-F"// options.c
#define kSingleUserModeFlag"-s"// options.c
#define kArchI386Flag"32"// boot.c
#define kLegacyModeFlag"-legacy"// boot.c
#define kArchX86_64Flag"64"// boot.c
/*
* Booter behavior control

Archive Download the corresponding diff file

Revision: 529