[coreboot] CS5536 write MSR and trigger I/O error

Peter Stuge peter at stuge.se
Fri Jun 18 08:08:29 CEST 2010


Li Gen wrote:
> I have a main board with cs5536,

Which CPU does it have?

> and need to write the bios.

I would suggest that you use coreboot as firmware. If you require a
legacy BIOS environment then you can use coreboot together with
SeaBIOS. It works very well.

> I use following codes to read and write MSR to configure CS5536.

Reading and writing MSRs must be done with the instructions rdmsr and

> 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

Whenever you are accessing PCI config space registers, keep in mind
that each access is always two operations. First write the 32-bit PCI
config space register address to 0xcf8, then read or write 32-bit
data to 0xcfc.

Also note that if you are not using coreboot then you may not get a
lot of help here, since this mailing list is focused on coreboot. :)


More information about the coreboot mailing list