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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?1 F* \9 W, J; A: T$ L
/ C& j) M: ~  l" l# b3 U/ k
IO index access   ; C6 |* I3 L3 l+ G/ j
Software would use 2 way to access the APC register 2 F5 p/ x$ _5 P

. e$ q2 K! G) W! p. v) a
: k) w8 g) u! V/ ~6 e1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
0 g: E' S4 j, M" ]( h! s+ L1 jwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
0 f9 c$ x  j" B) d9 z0 o0 p& y1 ethe APC bank.
* Q0 w9 H, D% o- a8 p : A1 z: y7 e5 L4 _- P
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 8 R/ d& I! T& ]% ^+ S- g
port with 78h/79h to read/write data.
% S  v1 C: ^9 j9 X5 b/ f/ S1 ?- f# B  a. s
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
2 Y& u* F% H9 ]  U请用下面这段代码来试试
% _: G$ q3 r4 o. f) `/ v6 {+ c    reg:BYTE0 G; `$ L2 `1 V4 v7 y! Z
        mov ax,0b108h: H: ~: k5 C: r1 E% C7 f( j
        mov bx,10h
7 M' V( w& `% P% a; @8 {$ S        mov di,48h) {' A( N9 n9 b* Q7 K
        int 1ah
* c! Q: L6 U$ @- a        mov reg,cl          ;get RTC Control Register0 T1 |3 S0 i# L; k7 |; f% a% r+ y

, `' d* P9 L* ^' T        mov cl,reg
$ }8 U& d+ F, f1 b( q( s        and cl,3fh
% e; {  u' V0 }' D$ Z2 Z0 N5 [        or cl,40h           ;set APCREG_EN
8 `5 j: t; I6 x        mov ax,0b10bh
/ ~; S9 P& |: y  ]        mov bx,10h
) k; Y. M1 n9 f$ _; ^        mov di,48h. d4 z$ a+ `6 A0 L, n2 g4 Y8 ?
        int 1ah
$ j' w7 w, P, x8 m0 j- c       //now can access the APC register
/ R: B0 a8 O3 z7 L  Y5 U
+ B$ V  a% V3 p9 H) @        mov cl,reg
: p3 z4 \; e7 \$ E! \6 k        mov ax,0b10bh
" z; @/ y" n! K        mov bx,10h
/ B& c6 x% A* D        mov di,48h2 D5 S- r# ~; R7 ~7 M9 _* H/ y
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
- b/ M8 ^' M0 h(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了
) U  k; q- S4 b( ]+ |& ]. `/ }, m- D7 z- x2 P
ps.看来还是要仔细的看datasheet5 b. ]; i1 V& A: q5 b; n9 j# u# [

% j( |7 z; Y( R0 Y/ Q/ @) X: _[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-9-1 17:41 , Processed in 2.360409 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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