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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
- p  C3 n0 q# F6 M& R8 |1 O
$ U" |  w+ \' e# `) I- BIO index access   7 e+ _' a. y2 N+ C. _
Software would use 2 way to access the APC register $ g$ `  W8 R, p4 Q
+ X' y" v0 ]0 S* a2 G

# r. r) l* @- l1 n: K3 T; B0 p  t1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port 7 Q7 {7 F& [- b. e- E
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
7 ^) \' g0 I7 h7 `5 gthe APC bank.
7 i: Q  \7 J& N& P8 V2 k
( p5 b" F5 y  Z8 ?0 Z+ o" Z2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
0 P( ]4 ]8 k4 `4 lport with 78h/79h to read/write data. - `  u3 F/ F& R

4 b- F# p$ m, J9 i$ f% F$ D如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?% k4 E" V* G6 r+ j0 A5 S1 S9 i
请用下面这段代码来试试- d/ w8 g: |- M
    reg:BYTE" m; i; ^" h. g+ j/ p, ?
        mov ax,0b108h
0 F( \6 @- w( E- O        mov bx,10h
/ ?2 `5 x/ |% I7 N  U        mov di,48h9 G9 g* G! S! p# P1 c
        int 1ah
9 {. o9 L" j5 Q" _" [. v# I        mov reg,cl          ;get RTC Control Register! p$ x0 K0 `# a% c( }

: t& Y) m- B* }        mov cl,reg# j; R  G, ^0 c7 N) i! ~9 ~
        and cl,3fh
5 g: o* m8 c. k8 M3 u6 ~  S        or cl,40h           ;set APCREG_EN
7 M+ \0 `3 O9 x' w% s, j7 M        mov ax,0b10bh3 Z# g( H0 o. }# u
        mov bx,10h) g1 a# u5 H+ s! F$ k% B9 `1 Y
        mov di,48h' x( d+ e# z& U- T+ }
        int 1ah
* o% y1 s" t- `       //now can access the APC register 9 e( g* r8 |! j% J5 A

1 N# U$ ~/ e' b% L- j        mov cl,reg* v$ `& t: i: u6 T/ T" v9 a
        mov ax,0b10bh
7 ~. Z# d; i3 G; _# J* i. ~0 ]        mov bx,10h
$ c" a0 Z4 }6 w" b! e        mov di,48h% n% l8 |3 I* O8 ^3 I- m- W
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
* t3 b2 ]( j7 S  r$ _(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 q% N5 T- Y7 g9 i' i& Q8 ~8 B/ B" ~1 F) Y+ ?8 @
ps.看来还是要仔细的看datasheet
; m( [/ x6 t. P8 \8 ?
0 j9 i2 t2 q& u2 f6 v- m[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-11-3 23:14 , Processed in 0.175158 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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