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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?$ [0 i0 N( }: v2 ~3 Y. M5 R
3 }/ d7 V. T4 L2 K' a- A
IO index access   
- `& E. N- _9 Q3 PSoftware would use 2 way to access the APC register
! t* d0 G( b0 o8 d
6 W: \- W' Z0 r) w# i$ i$ y' k 5 ~) \! W: H+ z7 h
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
4 P, @' Z) C' Q. k/ |1 ?with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
, I5 d( X: I) Y9 Bthe APC bank.
1 ]! o/ W, G2 g" J3 A3 {& f4 Y
( S- W, ~( j+ T) f. ~3 m2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 1 Q& E" F* H% N/ D
port with 78h/79h to read/write data.
8 W% T; G% A6 ^* ^
' r7 J# |, u  D9 S如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
5 c/ S1 J4 v# u- \! ^' K. f& E4 q请用下面这段代码来试试
/ z3 C. [& U! o7 [. @) E# L    reg:BYTE8 S( n# e' J9 Z* r- ~( x4 k& C% ?; |
        mov ax,0b108h4 K) H$ j: |, j* w" c7 V. ?1 a% B
        mov bx,10h9 g) E  L/ _* B2 m6 u
        mov di,48h/ X  P* j3 _7 ~: s5 D; E
        int 1ah
" d& {5 J0 X/ t. c* m9 l        mov reg,cl          ;get RTC Control Register
; l5 q# ^) L/ M' }, {
  s& n! M* B$ K. i        mov cl,reg4 o0 ?; p: t/ ~  H  c( @
        and cl,3fh: {- ~+ V4 I, u2 |" X
        or cl,40h           ;set APCREG_EN
. U7 R, i5 C* s        mov ax,0b10bh0 K0 e9 s7 ]% `( H
        mov bx,10h# m" F( u, l: `" t7 r8 K
        mov di,48h
4 m7 A4 h5 ]7 a! ?, c, a" F        int 1ah
. V  r. |/ U5 u% `+ G/ F       //now can access the APC register
2 Q% M0 d5 e8 U& b1 E2 l7 ^
' J1 {+ F& H* f( R4 m        mov cl,reg
7 z$ m+ b7 E9 b0 {5 c/ u5 W        mov ax,0b10bh
7 u/ L: h% u2 K  l5 j; S, Z        mov bx,10h4 b* A9 q( }# t- k
        mov di,48h
" a8 U3 Z) d3 f. Q: ]) w6 U        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
$ d$ A( B4 S2 X( M# h+ x1 y8 k: M(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了
% w% U$ h* v5 [  G1 J8 S
& |0 n# j3 r6 _! v1 g1 Fps.看来还是要仔细的看datasheet
/ J' O( B; C* _- X% i# C2 o9 m
* U! W! v, ^' N4 C  n[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-25 03:42 , Processed in 0.038883 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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