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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
7 H  `# ~) x# @# d0 N0 h6 a5 n! k7 N  C. ~# \
IO index access   
' x4 V- Y) y* cSoftware would use 2 way to access the APC register
, H+ s$ |0 n+ D) u; B- M+ D - j' ^) d7 D; i3 T

" ^3 M, {& }! y, A  |* h1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
7 |# L& U, B; g& f2 f) |/ Owith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 5 K  r0 {( n: s- k/ f! x( D* j
the APC bank.
$ Q$ M. z3 }, N* S   U% T5 H, I. P, ]  M
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data " J; e+ q0 A0 K7 {
port with 78h/79h to read/write data. ; [! c. q" V; Z/ b' G& x0 d* e, D
1 o1 J" Y1 q, L% c7 V
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
, l/ c% \' `  j" Q9 R请用下面这段代码来试试' V" f1 f  H* L  I1 [/ y3 K
    reg:BYTE
: G2 H7 i8 ]" M2 B! C9 Q1 w2 D        mov ax,0b108h
- \' l. P" x; d6 D/ c5 t        mov bx,10h2 m/ A5 t3 t  e! m0 l
        mov di,48h
( e2 h# {; S8 j" L- Z1 P        int 1ah- m% p/ z9 i! Q3 @5 i% r% K
        mov reg,cl          ;get RTC Control Register
$ U# r# F! H% w5 Y' f# }4 s, d  ~- Q   L. m1 S9 h5 q% Z1 z
        mov cl,reg
- s7 F- Y5 P% j; D        and cl,3fh) f4 @8 `) L3 G/ W5 A: `" k) s
        or cl,40h           ;set APCREG_EN
6 b! @7 X- W: c6 A1 W! J/ L% _8 f        mov ax,0b10bh
8 S' k8 k6 C8 m1 U. j        mov bx,10h
+ A, S( ^& ?! h! R( R* [! v        mov di,48h$ t* {& ~/ _* m& B0 T1 D
        int 1ah3 O" u+ @0 x  c
       //now can access the APC register
  q- t4 ^" d2 ]/ z 8 r2 k6 S# m! i6 Y( S4 l6 V+ d
        mov cl,reg
5 F6 n' T8 J+ G- x# t0 ?  {        mov ax,0b10bh
+ S! x& d" e7 W# f# E; G        mov bx,10h4 p  m- Y  N: Z& D  H( u, l2 u" U
        mov di,48h
5 P6 ?4 N* W. J/ _/ d3 U- y        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊+ v# `4 m3 ~" t5 X) n1 _3 j
(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了3 K. v* r5 P8 h# c$ G" w+ N
5 P# g: j, G6 L! [6 j# P8 O  ~
ps.看来还是要仔细的看datasheet
( H* ?! [& E: n5 P5 G% c  a: b/ d3 J) o3 s
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-3-5 15:57 , Processed in 0.383645 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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