找回密码
 加入计匠网
搜索
热搜: BIOS ACPI CPU Windows
查看: 25273|回复: 10

请教82 83 CMD 的真正作用. 看不懂ACPI SPEC的描述!

[复制链接]
发表于 2008-10-21 15:32:34 | 显示全部楼层 |阅读模式
清高人指点一下:
+ G: u5 V# n7 R; h82h EC Burst Enable Enable EC operation in burst mode
4 T4 X6 k/ |" l$ l$ f9 j. a  V  Q83h EC Burst Disable Disable EC operation in burst mode- {9 }" ?9 {9 @# h( F9 z+ S2 @: z
; y3 c' l. s2 r' Y* v
这两个命令倒是是在什么时候发的, 具体的作用是什么啊!
# a' v/ R) h  [3 E( q( G5 M, W万分感谢!!
发表于 2008-10-21 16:23:13 | 显示全部楼层
In burst mode, embedded controller has received the burst enable command from the host, has halted normal processing, and is waiting for a series of commands to be sent from the host. this allows OSPM or system management handler to quickly read and write several bytes of data at a time without the overhead of SCIs between the commands. + o& |# B  J( Z& B3 P4 B' U
一般情况下, OSPM与EC通信均是通过SCIs事件方式(interrupt-driven command processing)来完成, 但当在需要传输比较多数据时, 如SMBus Block 的大量数据传输时, OSPM可以发送 Bust Enable Command 请求EC进入burst Mode, 在此模式下, EC将中止正常的其它处理, 只处理与 OSPM 进行的全速的读/写操作, 此时, 不再是以SCIs事件来触发每一次的读写,而是查询方式(polled command processing)进行, 但这样处理不能超过 1ms:
: [* ~7 {0 `. N- P• First Access – 400 microseconds
" p  ^% H4 y4 b8 |. e• Subsequent Accesses – 50 microseconds each
, W7 K; [# v$ Z) h1 \• Total Burst Time – 1 millisecond
; Q+ L* U/ {( Z# B$ C当EC在收到 OSPM 发送的 Bust Disable Command 后, 则结束 Burst mode.
回复

使用道具 举报

 楼主| 发表于 2008-10-21 16:27:52 | 显示全部楼层
尽管还是看不大懂. 不过还是明白了一些.感谢感谢, david 大哥了
回复

使用道具 举报

发表于 2008-10-21 17:40:00 | 显示全部楼层
, 好吧! 取个例子好了:  C2 [3 w1 X" j. A8 y
, r4 ^; ~! G* J' [7 K& [3 f
如果OSPM 想一次写入 EC SPACE 0x20-0x3F共32Byte, 那OSPM将连续发送32次 Writ Command, EC 被触发了 32*3 = 96次中断,才能全部写完,0 K, F% B" U7 \- l4 P" b" ~
Write Command (3 Bytes)
' [* S0 }+ v8 z; f$ u: h4 `4 ?) pByte #1     (Command byte Header)      Interrupt on IBF=0' E- j! b! [9 ?+ w( R  c8 u: n* o
Byte #2     (Address byte to write)         Interrupt on IBF=0
  K9 \8 d! c! u% e3 ~Byte #3     (Data to read )                     Interrupt on IBF=0- M0 V9 L# I2 [' o& R" t
' P+ I/ ~0 i2 w0 U. F2 q( N
这种连续的中断,效率反而会非常地低,访问的时间会变得比较长,但如果在这种连续地传输过程中不使用中断,而是查询方式全速向EC写,那速度上肯定会远远快于EC不停地被IBF=0中断触发,burst mode就是在这样的情况下使用的./ y2 n3 I5 ?/ F/ Z- x% y: c4 x
当然,这是一个比较极端的情况了,可如果你设计为通过 EC Smubs Controller 的方式来访问其下的设备,如电池,还是会有机会出现一次访问多个的情况,比如读取一个DWORD,读入OEM STRING等等,这些都不能通过一次R/W Cmd就可以访问的.
回复

使用道具 举报

发表于 2009-1-14 12:59:09 | 显示全部楼层
非常感谢!7 b5 T$ n% {( c1 X4 R! G
受益非浅!
回复

使用道具 举报

发表于 2009-1-15 13:57:26 | 显示全部楼层

回复 4# 的帖子

你好,我看到ACPI  里有提到
  m! q; F' e) a% g' n6 m  g; z6 I$ mWhile in burst mode, the embedded controller follows these guidelines for OSPM driver:
- `' S' o  o; V, X& {             SCIs are generated as normal, including IBF=0 and OBF=1.- i% W* ]4 _8 F6 v% _
             Accesses should be responded to within 50 microseconds.
% x( M$ {* K) g( P3 H0 t8 X  它也在正常产生SCI 啊,也就是说HOST 发命令或数据或读数据还是会引起SCI 啊,并非查询方式(polled command processing)进行  ,这是怎么回事?$ t! @" l) ~4 S+ V9 a
请指教,谢谢
回复

使用道具 举报

发表于 2009-1-15 15:31:01 | 显示全部楼层

回复 2# 的帖子

你好,请问ACPI中:
+ q7 q3 g4 c. ?/ `          This implies that a system management handler uses commands that parallel the functionality of all the commands for ACPI including query, read, write, and any other implemented specific commands.4 y& U! }+ k7 @7 p- S/ j$ A5 G
  上边这句话可不可以这样理解:对于shared EC Interface ,SMI  handler 环境下,也可以使用 ACPI所定义的80-84 Command 吗?
6 X) A3 Y8 d8 ^* h      如果可以这样理解的话,是不是说在 SMI  handler环境 下也可以读,写 EC space了, 用的是不是 80,81,82,83,84command 这些命令?
4 h, p+ j: J' W, U4 A) ?, F 那么当在读或写时引起IBF=0,OBF=1,产生什么中断? 是 SCI  吗?   如果是,在这个环境下由谁来处理这个中断?
- u2 L2 _! y' B! K  h4 r2 @+ ]) z) {% D
     对于80,81 commad ACPI 里有提到: This command byte allows OSPM to read a byte in the address space of the embedded controller. This command byte is reserved for exclusive use by OSPM, and it indicates to the embedded controller to generate SCIs in response to related transactions (that is, IBF=0 or OBF=1 in the EC Status Register), rather than SMIs.2 ?5 e& v, L3 L0 i: K# S
         这句话是不是说80,81 commad是 OSPM环境 专用的吗?在IBF=0,OBF=1的时候产生SCI,而不是SMI,那么在上面的 SMI handler环境 下 ,怎么可以使用80(读),81(写) 命令?
  I' n4 F& }5 i6 A; q是不是每一个环境(OSPM 或 SMI handler)各有一套 读 写,查询 的 command sets啊?! Z6 o1 f6 j1 U( b
     谢谢~
7 _% ?0 E; V( G  H) {) ~& T8 w6 P  r7 R" x/ h
[ 本帖最后由 蓝色永恒 于 2009-1-15 15:43 编辑 ]
回复

使用道具 举报

发表于 2009-3-11 16:15:31 | 显示全部楼层

回复 7# 蓝色永恒 的帖子

it's decided by EC." G8 x2 y; T( V1 ^$ G) X+ F2 q+ e
if EC not judge the os is in OSPM or SMI handler, when it received the 80, 81 commands, it executed always.4 }' D3 F: B) j1 z
in SMI handler, EC executed 80, 81 commands as usual and generated a SCI.
* w+ q( s' x0 Y( E; l6 t& J, Wbut the bios not configure the SCI in SB, SCI lost. no other function.
回复

使用道具 举报

发表于 2009-4-16 15:58:44 | 显示全部楼层

回复 8# heden 的帖子

多谢!你的意思让我大致明白了,也就是说EC只管接收来自HOST的COMMAND,然后做对应的动作了,而不去区分是谁发的啦!
回复

使用道具 举报

发表于 2009-9-21 10:14:19 | 显示全部楼层
了解,谢谢
6 O: d; L7 i4 F( l
回复

使用道具 举报

发表于 2009-9-21 22:10:12 | 显示全部楼层

回复 4# david 的帖子

david 大侠好,小弟在理解0X80,0X81也没有搞懂,麻烦一起解析下,谢谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

Archiver|手机版|小黑屋|计匠网

GMT+8, 2024-5-20 07:32 , Processed in 0.017880 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表