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

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

[复制链接]
发表于 2008-7-21 11:31:40 | 显示全部楼层 |阅读模式
sis 968 datasheet ,page468  说了2种存取APC reg的方法,但是其中的SB reg.48h不知道是指哪个寄存器?
3 D' Z3 p* Q5 {  r! Z; i8 a# c0 |
IO index access   
' w5 o4 F/ T: w% }- M: N' g( [2 xSoftware would use 2 way to access the APC register % w/ _) U% J2 [; F+ F' `
/ ?9 J& w) u& o

0 G; \9 ?5 |+ a5 O1 q1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port
& V  d* {& L& W* }" v. ?with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable
7 N5 F* `7 b6 b+ q6 cthe APC bank. 0 q) C- X2 d* V" j4 O' K2 T9 b

  U- |# g4 @6 h8 z/ q: T2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data 3 x% k3 o. U/ [. w
port with 78h/79h to read/write data. 1 \/ w7 w% O2 H8 |) W. u) u
% Q9 m1 p# n. u6 F4 D! z9 [
如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
, A6 x2 N5 C% Z! u2 ^2 p请用下面这段代码来试试- T7 R. m2 j% ~
    reg:BYTE
: [% s9 ?9 ~: h6 U7 A  C0 ]0 o        mov ax,0b108h& j- X/ r* \- v/ ^7 s, a
        mov bx,10h
4 b: R9 B4 ^& ^        mov di,48h3 E+ G7 X+ ^2 m: f( ~7 z& s% \
        int 1ah8 e$ M0 A1 H, q. N) @
        mov reg,cl          ;get RTC Control Register
$ c+ q: g1 X: L. Q & u+ M- }4 g' j# K# b% ?8 N' F
        mov cl,reg
) o' s+ l" L# i, n5 i: ^8 j3 h- I" |        and cl,3fh9 ]/ k2 J' D& J9 s( y
        or cl,40h           ;set APCREG_EN
" |) {6 F# c6 D# E8 {! P4 c        mov ax,0b10bh( x# a6 R+ J$ Z
        mov bx,10h
6 E7 @$ d: v6 \" ^' V4 p+ B/ y        mov di,48h
' r/ ]5 J4 W7 S; o$ I  n        int 1ah
0 t1 ^7 P2 {) E1 y/ T+ M% }, B7 x       //now can access the APC register $ m% w2 B$ [6 R& n, b2 r4 p
, D' v9 W6 w7 F: Y) l% m
        mov cl,reg
7 k& l. Z' C9 s& V- r1 A        mov ax,0b10bh
. ~- F) W# t7 l1 x' |        mov bx,10h: f* `' c' y4 u% V
        mov di,48h
  l' p% _/ J+ P6 @        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊) L/ E0 O- ]1 K/ t# w, Y/ 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了! q+ I7 r' H; Q2 m4 t
' P  M* Q/ \- D' G. c- H( d8 \. ?
ps.看来还是要仔细的看datasheet  a; T+ a& S5 f/ q, O
2 `6 C& K: f5 Z, u, p: S) l
[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-3-15 06:46 , Processed in 5.311448 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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