PS/2 Self-testing problem
- adev5311
- Posts: 11
- Joined: Sun Oct 13, 2024 2:29 am
- Libera.chat IRC: adev531
- GitHub: https://github.com/adev531
PS/2 Self-testing problem
Im trying to Initialize PS/2 Controller.
Its working properly in QEMU and other emulators,
and I tried in my laptop as my laptop supports CSM and In device manager,
Its displaying Keyboard/Touch pad as PS/2 device. But in my laptop returning 0x1C (After Pressing Enter on Grub) or 0xFA on Self-test. I already added code to Flush buffer and Disable devices.
What should I fix?
Its working properly in QEMU and other emulators,
and I tried in my laptop as my laptop supports CSM and In device manager,
Its displaying Keyboard/Touch pad as PS/2 device. But in my laptop returning 0x1C (After Pressing Enter on Grub) or 0xFA on Self-test. I already added code to Flush buffer and Disable devices.
What should I fix?
Hello, hi.
I'm alt account.
I'm alt account.
-
- Member
- Posts: 5494
- Joined: Mon Mar 25, 2013 7:01 pm
Re: PS/2 Self-testing problem
USB legacy support will interfere with initializing the PS/2 controller. If you don't have USB drivers yet, you can try disabling USB legacy support in the BIOS setup.
Which self-test are you talking about? Both the PS/2 controller and the keyboard have self-test commands. (Do not use the PS/2 controller self-test command.)
Sharing your code will help us figure out what's going on.
Which self-test are you talking about? Both the PS/2 controller and the keyboard have self-test commands. (Do not use the PS/2 controller self-test command.)
Sharing your code will help us figure out what's going on.
- adev5311
- Posts: 11
- Joined: Sun Oct 13, 2024 2:29 am
- Libera.chat IRC: adev531
- GitHub: https://github.com/adev531
Re: PS/2 Self-testing problem
I'm using PS/2 Controller self-test, Is there problem?
Why self-test on PS/2 Controller is bad?
(+ There's no option to disable USB legacy support. Its Samsung UEFI BIOS.)
Why self-test on PS/2 Controller is bad?
(+ There's no option to disable USB legacy support. Its Samsung UEFI BIOS.)
Hello, hi.
I'm alt account.
I'm alt account.
-
- Member
- Posts: 5494
- Joined: Mon Mar 25, 2013 7:01 pm
Re: PS/2 Self-testing problem
The self-test command can change the PS/2 controller configuration. Firmware, especially on laptops, does not handle the change gracefully. For example, laptop Fn keys may stop working or activate when the wrong keys are pressed.
- adev5311
- Posts: 11
- Joined: Sun Oct 13, 2024 2:29 am
- Libera.chat IRC: adev531
- GitHub: https://github.com/adev531
Re: PS/2 Self-testing problem
I reset config after checking self-test.
and after I remove controller self-testing...
First port Test is returning 0x54 (0 for second port)
and Identify command is not working properly in my laptop.
and after I remove controller self-testing...
First port Test is returning 0x54 (0 for second port)
and Identify command is not working properly in my laptop.
Hello, hi.
I'm alt account.
I'm alt account.
-
- Member
- Posts: 5494
- Joined: Mon Mar 25, 2013 7:01 pm
Re: PS/2 Self-testing problem
You might not be able to reset everything. There are lots of nonstandard extensions to the PS/2 controller.
That sounds like the keyboard and mouse IDs. I think there's something wrong in your code to receive data from the PS/2 controller.
- adev5311
- Posts: 11
- Joined: Sun Oct 13, 2024 2:29 am
- Libera.chat IRC: adev531
- GitHub: https://github.com/adev531
Re: PS/2 Self-testing problem
Sorry, I meant "I'm setting config of PS/2 Controller after self-testing."Octocontrabass wrote: ↑Sun Oct 13, 2024 8:27 pmYou might not be able to reset everything. There are lots of nonstandard extensions to the PS/2 controller.
Probably flushing buffer is not working properly. I'm doing :Octocontrabass wrote: ↑Sun Oct 13, 2024 8:27 pmThat sounds like the keyboard and mouse IDs. I think there's something wrong in your code to receive data from the PS/2 controller.
Code: Select all
while ((inb(0x64) >> 0) & 1 == 1) inb(0x60)
Hello, hi.
I'm alt account.
I'm alt account.
-
- Member
- Posts: 5494
- Joined: Mon Mar 25, 2013 7:01 pm
Re: PS/2 Self-testing problem
You're setting the standard configuration byte. What about nonstandard configurations?
That's the right way to flush the output buffer. Are you flushing the output buffer at the right time?adev5311 wrote: ↑Sun Oct 13, 2024 11:57 pmProbably flushing buffer is not working properly. I'm doing :To flush buffer.Code: Select all
while ((inb(0x64) >> 0) & 1 == 1) inb(0x60)
- adev5311
- Posts: 11
- Joined: Sun Oct 13, 2024 2:29 am
- Libera.chat IRC: adev531
- GitHub: https://github.com/adev531
Re: PS/2 Self-testing problem
Probably that's the Reason.Octocontrabass wrote: ↑Mon Oct 14, 2024 4:03 pmYou're setting the standard configuration byte. What about nonstandard configurations?
Before disabling devices.Octocontrabass wrote: ↑Mon Oct 14, 2024 4:03 pmThat's the right way to flush the output buffer. Are you flushing the output buffer at the right time?adev5311 wrote: ↑Sun Oct 13, 2024 11:57 pmProbably flushing buffer is not working properly. I'm doing :To flush buffer.Code: Select all
while ((inb(0x64) >> 0) & 1 == 1) inb(0x60)
Hello, hi.
I'm alt account.
I'm alt account.
-
- Member
- Posts: 5494
- Joined: Mon Mar 25, 2013 7:01 pm