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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
0 V, z+ `8 b' K
& d  @. ~% v5 pIO index access   # \2 C1 w% E( |8 U( ^- B
Software would use 2 way to access the APC register " m, M& {3 |4 [& x
" D2 B8 W+ q+ C1 F

; \" a! W1 Z, G5 _/ k1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port : |* ~) {; ^' O# ?7 P- `/ D) W0 U
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
6 n3 h+ C4 W. Rthe APC bank. ' ~' r8 T9 {1 i( j( P# A/ d

9 C6 i( m) w) T0 T2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data , t# y# R8 `9 A; j5 E
port with 78h/79h to read/write data. 9 A8 R: b3 p( ]7 t4 @! y
% N4 f* I6 s$ |: K( S9 v# W
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
& N: ^) X0 f1 k) e" y% S请用下面这段代码来试试
% D8 e" H$ X) ~0 N. R% d+ w$ I    reg:BYTE4 c( P1 |, e2 w7 M0 y
        mov ax,0b108h
# ]. ^7 r9 m- }8 F2 t        mov bx,10h+ i% ^- D0 A/ c; [5 U; Q
        mov di,48h9 w, l. C5 l! n( f% d+ }* V
        int 1ah
9 M: g$ d6 r. w1 d# s* ]; k        mov reg,cl          ;get RTC Control Register3 O! `, T6 F! t7 `0 ^; ^: G

2 e/ v5 i3 X5 h6 ~  y        mov cl,reg: Y$ _/ D" Q9 b  A$ {
        and cl,3fh
/ d4 G0 j3 F# z        or cl,40h           ;set APCREG_EN
2 t4 a2 \0 N  u$ \* C) B( L        mov ax,0b10bh
6 ~2 p/ o5 b, K3 \- ~0 d        mov bx,10h
- Y- }- f% K/ x' s6 P7 N        mov di,48h% q% o* v. C. V% h
        int 1ah2 P, c1 ]4 M% |
       //now can access the APC register . }! \, P5 Z0 s+ }

; c  u% U- u" X+ r; k. J5 ~; R        mov cl,reg$ z. T' t" ^' N$ f9 `2 m
        mov ax,0b10bh  I$ {  h9 W" A; a0 u! t5 j& z
        mov bx,10h
* z0 ^2 L: W& }. E  W        mov di,48h* v2 e+ q. ]* s% S4 D$ }
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
2 |, C& k/ c' _& j! A. f(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了
& l: i7 j0 ?( Z+ F, B  ]% X, g+ x
ps.看来还是要仔细的看datasheet7 R. D0 t" l/ a, N+ j

. `: W1 q; j( l- }# r[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-2-1 13:37 , Processed in 0.387999 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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