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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
, d2 l3 T5 [7 T9 ^& L: M0 @1 E5 X6 P* d$ o- r$ S" D# ?8 E
IO index access   
1 H% i9 I$ L4 DSoftware would use 2 way to access the APC register
. t+ K4 \* L6 i" J  T& ` * @' e$ v: I- r+ |4 ?: x7 {& C

# e/ Q5 l  r6 E; n8 H6 T: R6 E1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
" |( K3 C1 a; T4 D2 h/ t, lwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable $ a1 r+ E3 `! Z" S3 N/ p
the APC bank.
: t1 w, M6 b9 x
& P6 f  b& Y! y' n4 M6 l1 I" k2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data $ ~* F4 I. ^4 Y9 y" V$ Z
port with 78h/79h to read/write data. # X2 @4 L/ q: D$ P# H4 M1 s
( b* T) g6 P, m, j. c
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
1 H& O( M9 x8 x8 v6 P, S7 m% y请用下面这段代码来试试3 G. Z* `3 ^. L, R, ?# m5 Z$ D
    reg:BYTE
  j2 m4 a- r$ ?2 L8 D        mov ax,0b108h8 K. I. r5 L0 ?3 J& ~% e3 b& U
        mov bx,10h
( K& q7 M5 y3 ~: S1 k! D& r        mov di,48h
6 W  j2 E* \8 s" y        int 1ah
3 s' U' m, ?6 D, A/ J        mov reg,cl          ;get RTC Control Register1 \/ ]2 _& j1 ?) R* k

0 Z) \5 i# O2 c9 F8 W( ?        mov cl,reg, Q  E; Y  H# W& T; E
        and cl,3fh
; P- A" i! C+ Y        or cl,40h           ;set APCREG_EN
) Y! O" a6 U/ G- B! @/ t1 q        mov ax,0b10bh' G8 q$ ~8 p3 y" ^3 s! T
        mov bx,10h
- T+ Z/ Y- t9 B        mov di,48h
4 `1 k! O0 W1 V9 V7 _& Z/ @6 }: E        int 1ah: h8 j( t! G1 _2 v1 v0 U+ N0 e1 P
       //now can access the APC register & g& I: U6 T% x2 i4 C! B0 h
% {5 j2 ]5 P1 J3 X- Y$ H% o
        mov cl,reg
& @! ~/ I4 F; A) s/ i        mov ax,0b10bh
2 Q/ U3 ^- A' ]* F! r3 t% d" L5 k6 `        mov bx,10h
) E' ~0 x5 P. Y( v( b        mov di,48h
% z" \8 t& o' }8 }/ r9 q$ E+ A        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊( v* Q( j! a8 j. p
(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了
. ]9 b5 H/ O* d7 t0 f& A! b8 Y1 k0 |- T5 }
ps.看来还是要仔细的看datasheet
! W" i' T" d9 m. x, h9 B' O- ^, W& l0 J' k% E
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-20 14:36 , Processed in 0.017765 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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