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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?/ m) H6 q. l: q$ o3 o
- W# s6 s7 N) A7 L
IO index access   
1 Y/ _, K3 g4 r  m, eSoftware would use 2 way to access the APC register
7 U: x7 s; J& K' s$ s
9 X7 E! ~* }% s# q2 ~2 y
8 T( e, c( T- n" d' y1 s1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
# t7 t# X- V0 L+ ^6 ]with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ) L" ]( s9 V% j
the APC bank.
% x* ]& U4 w, h( A; f
0 s" ~; a5 y5 y2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
8 g' e9 t' e! d8 Zport with 78h/79h to read/write data.
" a7 K. |% _* A$ u1 }
; P. r5 E  q$ i+ X, q1 e! d* g% Y如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?' O0 U+ }6 X2 D# K
请用下面这段代码来试试0 k; M* h) J4 \' w" ?) L9 T
    reg:BYTE% t3 U5 T( B0 e
        mov ax,0b108h
% w8 x- L% w7 q6 E        mov bx,10h
! c) @& \) ^  C& q        mov di,48h
5 Z8 ]- l  K6 s1 |; `        int 1ah
6 n! s+ _" q( d# R3 F5 P        mov reg,cl          ;get RTC Control Register
! s+ H7 T+ w- q& M! h& [) d
$ I8 _2 V7 f  m/ J0 P        mov cl,reg
+ J6 T. t- A) ~) J        and cl,3fh
& r" J: s- j7 q3 N* L        or cl,40h           ;set APCREG_EN
9 ]% h3 }5 x4 q        mov ax,0b10bh
6 {8 o) G% {2 ]. ^# @1 Z: k        mov bx,10h5 ^+ E: M  B& C% L$ A! I/ O' d! x4 L
        mov di,48h& Q+ S$ n0 X* K) G/ a
        int 1ah3 U9 Y$ i7 O! J- v" I( ~  B, G) x
       //now can access the APC register
$ ]( x* i  {6 q% I - E) Z( F- r0 r1 V3 r# O# _
        mov cl,reg
8 ?2 d! `; ~; f3 R1 W( e        mov ax,0b10bh
6 o8 k/ ]! l( z  X9 e. }8 W& }8 P        mov bx,10h3 Y6 Y% R: x& N' M0 h
        mov di,48h) }, F" `2 t0 ~
        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊: f& J9 N, |/ p$ ]. G
(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了
6 o7 n5 f; x7 i/ u6 k1 F. ]! R# Z1 T, B1 ?
ps.看来还是要仔细的看datasheet
4 |3 x7 P0 g9 a  x! B
# b$ [5 V" e- K4 i0 {[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-17 15:30 , Processed in 0.017801 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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