Please help with UART Power On (ACPI) from Kernel Mode Driver (asm) !!!

Thanks.
Posted on 2003-10-22 11:30:59 by Poly
Which UART chip are you programming?

Regards, P1 :cool:
Posted on 2003-10-22 12:19:34 by Pone
Four-F did an excellent tutorial on kernel mode device drivers. One of his examples shows how to modify the I/O permission bit map so you can access the UART directly. You can use my subroutine to automatically calulate the bit mask. Just place the port number like 3f8 into eax.




Calcbm:

push ebx ; Preserve ebx / important reg.!!!
push edx
mov ecx,pIopm
xor ebx,ebx
xor edx,edx
mov ebx,08h
div ebx
add ecx,eax
mov ebx,01h
inc edx
dec edx
jz $+06h
shl ebx,1
jmp $-05h
not ebx
and ,ebx
pop edx
pop ebx
retn

Four-F's original code:

; I/O access for 70h port
mov ecx, pIopm
add ecx, 70h / 8
mov eax,
btr eax, 70h MOD 8
mov , eax

my code using subroutine: "A little simpler"

mov eax,071h ; Calculate I/O permission bitmap
call Calcbm ; mask bits for port 71
Posted on 2003-10-22 13:16:58 by mrgone
What is pIopm ?
Posted on 2003-10-22 15:35:46 by Poly
Go to the tutorial section of this board and download Four-F's KMDkit. It has three examples programs. The one I'm refering to with "pIopm" is called "DateTime". He has all the include files with the kit in a nice zipped package or use this link and download all three.http://www.freewebs.com/four-f/index.htmhttp://www.freewebs.com/four-f/index.htm
Posted on 2003-10-22 19:18:10 by mrgone
I have problem with Wake Up of UART chip.
My computer work with ACP (Advanced Configuration & Power Interface)
I read ports:

03f8 - have value ffh
03f9 - have value ffh
03fa - have value ffh
03fb - have value ffh
03fc - have value ffh
03fd - have value ffh
03fe - have value ffh
03ff - have value ffh
!!!!!

How i can wake up UART chip with asm ?
May be anybody help me?
please help!!!
Posted on 2003-10-22 23:54:10 by Poly
Wake up on UART, is an inbound data traffic on the serial in port, that the motherboard senses and responses by the interupt line from the UART, to power up from sleep mode the other devices on the rest of the motherboard.

IOW, You stimulate it by sending data to the serial port to which the UART is connected.

Are you wanting a software emulation of the hardware feature?

Regards, P1 :cool:
Posted on 2003-10-23 13:03:05 by Pone
Yes, i have KernelModeDriver and my hardware device connected to COM port.
But this device send data to port ONLY after receive data from Computer.
I.e. i can't wake up UART by send any data to COM port from my hardware device.
I want wake up UART by software from KernelModeDriver or (if it's possible) from Ring3 program, worked with KernelModeDriver.
Posted on 2003-10-23 15:34:18 by Poly
You can set a uart into self test mode every since the PC-XT
Posted on 2003-10-23 20:48:03 by mrgone
I CAN'T SET UART INTO SELF-TEST MODE BECAUSE UART IS POWER OFF !!! :(((

COM1:
mov dx,03fc ; Modem Control Register (MCR)
mov al,00010000b ; set LoopBack Mode
out dx,al

and after this operation:

03fc value == FFh !!!
03f8 value == FFh !!!
ALL addresses == FFh !!!!!!!!!!!
:((((((((((((((((((((((((((

HELP ME ANYBODY PLEASE !!!!!!!!!!
Posted on 2003-10-28 04:55:23 by Poly
If you are using a seperate modem card you may need to check with manufacturer. Time to get out that screw driver...lol
Posted on 2003-10-29 08:13:32 by mrgone
Can anybody help me?
Posted on 2003-11-03 00:56:56 by Poly