Page 1 of 1
Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" mean
Posted: Wed Oct 06, 2021 4:30 pm
by TimonGaertner123
Hey,
I'm about to init my ps2 controller...
The wiki page for it is really confusing -
https://wiki.osdev.org/%228042%22_PS/2_Controller - :
It's about the configuration byte:
There is written that if the third Bit is 0 "your OS shouldn't be running", wtf does this mean, it's running
Also there's written that the 8th bit must be 0, what if it's not???
Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me
Posted: Thu Oct 07, 2021 12:31 am
by iansjack
What does it matter? Just do what the documentation says.
You'll find this sort of instruction in the documentation for several devices. If you ignore it the result, in general, is undefined. It may work in some circumstances, or for some versions of the device, but not in others.
If you really want to know what happens for your code addressing your device, there's a very easy way to find out....
Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me
Posted: Thu Oct 07, 2021 1:29 am
by davmac314
TimonGaertner123 wrote:There is written that if the third Bit is 0 "your OS shouldn't be running", wtf does this mean, it's running
If I read it correctly, It means that, if the system fails POST (power-on self-test), it should stop and not load/run the operating system. Therefore the third bit should always be 1 when you check it from the operating system, since it is set to 1 when the system passes POST.
TimonGaertner123 wrote:Also there's written that the 8th bit must be 0, what if it's not???
This I'm not sure of, but I'd expect that the hardware won't work correctly in some manner, or possibly it has another effect on the system, or possibly it has no effect at all but is "reserved" for some future purpose and so should be set to 0 to be forwards-compatible with future hardware that does interpret this bit.
According to the 8042 info I have I think it's probably that latter case - bit is reserved for future use, 0 is the "safe" value.
Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me
Posted: Thu Oct 07, 2021 11:53 am
by nexos
Also there's written that the 8th bit must be 0, what if it's not???
It all depends. Maybe nothing, maybe a triple fault, or maybe your keyboard will explode. Really, you can never be sure! Every computer handles this differently I'm sure.