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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
; U0 r, I" c* ?, [
6 d% e3 Q7 n3 w& V. zIO index access   & J6 g. C; T4 N; w; `4 o
Software would use 2 way to access the APC register ! w; s- U. H1 Q1 ~

. x2 W/ D: C4 P2 p
7 L; B/ a& u( {% p1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
3 W* g+ F( j( [$ l8 iwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ; k4 J' u+ U5 X6 X, X$ M
the APC bank.
" l+ ^; d0 k1 L% c5 y. b* C
# X/ o# n6 n! @0 x% ]* c) B2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
' G9 u& ]& a, {( V" g2 f) p* qport with 78h/79h to read/write data.
7 z9 b6 K1 s& c: i) [! O8 ^9 j6 i! m0 U2 B2 p, [
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
" A; Q3 F9 l: y  L# B请用下面这段代码来试试
# @) U- @% o9 Y0 Q7 j+ w% D: z% ?9 D. b2 c    reg:BYTE
" }9 @/ o& ~& F        mov ax,0b108h* }# Z3 H: V" E6 [% {
        mov bx,10h5 L0 L  J- `8 k
        mov di,48h9 n) u% a" [7 U" i% H
        int 1ah
% C6 h2 K: v# s4 c; }        mov reg,cl          ;get RTC Control Register
2 i1 J0 ?' s4 z$ ^1 w * W0 o/ L, }2 ?: u- g1 u  C
        mov cl,reg
" |& X  ~; q+ |9 c+ y( m0 G0 b7 y        and cl,3fh
$ R2 B5 J2 ~' N        or cl,40h           ;set APCREG_EN
8 v3 D7 e/ M3 |' B- {        mov ax,0b10bh
5 f4 Z; @8 H" p# H4 t0 F        mov bx,10h% d8 y- ~9 V* }( V5 ~
        mov di,48h
9 O" a! u* L) U/ A2 d        int 1ah9 d! A5 A, i& Y" K
       //now can access the APC register 4 D: z, D4 e. A( l6 w3 y; T: l4 k
  |1 ]% D; O4 z* p( h$ D
        mov cl,reg
" Y/ `5 v7 ?: u( J4 N6 \7 Z& Y        mov ax,0b10bh# b2 p5 s. |" d  g) g
        mov bx,10h; k0 g7 Q; l1 v+ D4 A/ `
        mov di,48h
" V  J3 I% z; }* Q9 n8 Q        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊, I+ q$ ]8 \* a8 i2 i7 ~
(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 {& d" d" x3 {' v6 ^2 H( n# m+ I3 i5 G/ n. j
ps.看来还是要仔细的看datasheet
% t. Z0 F) _0 ]6 N, d' h$ n7 Y& M9 U9 o. U9 I9 z( \
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-18 22:42 , Processed in 0.417537 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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