Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" mean

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
TimonGaertner123
Posts: 6
Joined: Thu Sep 23, 2021 3:08 am

Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" mean

Post 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???
User avatar
iansjack
Member
Member
Posts: 4695
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me

Post 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....
davmac314
Member
Member
Posts: 121
Joined: Mon Jul 05, 2021 6:57 pm

Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me

Post 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.
nexos
Member
Member
Posts: 1079
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me

Post 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.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
Post Reply