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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?1 G8 ?2 x2 k4 }9 K4 m

7 |; w( o3 C* J+ {( Z, U" `/ V2 pIO index access   
6 s  S2 O# Z- W+ _! i( [; @Software would use 2 way to access the APC register ' r% G  q0 b8 s1 ^  @$ E
, L3 V# J' t! T) o+ t

% L9 M9 `9 L. o& u; V1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port 4 u7 L. J+ F+ r$ m+ f2 x* q3 X
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 6 Z3 i+ ?  [" |; y, D2 G
the APC bank.
' C9 Z3 c% `+ B: e2 G 1 S7 k: p5 S! K* i2 i; w8 \
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data % v0 Z* d2 ~$ ~7 O
port with 78h/79h to read/write data.
% w: |+ N7 l& r4 k
% _' o. T  x3 i6 i3 g8 C  ~$ h如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
  Q: C/ T  j9 W, ~* p- b请用下面这段代码来试试& k8 K- o3 @% N$ Z! b2 b( |/ y7 B
    reg:BYTE
- _; O3 ]6 U" N2 Q        mov ax,0b108h
0 g. E, R  v# f" p) H! a        mov bx,10h3 ?  ?+ m0 w5 K/ S' x8 d
        mov di,48h- R: v, `# ]7 L2 K! E3 z2 C5 m
        int 1ah5 i  I1 [: c/ X! n& Q, s
        mov reg,cl          ;get RTC Control Register
8 a6 w4 ^+ k6 f& m7 f 9 a' B- N, I9 w9 I( I
        mov cl,reg
) t2 p6 a# o3 e        and cl,3fh; l1 Q) S" T$ U+ O, m% p( T) [6 x
        or cl,40h           ;set APCREG_EN7 {# f  D9 q4 o: z
        mov ax,0b10bh
* c- y3 p$ A- z4 ~3 ]% _        mov bx,10h
# X6 B, x' K# k  J        mov di,48h$ Q0 k5 R9 r* Q7 n. t
        int 1ah
: c- u5 `( y9 T+ a# R( J       //now can access the APC register % e7 K# E. _/ m. P) C  A5 U- L
( s9 j! r9 E) t5 p! _# V' R
        mov cl,reg
) P  D. w7 b1 i  D. D, d* m) w        mov ax,0b10bh4 j$ G3 x) B; x
        mov bx,10h
% U. ?; i4 E+ |- g% W        mov di,48h
6 |% b0 d+ k' Y        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
" U4 o6 q8 m* e- O5 j4 P(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了
/ I1 S# T3 C: d# ]9 _- K3 x" _' h5 O& V: L$ J$ f/ v; x
ps.看来还是要仔细的看datasheet
% ]2 E3 G) ~* `& B1 D8 `! z! V* a' f3 q, A& f3 u8 N5 b, b
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-9-19 21:00 , Processed in 0.052183 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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