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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
% S2 |- N* H  P* f) {8 O" ]6 ?$ [$ f. `% S
IO index access   0 S- R+ r2 t! k! ^* p5 c( v
Software would use 2 way to access the APC register $ f4 J7 h8 k0 z
9 g$ ^7 W) A3 N5 H
# t' K4 k9 l' G6 {
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
9 N$ @. f( I8 Y3 ?0 P0 I+ twith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
; Z& O* ~6 U( ^the APC bank.
( g- S& H4 p7 X( N   J# v, F8 ?1 D" |9 \  q
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
$ [$ Z8 w! j$ C2 [3 _5 d: qport with 78h/79h to read/write data. 9 R" c& v. M" x$ ?

: K) s$ J: I. v/ E% t如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?: P+ }, ~) ^. E/ U
请用下面这段代码来试试9 W8 S6 h. z* Y' j% Y# K7 U1 w
    reg:BYTE+ n+ z7 B* M0 K  u% F
        mov ax,0b108h" u5 O5 `. ~1 c; q' B2 d; C
        mov bx,10h9 J% c- z. p' ^% @+ z
        mov di,48h# }" h7 X! U/ o# |
        int 1ah7 t( Y6 @8 w+ A7 `! Y
        mov reg,cl          ;get RTC Control Register( X) f% J1 Q9 X5 Q
( H0 ~$ X! r( ~# d3 f0 k; A
        mov cl,reg: \& ?" j+ a, X% J( C- ~) O/ t
        and cl,3fh! j: b2 S% _* z4 f( R; h
        or cl,40h           ;set APCREG_EN* E+ i4 o( v+ s$ T
        mov ax,0b10bh
: J7 e* A/ H9 f, y# V        mov bx,10h
# E8 i- ?5 X- F        mov di,48h
: P; G: `- G: Z. R        int 1ah
1 V5 x. v. Q; g- u7 e       //now can access the APC register
+ V% a) G$ u. n$ e0 R+ z * h) @8 M% X- m& [: I
        mov cl,reg+ L4 m! V( A- K0 p- k+ a: ~
        mov ax,0b10bh
# P* ]7 A2 g7 F- Z7 X7 _# @  H! r        mov bx,10h
  V* Q3 U. I/ J3 @        mov di,48h
, M+ c. `7 o  R4 s' Y9 B* x, `( c        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊( I; x" a8 X- o9 i& ^' |
(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了* Q0 h$ m- y7 j! `

( M, ]; L. j: A& S# @, `1 tps.看来还是要仔细的看datasheet/ p4 q* J' v8 {! U* \, f. u( Z
9 ^) j: @7 r1 ], T' B* h
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-7-22 00:32 , Processed in 0.112843 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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