The A20 Problem (JOS)

38 views
Skip to first unread message

Gapry Un

unread,
Apr 2, 2013, 11:51:21 AM4/2/13
to julu...@googlegroups.com
Dear All,

      The snippet code as following is enable A20 for JOS. It has a problem which confuse for me. The "$0xdf" is a command, not data.

 It should be out to port 0x64, which is command port. In fact, It port to 0x60, which is data port.

 Here, exist two methods (Method 3.1 & Method 3.2) : http://www.brokenthorn.com/Resources/OSDev9.html

So, my question is : Why port to 0x60 (outb %al, %0x60) at last ?

seta20.1:
  inb     $0x64,%al               # Wait for not busy
  testb   $0x2,%al
  jnz     seta20.1

  movb    $0xd1,%al               # 0xd1 -> port 0x64
  outb    %al,$0x64                                                                                

seta20.2:
  inb     $0x64,%al               # Wait for not busy
  testb   $0x2,%al
  jnz     seta20.2

  movb    $0xdf,%al               # 0xdf -> port 0x60
  outb    %al,$0x60

Best regard, Gapry
Reply all
Reply to author
Forward
0 new messages