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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
1 L4 p+ H) x& }3 s+ S* D2 w" M4 E0 d* s, D( a9 ]  }
IO index access   
+ \8 }  s4 k. Q$ \- k, d( U- CSoftware would use 2 way to access the APC register
: ?2 x  B  Z3 \, q" r/ x6 u
* a) _" F) O& w9 e! q, [
+ A. v$ W& y3 E; o1 O- ^  z1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
+ X' T& _! L# y$ [% i7 _9 ~with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 6 c4 @+ h( u) ^0 v% K, t9 ^7 ]' ~
the APC bank.
8 u5 c) X" _3 c) ~7 |$ r& F) h; q
" d3 p9 n5 y1 [2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data * j2 z; p# R$ l7 v9 u# ?; A7 m
port with 78h/79h to read/write data. ; b: ?1 j! J' A) r" r1 K
+ r" q9 U, ~9 N% U" r
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?$ W( Y1 r% t2 m6 t
请用下面这段代码来试试
$ X- d3 H" x0 Z" g# o    reg:BYTE
* ^2 }& ?) w" O        mov ax,0b108h
$ K+ r! Q% u$ [        mov bx,10h
9 S4 M2 k  o9 o        mov di,48h
* \' O" r4 r( t4 N* }0 C        int 1ah
! F! q' Q- |  `3 n+ S9 f        mov reg,cl          ;get RTC Control Register
" ?4 X( c, Q* }6 c: p! r $ k1 p$ X( q3 ]' ?' N
        mov cl,reg
7 m  M2 Q' I6 A$ w4 N        and cl,3fh; N5 [! B) a! O- F" }+ U/ Z
        or cl,40h           ;set APCREG_EN% i5 n, T4 ~( B9 }3 r: w0 @
        mov ax,0b10bh2 H; U/ }! @# C; [$ I, N
        mov bx,10h
/ n) P; ?: q; \, l; I$ Y        mov di,48h! z2 g4 O  d. M/ s1 u/ @
        int 1ah: I) [/ y  R& y0 C: w" Z' A
       //now can access the APC register 0 p% s$ Z: T) }5 N: E' X) p  q

/ @7 }' l5 @. `. |9 ]* j        mov cl,reg8 P1 w: f' x6 b9 h7 }% {
        mov ax,0b10bh: ~7 V' ~* h- a6 h+ \8 w# [4 y- L
        mov bx,10h5 P5 }* a7 ~3 L3 Q9 q
        mov di,48h0 T, i1 H7 f2 ^2 g; L0 {0 _; K
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
. q  u: h& C2 G- U  ]/ q  ](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了
9 N" S8 y; n- g* V6 S% L: }) B5 M! k. u+ d
ps.看来还是要仔细的看datasheet$ k. N* p% e$ a) P0 l  I  U. f9 M: V

  \: a& {4 b9 D3 {4 K' y[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-9-21 21:56 , Processed in 0.700500 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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