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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?" R8 {2 ?6 r* l1 `8 ]
+ E: m- a+ Y/ B7 p2 F
IO index access   0 h, J  s" ?! N) {! |: s! ]
Software would use 2 way to access the APC register ; `7 Y) v% b: T  Q0 q" Y

8 r& d* c) C8 N. t " g6 e" O& I" A3 j- R& \/ p7 T9 `
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port # k" c2 }) H: |% C1 t
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
# u( Z4 ^" {8 ]& Ythe APC bank. # [2 v9 F$ S, Z# h

$ R. m! z4 l2 z' S( S) c5 y2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
7 m- @+ {! f+ l9 J# p6 ^- Iport with 78h/79h to read/write data.
' E8 V! ~/ f4 c- g. Q5 c/ F
& z) B2 L3 G9 i2 H' E, i7 l如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?5 M! u2 o$ R/ m8 z7 o4 i7 ?& L
请用下面这段代码来试试
1 D4 y2 b/ P% }: V+ k& q$ }$ P! o    reg:BYTE
* r. \& G, i1 m        mov ax,0b108h
/ o2 S+ c" K$ u/ i: u        mov bx,10h
7 L8 K  X5 r( |& N9 ?        mov di,48h+ M! e( |8 j9 V; @" B+ j) U: l
        int 1ah
4 m4 L% S- z; O* c' H7 g        mov reg,cl          ;get RTC Control Register6 N( u4 B9 R1 N: G  n8 w0 h, f

; h& }/ v( b. i6 _+ A5 P        mov cl,reg
; P1 z! X. `: i8 U9 }        and cl,3fh' q1 q' x, I: q7 [4 U  n
        or cl,40h           ;set APCREG_EN3 Q/ i- p$ x# p6 N
        mov ax,0b10bh% h* ^* y3 O3 \9 ]; x( N5 t
        mov bx,10h% t% ]6 {% j' t$ L) ]/ g
        mov di,48h0 A9 d2 W; v; {; x( D. a
        int 1ah
3 i: _5 m) E0 t2 S2 U1 E8 [       //now can access the APC register
, ?: W( _- y/ L/ R  j& _ $ z% V! \' Z+ D" H( n
        mov cl,reg& I3 V- b+ O6 O+ @# J
        mov ax,0b10bh
: _5 l: I* M, G- A( L/ L        mov bx,10h
* Y$ R1 o4 m: M# }  L& M        mov di,48h3 }  I, z. a  N+ ?" F
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
' e( M3 |$ l: 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了1 z' M, d7 s. M& n/ f4 z5 T8 F

0 d; x+ q# H" ^' T6 P( f0 O. Q( yps.看来还是要仔细的看datasheet
5 @' V1 F" N! s7 v4 G
: \! w! O7 m) P[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-18 22:46 , Processed in 0.056089 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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