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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
1 b. b' f3 b4 }) A$ D6 t) ~& y5 N0 V* |# Z
IO index access   
4 c' T  L' l0 O8 H) B+ xSoftware would use 2 way to access the APC register . H0 y$ \7 M7 ?2 O4 R2 G* k
0 q& A9 |# M1 ~4 k6 Q! m3 U! s* }  r

% J* Y) n2 [% E! q% s, `1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
. F% [7 M4 z& r8 Pwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ( v$ J% |% S$ o" H
the APC bank. # `8 ?; ]  S" O
: E8 T2 R: q5 K/ q  |' Y+ H$ K
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
! `4 s) `5 u- q, b  Lport with 78h/79h to read/write data. 7 d/ x' N8 s- E( \6 d" j3 r9 u

7 O1 B3 ]" O5 F( P$ M如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?/ @/ O' ?7 O6 i' p- ^
请用下面这段代码来试试
2 O5 x- T( m1 Q: f% A    reg:BYTE+ o: U0 Z( q" ~' B  |, f  g
        mov ax,0b108h
; ?  n* `+ W0 k# W4 D9 w" d+ T        mov bx,10h
+ h- w* d9 S* q6 g) H3 J5 [# v; n: Z        mov di,48h1 W' W- P: e# k" C! d
        int 1ah
3 \0 U5 p* Q0 s# Y8 O$ n, ]        mov reg,cl          ;get RTC Control Register
& n9 o' {4 r) U$ H; j5 O
" K& P5 T5 ^$ d        mov cl,reg9 S. x" n$ W2 C7 n
        and cl,3fh
) O! d# H' M' R: B$ z$ Z1 K8 _5 [        or cl,40h           ;set APCREG_EN
% {) w8 t# y* p; @        mov ax,0b10bh
5 g/ _' i+ l) r0 x        mov bx,10h
& o8 p- `! O; n( S# K# m1 u1 O        mov di,48h6 U+ W/ f. j, {2 h8 }4 S
        int 1ah
# I) F7 w# L8 Y7 I0 H8 ]6 f       //now can access the APC register 1 a! p2 G& {/ H* O

7 J" p+ N- i5 x6 Z' v( |1 o        mov cl,reg  q  E  y: D9 i" K7 ^
        mov ax,0b10bh
  r. T, [* O4 F# x7 B5 y; J        mov bx,10h
! }! r$ J+ A1 k4 w( W; Z7 }) N! n- o        mov di,48h
/ r1 U8 H: e6 X        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
# Z7 B. k' y, S* j9 Y: \7 Q& P' X7 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了
2 `0 l! t1 _: }, Y# H5 s* n  K0 `3 B" ~& H
ps.看来还是要仔细的看datasheet
% ]5 A% F$ f+ A6 X8 R+ u) g0 g* V9 ]% X9 w
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 08:34 , Processed in 0.101462 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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