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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?& v( h0 z+ H7 x7 X2 n+ I& O

( s; d: a  J" r( M! H" L6 K4 S: NIO index access   
! L( j8 G; g5 V5 T& Y% x$ X+ ?Software would use 2 way to access the APC register . Z) A3 h' c4 c* D, M/ e, \
' [7 W% Y3 J% s7 X; z( @

0 Q, }3 B7 Q7 \( n- e% s& t& `1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port 6 D$ J% l5 R: j; G7 I4 k
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
7 B2 Z& ]2 a) C' r6 j% i, o$ zthe APC bank.
7 L( |, E$ W, [3 P. t" }- p. o
& h4 y' n3 x3 F9 n# F2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 8 F% f2 P2 |+ u- t3 B8 B" E
port with 78h/79h to read/write data. + A9 ~. I0 f, E+ R! C) T
8 p: V; C: {) L
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?7 _, J* o4 Z' J+ A* Q2 h- s
请用下面这段代码来试试
1 F2 P/ u! f7 R. M1 m8 R    reg:BYTE; g$ ~- H  }; y8 n3 k1 G
        mov ax,0b108h
6 C8 q8 s* e# _) n        mov bx,10h
9 G2 x$ j* E. w2 Q- P' \2 C2 d) v. E        mov di,48h2 W9 _; Y5 _: {5 _  B* g/ W& A
        int 1ah3 l. H' v5 K+ o1 F% |& Q7 V; Z% Y" b$ f
        mov reg,cl          ;get RTC Control Register
# [% ]8 _+ C. T; B$ N : {6 E, p! ?  L3 A5 L0 [4 Z
        mov cl,reg
+ p, K: S: K! ^        and cl,3fh  ?4 ^+ s3 [0 \8 @) C5 D9 M2 V
        or cl,40h           ;set APCREG_EN
: R5 M7 B& P- x9 b% ^        mov ax,0b10bh: T9 U4 d' Z, F" n  a8 B/ b
        mov bx,10h/ m" Y3 ?/ \! @
        mov di,48h+ k' f# f2 q+ {; F
        int 1ah' A7 e, _& S! i- d  y
       //now can access the APC register
- J# f  i) S! g0 ~
& m, c; b3 r8 ?; Z1 D+ M        mov cl,reg
. T* O: Y5 u; V0 l4 D        mov ax,0b10bh
+ u" y% b/ s  O* t, q, O. d        mov bx,10h
3 i" \4 T& l! b        mov di,48h
/ @, }! n. e: E8 ?        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
% Q% R! {( ]/ [% _% u0 ^* p6 R) J9 J(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了
1 Y# }: v; z; y5 d' j+ y/ z& Y
/ ?2 \% l2 N9 ups.看来还是要仔细的看datasheet; g7 n2 P( u* j" ~0 k, a

+ }! O4 B% x5 K1 A+ N2 |8 h' f. C[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-11-1 20:32 , Processed in 0.461936 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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