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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
0 h( k& u$ ?; l' L  v9 ^, `& q+ N, W' F# l9 A8 l9 E) A! y
IO index access   " z# Y* \: F+ R5 S2 u: X% L5 h* v* t
Software would use 2 way to access the APC register 5 p" D4 @/ K, d% o: s
+ k2 q7 x, T) I6 t& h
% `1 @  M  {! I6 n, n6 j: G
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
/ s1 r  U( Y7 I3 Kwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable - T8 L7 O" Q7 w  n4 J& g7 l
the APC bank.
2 J2 F# g7 K$ F6 i* o! F( n7 J
4 d, L1 ^! I8 x1 {4 o2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
# Q( G& o* Z" U+ u5 q6 ^- W4 @0 hport with 78h/79h to read/write data. 4 V& c- J# p( K% O1 O8 S' }1 K
& X$ d0 N% x1 a% J* B$ P
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?4 n% V+ J! @0 U+ m
请用下面这段代码来试试
! T' e8 z/ S: N! }$ ]8 w0 U    reg:BYTE0 o* U* P* F( _" i" [
        mov ax,0b108h
6 ^, O  u' a4 Z        mov bx,10h
7 y$ X6 B8 ?0 p& R7 R        mov di,48h, D; {/ }2 e. G8 s( q! k- |
        int 1ah  f# O1 }* Z: i+ i, z# O6 B! K% `
        mov reg,cl          ;get RTC Control Register$ I0 B& U; ^* d. D- g: ~' G
' W' D' w5 ?* b' @% u; n& k
        mov cl,reg- \7 i2 h+ V' O1 u, k
        and cl,3fh+ g0 t: T6 A1 Z  T  \
        or cl,40h           ;set APCREG_EN3 |" [1 ]. x5 I& }% V! |' \% k
        mov ax,0b10bh
8 ?( v  t, k) I% i, l' c        mov bx,10h
) `/ |, k; n- Z8 m        mov di,48h
) k) R7 x2 d1 s% j# N) O# I        int 1ah- A: l' ]7 \+ c4 p
       //now can access the APC register ! @7 h/ k9 K0 J

* s. f# y+ h/ v( }% d6 N        mov cl,reg
1 X2 V% B0 j5 r! o4 r        mov ax,0b10bh6 a% q0 ~. V( P  f$ b- g  P5 _
        mov bx,10h  Q/ f. C" Z3 J( X
        mov di,48h
3 f$ {( ~; a. T6 \$ C+ ]9 h8 J        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊( g7 k+ v% Z7 o4 F
(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了3 f3 j5 h- w7 d$ B! P) b

. p; \2 U- @- r: {# n0 d4 Eps.看来还是要仔细的看datasheet
: S; [# S+ R( ]$ k) h8 }" [/ W( P& G2 N6 @0 O# P
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-20 05:46 , Processed in 0.038635 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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