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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?' h1 f) z( P( H

7 B% }+ j( P. E0 z8 J: jIO index access   
0 r" p0 E/ O& N9 \, b, c) a3 \Software would use 2 way to access the APC register
, H. |7 C/ k% U& L1 e * R" U6 ?( N. P% k5 M/ u' d  N

, \! F- s7 z" F6 i% j- \! `7 h$ l1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
; Z1 u) M4 f) u8 _# v$ N1 B. v! R$ pwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
- v# C* v% N3 w4 Sthe APC bank.
" H# X; H' R5 T$ D3 J* v
: n; @( N% a1 P2 w) U1 t2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data $ V6 W8 F$ J$ W2 T% N8 [0 x
port with 78h/79h to read/write data.
! x' H/ C: ^) }. \- c! _8 B8 @
! @. I/ m* u# s9 f# p% i如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
2 M9 I9 C# P  ~+ P, ^2 G- Q请用下面这段代码来试试
  w, y3 B2 z; `! d! c7 J" b    reg:BYTE! R6 N& A( J' `2 r7 K1 s2 A
        mov ax,0b108h
5 |5 k& K3 }6 p4 [7 |7 z        mov bx,10h
: g2 w$ j) O2 d  b; @) e1 ]5 T        mov di,48h
8 C+ Z3 j, ~, d( a! M+ w2 F        int 1ah
+ N: f$ @5 t: d1 @6 Q+ C4 t        mov reg,cl          ;get RTC Control Register
9 }2 m3 j6 h* C3 U% Z2 p/ G* n   P8 ^1 {9 \# l1 U) o& L
        mov cl,reg+ k( f7 r9 u- R$ B7 X; j$ B
        and cl,3fh
" O* V2 a7 n" D; T/ L" y6 G0 ]) R        or cl,40h           ;set APCREG_EN
6 K. W+ G! `' v$ }& ?        mov ax,0b10bh. s$ }: m. \8 N* ^0 Z2 f$ c
        mov bx,10h
# |6 h& d( @6 ~+ L        mov di,48h
% i; w6 N" C4 y/ \9 @9 L  E        int 1ah
! g. {. B6 \& n# w# R4 d9 |7 f; o! U       //now can access the APC register , T$ s2 i4 `. }/ ?5 K

8 @6 R1 i9 T9 i- c& ~" v/ X        mov cl,reg
$ ]- _0 W$ D  T5 |& }8 ?# ~        mov ax,0b10bh
' N. \/ {' ~8 q; T4 T# @/ y0 J: r        mov bx,10h
  T7 w! G  B$ e9 A        mov di,48h& E( z. L& L( r4 C7 ^' [
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊2 d7 Z) g% I9 G8 h1 l
(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 z. Z! z! L. V. q+ o
3 h/ I* G9 U# i5 P
ps.看来还是要仔细的看datasheet& v* Y! u1 T" K. ~4 G
/ q' [- q) |1 f0 F+ ]  Z% E" n
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-12 06:29 , Processed in 0.030119 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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