Index: trunk/CHANGES =================================================================== --- trunk/CHANGES (revision 81) +++ trunk/CHANGES (revision 82) @@ -1,3 +1,6 @@ +- Added NVIDIA new NVCAP customization support and support for ION gfx cards from aserebln +- Added ATI new framebuffers support and new cards from PCEFI10.6 +- improved ACPI file search algo by implementing a cache. - Nvidia injection fix - pciroot would not always return correct uuid in autodection mode - Fixed the hibernation problem in boot2/resume.c Index: trunk/i386/libsaio/nvidia.c =================================================================== --- trunk/i386/libsaio/nvidia.c (revision 81) +++ trunk/i386/libsaio/nvidia.c (revision 82) @@ -91,6 +91,8 @@ 0x00, 0x00, 0x00, 0x00 }; +#define NVCAP_LEN ( sizeof(default_NVCAP) / sizeof(uint8_t) ) + static struct nv_chipsets_t NVKnownChipsets[] = { { 0x00000000, "Unknown" }, { 0x10DE0040, "GeForce 6800 Ultra" }, @@ -334,6 +336,8 @@ { 0x10DE06F9, "Quadro FX 370 LP" }, { 0x10DE06FA, "Quadro NVS 450" }, { 0x10DE06FD, "Quadro NVS 295" }, + { 0x10DE087D, "ION 9400M" }, + { 0x10DE087E, "ION LE" }, { 0x10DE0A20, "GeForce GT220" }, { 0x10DE0A23, "GeForce 210" }, { 0x10DE0A2A, "GeForce GT 230M" }, @@ -621,6 +625,31 @@ return 1; } +int hex2bin(const char *hex, uint8_t *bin, int len) +{ + char *p; + int i; + char buf[3]; + + if (hex == NULL || bin == NULL || len <= 0 || strlen(hex) != len * 2) { + printf("[ERROR] bin2hex input error\n"); + return -1; + } + + buf[2] = '\0'; + p = (char *) hex; + for (i=0; i 0) ? nvFilename : "internal"); + + sprintf(kNVCAP, "NVCAP_%04x", nvda_dev->device_id); + if (getValueForKey(kNVCAP, &value, &len, &bootInfo->bootConfig) && len == NVCAP_LEN * 2) { + uint8_t new_NVCAP[NVCAP_LEN]; + + if (hex2bin(value, new_NVCAP, NVCAP_LEN) == 0) { + verbose("Using user supplied NVCAP for %s :: %s\n", model, devicepath); + memcpy(default_NVCAP, new_NVCAP, NVCAP_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], + default_NVCAP[4], default_NVCAP[5], default_NVCAP[6], default_NVCAP[7], + default_NVCAP[8], default_NVCAP[9], default_NVCAP[10], default_NVCAP[11], + default_NVCAP[12], default_NVCAP[13], default_NVCAP[14], default_NVCAP[15], + default_NVCAP[16], default_NVCAP[17], default_NVCAP[18], default_NVCAP[19]); +#endif + devprop_add_nvidia_template(device); - devprop_add_value(device, "NVCAP", default_NVCAP, 20); + devprop_add_value(device, "NVCAP", default_NVCAP, NVCAP_LEN); 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);