The new resource allocator made a bug in SB600 SATA BAR printing very visible (the SB600 code printed that two BARs had the same address). Mask the correct number of bits.
Tested on Asus M2A-VM (AMD DBM690T target).
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: LinuxBIOSv2-asus_m2a-vm/src/southbridge/amd/sb600/sb600_sata.c =================================================================== --- LinuxBIOSv2-asus_m2a-vm/src/southbridge/amd/sb600/sb600_sata.c (Revision 4589) +++ LinuxBIOSv2-asus_m2a-vm/src/southbridge/amd/sb600/sb600_sata.c (Arbeitskopie) @@ -86,10 +86,10 @@ /* get base addresss */ sata_bar5 = (u8 *) (pci_read_config32(dev, 0x24) & ~0x3FF); sata_bar0 = pci_read_config16(dev, 0x10) & ~0x7; - sata_bar1 = pci_read_config16(dev, 0x14) & ~0x7; + sata_bar1 = pci_read_config16(dev, 0x14) & ~0x3; sata_bar2 = pci_read_config16(dev, 0x18) & ~0x7; - sata_bar3 = pci_read_config16(dev, 0x1C) & ~0x7; - sata_bar4 = pci_read_config16(dev, 0x20) & ~0x7; + sata_bar3 = pci_read_config16(dev, 0x1C) & ~0x3; + sata_bar4 = pci_read_config16(dev, 0x20) & ~0xf;
printk_spew("sata_bar0=%x\n", sata_bar0); /* 3030 */ printk_spew("sata_bar1=%x\n", sata_bar1); /* 3070 */
It is a bug itself, not made by new thing. Thanks.
Acked-by: Zheng Bao zheng.bao@amd.com
-----Original Message----- From: coreboot-bounces+zheng.bao=amd.com@coreboot.org [mailto:coreboot-bounces+zheng.bao=amd.com@coreboot.org] On Behalf Of Carl-Daniel Hailfinger Sent: Thursday, August 27, 2009 10:31 AM To: Coreboot Subject: [coreboot] [PATCH] Fix SB600 SATA BAR printing
The new resource allocator made a bug in SB600 SATA BAR printing very visible (the SB600 code printed that two BARs had the same address). Mask the correct number of bits.
Tested on Asus M2A-VM (AMD DBM690T target).
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: LinuxBIOSv2-asus_m2a-vm/src/southbridge/amd/sb600/sb600_sata.c =================================================================== --- LinuxBIOSv2-asus_m2a-vm/src/southbridge/amd/sb600/sb600_sata.c (Revision 4589) +++ LinuxBIOSv2-asus_m2a-vm/src/southbridge/amd/sb600/sb600_sata.c (Arbeitskopie) @@ -86,10 +86,10 @@ /* get base addresss */ sata_bar5 = (u8 *) (pci_read_config32(dev, 0x24) & ~0x3FF); sata_bar0 = pci_read_config16(dev, 0x10) & ~0x7; - sata_bar1 = pci_read_config16(dev, 0x14) & ~0x7; + sata_bar1 = pci_read_config16(dev, 0x14) & ~0x3; sata_bar2 = pci_read_config16(dev, 0x18) & ~0x7; - sata_bar3 = pci_read_config16(dev, 0x1C) & ~0x7; - sata_bar4 = pci_read_config16(dev, 0x20) & ~0x7; + sata_bar3 = pci_read_config16(dev, 0x1C) & ~0x3; + sata_bar4 = pci_read_config16(dev, 0x20) & ~0xf;
printk_spew("sata_bar0=%x\n", sata_bar0); /* 3030 */ printk_spew("sata_bar1=%x\n", sata_bar1); /* 3070 */
On 27.08.2009 06:16, Bao, Zheng wrote:
It is a bug itself, not made by new thing. Thanks.
I have rewritten the commit message to be more clear.
Acked-by: Zheng Bao zheng.bao@amd.com
Thanks, r4591.
Regards, Carl-Daniel