免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: albcamus
打印 上一主题 下一主题

PCI驱动的suspend/resume方法,在何时调用? [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-03-21 17:33 |只看该作者
这次好像猜错了
>I would say my friend is working on PM, I am on behalf of him to
>confirm before question.
>He said, in linus's opinion, STD should be called as
>"snapshot-and-restore" and should not be considered as suspend/resume.

People always have different views from different angles. But if you refer to ACPI spec, sleep sequence is always suggested similar.

>So you said "linux treats S1/S3 exactly same" should be for D-sates.
>STR in linux and S1 in linux are different, is he right?

Not only D-states, including cpu offline, etc. I mean the whole sleep flow is same except the last value written to platform is different.

论坛徽章:
0
12 [报告]
发表于 2008-03-21 17:36 |只看该作者
更多补充

>Oh, sorry, I mis-understanding what he wants.
>His question is "for CPU, does linux treat S1/S3 same"?
>I guess the answer is no

The answer is yes for APs, and no for BSPs. All APs are put offline for both S1/S3. But for BSP, S1 doesn't need to save/restore BSP context since once resume, the instruction right after sleep point is resumed. However for S3, because all cpus are reset, one special real-mode wakeup code is required to bring BSP back to original context.

论坛徽章:
0
13 [报告]
发表于 2008-03-21 17:45 |只看该作者
原帖由 zx_wing 于 2008-3-21 17:36 发表
更多补充


多谢多谢

这么精彩的回答,我要加个精华(不过加到自己头上了,咳咳 )

论坛徽章:
0
14 [报告]
发表于 2008-03-24 17:11 |只看该作者

论坛徽章:
0
15 [报告]
发表于 2008-04-15 16:12 |只看该作者

论坛徽章:
0
16 [报告]
发表于 2009-06-25 15:15 |只看该作者
继续问一下,那么S3 resume之后,PCI空间的值是如何暂存的?
又是谁来做这个工作的?有没有一个标准的做法?

论坛徽章:
0
17 [报告]
发表于 2009-06-25 15:30 |只看该作者
原帖由 fishpxie 于 2009-6-25 15:15 发表
继续问一下,那么S3 resume之后,PCI空间的值是如何暂存的?
又是谁来做这个工作的?有没有一个标准的做法?


driver自己的suspend方法,调用pci_save_state,来把配置空间(包括PCI、PCI-X、PCI-E)存到pci_dev里头去; resueme方法调用pci_restore_state,从pci_dev里头保存的值来恢复config space的状态。

论坛徽章:
0
18 [报告]
发表于 2010-12-02 08:42 |只看该作者
好贴顶下。。。

羡慕下WING老兄有内部专家可以问。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP