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

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

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

7 O2 U4 u$ S2 `* |, tIO index access   1 U0 g* H" m0 Q/ n
Software would use 2 way to access the APC register
$ s5 Q+ E! m5 d5 _5 O, v
$ g% W* R2 b' n7 D. C: M ; n) g" M8 t. f; f3 d3 X  i
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port : V! C! D: L% L
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 8 g  I. l9 S, d! n9 K
the APC bank.
  l0 q& \0 T$ ]- Z 9 M1 m5 X3 E0 p* D& J2 f
2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data ' G3 T8 u8 H( w* b
port with 78h/79h to read/write data.   e0 C% ~! U/ @0 n5 Y
* k# Y: e' r& S+ U/ N8 s
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
1 x6 m! }. J* e* h请用下面这段代码来试试+ L* N0 W0 c" a( z5 @' ^  Q$ O
    reg:BYTE5 {3 k& s/ m) S+ m" [- `! `  k4 y
        mov ax,0b108h3 E8 C( E4 U* P  C6 o9 `3 t0 Z# M
        mov bx,10h+ D2 z% V% K* D2 \
        mov di,48h
1 c) T  g1 p+ D: }$ D: @        int 1ah0 o+ n$ }* W, b7 I; u; l
        mov reg,cl          ;get RTC Control Register
- M4 A) Y4 K, E2 E) \& T
& c8 S9 `' h6 v! R" M        mov cl,reg: I- a( h, G: L$ x( ^& j
        and cl,3fh
7 L* T: D3 ~5 P# V' i* @$ A: {        or cl,40h           ;set APCREG_EN
" M+ a' z3 Q8 l, u        mov ax,0b10bh% k7 U/ I/ V. M; @
        mov bx,10h3 q0 ^1 ~# `+ @6 `
        mov di,48h' O) f3 u+ h1 q. ]
        int 1ah
$ q1 }& G) v# d( w, h       //now can access the APC register & E, g* T. ~: s8 b

( N: Y7 E) r+ r5 c& ?6 K- t+ j        mov cl,reg
$ K& p5 P' |& M2 G2 r' T        mov ax,0b10bh4 C7 J* c1 {- C- U3 ]- `
        mov bx,10h( q( U. u8 D2 c9 I( W5 Q# V; a
        mov di,48h
* P9 H+ c; C4 U; e        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
+ C7 p) j" y# 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了  f: p" i8 i  o. ?! K. J
; C7 [/ H8 p' N5 O0 p
ps.看来还是要仔细的看datasheet
, A9 G' N: h, X6 p/ H
& j6 h5 @4 c+ v- Q0 T' Y' H6 n/ t[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-29 05:08 , Processed in 0.033638 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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