Chameleon

Chameleon Commit Details

Date:2011-06-08 15:17:14 (8 years 1 month ago)
Author:Azimutz
Commit:989
Parents: 988
Message:Sync with trunk r988.
Changes:
M/branches/azimutz/trunkAutoResolution/doc/BootHelp.txt
M/branches/azimutz/trunkAutoResolution
M/branches/azimutz/trunkAutoResolution/package/fdisk440
M/branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c
M/branches/azimutz/trunkAutoResolution/i386/boot2/boot.h

File differences

branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c
7272
7373
7474
75
76
7577
7678
7779
......
8486
8587
8688
89
8790
8891
8992
......
9396
9497
9598
99
100
101
102
103
104
96105
97106
98107
......
11631172
11641173
11651174
1175
11661176
11671177
11681178
......
13071317
13081318
13091319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
13101335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
13111359
13121360
13131361
......
13221370
13231371
13241372
1373
1374
1375
13251376
13261377
13271378
#define PATCH_ROM_FAILED 0
#define MAX_NUM_DCB_ENTRIES 16
#define TYPE_GROUPED 0xff
extern uint32_t devices_number;
const char *nvidia_name_0[]={ "@0,name","NVDA,Display-A" };
const char *nvidia_name_1[]={ "@1,name","NVDA,Display-B" };
const char *nvidia_slot_name[]={ "AAPL,slot-name","Slot-1" };
//const char *nvidia_display_cfg_0[] = { "@0,display-cfg
static uint8_t default_NVCAP[]= {
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00,
#define NVCAP_LEN ( sizeof(default_NVCAP) / sizeof(uint8_t) )
static uint8_t default_dcfg_0[]={0xff, 0xff, 0xff, 0xff};
static uint8_t default_dcfg_1[]={0xff, 0xff, 0xff, 0xff};
#define DCFG0_LEN ( sizeof(default_dcfg_0) / sizeof(uint8_t) )
#define DCFG1_LEN ( sizeof(default_dcfg_1) / sizeof(uint8_t) )
static struct nv_chipsets_t NVKnownChipsets[] = {
{ 0x00000000, "Unknown" },
// 0040 - 004F
const char*value;
booldoit;
devicepath = get_pci_dev_path(nvda_dev);
bar[0] = pci_config_read32(nvda_dev->dev.addr, 0x10 );
regs = (uint8_t *) (bar[0] & ~0x0f);
memcpy(default_NVCAP, new_NVCAP, NVCAP_LEN);
}
}
if (getValueForKey(kdcfg0, &value, &len, &bootInfo->bootConfig) && len == DCFG0_LEN * 2)
{
uint8_t new_dcfg0[DCFG0_LEN];
if (hex2bin(value, new_dcfg0, DCFG0_LEN) == 0)
{
verbose("Using user supplied @0,display-cfg\n");
memcpy(default_dcfg_0, new_dcfg0, DCFG0_LEN);
printf("@0,display-cfg: %02x%02x%02x%02x\n",
default_dcfg_0[0], default_dcfg_0[1], default_dcfg_0[2], default_dcfg_0[3]);
devprop_add_value(device, "@0,display-cfg", default_dcfg_0, DCFG0_LEN);
}
}
if (getValueForKey(kdcfg1, &value, &len, &bootInfo->bootConfig) && len == DCFG1_LEN * 2)
{
uint8_t new_dcfg1[DCFG1_LEN];
if (hex2bin(value, new_dcfg1, DCFG1_LEN) == 0)
{
verbose("Using user supplied @1,display-cfg\n");
memcpy(default_dcfg_1, new_dcfg1, DCFG1_LEN);
printf("@1,display-cfg: %02x%02x%02x%02x\n",
default_dcfg_1[0], default_dcfg_1[1], default_dcfg_1[2], default_dcfg_1[3]);
devprop_add_value(device, "@1,display-cfg", default_dcfg_1, DCFG1_LEN);
}
}
#if DEBUG_NVCAP
printf("NVCAP: %02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x\n",
default_NVCAP[0], default_NVCAP[1], default_NVCAP[2], default_NVCAP[3],
devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4);
devprop_add_value(device, "model", (uint8_t*)model, strlen(model) + 1);
devprop_add_value(device, "rom-revision", (uint8_t*)biosVersion, strlen(biosVersion) + 1);
if (getBoolForKey(kVBIOS, &doit, &bootInfo->bootConfig) && doit) {
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
}
branches/azimutz/trunkAutoResolution/i386/boot2/boot.h
9292
9393
9494
95
96
9597
98
9699
97100
98101
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
#define kVBIOS"VBIOS"/* nvidia.c */
#define kdcfg0 "display_0"/* nvidia.c */
#define kdcfg1 "display_1"/* nvidia.c */
#define kPCIRootUID"PCIRootUID"/* pci_root.c */
#define kEthernetBuiltIn"EthernetBuiltIn"/* pci_setup.c */
branches/azimutz/trunkAutoResolution/doc/BootHelp.txt
22
33
44
5
5
66
7
7
88
9
9
1010
11
11
1212
1313
14
14
1515
16
16
1717
1818
1919
2020
2121
22
22
2323
2424
25
25
2626
27
27
2828
2929
3030
31
31
3232
3333
3434
35
35
3636
3737
3838
3939
40
40
4141
4242
43
43
4444
4545
4646
4747
4848
49
49
5050
5151
5252
53
53
5454
5555
5656
57
57
5858
5959
6060
6161
62
62
6363
6464
6565
66
66
6767
68
68
6969
7070
71
71
7272
7373
7474
75
75
7676
77
77
7878
79
79
80
81
82
83
8084
8185
82
86
8387
8488
8589
8690
87
91
8892
89
93
9094
9195
9296
9397
94
98
9599
96100
97101
98102
99
103
100104
101
105
102106
103
104
107
108
105109
106110
107111
108
112
109113
110114
111115
112
116
113117
114118
115
119
116120
117121
118122
......
120124
121125
122126
123
127
124128
125129
If you don't type anything, the computer continues starting up normally. It
uses the kernel and configuration files on the startup device, which it also
uses as the root device.
Advanced startup options use the following syntax:
[device]<kernel> [arguments]
Example arguments include
device: rd=<BSD device name> (e.g. rd=disk0s2)
rd=*<IODeviceTree path> (e.g. rd=*/PCI0@0/CHN0@0/@0:1)
kernel: kernel name (e.g. "mach_kernel" - must be in "/" )
flags: -v (verbose) -s (single user mode)
-x (safe mode) -f (ignore caches)
-F (ignore "Kernel Flags" specified in boot configuration file)
"Graphics Mode"="WIDTHxHEIGHTxDEPTH" (e.g. "1024x768x32")
kernel flags (e.g. debug=0x144)
io=0xffffffff (defined in IOKit/IOKitDebug.h)
Example: mach_kernel rd=disk0s1 -v "Graphics Mode"="1920x1200x32"
If the computer won't start up properly, you may be able to start it up
using safe mode. Type -x to start up in safe mode, which ignores all
cached driver files.
Special booter hotkeys:
F5 Rescans optical drive.
F10 Scans and displays all BIOS accessible drives.
Special booter commands:
?memory Displays information about the computer's memory.
?video Displays VESA video modes supported by the computer's BIOS.
?norescan Leaves optical drive rescan mode.
Additional useful command-line options:
config=<file> Use an alternate Boot.plist file.
Options useful in the com.apple.Boot.plist file:
Wait=Yes|No Prompt for a key press before starting the kernel.
"Quiet Boot"=Yes|No Use quiet boot mode (no messages or prompt).
Timeout=8 Number of seconds to pause at the boot: prompt.
"Instant Menu"=Yes Force displaying the partition selection menu.
"Default Partition" Sets the default boot partition,
=hd(x,y)|UUID|"Label" Specified as a disk/partition pair, an UUID, or a
label enclosed in quotes.
"Hide Partition" Remove unwanted partition(s) from the boot menu.
=partition Specified, possibly multiple times, as hd(x,y), an
[;partition2 ...] UUID or label enclosed in quotes.
"Rename Partition" Rename partition(s) for the boot menu.
=partition <alias> Where partition is hd(x,y), UUID or label enclosed
[;partition2 <alias2> in quotes. The alias can optionally be quoted too.
...]
GUI=No Disable the GUI (enabled by default).
"Boot Banner"=Yes|No Show boot banner in GUI mode (enabled by default).
"Legacy Logo"=Yes|No Use the legacy grey apple logo (disabled by default).
PciRoot=<value> Use an alternate value for PciRoot (default value 0).
UseKernelCache=Yes|No Default is No. Yes will load pre-linked kernel and will
ignore /E/E and /S/L/E/Extensions.mkext.
GraphicsEnabler=Yes|No Automatic device-properties generation for gfx cards.
AtiConfig=<cardcfg> Use a different card config
UseAtiROM=Yes|No Use an alternate Ati ROM image
(path: /Extra/<vendorid>_<devid>_<subsysid>.rom)
(path: /Extra/<vendorid>_<devid>_<subsysid>.rom)
UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image
(path: /Extra/<vendorid>_<devid>.rom)
(path: /Extra/<vendorid>_<devid>.rom)
VBIOS=Yes|No Inject NVIDIA VBIOS into device-properties.
display_0=<value> Inject alternate value of display-cfg into NVDA,Display-A@0.
MUST BE 8 Chars in length (HEX)
display_1=<value> Inject alternate value of display-cfg into NVDA,Display-B@1.
MUST BE 8 Chars in length (HEX)
EthernetBuiltIn=Yes|No Automatic "built-in"=yes device-properties generation
for ethernet interfaces.
USBBusFix=Yes Enable all USB fixes below:
EHCIacquire=Yes Enable the EHCI fix (disabled by default).
UHCIreset=Yes Enable the UHCI fix (disabled by default).
USBLegacyOff=Yes Enable the USB Legacy fix (disabled by default).
ForceHPET=Yes|No Force Enable HPET.
Wake=No Disable wake up after hibernation (default: enabled).
ForceWake=Yes Force using the sleepimage (disabled by default).
WakeImage=<file> Use an alternate sleepimage file.
(default path is /private/var/vm/sleepimage).
DropSSDT=Yes Skip the SSDT tables while relocating the ACPI tables.
DSDT=<file> Use an alternate DSDT.aml file
(default paths:
/DSDT.aml /Extra/DSDT.aml bt(0,0)/Extra/DSDT.aml).
GenerateCStates=Yes Enable auto generation of processor idle sleep states
(C-States).
(C-States).
GeneratePStates=Yes Enable auto generation of processor power performance
states (P-States).
states (P-States).
EnableC2State=Yes Enable specific Processor power state, C2.
EnableC3State=Yes Enable specific Processor power state, C3.
EnableC4State=Yes Enable specific Processor power state, C4.
SMBIOS=<file> Use an alternate SMBIOS.plist file
(default paths:
/Extra/SMBIOS.plist bt(0,0)/Extra/SMBIOS.plist).
SMBIOSdefaults=No Don't use the Default values for SMBIOS overriding if
smbios.plist doesn't exist, factory values are kept.
"Scan Single Drive" Scan the drive only where the booter got loaded from.
=Yes|No Fix rescan pbs when using a DVD reader in AHCI mode.
Rescan=Yes Enable CD-ROM rescan mode.
SystemId=<UUID> Set manually the system id UUID,
SMUUID in smbios config (reserved field) isn't used.
SystemType=<n> Set the system type where n is between 0..6
(default =1 (Desktop)
(default =1 (Desktop)
md0=<file> Load raw img file into memory for use as XNU's md0
ramdisk. /Extra/Postboot.img is used otherwise.

Archive Download the corresponding diff file

Revision: 989