Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hello. How is it possible to get one of the PIT's counters frequency? I mostly need the 1st and 3rd counter frequencies. I know I can use a variable to store the frequency but I just want to have a very small kernel in size (Of course my bootloader is 17KiBs) And the kernel itself is less than 6KiBs with a reach console controller and Interrupts enabled!
The frequency is whatever you set it to. And, let's face it, it's going to take less bytes to store this in a variable than any routine to read this from the chip would.
No, you cannot read the reset count value, just the current count. No doubt Intel thought, for the reason I outlined earlier, that is was an unnecessary facility. Were it possible it would require at least one write to the control register and two reads from the data register. This would take more bytes of code, and would no doubt be slower, than retrieving the value from a variable.