Corey Osgood wrote:
So, I commented all the do_ram_commands out (since I can't see the problem with it) and did ram init using pci_write_config16, setting what I know the values should be, and then NOP would not report as being set (and ram still failed). So, I set up a for loop to set NOP until the northbridge reported that it was set...I got an infinite loop. My loop might be wrong (it's a bit hackish), can someone tell me if it should work? Or does NOP simply not set?
/* 3. Apply NOP. */ RAM_DEBUG_MESSAGE("Ram Enable 3: Apply NOP\r\n"); int s; for( s = 0; s != 0110; s = pci_read_config16( ctrl->d0, SDRAMC ) ) { RAM_DEBUG_MESSAGE("Do NOPs til it cooperates!\r\n"); pci_write_config8(ctrl->d0, SDRAMC, 0x0110); read32(0x04000000); EXTRA_DELAY }
Hello everybody,
I am new to LinuxBios and interested in getting an Asus P2B-F (i440bx) up and running. Therefor I read the Intel specifications and regarding to the code above the following paragraph got my attention (section 3-1, p. 27):
Some of the 82443BX registers described in this section contain reserved bits. These bits are labeled "Reserved". Software must deal correctly with fields that are reserved. On reads, software must use appropriate masks to extract the defined bits and not rely on reserved bits being any particular value. On writes, software must ensure that the values of reserved bit positions are preserved. That is, the values of reserved bit positions must first be read, merged with the new values for other bit positions and then written back.
If I understood this correctly we have to do
/* 3. Apply NOP. */ RAM_DEBUG_MESSAGE("Ram Enable 3: Apply NOP\r\n"); int s; for( s = 0; s != 0x0110 & 0x03ff; s = pci_read_config16( ctrl->d0, SDRAMC ) ) { RAM_DEBUG_MESSAGE("Do NOPs til it cooperates!\r\n"); pci_write_config8(ctrl->d0, SDRAMC, 0x0110 | (s & 0xfc00)); read32(0x04000000); EXTRA_DELAY }
Unfortunately I can't test this myself, because my test-setup is still not complete...