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

关于SIS 968中APC REG的读写问题

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?* X; W! d+ L: N# T) s( s7 S" o3 _

2 D* X1 P. |' X5 T1 h) eIO index access   
# u& j' I) T  M+ a+ }Software would use 2 way to access the APC register 3 p* t  @# {& V2 A

0 |! x9 u; b* @4 d: N+ _ 5 n4 e# @- {" i7 ?
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
+ c% e# K3 Z. j/ n4 C1 H; n+ T& U" rwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ; Q0 i# J1 G0 F0 ?9 }
the APC bank.
& W" F4 `4 ~- _0 _ $ P. a+ S* I0 Y% ]8 z
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
& ~0 B3 s) `  }$ _9 [( mport with 78h/79h to read/write data. , M- @9 W% K6 u2 x) V

, u, d4 [) o' e; {0 W' \6 i+ |. l+ E如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?: V0 z2 T3 L1 n
请用下面这段代码来试试
8 x. t) V3 @! F* e0 J1 _- g" s- m, L    reg:BYTE2 ]8 Q7 l/ n, J" G
        mov ax,0b108h6 }8 j) S% J3 F- E0 y
        mov bx,10h2 T) [9 D/ E: C; N% L
        mov di,48h
& f. M( X$ ]$ `3 V) _$ d7 l4 w        int 1ah
+ U) n( c8 b6 ^/ ?, v% w        mov reg,cl          ;get RTC Control Register
$ e- X! j* u1 _, [; H6 C& {" C , k/ _9 r9 g1 v0 }# Q
        mov cl,reg, {5 |, z% U: i3 C$ A
        and cl,3fh
( t2 z' d2 }( ~0 l# D        or cl,40h           ;set APCREG_EN
! @* q$ E+ e" E- {        mov ax,0b10bh2 c/ s6 a7 _' Q9 ]+ U3 Z
        mov bx,10h
4 z# x% ]0 }- A! I  Y. R8 J- P3 }        mov di,48h# o+ j) }+ A' V5 q- ]
        int 1ah
) H6 U6 D1 G3 _6 e  b       //now can access the APC register
8 A! S3 t( }/ w, p* c
! T7 e/ I% H2 X9 G; Q: K        mov cl,reg  @1 ^+ Y# v! [$ _* t0 o  w. A
        mov ax,0b10bh& Y" R( ^9 z# T% m3 {
        mov bx,10h' w; S. j" z& S
        mov di,48h, \1 u* V9 W5 M4 L1 q
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
; |4 h- e9 Z, D' c) E5 l(1L <<31) + (0L << 16) + (2 << 11) + ( 0 << 8) + (0x48 & 0xfc)
回复

使用道具 举报

 楼主| 发表于 2008-7-21 16:11:58 | 显示全部楼层
问题已找到,原因是bios默认ACPI base registers在I/O SPACE(在角落里有这个设定),而我在MEMORY SPACE 中读的,所以只要改一下就OK了
* \; k& \5 _6 Z( A- E5 k7 ~! N0 l1 h
ps.看来还是要仔细的看datasheet3 G0 v2 N: w" n$ |5 g

) ?/ q! r; O: U. q' O' p  L( L' V[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-19 05:57 , Processed in 0.021745 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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