OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 9:37 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" mean
PostPosted: Wed Oct 06, 2021 4:30 pm 
Offline

Joined: Thu Sep 23, 2021 3:08 am
Posts: 6
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???


Top
 Profile  
 
 Post subject: Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me
PostPosted: Thu Oct 07, 2021 12:31 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
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....


Top
 Profile  
 
 Post subject: Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me
PostPosted: Thu Oct 07, 2021 1:29 am 
Offline
Member
Member

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


Top
 Profile  
 
 Post subject: Re: Wtf does the cfg-byte-sec of ""8042" PS/2 Controller" me
PostPosted: Thu Oct 07, 2021 11:53 am 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
Quote:
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group