Index: branches/meklort/i386/modules/KernelPatcher/kernel_patcher.c =================================================================== --- branches/meklort/i386/modules/KernelPatcher/kernel_patcher.c (revision 539) +++ branches/meklort/i386/modules/KernelPatcher/kernel_patcher.c (revision 540) @@ -676,7 +676,7 @@ kernSymbols_t *symbol = lookup_kernel_symbol("_commpage_stuff_routine"); if(symbol == 0 || symbol->addr == 0) { - printf("Unable to locate %s\n", "_commpage_stuff_routine"); + //printf("Unable to locate %s\n", "_commpage_stuff_routine"); return; } Index: branches/meklort/i386/modules/Memory/spd.c =================================================================== --- branches/meklort/i386/modules/Memory/spd.c (revision 539) +++ branches/meklort/i386/modules/Memory/spd.c (revision 540) @@ -71,13 +71,19 @@ /** Read one byte from the intel i2c, used for reading SPD on intel chipsets only. */ unsigned char smb_read_byte_intel(uint32_t base, uint8_t adr, uint8_t cmd) { + printf("smb_read_byte_intel\n"); int l1, h1, l2, h2; unsigned long long t; outb(base + SMBHSTSTS, 0x1f); // reset SMBus Controller outb(base + SMBHSTDAT, 0xff); - while( inb(base + SMBHSTSTS) & 0x01); // wait until ready + while( inb(base + SMBHSTSTS) & 0x01) + { + rdtsc(l2, h2); + t = ((h2 - h1) * 0xffffffff + (l2 - l1)) / (Platform.CPU.TSCFrequency / 100); + if(t > 50) return 0xFF; // hack, exit if unresponsive. + } outb(base + SMBHSTCMD, cmd); outb(base + SMBHSTADD, (adr << 1) | 0x01 ); @@ -261,11 +267,12 @@ char spdbuf[256]; for (i = 0; i < MAX_RAM_SLOTS; i++){ + DBG("Scanning slot %d\n", i); slot = &Platform.RAM.DIMM[i]; spd_size = smb_read_byte_intel(base, 0x50 + i, 0); // Check spd is present if (spd_size && (spd_size != 0xff) ) { - + printf("SPD is present\n"); slot->spd = spdbuf; slot->InUse = true; @@ -331,7 +338,6 @@ getc(); } } - // laptops sometimes show slot 0 and 2 with slot 1 empty when only 2 slots are presents so: Platform.DMI.DIMM[i]= i>0 && Platform.RAM.DIMM[1].InUse==false && fullBanks && Platform.DMI.MaxMemorySlots==2 ? @@ -367,7 +373,7 @@ int i; while (current) { -#if 0 +#if DEBUG_SPD printf("%02x:%02x.%x [%04x] [%04x:%04x] :: %s\n", current->dev.bits.bus, current->dev.bits.dev, current->dev.bits.func, current->class_id, current->vendor_id, current->device_id, Index: branches/meklort/i386/modules/Memory/Memory.c =================================================================== --- branches/meklort/i386/modules/Memory/Memory.c (revision 539) +++ branches/meklort/i386/modules/Memory/Memory.c (revision 540) @@ -43,4 +43,5 @@ } scan_memory(&Platform); // unfortunately still necesary for some comp where spd cant read correct speed scan_spd(&Platform); + } \ No newline at end of file