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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?2 ~, u3 b7 `2 I, b/ {; }

1 }: n4 v, n" b) ~3 Z  W6 ?+ FIO index access   ! u+ ]* k* k4 Z9 B
Software would use 2 way to access the APC register + `3 ~; J( T: |- Y/ v% Y

  z; Z; a) s6 T) N" N1 D( a
/ B4 p% m/ ~6 @: t5 B  d( w, T1 U1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
+ w9 L$ N/ o3 |: cwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ' }& \- B0 a* Q# }: X" p! w5 R* J" `
the APC bank.
) A  L' T  P$ K ( x& x- Q: w  F. q3 G
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data - f0 W, `$ ^! s; X2 P) \
port with 78h/79h to read/write data.
4 m  K  |/ s7 I9 k! A; J, F1 D' E) N( w/ H8 n: F9 ]( J7 ^
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
1 E; d5 m( @6 f4 m请用下面这段代码来试试# T, s6 O6 g; m! H& C: |6 M
    reg:BYTE, M+ `% v* L7 q2 @  h" I, @  m; a
        mov ax,0b108h- M+ g( l  j7 g- X2 _
        mov bx,10h
! Q7 u% g0 W3 q7 r! t# p        mov di,48h
4 K! j4 g6 t$ O  K        int 1ah
1 E& n7 ]! O6 f9 u* D% M( N2 O$ \# U        mov reg,cl          ;get RTC Control Register
9 i' \1 n4 z( r4 s* b5 p, Z5 S & Y8 X. x' r5 O6 Q& [
        mov cl,reg
1 [: `9 `) j# k0 S  \. R: w        and cl,3fh! p1 y# n3 p5 r  r8 ]8 C
        or cl,40h           ;set APCREG_EN4 P/ o4 F" Y0 h* f: Y0 j
        mov ax,0b10bh4 o6 ]7 S& ~' u# N/ E3 z
        mov bx,10h
& k! b, t4 J6 t6 _, ?. S        mov di,48h
' ^+ O4 F" ?' p' t' P( M: ~        int 1ah
+ Q- @; A0 _% s2 R       //now can access the APC register ' y: O, w* I1 b, O8 n) v

: U3 B1 s. d! ]: r' ~        mov cl,reg5 a3 M' }$ n- W! N
        mov ax,0b10bh6 X$ I: c/ B+ m* M
        mov bx,10h
. g: \: c4 W  o        mov di,48h
' P; Y. ~) {7 _  J        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊0 q' B: B4 r& w
(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了
- {, Q* K* X! J9 L4 p5 i. I) ?( c/ P2 f' c: j0 j
ps.看来还是要仔细的看datasheet
5 ^2 }2 o; n/ h1 j9 n7 |
8 F% e' d% \* ?3 C) o. M[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-3-5 00:17 , Processed in 0.025074 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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