Hi,
I have a main board with cs5536, and need to write the bios. During
the pci devices scaning, I can found cs5536, and the device number is
9. So I use following codes to read and write MSR to configure CS5536.
However, I found that I can successfully read the MSR content, but
when I write the same content to the same MSR, the I/O error was
happened after writing the low data to 0xf8.
Then I try to write the high data first and then write the low
data, I found that writing the high data will not trigger I/O error,
only writing low data will trigger I/O error. Is there something else
I forgot to initialize before writing MSR? and what do I do something
wrong?
Thank you!
#define CS5536_SB_MSR_BASE (0x00000000)
pci_write(CS5536_PCI_CONF_BASE+0xf4, CS5536_SB_MSR_BASE | 0x10) ; // OK
pci_read(CS5536_PCI_CONF_BASE+0xf8, &low ) ; // OK low =00000003h
pci_read(CS5536_PCI_CONF_BASE+0xfc, &hi ) ; // OK hi = 44000030h
pci_write(CS5536_PCI_CONF_BASE+0xf4, CS5536_SB_MSR_BASE | 0x10) ; // OK
pci_write(CS5536_PCI_CONF_BASE+0xf8, low ) ; // I/O Error, Why?
pci_write(CS5536_PCI_CONF_BASE+0xfc, hi ) ; // I/O Error, Why?
Q: Is there something else I forgot to initialize before writing MSR?
and what do I do something wrong?