Index: branches/ErmaC/Trunk/i386/libsaio/acpi_patcher.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/acpi_patcher.c (revision 2025) +++ branches/ErmaC/Trunk/i386/libsaio/acpi_patcher.c (revision 2026) @@ -29,8 +29,10 @@ boolean_t tableSign(char *table, const char *sgn) { int i; - for (i=0; i<4; i++) { - if ((table[i] &~0x20) != (sgn[i] &~0x20)) { + for (i=0; i<4; i++) + { + if ((table[i] &~0x20) != (sgn[i] &~0x20)) + { return false; } } @@ -174,6 +176,11 @@ for (j=0; j<4; j++) { char c = dsdt[offset+j]; + if( c == '\\') + { + offset = i + 8 + (dsdt[i+7] >> 6); + c = dsdt[offset+j]; + } if (!aml_isvalidchar(c)) { @@ -189,16 +196,20 @@ memcpy(acpi_cpu_name[acpi_cpu_count], dsdt+offset, 4); i = offset + 5; - if (acpi_cpu_count == 0) - acpi_cpu_p_blk = dsdt[i] | (dsdt[i+1] << 8); - - verbose("Found ACPI CPU: %c%c%c%c\n", acpi_cpu_name[acpi_cpu_count][0], acpi_cpu_name[acpi_cpu_count][1], acpi_cpu_name[acpi_cpu_count][2], acpi_cpu_name[acpi_cpu_count][3]); - - if (++acpi_cpu_count == 32) return; + if (acpi_cpu_count == 0) + { + verbose("Found ACPI CPU: %c%c%c%c\n", acpi_cpu_name[acpi_cpu_count]); + } else { + verbose("And %c%c%c%c\n", acpi_cpu_name[acpi_cpu_count]); + } + + if (++acpi_cpu_count == 32) + break; } } } - // DBG("end finding cpu names: cpu names found: %d\n", acpi_cpu_count); + DBG("end finding cpu names: cpu names found: %d\n", acpi_cpu_count); + return; } struct acpi_2_ssdt *generate_cst_ssdt(struct acpi_2_fadt* fadt) Index: branches/ErmaC/Trunk/i386/libsaio/spd.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/spd.c (revision 2025) +++ branches/ErmaC/Trunk/i386/libsaio/spd.c (revision 2026) @@ -278,7 +278,7 @@ for (i = 0; i < MAX_RAM_SLOTS; i++){ slot = &Platform.RAM.DIMM[i]; spd_size = smb_read_byte_intel(base, 0x50 + i, 0); - DBG("SPD[0] (size): %d @0x%x\n", spd_size, 0x50 + i); + DBG("SPD[0] (size): 0x%02x @0x%x\n", spd_size, 0x50 + i); // Check spd is present if (spd_size && (spd_size != 0xff)) { Index: branches/ErmaC/Trunk/i386/libsaio/cpu.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/cpu.c (revision 2025) +++ branches/ErmaC/Trunk/i386/libsaio/cpu.c (revision 2026) @@ -464,23 +464,27 @@ maxcoef = currcoef; } - if (maxcoef) { - if (maxdiv) { - fsbFrequency = ((tscFrequency * 2) / ((maxcoef * 2) + 1)); - } else { - fsbFrequency = (tscFrequency / maxcoef); + if (maxcoef) + { + if (maxdiv) + { + fsbFrequency = ((tscFrequency * 2) / ((maxcoef * 2) + 1)); + } else { + fsbFrequency = (tscFrequency / maxcoef); } - if (currdiv) { - cpuFrequency = (fsbFrequency * ((currcoef * 2) + 1) / 2); - } else { - cpuFrequency = (fsbFrequency * currcoef); + if (currdiv) + { + cpuFrequency = (fsbFrequency * ((currcoef * 2) + 1) / 2); + } else { + cpuFrequency = (fsbFrequency * currcoef); } DBG("max: %d%s current: %d%s\n", maxcoef, maxdiv ? ".5" : "",currcoef, currdiv ? ".5" : ""); } } } /* Mobile CPU */ - if (rdmsr64(MSR_IA32_PLATFORM_ID) & (1<<28)) { + if (rdmsr64(MSR_IA32_PLATFORM_ID) & (1<<28)) + { p->CPU.Features |= CPU_FEATURE_MOBILE; } } @@ -559,7 +563,8 @@ } #if 0 - if (!fsbFrequency) { + if (!fsbFrequency) + { fsbFrequency = (DEFAULT_FSB * 1000); cpuFrequency = tscFrequency; DBG("0 ! using the default value for FSB !\n"); @@ -578,16 +583,19 @@ p->CPU.CPUFrequency = cpuFrequency; // keep formatted with spaces instead of tabs - DBG("CPU: Brand String: %s\n", p->CPU.BrandString); - DBG("CPU: Vendor/Family/ExtFamily: 0x%x/0x%x/0x%x\n", p->CPU.Vendor, p->CPU.Family, p->CPU.ExtFamily); - DBG("CPU: Model/ExtModel/Stepping: 0x%x/0x%x/0x%x\n", p->CPU.Model, p->CPU.ExtModel, p->CPU.Stepping); - DBG("CPU: MaxCoef/CurrCoef: 0x%x/0x%x\n", p->CPU.MaxCoef, p->CPU.CurrCoef); - DBG("CPU: MaxDiv/CurrDiv: 0x%x/0x%x\n", p->CPU.MaxDiv, p->CPU.CurrDiv); - DBG("CPU: TSCFreq: %dMHz\n", p->CPU.TSCFrequency / 1000000); - DBG("CPU: FSBFreq: %dMHz\n", (p->CPU.FSBFrequency + 500000) / 1000000); - DBG("CPU: CPUFreq: %dMHz\n", p->CPU.CPUFrequency / 1000000); - DBG("CPU: NoCores/NoThreads: %d/%d\n", p->CPU.NoCores, p->CPU.NoThreads); - DBG("CPU: Features: 0x%08x\n", p->CPU.Features); + DBG("\n---------------------------------------------\n"); + DBG("CPU: Brand String:\t\t\t\t %s\n", p->CPU.BrandString); + DBG("CPU: Vendor/Family/ExtFamily:\t 0x%x/0x%x/0x%x\n", p->CPU.Vendor, p->CPU.Family, p->CPU.ExtFamily); + DBG("CPU: Model/ExtModel/Stepping:\t 0x%x/0x%x/0x%x\n", p->CPU.Model, p->CPU.ExtModel, p->CPU.Stepping); + DBG("CPU: MaxCoef/CurrCoef:\t\t\t 0x%x/0x%x\n", p->CPU.MaxCoef, p->CPU.CurrCoef); + DBG("CPU: MaxDiv/CurrDiv:\t\t\t 0x%x/0x%x\n", p->CPU.MaxDiv, p->CPU.CurrDiv); + DBG("CPU: TSCFreq:\t\t\t\t %dMHz\n", p->CPU.TSCFrequency / 1000000); + DBG("CPU: FSBFreq:\t\t\t\t\t %dMHz\n", (p->CPU.FSBFrequency + 500000) / 1000000); + DBG("CPU: CPUFreq:\t\t\t\t %dMHz\n", p->CPU.CPUFrequency / 1000000); + DBG("CPU: Number of CPU Cores:\t\t %d\n", p->CPU.NoCores); + DBG("CPU: Number of CPU Threads:\t %d\n", p->CPU.NoThreads); + DBG("CPU: Features:\t\t\t\t\t 0x%08x\n", p->CPU.Features); + DBG("---------------------------------------------\n"); #if DEBUG_CPU pause(); #endif Index: branches/ErmaC/Trunk/i386/libsaio/disk.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/disk.c (revision 2025) +++ branches/ErmaC/Trunk/i386/libsaio/disk.c (revision 2026) @@ -1490,17 +1490,18 @@ bool valid = false; config_file_t systemVersion; char dirSpec[512]; - + sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/SystemVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no); if (!loadConfigFile(dirSpec, &systemVersion)) { valid = true; } - else + else { + /* Mac OS X Server */ sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/ServerVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no); - + if (!loadConfigFile(dirSpec, &systemVersion)) { bvr->OSisServer = true;