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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?) D- C3 w5 n% C( I2 }6 f* E% B

6 _4 _- V* D$ A! i* ]' I3 ~  ?. C0 ^IO index access   % S5 W4 I9 K+ L% z) y+ S
Software would use 2 way to access the APC register 3 M8 u: m, i0 L% W9 _1 ?

" L5 w( z; x7 l$ E2 l. W6 M ' r2 D6 ~8 R4 H8 z
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
3 @) ^! `/ S, N' r# uwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable # n- |) q- m2 _
the APC bank. / t" k# _& i+ G
% }" X' a/ }' q6 r; v% }
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 9 p) R+ J# G6 U7 E+ @
port with 78h/79h to read/write data.
5 b+ u0 k( g6 F2 q# a5 Y/ R
. z: j+ C* m5 w; ^+ G如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
( [0 Q: [* @) h$ Q- q9 j# w请用下面这段代码来试试
# ~' @, v9 Q  N( D4 m# `  s. D7 s    reg:BYTE8 R9 W$ y/ v  w; k4 P7 ?
        mov ax,0b108h) `: B, N$ {/ z: T/ \
        mov bx,10h
' W0 j1 R, x3 S2 r        mov di,48h% o' m. \2 |# R- Y* c/ |) U
        int 1ah$ B/ Y# n4 F1 _. `
        mov reg,cl          ;get RTC Control Register! U: U7 X* h( G3 O0 [2 d, S

4 S/ r: Q, y/ r        mov cl,reg
1 h# @8 b4 F( _) G/ S        and cl,3fh$ {! h' K0 H9 Z( u9 b4 @
        or cl,40h           ;set APCREG_EN" e  N' i( H& j* n
        mov ax,0b10bh
1 C4 ~. _9 k$ d1 J        mov bx,10h& Z. y- b; g" ]! A
        mov di,48h
$ n. l  A6 n6 g; o        int 1ah
. _9 I5 T, N8 A. _& E( s       //now can access the APC register
$ S4 j3 }1 T2 I+ D# B5 T) M
9 Y- W# h( F. I        mov cl,reg# L( U. Y: ^& h7 W  H- w
        mov ax,0b10bh
# R, A; x2 b3 o& f% x        mov bx,10h
3 s" z. `" p9 ~3 \% }+ A        mov di,48h$ d4 S6 c: c! I: {0 y1 n# M( P
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
! \: N; l2 D, ](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了
7 i0 ]+ |" C. k* e+ `$ r# o" P/ C: T
ps.看来还是要仔细的看datasheet
1 D0 Q9 Z; f$ W6 C5 s0 I  f
' c7 B. R6 x6 n3 n9 r3 C[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-10-12 08:10 , Processed in 0.050913 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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