On Feb 3, 2008 10:49 AM, Urbez Santana Roma <<a href="mailto:urbez@linuxupc.upc.edu">urbez@linuxupc.upc.edu</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Finally works, my mainboard complete, with the IDE +dma, network, usb,<br>etc...<br><br>I must only add the same that y have commented in my last email, for<br>working the access of IDE , network, etc.<br><br>Mainboard: VIA EPIA CN10000.<br>
Chipsets: VT8237 and CN700<br>Cpu: C7<br>Ram: 512MB DDR2 KVR533D2N4<br>Linux Kernel: 2.6.22<br><br>1. Make a clone of the last posted code for CN700/C7 jetway mainboard of<br>Corey Osgood, for your mainboard.<br><br>2. Set to 1 the 20 bit in the function sdram_enable() to all MRS RAM<br>
Commands. If not, the Kingstom<br>Memory not initiates correctly.<br><br>3. comment the call to the function disable_sata(), if not, your normal<br>ide not appears in the PCI config space.</blockquote><div><br>Weird. This USED to work, I'm still trying to figure out how I messed it up.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">4. Add the follow code to the end of the function main() in auto.c: if<br>not, your normal IDE cannot use DMA and via-rhine, usb's, etc, not<br>
works.<br><br>        //This enable the access of PCI devices to the PCI bus master?<br>        pci_write_config8(cn700->d0f7, 0x57, 0x20);//was 0x01</blockquote><div><br>As Rudolf said, this is supposed to be the address of the last dram bank, IE how much ram the system has. Interestingly enough, although these registers are in the northbridge's config space, they're actually set on the southbridge, through the vlink. That's why some registers have to be set both in d0f3 and d0f7. I'm setting this up now in d0f3 during raminit, so I can just copy it over.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">5. If you will that the FILO not confuses scanning PCI, you must add, to<br>the end of main() in auto.c:<br>
<br>    pci_write_config8(cn700->d1f0,0x19,0x1,CF8);//enable PCI-BRIGDE<br>SECONDARY BUS<br>    pci_write_config8(cn700->d1f0,0x1a,0x1,CF8);</blockquote><div> <br></div><div>Huh? I think these are already set somewhere, perhaps c7_cpu_setup(). Might not be in the older patch.<br>
 <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">6. If you want that your BIOS, runs at the maximum CPU speed, in my<br>case, the CPU starts<br>
with 800MHz, and i needed in the bios that works with 1000MHz. You can<br>add this if u will:<br><br>#define MSR_IA32_PERF_STATUS                    0x00000198<br>#define MSR_IA32_PERF_CTL                       0x00000199<br>
#define MSR_IA32_MISC_ENABLE                    0x000001a0<br><br>        msr_t msr;<br>        print_debug("Enabling C7 Power Save\r\n");<br>        msr=rdmsr(MSR_IA32_MISC_ENABLE);<br>        if (!(msr.lo & 0x10000)) {msr.lo|<br>
0x10000;wrmsr(MSR_IA32_MISC_ENABLE,msr);<br>        msr=rdmsr(MSR_IA32_PERF_STATUS);<br>        //TODO: wait CPU not busy bit 16 & 17 off (STATUS)<br>        wrmsr(MSR_IA32_PERF_CTL, 0,  (hi&0xff00)| ((hi>>16)&0x00ff));<br>
        //Max multi Factor, and minimum voltage<br>        //TODO: wait CPU transition bit 16 & 17 off (STATUS)</blockquote><div><br>OK, I'll add this, thanks! Is this CPU-specific, or does this set any CPU to the max speed? <br>
</div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">7. If you will, you can generate your fadt.c and dsdt.c with the genfadt<br>
and gendsdt tool, or generate one new.<br><br>8. Force the ACPI in the kernel if not uses it with acpi=force<br><br>9. If you want that your kernel recognises lapic, you must change the<br>kernel driver, for not ignore<br>
another Vendors differs of AMD and Intel, in the function "static int<br>__init detect_init_APIC (void)" of the file ./arch/i386/kernel/apic.c<br><br>End.<font color="#888888"></font></blockquote><div><br>Thanks, this should be very helpful. I'll take your changes into account, and have a fresh patch sometime soon. Watching the super bowl atm, but I should have some time tomorrow.<br>
<br>-Corey<br> </div></div>