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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
% V" Y( ~1 l$ T; }
$ B7 _8 B- ~1 LIO index access   . ^* b' K3 ~& v1 _/ H9 B
Software would use 2 way to access the APC register " m0 Z2 {1 Q1 F. @# u" n0 X! [0 {
$ I; W- f) a( ]- ^

0 g/ K" x6 b+ Q( a  u+ {1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
& t$ m0 z4 V  ]with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable # S* w5 E+ ?% H0 j* l5 i& n4 y
the APC bank. $ e: O2 S4 P9 \, t. L

% n6 f( n1 s# Q2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data   \1 G. _& d+ z  K' B0 q2 C
port with 78h/79h to read/write data.   s  |5 m  I' ]6 x

9 N, U- Q  M! P, ~) j如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?1 ?$ q# I& d& P# Y6 ~
请用下面这段代码来试试
( d: \7 E$ o+ M3 w' a, f) E    reg:BYTE
  ~2 f# }7 `! @( s3 M( d        mov ax,0b108h
3 [0 \- a- ^  V, m4 q6 o        mov bx,10h
0 H) P, Q3 s: p" j- j        mov di,48h5 s# b2 Q& f9 m/ F; y
        int 1ah
4 ]3 n$ E$ J6 Q' e1 e        mov reg,cl          ;get RTC Control Register% h7 q( N( s7 @! l+ P  u/ y3 m9 J7 H

" |) y0 O" G! G( k        mov cl,reg
) s* b" [% {& p' S  `0 Z, I- f        and cl,3fh
8 d# e. u4 C+ {( b: a        or cl,40h           ;set APCREG_EN. w: v# A' l3 |0 W; }: `! T9 ~6 v
        mov ax,0b10bh
- }/ g# {; \# A- f8 o; u# G3 w5 V. y8 ?        mov bx,10h
+ s3 N! }2 ^. L3 P, o' I        mov di,48h
- C. T+ o" N3 Q( i1 P) v        int 1ah
6 ]- z: [( o, f8 q; F% Y3 k       //now can access the APC register
; G% X1 m2 W; |1 d, _ & o' ]2 c( ^4 p6 \8 ^9 F. I
        mov cl,reg/ }9 e; _8 f, L1 G! O
        mov ax,0b10bh
6 j* W, ?$ r* U" _' Q( R$ `( s        mov bx,10h
  q: c; c2 i! L        mov di,48h
/ @2 C. E2 F0 R- Y! V0 ~+ X        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊+ _) {3 p: E3 I+ J) _# U( D' X
(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 k. l# m& o" B$ ^
& {9 N1 [* |8 @9 r3 t' [# e8 Ops.看来还是要仔细的看datasheet
: M: q4 N3 K: J' k1 b, d0 M" \, P. F9 s
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-20 03:41 , Processed in 0.061736 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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