Ports in PMODE

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Hery
Member
Member
Posts: 65
Joined: Sat Dec 04, 2004 12:00 am

Ports in PMODE

Post 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)
User avatar
intel_breaker
Member
Member
Posts: 46
Joined: Tue Jan 04, 2005 12:00 am
Location: Poland
Contact:

Re: Ports in PMODE

Post 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?
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: Ports in PMODE

Post by blackcatcoder »

maybe it could be the a20 line , have you brought it up correctly?
Post Reply