operating system - Are so many keyboard controller wait calls needed when enabling the A20 gate -


The code has been given to enable A20 from A20 line:
   

a20wait2 on output buffer

a20wait The Classroom.

Command / Status Register and buffer registers by typing / reading from 0x64 access.

Then why are you waiting so many on the input / output buffers? After writing the status command byte, there should be no one on the output buffer before reading the status register on the input buffer?

I tried to disable the other two waiting calls, in which I mentioned the last paragraph and it worked fine. But I'm curious why they are there. Is there any other reason?

A20 gate control signal is provided by another processor. Traditionally 8042 Micro-Controller drives its output port pin signal. This was intended to handle the Micro Controller keyboard interface, there was an unused output pin, so IBM engineers decided to cut the cost of hardware for the design of AT and control the A20 gate signal with AT.

The interface between the main processor and that microcontroller is a lot easier, only two 8-bit ports are the I / O address 0x60 data port, 0x64 command / status port.

8042 implements its own program, which is completely free from the main processor. Therefore, there are some things to talk about, software has to work with hands. You can only write something after making sure that 8042 received the previous command and executed it. And only after making sure that something was read that 8042 wrote the data port. Spinning on input and output buffer position bits is thus necessary to capture 8042.

Removing the spinning can work in an emulator. It is unlikely to work correctly on real hardware, you may be lucky This is absolutely no risk at risk

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -