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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?0 L0 b7 E6 s6 G
# A" ]/ G: l4 L# C1 N  L
IO index access   4 P. }' g) ^3 W: t2 u3 m
Software would use 2 way to access the APC register
# T, H; F" j+ C* h, }! D6 W; T . ^5 R/ f  M/ F, A4 S
) L5 {* B+ [2 V6 ]4 n0 T
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port 9 ~6 s: Q5 U& x/ F0 E* O; M. V
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable 1 @0 B( @: K2 f) x3 ^3 ?' c
the APC bank.
1 Y, k) a5 X6 f5 x! `8 h
2 E9 u9 a+ e' ]& S2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 9 o% I# \4 l9 I8 E8 _  \
port with 78h/79h to read/write data.
' Q& f$ ~! s# s; v7 H. c; j% `1 G% `* c. o2 {& m
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
* N* k- k$ j' a9 a3 o请用下面这段代码来试试
, U8 Q' n8 U, ?) w; D$ ]    reg:BYTE
1 x3 b: |0 Q2 T3 }0 ^        mov ax,0b108h
9 ?1 J1 [1 C. m5 ^; z" G        mov bx,10h; w+ t' b+ e6 `/ R, j- k- y) r0 D
        mov di,48h
" W# d- z# C8 j: P) i  M# P        int 1ah+ v9 F( E2 \/ ]: E" r
        mov reg,cl          ;get RTC Control Register
, t7 B* a4 a7 ~4 U 8 W! n* z/ z3 w) L+ ^  i
        mov cl,reg! ~, p6 K( i8 g' \) h' E
        and cl,3fh/ |+ p. T/ T$ s) g  z2 H
        or cl,40h           ;set APCREG_EN
& a# `8 y- J) V5 q4 A, F! t& q7 e# x        mov ax,0b10bh9 U# R/ `2 p. \  d- \
        mov bx,10h
% C: l2 n3 P4 k7 q; o/ @  E" {        mov di,48h: I& w& ]3 m) z$ E5 F
        int 1ah% I) W) r  ^# X+ R* o* e5 Z
       //now can access the APC register
1 J% N6 a$ f/ S
5 P9 t& y& R" A9 R        mov cl,reg+ z! f# a1 _1 l
        mov ax,0b10bh
. _  J2 B3 C3 i0 O. `0 h        mov bx,10h
6 _! ^# C8 @9 ^* G! m. x7 E" e        mov di,48h
  T( A- X% M+ m- U# N" z        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
$ M- Y5 x6 r% }' N! J# M3 o(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了' W: }% c8 M# Q

) F% L% m8 {- L. O# j, Z$ c  aps.看来还是要仔细的看datasheet
# B* l7 w' z1 z3 F% X7 i4 p! p/ [' F0 {5 I
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-6-4 16:19 , Processed in 0.045167 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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