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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
, h) X3 \( g; X" k! G2 N
% [, E$ E- c& e) m, G: J0 sIO index access   ' I0 t) z" e- n' s
Software would use 2 way to access the APC register ' e* U. d' l. [" A4 P

! g5 A$ \2 S, {; N
  V- d/ c- w+ k7 t1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
# f8 P% N: o) h# ~with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
6 f$ W7 G0 @- {4 g: v' `the APC bank.
) c* w4 p" L8 M! p
4 W9 y( a& B5 N  X8 {. C* `2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
, x& }, G- Q) E( n% Nport with 78h/79h to read/write data.
1 r. p3 q% N3 t
2 a$ n. M: Q6 ]6 A' }: X如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?" r9 M( X* J7 @6 a4 H
请用下面这段代码来试试! g( ]; g! I( }5 S8 I
    reg:BYTE
* P$ y0 F' O* t2 G' ?: U* v9 j        mov ax,0b108h
( w$ [- G9 f0 _% L% Z        mov bx,10h
3 x+ T  n6 c! Z        mov di,48h
9 n* W9 a4 _: o& Q& B; d) b        int 1ah8 x& q# |& X' E* i4 c2 p7 m
        mov reg,cl          ;get RTC Control Register
& Z! N1 |7 ^6 m" U# `
0 p. D" U1 W/ c7 @        mov cl,reg
! `1 Q1 f. D! ]4 Z" a        and cl,3fh* f4 v& W' r3 r$ K4 g/ P( g
        or cl,40h           ;set APCREG_EN6 e2 `' _% m# e4 \0 f* S7 I+ Z0 Y
        mov ax,0b10bh
( ~1 Q1 e/ }& a# _) j0 I6 {+ O& o        mov bx,10h" R* Y  Z8 D) k
        mov di,48h
3 P3 M& o$ j: s" r        int 1ah6 v9 R9 v* b4 q, V4 T* L+ u
       //now can access the APC register . W8 R, D" E4 h/ b: `
  E9 S0 {# [. e! u
        mov cl,reg
: r4 q# \# \, T3 Q7 {9 S" t  y        mov ax,0b10bh
% r* g  s' D+ a+ O8 P        mov bx,10h
  ^. w  M. L) b. w- S! ~/ u+ }        mov di,48h; j' c' m/ `; ^6 g" d$ {" Y- U' ~
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊. O2 `- `) |# W  a
(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了5 l0 V) M4 M' |) r

1 z) T# g8 }* k1 Jps.看来还是要仔细的看datasheet
6 ~7 b% r/ d& |8 `! C! f- B# b0 i; s4 B- U$ p9 |  f  q3 I
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-2-1 12:07 , Processed in 0.057199 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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