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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?9 Y* {! F  H, u5 h- _) z2 L

& w7 W5 D$ i" s' }! [IO index access   9 f; q/ e) O' }+ P
Software would use 2 way to access the APC register / H0 W+ d: ]) @1 m/ W
* }0 G& E* K, B& G: l1 R6 M, q1 p
6 W) ]/ |, k( i6 }0 C. B' J
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port 8 W. l6 N& r3 }
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
& m, Q1 a/ a6 _" L& I( othe APC bank.
  P/ R: f: X- L! N$ R3 |7 R / M4 H4 q+ t% j- w
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
$ P, t* f$ v* ?: rport with 78h/79h to read/write data. 0 J5 V# X0 g4 g' v; d2 ^: U
3 p% d8 G, s. c# N' M
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?0 ]% ?5 _- b# j1 F# y  d2 F
请用下面这段代码来试试
# V) i; o1 @5 P( \    reg:BYTE
+ f' t0 M3 ^# t7 o5 a: c4 d" v5 b        mov ax,0b108h* C& T9 O0 N: O$ _. d& ?- F
        mov bx,10h& E3 g- T6 w* C, K
        mov di,48h+ P4 H+ o7 y3 i( D* g0 A
        int 1ah
+ K' j' a* l) i        mov reg,cl          ;get RTC Control Register
- P3 B: f/ ~) q" g- T! i
5 ?. S1 z% E! C$ H, Z- l. d. q        mov cl,reg  a9 p7 s% n5 Q
        and cl,3fh
1 y8 s8 z3 o& B6 |9 [. Y        or cl,40h           ;set APCREG_EN
3 P9 h! H% l+ r' Z# f, ?        mov ax,0b10bh
0 G0 L2 W9 S. V# q3 }+ b, a) c        mov bx,10h
( @3 J0 f: ]: S, W) k        mov di,48h
) p" s, v) d! h; Y* }        int 1ah& H2 S# g+ b" Z/ M7 x- W
       //now can access the APC register 4 E$ Q! }! [7 ?7 z0 q
8 @) J3 @/ g: j
        mov cl,reg) {% t$ }/ G3 C3 F; c
        mov ax,0b10bh
. a5 W* p  ~# j: e! J        mov bx,10h4 K( L" U, D+ @. _- k/ R0 s$ D
        mov di,48h& R6 q& o1 ~, {
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊% p: _9 X9 |/ G5 ~
(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了
% T* O3 ^7 t" J# C( c" p
0 {4 k3 c7 j& H% a) T) eps.看来还是要仔细的看datasheet
3 ~# |1 X# I! G* T8 j: Q7 b4 c2 \6 |
7 E1 g" Z: n. {# @) L! {[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-12 06:03 , Processed in 0.030200 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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