Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pc-tty: add PS/2 mouse support and kbd/mouse vdevs #512

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adamgreloch
Copy link
Member

@adamgreloch adamgreloch commented Aug 21, 2024

JIRA: RTOS-896, RTOS-864

Description

Adds PS/2 mouse support. Because PS/2 keyboard and mouse share the same I/O port, this required some heavy refactoring of ttypc_kbd driver. It also adds /dev/kbd and /dev/mouse virtual devices, which can be used for input event capturing by applications, for instance by an X server, as part of RTOS-864.

Mouse support and virtual devices are opt-in and can be enabled via board_config.h.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: ia32-qemu

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

@adamgreloch adamgreloch force-pushed the adamgreloch/RTOS-896 branch 4 times, most recently from 7a9d162 to 8a01d03 Compare August 21, 2024 16:10
Copy link

github-actions bot commented Aug 22, 2024

Unit Test Results

7 949 tests  ±0   7 231 ✅ ±0   40m 11s ⏱️ - 3m 35s
  461 suites ±0     718 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 6883a01. ± Comparison against base commit 3a4fd5d.

♻️ This comment has been updated with latest results.

@adamgreloch adamgreloch force-pushed the adamgreloch/RTOS-896 branch 2 times, most recently from 8bb3c00 to e5227cb Compare August 22, 2024 08:40
@adamgreloch adamgreloch marked this pull request as ready for review August 22, 2024 09:11
tty/pc-tty/Makefile Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc.h Outdated Show resolved Hide resolved
tty/pc-tty/ttypc.h Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_mouse.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_mouse.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_mouse.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_mouse.c Outdated Show resolved Hide resolved
@adamgreloch adamgreloch force-pushed the adamgreloch/RTOS-896 branch 2 times, most recently from b6690a2 to 41e575c Compare August 26, 2024 13:32
@adamgreloch adamgreloch requested a review from ziemleszcz August 26, 2024 13:40
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.c Outdated Show resolved Hide resolved
tty/pc-tty/event_queue.h Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_kbd.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_kbd.c Show resolved Hide resolved
tty/pc-tty/ttypc_kbd.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_ps2.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_ps2.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_ps2.c Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_ps2.h Outdated Show resolved Hide resolved
tty/pc-tty/ttypc_ps2.h Outdated Show resolved Hide resolved
Adds PS/2 mouse support. Because PS/2 keyboard and mouse share the same
I/O port, this required some heavy refactoring of ttypc_kbd driver. It
also adds /dev/kbd and /dev/mouse virtual devices, which can be used for
input event capturing by applications, for instance by an X server, as
part of RTOS-864.

Mouse support and virtual devices are opt-in and can be enabled
via board_config.h.

JIRA: RTOS-896
Mouse events outputed on /mouse/dev are now always aligned in accordance
to PS/2 protocol spec. Additionally, configurations steps must be skipped
on real hardware, as they seem to be done by the real BIOS already
(enabling mouse, enabling IRQ12 interrupt etc.) and redoing them may
lead to blocking the controller.

JIRA: RTOS-896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants