On 10. mars 2010 04:30, Bao, Zheng wrote:
index ac62981..067560d 100644 --- a/src/cpu/amd/quadcore/quadcore.c +++ b/src/cpu/amd/quadcore/quadcore.c @@ -69,11 +72,10 @@ static void real_start_other_core(u32 nodeid, u32 cores)
if(cores > 1) { dword = pci_read_config32(NODE_PCI(nodeid, 0), 0x168);
dword |= (1 << 0); // core2
if(cores > 2) { // core3
dword |= (1 << 1);
for (i = 0; i < cores - 1; i++) {
dword |= 1 << i;
pci_write_config32(NODE_PCI(nodeid, 0), 0x168,
dword); }
}pci_write_config32(NODE_PCI(nodeid, 0), 0x168, dword);
}
I assume the line pci_write_config32(NODE_PCI(nodeid, 0), 0x168, dword); should be put outside the loop.
Yes, well, I originally had that as "dword |= (0xf >> (5-cores); pci_write_config32(..)" or something. However, after reducing the loglevel below "debug" and encountering hangs that seemed to be conflict issues with the core startup, I added the loop to be able to add delays between startup of the individual cores during debugging. As it stands, the write could just as well be outside the loop.
Regarding hangs, I suspect this might be a PCI config race condition between the cores. I tried to adjust my configuration to use MMCONFIG to address this. It didn't seem to be supported out of the box, and I didn't have the time to look into it further at the moment. I still intend to do so, but it would be nice to know if anyone is using MMCONFIG with fam10 configurations. Is it supposed to work?