Index: branches/iFabio/Chameleon/i386/libsaio/acpi_patcher.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/acpi_patcher.c (revision 324) +++ branches/iFabio/Chameleon/i386/libsaio/acpi_patcher.c (revision 325) @@ -211,8 +211,8 @@ char resource_template_register_fixedhw[] = { 0x11, 0x14, 0x0A, 0x11, 0x82, 0x0C, 0x00, 0x7F, - 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x79, 0x00 + 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x79, 0x00 }; char resource_template_register_systemio[] = @@ -249,9 +249,9 @@ bool c4_enabled = false; bool cst_using_sustemio = false; - getBoolForKey(kEnableC2States, &c2_enabled, &bootInfo->chameleonConfig); - getBoolForKey(kEnableC3States, &c3_enabled, &bootInfo->chameleonConfig); - getBoolForKey(kEnableC4States, &c4_enabled, &bootInfo->chameleonConfig); + getBoolForKey(kEnableC2State, &c2_enabled, &bootInfo->chameleonConfig); + getBoolForKey(kEnableC3State, &c3_enabled, &bootInfo->chameleonConfig); + getBoolForKey(kEnableC4State, &c4_enabled, &bootInfo->chameleonConfig); getBoolForKey(kCSTUsingSystemIO, &cst_using_sustemio, &bootInfo->chameleonConfig); c2_enabled = c2_enabled | (fadt->C2_Latency < 100); @@ -267,97 +267,100 @@ aml_add_byte(pack, cstates_count); struct aml_chunk* tmpl = aml_add_package(pack); - if (cst_using_sustemio) { + if (cst_using_sustemio) + { + // C1 resource_template_register_fixedhw[8] = 0x00; resource_template_register_fixedhw[9] = 0x00; - resource_template_register_fixedhw[10] = 0x00; - resource_template_register_fixedhw[11] = 0x00; // C1 + resource_template_register_fixedhw[18] = 0x00; aml_add_buffer(tmpl, resource_template_register_fixedhw, sizeof(resource_template_register_fixedhw)); aml_add_byte(tmpl, 0x01); // C1 - aml_add_byte(tmpl, 0x20); // Latency - aml_add_word(tmpl, 0x03e8); // Power + aml_add_word(tmpl, 0x0001); // Latency + aml_add_dword(tmpl, 0x000003e8); // Power - uint8_t p_blk_lo = acpi_cpu_p_blk + 4; - uint8_t p_blk_hi = (acpi_cpu_p_blk + 4) >> 8; + uint8_t p_blk_lo, p_blk_hi; - // C2 - if (c2_enabled) + if (c2_enabled) // C2 { + p_blk_lo = acpi_cpu_p_blk + 4; + p_blk_hi = (acpi_cpu_p_blk + 4) >> 8; + tmpl = aml_add_package(pack); resource_template_register_systemio[11] = p_blk_lo; // C2 resource_template_register_systemio[12] = p_blk_hi; // C2 aml_add_buffer(tmpl, resource_template_register_systemio, sizeof(resource_template_register_systemio)); aml_add_byte(tmpl, 0x02); // C2 - aml_add_byte(tmpl, 0x60); // Latency - aml_add_word(tmpl, 0x01f4); // Power + aml_add_word(tmpl, 0x0040); // Latency + aml_add_dword(tmpl, 0x000001f4); // Power } - - p_blk_lo = acpi_cpu_p_blk + 5; - p_blk_hi = (acpi_cpu_p_blk + 5) >> 8; - - // C4 - if (c4_enabled) + + if (c4_enabled) // C4 { + p_blk_lo = acpi_cpu_p_blk + 5; + p_blk_hi = (acpi_cpu_p_blk + 5) >> 8; + tmpl = aml_add_package(pack); resource_template_register_systemio[11] = p_blk_lo; // C4 resource_template_register_systemio[12] = p_blk_hi; // C4 aml_add_buffer(tmpl, resource_template_register_systemio, sizeof(resource_template_register_systemio)); aml_add_byte(tmpl, 0x04); // C4 - aml_add_word(tmpl, 0x0A); // Latency - aml_add_byte(tmpl, 0xC8); // Power + aml_add_word(tmpl, 0x0080); // Latency + aml_add_dword(tmpl, 0x000000C8); // Power } - else - // C3 - if (c3_enabled) - { - tmpl = aml_add_package(pack); - resource_template_register_systemio[11] = p_blk_lo; // C3 - resource_template_register_systemio[12] = p_blk_hi; // C3 - aml_add_buffer(tmpl, resource_template_register_systemio, sizeof(resource_template_register_systemio)); - aml_add_byte(tmpl, 0x03); // C3 - aml_add_word(tmpl, 0x80); // Latency - aml_add_word(tmpl, 0x015e); // Power - } + else if (c3_enabled) // C3 + { + p_blk_lo = acpi_cpu_p_blk + 5; + p_blk_hi = (acpi_cpu_p_blk + 5) >> 8; + + tmpl = aml_add_package(pack); + resource_template_register_systemio[11] = p_blk_lo; // C3 + resource_template_register_systemio[12] = p_blk_hi; // C3 + aml_add_buffer(tmpl, resource_template_register_systemio, sizeof(resource_template_register_systemio)); + aml_add_byte(tmpl, 0x03); // C3 + aml_add_word(tmpl, 0x0060); // Latency + aml_add_dword(tmpl, 0x0000015e); // Power + } } - else { + else + { + // C1 resource_template_register_fixedhw[11] = 0x00; // C1 aml_add_buffer(tmpl, resource_template_register_fixedhw, sizeof(resource_template_register_fixedhw)); - aml_add_byte(tmpl, 0x01); // C1 - aml_add_byte(tmpl, 0x01); // Latency - aml_add_word(tmpl, 0x03e8); // Power + aml_add_byte(tmpl, 0x01); // C1 + aml_add_word(tmpl, 0x0001); // Latency + aml_add_dword(tmpl, 0x000003e8); // Power - // C2 - if (c2_enabled) + resource_template_register_fixedhw[18] = 0x03; + + if (c2_enabled) // C2 { tmpl = aml_add_package(pack); resource_template_register_fixedhw[11] = 0x10; // C2 aml_add_buffer(tmpl, resource_template_register_fixedhw, sizeof(resource_template_register_fixedhw)); - aml_add_byte(tmpl, 0x02); // C2 - aml_add_byte(tmpl, fadt->C2_Latency); - aml_add_word(tmpl, 0x01f4); // Power + aml_add_byte(tmpl, 0x02); // C2 + aml_add_word(tmpl, 0x0040); // Latency + aml_add_dword(tmpl, 0x000001f4); // Power } - // C4 - if (c4_enabled) + + if (c4_enabled) // C4 { tmpl = aml_add_package(pack); resource_template_register_fixedhw[11] = 0x30; // C4 aml_add_buffer(tmpl, resource_template_register_fixedhw, sizeof(resource_template_register_fixedhw)); - aml_add_byte(tmpl, 0x04); // C4 - aml_add_word(tmpl, 0x11); // TODO: right latency for C4 - aml_add_byte(tmpl, 0xfa); // Power + aml_add_byte(tmpl, 0x04); // C4 + aml_add_word(tmpl, 0x0080); // Latency + aml_add_dword(tmpl, 0x000000C8); // Power } - else - // C3 - if (c3_enabled) - { - tmpl = aml_add_package(pack); - resource_template_register_fixedhw[11] = 0x20; // C3 - aml_add_buffer(tmpl, resource_template_register_fixedhw, sizeof(resource_template_register_fixedhw)); - aml_add_byte(tmpl, 0x03); // C3 - aml_add_word(tmpl, fadt->C3_Latency); - aml_add_word(tmpl, 0x015e); // Power - } + else if (c3_enabled) + { + tmpl = aml_add_package(pack); + resource_template_register_fixedhw[11] = 0x20; // C3 + aml_add_buffer(tmpl, resource_template_register_fixedhw, sizeof(resource_template_register_fixedhw)); + aml_add_byte(tmpl, 0x03); // C3 + aml_add_word(tmpl, 0x0060); // Latency + aml_add_dword(tmpl, 0x0000015e); // Power + } } Index: branches/iFabio/Chameleon/i386/libsaio/nvidia.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/nvidia.c (revision 324) +++ branches/iFabio/Chameleon/i386/libsaio/nvidia.c (revision 325) @@ -621,6 +621,7 @@ { if (!rom || (rom[0] != 0x55 && rom[1] != 0xaa)) { printf("False ROM signature: 0x%02x%02x\n", rom[0], rom[1]); + pause(); return PATCH_ROM_FAILED; } @@ -628,6 +629,7 @@ if (!dcbptr) { printf("no dcb table found\n"); + pause(); return PATCH_ROM_FAILED; } // else @@ -660,6 +662,7 @@ if (sig != 0x4edcbdcb) { printf("Bad display config block signature (0x%8x)\n", sig); //Azi: issue #48 + pause(); return PATCH_ROM_FAILED; } } @@ -673,12 +676,14 @@ if (strcmp(sig, "DEV_REC")) { printf("Bad Display Configuration Block signature (%s)\n", sig); + pause(); return PATCH_ROM_FAILED; } } else { printf("ERROR: dcbtable_version is 0x%X\n", dcbtable_version); + pause(); return PATCH_ROM_FAILED; } @@ -1081,6 +1086,7 @@ if ((nvPatch = patch_nvidia_rom(rom)) == PATCH_ROM_FAILED) { printf("ERROR: nVidia ROM Patching Failed!\n"); + pause(); //return false; } Index: branches/iFabio/Chameleon/i386/libsaio/ati.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/ati.c (revision 324) +++ branches/iFabio/Chameleon/i386/libsaio/ati.c (revision 325) @@ -1148,7 +1148,8 @@ if (!card->info->device_id || !card->info->cfg_name) { - printf("Unsupported card!\n"); + printf("Unsupported card!\nUse AtiConfig key to specify a framebuffer for your card.\nIf still unsupported, report dev id, subsys id and vendor."); + pause(); return false; } Index: branches/iFabio/Chameleon/i386/boot2/boot.h =================================================================== --- branches/iFabio/Chameleon/i386/boot2/boot.h (revision 324) +++ branches/iFabio/Chameleon/i386/boot2/boot.h (revision 325) @@ -81,9 +81,9 @@ #define kGeneratePStates "GeneratePStates" /* acpi_patcher.c */ #define kGenerateCStates "GenerateCStates" /* acpi_patcher.c */ #define kCSTUsingSystemIO "CSTUsingSystemIO" /* acpi_patcher.c */ -#define kEnableC2States "EnableC2State" /* acpi_patcher.c */ -#define kEnableC3States "EnableC3State" /* acpi_patcher.c */ -#define kEnableC4States "EnableC4State" /* acpi_patcher.c */ +#define kEnableC2State "EnableC2State" /* acpi_patcher.c */ +#define kEnableC3State "EnableC3State" /* acpi_patcher.c */ +#define kEnableC4State "EnableC4State" /* acpi_patcher.c */ #define kWake "Wake" /* boot.c */ #define kForceWake "ForceWake" /* boot.c */ Index: branches/iFabio/Chameleon/package/buildpkg =================================================================== --- branches/iFabio/Chameleon/package/buildpkg (revision 324) +++ branches/iFabio/Chameleon/package/buildpkg (revision 325) @@ -250,8 +250,11 @@ do theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' ) mkdir -p "${1}/${theme}/Root/" - ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}" - find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+ + rsync -r --exclude=.svn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}" + # #### Comment out thx meklort + # ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}" + # #### + find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+ find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+ echo " [BUILD] ${themes[$i]##*/} " buildpackage "${1}/${theme}" "/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1 Index: branches/iFabio/Chameleon/Makefile =================================================================== --- branches/iFabio/Chameleon/Makefile (revision 324) +++ branches/iFabio/Chameleon/Makefile (revision 325) @@ -96,14 +96,14 @@ @echo "#define I386BOOT_CHAMELEONREVISION \"`svnversion -n | tr -d [:alpha:]`\"" >> $@ pkg: all - @if [ -e "$(SYMROOT)" ]; then \ - sudo `pwd`/package/buildpkg `pwd`/sym/package; \ + @if [ -e "$(SYMROOT)" ]; then \ + "${SRCROOT}/package/buildpkg" "${SYMROOT}/package"; \ fi; dmg: all @if [ -e "$(SYMROOT)" ]; then \ - sudo `pwd`/package/slimpkg `pwd`/sym/package; \ - sudo `pwd`/package/builddmg `pwd`/sym/package; \ + "${SRCROOT}/package/slimpkg" "${SYMROOT}/package"; \ + "${SRCROOT}/package/builddmg" "${SYMROOT}/package"; \ fi; .PHONY: $(SYMROOT)/i386/vers.h