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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
# _7 W  ?/ b- ?+ S+ ~
9 F8 t( z7 E+ d0 g/ w8 s) lIO index access   % U4 O1 A. e& }) L# U
Software would use 2 way to access the APC register
+ Q! a5 [. X9 l* P, f" M 4 `5 d( p$ m. t, p
+ h1 i. T7 t, B. S
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port / x' L4 `+ B, P7 G
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 6 y# Y0 I) H  W; F
the APC bank.
9 m3 a9 b. Y& {7 M6 V
. z  E% I& |( i2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 2 T& Y8 [8 G( h- m0 ]& Z# u) q
port with 78h/79h to read/write data. - W' D; ]/ S7 G! m( c$ G3 L+ s

# R! m( F. J2 }; J9 N  ?  B如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
! F4 k' s3 w6 a* ^请用下面这段代码来试试
  Y# \% v! S/ j! f, W1 n0 t! Y    reg:BYTE" P- E8 c" [6 o3 f9 R
        mov ax,0b108h
. m/ Z! L' q4 ?" m$ j  k        mov bx,10h
, s) P! h+ `3 A6 Z" \$ }) L        mov di,48h
5 a* H* Y  T- `8 e& X$ \* y9 z+ G5 j0 k        int 1ah5 y3 v; [& e  T- f/ B% C6 q
        mov reg,cl          ;get RTC Control Register$ ~" q" ~6 _1 o( y+ p( x3 d: z

! P7 @0 Q. c% T0 J( v$ \  X        mov cl,reg
" I2 ]: H, w8 N$ ]$ Y! c        and cl,3fh5 H. V0 V$ L( @
        or cl,40h           ;set APCREG_EN
! G" x) O! x4 C1 M& t+ N7 U        mov ax,0b10bh" C, G; V3 G8 Y
        mov bx,10h
; p/ P% K( V' g1 d" e        mov di,48h
( w- F3 _, ]! Z% ?  b" a3 d4 v        int 1ah# I7 F0 L+ S$ V' _9 @
       //now can access the APC register
: _8 C$ I1 N$ ?! E( y* g, T: a6 m% Y , P/ u* m8 D2 A( Q! G
        mov cl,reg9 B/ e, |' R! R) ?2 k
        mov ax,0b10bh
# v2 V- t9 t. c        mov bx,10h0 n6 u% ^( j6 H' K6 I4 v
        mov di,48h( w" {  J; u7 L5 U
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊  G5 L8 T. D- S
(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了
$ o: v5 l# g- E5 F, |1 a
7 f% d8 g( t$ O& X, b  V/ Z0 Gps.看来还是要仔细的看datasheet8 @  `& h; d! \

! }  f5 K( ^/ @2 C+ U3 ?( Z% N( I[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-11-22 05:17 , Processed in 0.084974 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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