Page 1 of 1

Ports in PMODE

Posted: Tue Jul 26, 2005 11:00 pm
by Hery
I have go t problem with access to ports in PMODE. for example: keyboard device. when i press key, it don't get scan code from 60h,
part of ocs log:

Code: Select all

[KBD  ] internal keyboard buffer full, ignoring scancode.(13)
[KBD  ] internal keyboard buffer full, ignoring scancode.(13)
[KBD  ] internal keyboard buffer full, ignoring scancode.(13)
[KBD  ] internal keyboard buffer full, ignoring scancode.(93)
[CPU0 ] protected mode
[CPU0 ] CS.d_b = 32 bit
[CPU0 ] SS.d_b = 16 bit
[CPU0 ] | IOPL=0 NV UP EI PL NZ NA PO NC
[CPU0 ] | SEG selector     base    limit G D
[CPU0 ] | SEG sltr(index|ti|rpl)     base    limit G D
[CPU0 ] |  CS:0008( 0001| 0|  0) 00000000 0000ffff 0 1
[CPU0 ] |  DS:0010( 0002| 0|  0) 00000000 0000ffff 0 1
[CPU0 ] |  SS:0018( 0003| 0|  0) 0000ffff 00001000 0 0
[CPU0 ] |  ES:0030( 0006| 0|  0) 000b8000 00008000 0 1
[CPU0 ] |  FS:0010( 0002| 0|  0) 00000000 0000ffff 0 1
[CPU0 ] |  GS:0010( 0002| 0|  0) 00000000 0000ffff 0 1
[CPU0 ] | CR0=0x00000011 CR1=0 CR2=0x00000000
[CPU0 ] | CR3=0x00000000 CR4=0x00000000
I have the same problem with other ports (3D4h,3D5h)

Re: Ports in PMODE

Posted: Wed Jul 27, 2005 11:00 pm
by intel_breaker
Method 1:
If I see well, you have 16-bits stack segment. In pmode you must set cs,ds,es,fs,gs,ss in 32-bits segments( If you use 32 bits protected mode)
Method 2:
Check that you have flushed keyboard buffer (this may help only with the keyboard problem)
Method 3:
Tips: Typicaly segments are sets that:
cs = 32bit code segment
ds = es = fs = gs = ss = 32 bit data segment

But I don't belive that its segments problem. Meabe your's outb functions not works correctly?

Re: Ports in PMODE

Posted: Mon Aug 01, 2005 11:00 pm
by blackcatcoder
maybe it could be the a20 line , have you brought it up correctly?