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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?) o! t' r4 E+ K. W, P7 S
' G- Z" B) Z( F  R; z  s5 H
IO index access   
7 b3 `$ `3 ^. i$ ISoftware would use 2 way to access the APC register
0 ^$ \# P. a  N( v - ~6 P6 u0 ?" X5 ]+ _! Z
  E/ t$ p* x, ]' P9 l* n
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port 3 t( M% W5 C0 v) J9 i4 V
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable + a. l' l; P" B
the APC bank.
9 s+ a7 F- K  F: n: h
( \. e3 H8 b: z0 f" _2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
* j2 l/ m9 M5 \# r4 M$ M, nport with 78h/79h to read/write data. 4 P- L0 W: Q7 W" ]; d5 ?1 \- W* T
. y; ?) i. ^+ _" r+ L5 j2 k3 l
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?( \) g% L0 Y' ?
请用下面这段代码来试试4 r% e9 u! B  [9 y1 a! c
    reg:BYTE
7 [3 r8 {# S5 d- X        mov ax,0b108h/ w* k* k1 ^( S( ?
        mov bx,10h
& c( `. f0 R3 ?- {' c$ w        mov di,48h, B; f4 v" r# k, Z6 y5 ?
        int 1ah( N5 w) H, J4 _7 p  T3 Z  w7 K7 @
        mov reg,cl          ;get RTC Control Register, ~/ ^5 ]. H7 r; Y- ]+ P/ U

- ?- O6 d% E! L# [8 m        mov cl,reg
5 Y% i) E* t9 Z        and cl,3fh
2 i' U) [, }! z5 p+ l( \7 ~9 l        or cl,40h           ;set APCREG_EN6 v# P: z8 g! n- C3 O  ~
        mov ax,0b10bh
; l# [8 Z% W8 ^8 k6 W1 d        mov bx,10h
8 Z8 l/ _" {' ?' z        mov di,48h
9 c9 M) Z( K& j* d& V6 m( X        int 1ah
8 W( p2 j4 s7 V6 h1 U5 P# J       //now can access the APC register % n, W+ _9 R/ `5 @( b; `. X

9 |5 H) V. G( E  U+ G6 a        mov cl,reg
" h& D' C- b) Q, J        mov ax,0b10bh
8 @3 A) g2 [2 c. N. [& {6 u7 T- P; }        mov bx,10h* W+ @3 r( j3 A) t( i( a7 l
        mov di,48h$ E1 B$ v+ S3 h9 Y
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊
6 x) @6 l* P# A$ J1 W1 ]3 x(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了2 ~3 G( c: U$ u( P% w$ ^7 y
; ^( J( s+ j0 n& p( B5 [9 `
ps.看来还是要仔细的看datasheet
6 c4 @* a' j0 E$ @% e' N$ [7 \( Q
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-14 21:51 , Processed in 0.022929 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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