Index: branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c =================================================================== --- branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c (revision 988) +++ branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c (revision 989) @@ -72,6 +72,8 @@ #define PATCH_ROM_FAILED 0 #define MAX_NUM_DCB_ENTRIES 16 + + #define TYPE_GROUPED 0xff extern uint32_t devices_number; @@ -84,6 +86,7 @@ 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, @@ -93,6 +96,12 @@ #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 @@ -1163,6 +1172,7 @@ const char *value; bool doit; + devicepath = get_pci_dev_path(nvda_dev); bar[0] = pci_config_read32(nvda_dev->dev.addr, 0x10 ); regs = (uint8_t *) (bar[0] & ~0x0f); @@ -1307,7 +1317,45 @@ 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], @@ -1322,6 +1370,9 @@ 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)); } Index: branches/azimutz/trunkAutoResolution/i386/boot2/boot.h =================================================================== --- branches/azimutz/trunkAutoResolution/i386/boot2/boot.h (revision 988) +++ branches/azimutz/trunkAutoResolution/i386/boot2/boot.h (revision 989) @@ -92,7 +92,10 @@ #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 */ Property changes on: branches/azimutz/trunkAutoResolution/package/fdisk440 ___________________________________________________________________ Deleted: svn:mime-type - application/octet-stream Index: branches/azimutz/trunkAutoResolution/doc/BootHelp.txt =================================================================== --- branches/azimutz/trunkAutoResolution/doc/BootHelp.txt (revision 988) +++ branches/azimutz/trunkAutoResolution/doc/BootHelp.txt (revision 989) @@ -2,117 +2,121 @@ 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] [arguments] - + Example arguments include - + device: rd= (e.g. rd=disk0s2) rd=* (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= 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 Where partition is hd(x,y), UUID or label enclosed [;partition2 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= 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= Use a different card config UseAtiROM=Yes|No Use an alternate Ati ROM image - (path: /Extra/__.rom) + (path: /Extra/__.rom) UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image - (path: /Extra/_.rom) + (path: /Extra/_.rom) VBIOS=Yes|No Inject NVIDIA VBIOS into device-properties. - + display_0= Inject alternate value of display-cfg into NVDA,Display-A@0. + MUST BE 8 Chars in length (HEX) + display_1= 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= Use an alternate sleepimage file. (default path is /private/var/vm/sleepimage). - + DropSSDT=Yes Skip the SSDT tables while relocating the ACPI tables. DSDT= 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= 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. @@ -120,6 +124,6 @@ SystemId= Set manually the system id UUID, SMUUID in smbios config (reserved field) isn't used. SystemType= Set the system type where n is between 0..6 - (default =1 (Desktop) + (default =1 (Desktop) md0= Load raw img file into memory for use as XNU's md0 ramdisk. /Extra/Postboot.img is used otherwise. Property changes on: branches/azimutz/trunkAutoResolution ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/rekursor/trunkAutoResolution:r3-22 Merged /trunk:r945-988