怎样读写SMBus上的Device—以获取Intel平台上Memory的SPD信息为例

How to access devices on SMBus--- Take reading SPD information (Intel platform) as example

 firing -2005/04/13

 

0. Essential skills before you start:

l         How to read/write PCI configuration space?

l         How to read/write I/O space under WindowsNT/2000… platform?

And an Intel south bridge datasheet as reference

 

1.  Basic steps

a.       Enable SMBus controller

b.       Get SMBus base address

c.       Read SPD information, according the device IDs

2.  Enable SMBus controller

LPC Interface Bridge Registers (D31:F0),  Offset: 40h (FUNC_DIS)Bit0 :

Software sets this bit to disable the SMBus Host controller function.

0 = SMBus controller is enabled

1 = SMBus controller is disabled

This bit is set to 1(SMBus controller is disabled) by default. So, just set this bit to 0.

(How to make sure you have enabled SMBus controller? Go to ‘Device Manager’ and refresh it, and then check ‘System Device’, where you should find a PCI device named “Intel® 82801DB SMBus Controller” like.)

3.  Get SMBus base address

SMBus Controller PCI Register (D31:F3), offset: 20~23H. That’s the SMBus base address. Just read this base address. Normally, the address could be 0x500 or 0x5000

4.  Read SPD information

The SMBus DeviceID of memory bank0 is a0, bank1= 0xa2, and bank2 =0xa4

a. start

b. wait smbus ready

c. output Base+04, (DeviceID+1)

d. out Base+03, offset

e. out Base+02, 48H

f. wait 200ms

g. wait smbus ready

h. input base+05

i. OK

 

Note:

How to wait SMBus ready? Input Base+0, bit0==0 indicates smbus is ready, otherwise(bit0==1), smbus is busy

  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值