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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
* l4 u5 H4 d: a: l% _2 i5 J( d* X: t9 I7 t+ ]1 w7 Z
IO index access   
* i) A/ F0 n7 Z. A. C. Q4 V! D& m7 aSoftware would use 2 way to access the APC register
8 ~! j+ K4 a+ W  {1 G4 u 5 y1 O) S* x6 j, |$ K
$ b6 X& @2 \0 e/ z
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
: O9 {0 W: S0 F1 xwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ) F6 W; i6 T5 U
the APC bank.
8 g8 |4 I6 `& H4 O5 w) A: a* V7 y- O - i9 @4 O5 _% B8 a
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data   p0 v* _/ z8 K* T6 S+ R% w+ C
port with 78h/79h to read/write data. 7 `: h$ C* j+ [. c* j

6 ^9 |+ F2 |9 t  z. P如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?% f: F1 X, T2 _: t
请用下面这段代码来试试+ ~. G: k6 M7 F, ~# }3 |% a% i% G8 r
    reg:BYTE9 D4 E% |& w5 U7 Y$ T% m
        mov ax,0b108h
5 \& o" C. F' D+ u& s" U        mov bx,10h6 ~0 q9 ~8 p3 F6 M- Q
        mov di,48h: e' t$ y; g& h/ w2 w
        int 1ah* y8 }( J) P4 K1 K, V
        mov reg,cl          ;get RTC Control Register9 r8 m: @& f( ^0 t3 i4 P6 f
* |: |! w! M2 \; l2 X$ V! g4 k
        mov cl,reg
" x3 [! _! K" P4 s        and cl,3fh
: ^1 c& d4 q9 S4 v) e        or cl,40h           ;set APCREG_EN% U4 P, U  W8 C8 l5 H4 k/ T
        mov ax,0b10bh- ?# n! |6 |# g9 }4 ^6 a/ Q* f' t
        mov bx,10h7 r, {6 O. A: W
        mov di,48h
1 I1 h6 e2 q( T        int 1ah
0 r* F4 l6 t3 r( t0 V# W$ w       //now can access the APC register ( k( _0 f# T* t7 `# w" `
  J( i; ]3 U( e$ I" X
        mov cl,reg
( t1 M$ \+ c. d; ?" }% f: o        mov ax,0b10bh
% C! x. `9 |3 r0 b        mov bx,10h
: Y7 `6 ^8 M9 V& w6 r0 `  l        mov di,48h$ g( I2 J$ c5 \5 j5 K
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
4 {# Y: p% C9 G, F. f9 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了9 C5 V. `4 I4 M" l& ~
0 B% g0 z  K& u) T: r) s
ps.看来还是要仔细的看datasheet
/ E5 d% ~& l$ g+ L" |  {; N; u
$ P' `& E* X. y8 z9 N, `[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-8-11 17:01 , Processed in 0.050237 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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