1st post in this forums...

I need some help to solve this up
this is
How ABIT SET their Command Per Clock Value

PCI Bus#0 Device#0 Function #1
offset 84,85,86,87
to: F3 13 07 03 (CPC Enable)

000017D8  66B884010080      mov eax,0x80000184

000017DE 66B9F3170F6B mov ecx,0x6b0f17f3
000017E4 66BBF2130F03 mov ebx,0x30f13f2
000017EA 807D0E01 cmp byte [di+0xe],0x1
000017EE 7502 jnz 0x17f2
000017F0 EB10 jmp short 0x1802
000017F2 807D0E02 cmp byte [di+0xe],0x2
000017F6 7506 jnz 0x17fe
000017F8 6683CB01 or ebx,byte +0x1
000017FC EB04 jmp short 0x1802
000017FE 6683E1FE and ecx,byte -0x2
00001802 E802EC call 0x407

00000407 BAF80C mov dx,0xcf8
0000040A 66EF out dx,eax
0000040C B2FC mov dl,0xfc
0000040E 66ED in eax,dx
00000410 66F7D1 not ecx
00000413 6623C1 and eax,ecx
00000416 660BC3 or eax,ebx
00000419 66EF out dx,eax
0000041B C3 ret

How can i reversed so that the final value is

F3 13 0F 23 (Command Per Clock Disable)
Posted on 2004-06-01 03:35:32 by tictac
i'm thinking of this to do the patch

can u check it is OK?:grin:

mov eax,0x80000184 ; enable pci configuration access mechanism 1 to offset 84 

mov ecx,0x1ffffff1
mov ebx,0x230f13f3
mov dx,0xcf8 ; of PCI Bus:0 Device:0 Function:1
out dx,eax
mov dl,0xfc ; get the data of offsets 84, 85 , 86 , 87
in eax,dx
not ecx
and eax,ecx ; PCR Value : 80 01 00 00
or eax,ebx ; PCR Value : F3 13 0F 23 (Command Per Clock Disable)
out dx,eax
Posted on 2004-06-01 04:01:30 by tictac
Form the 66h prefix in front of your instructions it looks to me that the code you show here is supposed to run in 16 bits real mode? If this is true it does not belong in Main section where we talk about win32asm ...

Besides what are you trying to do? What is this for?

Can you be a lot more descriptive?
Posted on 2004-06-01 04:23:37 by BogdanOntanu
ya it is 16 bit code real mode

sorry if i post it in wrong thread... i'm newbie here....

plz move this thread if doesnt't belong to here :)
Posted on 2004-06-01 04:26:22 by tictac
i want to change the PCR default value of ABIT NF7-S board

which have Command Per Clock enable by default.....(F3 13 0F 03)

Disable CPC will allowed higher overclocking for double sided 512MB stick ram
Posted on 2004-06-01 04:28:56 by tictac
Macro definition

PATCH_PCI macro reg_addr,mask

mov eax,reg_addr ;fetch the address of the regs to be patched
mov dx,in_port ;fetch the input port addr of PCI cfg space
out dx,eax
mov dx,out_port
in eax,dx
---> here (change eax = 0x230F13F3h)
out dx,eax

Posted on 2004-06-01 07:52:04 by tictac