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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
/ E9 j  H9 X0 M8 r: j" C6 z" X# o) T# x6 N7 y" s& L
IO index access   
5 L" w! y' O- \$ G# pSoftware would use 2 way to access the APC register
- u! E9 H, `. a4 a ! J7 r- ^) }- m0 C
7 _! d3 w( c" M0 g+ a. f7 J, @
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
4 _% ]/ I- h( ~  Q$ vwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 9 X- w! @, C1 P- d4 F
the APC bank. . M  |, q' n0 e0 L$ u$ ^
4 _3 q# Q1 t& x8 p% t( M8 D0 {5 s
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
6 a" `' z- G! k- A: ^: Oport with 78h/79h to read/write data.
% ^$ @  B* l% ~) E; f2 E* p5 |  O: r  s3 v4 @" P
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?. [+ o* N( k8 l: J6 c0 ?+ T9 f
请用下面这段代码来试试
  A) u" m, J! a" ~- [, _- o" z9 h    reg:BYTE
: r6 F8 g5 G2 b/ ~( C: b        mov ax,0b108h, V& ?1 K/ J4 g3 X3 e
        mov bx,10h
( J0 K# V" W! y* Y) K0 m" [" m        mov di,48h
, ?2 Q! U; ^, W7 c7 ~        int 1ah0 h( d/ e+ R9 W; U  g  h6 g
        mov reg,cl          ;get RTC Control Register
# A1 S$ z9 f' W2 Q# a0 t " W/ Z5 O' V0 f, q: w9 ]4 n, p7 Q
        mov cl,reg
* g3 g8 t1 Y6 d- g        and cl,3fh* Q9 @8 d! H' Y7 a' M
        or cl,40h           ;set APCREG_EN
, Y- t/ \! ?6 f; c" m0 d7 F% I        mov ax,0b10bh7 c5 u# t' W& m+ |( X3 F3 X; b* k( I
        mov bx,10h8 I2 b% C5 N* r4 \* b
        mov di,48h
; B& d- Z$ \& s  {        int 1ah0 H0 \9 g1 f2 u
       //now can access the APC register
  Q2 d1 j5 i, T4 `8 X
3 }: t" f( s$ t$ v0 ~        mov cl,reg0 T7 L" f8 ]4 s' Y% A6 X9 m4 R
        mov ax,0b10bh
- \) @/ r/ ~) X3 x+ Z& \        mov bx,10h
4 J" j3 R- y$ i- Y) @        mov di,48h
. g' d: f6 T9 p& l- ~' l        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
% e. t" l/ t' l. [8 R! q" x4 d(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了  h8 k5 h" V& a

' y, |; y4 |0 B: C* L7 x& b6 Zps.看来还是要仔细的看datasheet
: d& P1 t' u8 l
% s+ o+ y5 S4 d[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-6-8 08:15 , Processed in 0.041481 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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