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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
2 E6 I# {, ~+ V% B: u1 B. e9 _; X' l0 u; v4 j) S* S2 m/ p
IO index access   
$ j; K& J; N- Z; d4 QSoftware would use 2 way to access the APC register
* X+ e) \9 R3 Y) c9 C1 {/ \
# E2 h" Y, s2 m- _- z ! e/ K2 I! n( Q2 ~
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port $ n  Z' G  \2 ~( t* D7 ]; q6 P$ J4 l
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
3 e, [& g5 p2 h3 ethe APC bank.
5 @: d+ f7 w- S! h! T+ _
9 [$ V: t% ~3 R/ x- h9 F6 G2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
4 Q2 E7 X3 g$ N7 ~. Hport with 78h/79h to read/write data.
* T# w' L% ?4 B' Q4 Q) R0 Z& z. o( M: T1 `9 Z; f- D% G
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?+ E: `( p3 h' V! h  g2 L+ m4 R
请用下面这段代码来试试6 b* c$ S8 _/ S9 U- v. f& w
    reg:BYTE6 f- a8 }+ q$ k/ T& ]7 m
        mov ax,0b108h, A' E' S9 X2 ?: ?" D, R% X* Y
        mov bx,10h
* w) j" K% W1 g$ X7 W0 f        mov di,48h
: E7 w1 f! P; y' e' k0 W- y9 f        int 1ah
+ R; l$ Y7 n2 n- X        mov reg,cl          ;get RTC Control Register
1 Z3 S7 C" [4 U- R' g0 R
: u7 R: l& t3 P9 ^5 X        mov cl,reg
  `9 v6 C  V, k( I9 o" v2 f        and cl,3fh+ i7 K, ]2 f) y' @; \4 w' l# g
        or cl,40h           ;set APCREG_EN
# K; F# Z: B4 ~3 a        mov ax,0b10bh: o; p( g! O8 I; s
        mov bx,10h, M7 `. X; V5 L0 p
        mov di,48h
! I$ \+ ~) j; }' P: n& h5 `        int 1ah* u7 y+ D0 s, P+ Q0 D7 K
       //now can access the APC register 2 L8 q4 C$ g' E# k9 M

' @& _' g: ~* y        mov cl,reg
1 U8 e; A/ u# `4 \# Z        mov ax,0b10bh
2 ^  Q# I( |: F( t$ Y( S3 t# p        mov bx,10h1 h' X4 ]( J+ ^" n+ z
        mov di,48h9 ?0 t: T; x7 B
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊/ J1 M: {0 w6 F% i+ 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了
7 l. m9 h- x& e" X% q& ~; }, R. Z$ t; O# B# l
ps.看来还是要仔细的看datasheet5 G3 d- H; O$ y, l. v& W6 h
( J# w# {( V5 y
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-4 18:27 , Processed in 0.118135 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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