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

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

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

1 ]0 T0 z& _; BIO index access   3 J! J( g1 E7 j
Software would use 2 way to access the APC register . \& k8 W3 u% h, a
0 c& z2 [* C7 t
5 X7 L* i9 Z- V  X
1.  Software would set SB reg. 48h bit 6 to 1 to enable the APC bank. Use index/data port   x# U4 G5 j) o
with 70h/71h to read/write data. After access, reset the SB reg. 48h bit 6 to 0 to disable ' R6 L6 ^% z/ {3 R5 a* ~7 c# I8 D) l
the APC bank. " ^  _+ @7 s9 @, N

$ d3 h6 Q) b; c2.  Software would set SB reg. 48h bit 1 to 0 to enable the new re-index. Use index/data
: Z, b1 L1 T; B; t* [port with 78h/79h to read/write data. " i$ h) t8 R3 b  \0 R

/ }. Y, f3 a8 b8 [. n! T7 w# {如果指的是48h  RTC control的话, 我将0x7f填进去后,为什么通过70H,71H访问的还是 Internal RTC
发表于 2008-7-21 13:02:13 | 显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?4 u5 }8 l$ [. o1 E0 l# A* G9 B
请用下面这段代码来试试
: N6 m& F3 Y, [$ E    reg:BYTE  i1 y! B1 n/ Q6 V- W, e# {( F
        mov ax,0b108h0 r' u( b5 l5 m9 ?8 p( ?
        mov bx,10h
! w% t7 e! g) j; |9 Y# Z5 c/ A        mov di,48h4 `  E' d( F, c
        int 1ah% `/ ^9 b: e7 k8 t# @' ?! Y; }( o* l
        mov reg,cl          ;get RTC Control Register% \+ f4 S- B; D" g3 k% P
& c5 J. i" h. N. e; b
        mov cl,reg
+ ?4 }* V5 n" ^7 A4 {" s* L: b        and cl,3fh
/ i  [6 f& P, N0 Z3 ~) C) i        or cl,40h           ;set APCREG_EN6 c: W6 C+ h5 b7 E* N
        mov ax,0b10bh2 ~3 e# _/ Y, }1 r6 F: U2 x
        mov bx,10h
1 q5 E# n; l; T        mov di,48h
, T  a( k! \0 }: u) Y" K        int 1ah
+ `3 k( V' `8 P* C       //now can access the APC register
5 b# y( d+ D4 @, G 6 h. X+ u+ V4 u6 m4 ^# y" [+ d
        mov cl,reg
0 A) |7 D! j. k        mov ax,0b10bh
1 b/ P; d  j: s! p! H        mov bx,10h8 a; R; p/ b" ?$ L; ?, a
        mov di,48h
+ O9 u+ V- s0 r* t        int 1ah              ;Restore
回复

使用道具 举报

 楼主| 发表于 2008-7-21 13:54:47 | 显示全部楼层
应该没弄错啊6 @/ }8 a% n' x! G- E' ?
(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了
  w6 r# G3 @! W$ r4 m# E# H
% F: D/ M/ t4 ops.看来还是要仔细的看datasheet
: M: _8 u* ?/ g/ w9 C. |3 I
; f0 {- \9 a; {, c' r  Q) k& t[ 本帖最后由 jackey_gu 于 2008-7-21 16:13 编辑 ]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-26 16:49 , Processed in 0.060027 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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