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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?; I0 Y7 N! V; `; V% Q0 N
1 @9 A: Y0 E6 ~- t& {4 h
IO index access   
, Q1 G6 e8 s/ q# x0 l0 A/ JSoftware would use 2 way to access the APC register 2 k+ }8 m7 N7 f

! K4 i: o/ D" b  H2 ?7 z/ O + z! H1 z0 O1 }& Z- L8 E4 }7 u' o
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
2 v+ p2 J" y* i* _4 Z3 Z5 i! q' vwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
* t' R' `4 K& I- }$ p- athe APC bank.
- `3 b* `  i1 [7 b8 X( B6 m % Q  g+ a' E0 U( Q3 o& c4 @
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data ( b0 i, z5 P" t- A8 s+ L
port with 78h/79h to read/write data. 9 B# g; `/ Z! y7 Z

( W$ J/ t+ n6 d% F如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
, |3 l8 L" z( V6 W  u4 g请用下面这段代码来试试
' D" g4 V5 c  u$ d/ W$ {( S    reg:BYTE
2 m+ v* i2 l" W) P( `        mov ax,0b108h
, U! k1 e) {! P" M        mov bx,10h
6 v7 b6 W+ J8 F' e  {        mov di,48h
$ b6 p! F3 ~) J# L        int 1ah
* @) X  w" f7 u, [( T7 {        mov reg,cl          ;get RTC Control Register
7 k% d0 X! v9 h3 W# z6 [! ^ - B* ^5 a' g5 c* s$ ~9 Z  k  m# m
        mov cl,reg
5 S8 q2 |: j2 B6 w7 R- N  }        and cl,3fh
' n! c/ I0 W8 T) M! U+ |& L        or cl,40h           ;set APCREG_EN
& U2 O: z' q, T$ D& V        mov ax,0b10bh) ^+ n9 F: ~4 E
        mov bx,10h! A6 `& {# s2 Z7 t1 W
        mov di,48h* t. K: R) }: M1 U
        int 1ah8 v  u5 W7 F7 C
       //now can access the APC register
8 K# _- }5 L' f: {2 F. a & j- J, o. S0 U, B/ l; ~% v# o6 S
        mov cl,reg* d" I+ T+ ^8 s1 C( L
        mov ax,0b10bh( [/ @' A; f1 J6 f0 d$ ?6 b: G
        mov bx,10h
+ i5 [7 a4 ~. a1 d9 c2 D5 |, k        mov di,48h
5 f7 E* }* i, _1 F  _( v        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
% n" l6 S) h* Y- o(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了" c: Z8 m- w( I( c$ c5 k- e) ]' I) d
; o; ?3 U% `! ?
ps.看来还是要仔细的看datasheet& W7 Z1 W9 q' H. o& V
6 E' O. k2 l4 r1 @$ U
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 09:14 , Processed in 0.112539 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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