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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?8 [) s0 J0 ?3 j$ f6 @" }4 L
& b7 Q4 v7 U! U: ], T$ j, u
IO index access   * c, ~6 m6 y' h9 ~0 c. v) c
Software would use 2 way to access the APC register   I8 \4 f# y7 n6 m# b

7 w! \- \7 k" M& J! }6 O
( O5 n9 a' G' x! }& u! u  W1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port * p4 _: b+ L9 v- A$ Q; j$ a
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ' i; n, M; R9 M% x
the APC bank. - }) h5 ?! c! V/ \# Y) N
. u' j6 t* g3 e' j
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data ; |  m, b, O$ p3 Q$ n5 k) w
port with 78h/79h to read/write data. 5 x5 Y( C- a" X
. [% M- b- P6 p! y
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
: l' b; Y+ E/ ?; U; f: t请用下面这段代码来试试+ v+ w7 x; N; R" q! c/ L0 r" S
    reg:BYTE' R3 D5 _7 D* w' ?2 f: i
        mov ax,0b108h2 D! @1 N  H/ ]0 Q+ ^! ^# \
        mov bx,10h" M+ _5 H; a. f& x) r: K7 ]
        mov di,48h
& H  f$ b  t: H. U        int 1ah
( l9 x# u, }# ?6 G' X        mov reg,cl          ;get RTC Control Register
1 g4 s4 m& \5 X) q$ Y 6 E5 u7 a8 U' }
        mov cl,reg9 ^( }3 {8 R1 K, H7 m
        and cl,3fh" x- J$ ?4 d3 K; _9 x/ Z
        or cl,40h           ;set APCREG_EN
5 G/ a2 K4 ^6 S9 v5 Z        mov ax,0b10bh' T7 {9 S( z, v4 s
        mov bx,10h
$ Q3 l8 j& X8 g        mov di,48h
. E6 d# h9 U$ c; T- B: b        int 1ah
( n/ S' s/ v5 W9 Y       //now can access the APC register
2 L+ h* u7 z5 ]' N- D . b) n1 n3 {4 }) c0 Y
        mov cl,reg% d+ Y& r; X. p( e6 \
        mov ax,0b10bh
, X+ V& `) Z) J* c- ~        mov bx,10h
" \% M* h, p% G: x6 h        mov di,48h0 K0 T7 W" n: P& B
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
/ P% v. p. ?6 V; ~% Q$ D6 I8 Z+ \" ^(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了
0 z4 V, d! k, S4 n' i7 m; B
4 {' L3 |( ^: n7 [& gps.看来还是要仔细的看datasheet0 Q; L8 q1 m0 \: G; c" t2 n
; A/ }# a5 g& Y+ X7 \
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-5-31 21:06 , Processed in 0.069049 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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