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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?$ y* h5 F& X( t8 v

  r# }5 a9 _6 E/ y7 N* |9 oIO index access   
6 o, |  X7 E+ O$ g9 ]% S! uSoftware would use 2 way to access the APC register 7 F. v; M4 E# T! X1 l( m9 \: V

1 A2 s0 [# @+ N! F# p( m4 [ ' o5 ?6 L2 \% o. `* v" X" p- l% e2 f3 ?
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port ( x' F* }$ F- k$ ]' R
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
; O! T) P1 U8 ]2 G+ f/ H- dthe APC bank.
6 g8 a- e- Z, z7 j: n& H2 G * n( A# ]6 ^. D; B# e. L
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 5 ^: ^0 I4 B! M0 w: J+ R  f$ u
port with 78h/79h to read/write data. ( {* q- p! c. \5 r1 M/ }
5 h: D: P; y2 e+ e; W& @2 u, y
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
1 D9 [  q) T) c( s请用下面这段代码来试试! f$ e% b- }1 f, o$ c
    reg:BYTE2 r) E+ W' K. s/ }6 E
        mov ax,0b108h
2 T! v: O8 Q! f5 |- c& r$ L6 H; Q        mov bx,10h
1 M6 S. R) M+ s+ e        mov di,48h
$ B3 {; G+ q/ q6 _5 N) G; Z        int 1ah  A- l& Y. O  |. G7 d- s% ~; y
        mov reg,cl          ;get RTC Control Register3 G' J3 N3 w4 t% F+ F* s4 o

: y. L7 ^5 i# Y9 V: u/ U% Z        mov cl,reg
6 @2 Q* B4 Q1 {) H5 a* l3 ]        and cl,3fh
5 [" x! c; M4 g" W& d0 k3 {$ `        or cl,40h           ;set APCREG_EN
  z' n, X! U* a0 u0 r7 G5 C        mov ax,0b10bh
. \  c: o) R, S        mov bx,10h
5 c) Y) J. t' b: @$ r: ]3 _        mov di,48h
( S' V+ A' G% _4 T        int 1ah
, Q+ u/ H4 d: E3 c' N6 H       //now can access the APC register
& k; T' D9 R, U" Z* d- ~) R 2 L% U) v0 X( A- x
        mov cl,reg% ~/ X" Y$ f# M1 r
        mov ax,0b10bh
( Y* @: T! `+ \        mov bx,10h
* V3 D! Z+ }/ ~        mov di,48h
& u' L/ ]2 i% t7 m        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
$ X; m5 U- z5 Y2 F3 w- A$ ~( q( 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了) c) n- j1 b2 U; O5 A& p2 n( h- j

% `. _% i7 A+ J- Zps.看来还是要仔细的看datasheet; ~9 i" F, G* _) t8 `" k: F6 j

& j$ I2 l' k0 k) z% t8 V& H[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-3-5 17:41 , Processed in 0.105646 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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