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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
4 {$ M5 W+ Z3 ~! t
( R, }+ {: W; ]' k$ M+ }/ xIO index access   
2 O3 N3 k7 v6 \8 f9 tSoftware would use 2 way to access the APC register
' g. Q. a! i/ j/ i) `' @; } # e" m8 _( r  T) T+ r

6 j6 q. C& x; E3 {+ d1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port / m9 N2 x  \3 C) X5 x$ `# \
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable . h. H. c+ P. v7 w
the APC bank.
& ~/ m' S1 o/ b: o
# g- ], B( s# ^4 @9 o2 I2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 3 d+ K, E2 z1 A/ }9 _- F
port with 78h/79h to read/write data.
$ A' n& \3 S" ?, Z$ l. j9 I; S) h- w
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?, u) x2 H5 n$ k- r( @
请用下面这段代码来试试* V% x" Q4 m0 ]/ k. F$ N
    reg:BYTE! M) W! q% Y8 P' k) r6 K/ D
        mov ax,0b108h
% E. k1 h( c5 l/ r: m0 r# L        mov bx,10h) V7 D/ z. [0 {- J
        mov di,48h
  o, Q$ M+ D6 t6 H7 I        int 1ah
5 ?8 o8 t: A; O        mov reg,cl          ;get RTC Control Register
  E1 i, T7 Y! l% H1 n$ {, ?" T0 A9 {
/ `1 \) w7 s5 X        mov cl,reg
4 a2 A; E5 H% p; v        and cl,3fh8 n/ Y: o1 y% H$ ?8 J
        or cl,40h           ;set APCREG_EN; w; C5 z- u% R
        mov ax,0b10bh
+ x* P5 f/ K% g! M% ~6 y- `3 X        mov bx,10h4 ]" k) [7 B* b0 ~
        mov di,48h
  g6 y% E% P) u$ y, O8 t        int 1ah
  V; n/ {& T$ q$ D       //now can access the APC register
2 E& H( L" w2 O ! H5 T: B& M9 |
        mov cl,reg
' Y+ J2 V6 T4 P        mov ax,0b10bh
& x# ?9 n7 ?: d# W9 l        mov bx,10h
! f' Y  v+ u7 A  B  j) _        mov di,48h& x4 O2 P3 m6 F, e  N/ G5 t5 L
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
1 g: Z$ S5 o& d8 o4 }4 c(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了8 ~8 F6 U% N% a* I& y: g
. M( }0 S" c  l, A
ps.看来还是要仔细的看datasheet
; X) z0 Z  t" D" Y9 [
8 v: t/ J/ u' @, i[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-6-4 19:22 , Processed in 0.078797 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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