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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
% c8 x. D8 L8 l" o/ [5 |: P
) p' c/ D" M/ d: W* o3 ?IO index access     C! K9 G6 X0 T0 _
Software would use 2 way to access the APC register . o. r  J  b8 i- H/ ~
% K  X( F2 ]1 J
0 k7 X. q" g7 |+ x, c
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
3 B, C' u! J8 a5 ]' I8 L( C* s" mwith 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable % d+ o" W+ w! f4 ?! X$ g$ r
the APC bank. $ K& \% t* d& d0 x3 S

# L0 p) q- d" H+ E% C2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
( C5 h, X9 I  \+ v( Nport with 78h/79h to read/write data.
0 [% R) A/ g3 n3 z7 l$ \  D( a$ E" @( S7 ?9 [! m$ I
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
- g* T9 k( b) c请用下面这段代码来试试
* ~* w8 \" @1 F; c    reg:BYTE
" U9 K2 y/ r0 H- ]) ~; Q! B- `# k        mov ax,0b108h
& b1 v: m" C# B1 _6 E! p$ i) G        mov bx,10h4 e" v, p& C8 q  M" x
        mov di,48h$ R9 Z" n8 k$ a$ A( a+ M
        int 1ah
) a# `8 P* X: u* I        mov reg,cl          ;get RTC Control Register- j' z. B2 P! G0 n3 c% s9 S$ ~) m3 i
$ v( S" [) X' j5 o/ W6 {
        mov cl,reg
1 x- N4 F% \+ j3 [* |        and cl,3fh
" T7 u$ ~5 [2 F4 J3 `; B& ]5 {( s        or cl,40h           ;set APCREG_EN! `' E! m! |; G7 f- `5 v7 `
        mov ax,0b10bh
/ N, b  U2 e8 N% o6 P        mov bx,10h
- d, S$ `# K8 [        mov di,48h3 T3 K' }4 ]& a" D/ [% P% j
        int 1ah$ o, W, P5 d4 k# \' ]3 z
       //now can access the APC register " o; P: |! d: T8 H
9 Q7 u5 O& u, I9 W* }! H
        mov cl,reg
2 _$ C' m6 c( ?& d1 f) F/ M" F        mov ax,0b10bh
4 r# I& P/ K8 S0 h5 ?; t( ?        mov bx,10h
& b# t2 @4 y" @# f! A        mov di,48h7 V9 T, }1 V" j' [- E
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊# w% D. ^+ P$ o, Z& K) V
(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了) D- U( v6 V! J; d9 f
7 @. O9 V7 L. V7 ^. B
ps.看来还是要仔细的看datasheet
+ G% S$ q( l+ P' _4 X8 C, @4 b# {3 T! |: z2 _# j  R5 X+ U  m( F
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-7-21 22:12 , Processed in 0.079820 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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