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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?& C6 G" r( o6 L5 p
1 x3 |. W, H$ w, p6 ^3 P: z
IO index access   9 t2 g. z5 W7 d8 f+ R
Software would use 2 way to access the APC register
3 {8 t& u1 Z' m9 R1 { : ~8 U  s2 M4 H3 k$ @
/ Z  s( ~# B% ~
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
- g2 |! W: {- Q8 a* i# ]with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
9 v1 O6 r8 G' g; q# ]$ Qthe APC bank.
/ C" K3 o# n7 P# u' q4 Q7 M1 G * f0 I( x$ e7 G- W
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
, w# E% A, [+ i4 E) kport with 78h/79h to read/write data.
, B& s) d1 f3 s/ j' ?  ~0 H
' @# _/ i6 [# P0 q+ s3 |/ w% t8 y2 O如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
4 g; ?% D) {" E. `* Q请用下面这段代码来试试
! n& `% G$ f5 d; S) e    reg:BYTE) G: T" T) G: X$ k3 D' ~
        mov ax,0b108h
5 a2 u$ a- f$ t        mov bx,10h; C- L* E% \/ p
        mov di,48h
! x; e+ K  U+ w- m9 v7 `# L        int 1ah
  ]/ m+ E( M5 |. `        mov reg,cl          ;get RTC Control Register/ X7 i/ {6 K8 ~2 Z9 ~' |6 C
* \2 y% {4 B# |2 U* b
        mov cl,reg
: h9 k" h) s) \        and cl,3fh
% M7 _! u  }5 J5 u: g        or cl,40h           ;set APCREG_EN! z, M3 M, Q1 b' `7 ?& Y5 M
        mov ax,0b10bh
! n$ f: i9 `* J+ `" x4 z. P        mov bx,10h( r0 g0 m% `% E( I  T+ G/ U
        mov di,48h
1 F+ b1 N. W- G* o& W+ h        int 1ah
0 d# {5 c  h% T, q' N# B) Y       //now can access the APC register & A+ J  I3 O# j; T# u1 F7 Q/ @
" {* W( }. s2 h
        mov cl,reg" H  Q4 \/ z( @' U$ F3 g4 \
        mov ax,0b10bh
; S) o8 _! J5 S  V( h9 C0 N        mov bx,10h
, M( t5 y) _% I9 s) s        mov di,48h4 x; G7 F' n" ?$ t# Q& e
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊: D$ d: J) u9 d0 @9 U5 p7 f7 n5 u
(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了
2 P7 v0 O2 F( |& l! J6 U1 |- l1 g
ps.看来还是要仔细的看datasheet
9 T- e# Y' h4 P( {4 N! R8 a9 ^0 [2 U8 K% R
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-6-29 04:13 , Processed in 1.518960 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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