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

Mosa.DeviceDriver: various improvements #1200

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

AnErrupTion
Copy link
Member

@AnErrupTion AnErrupTion commented Mar 8, 2024

This PR focuses on various improvements (like bug fixes) throughout the Mosa.DeviceDriver project. The following changes were done:

  • Put references to links in comments after the namespace
  • In PCIController, the Definitions region was removed since it only contained 1 field
  • The Mosa.Runtime.Pointer struct was made readonly to fix some potential struct copying for ACPI structs
  • In VMwareSVGA2:
    • Private fields were put after the public frame buffer field for consistency
    • The private vramSize field has been removed since it was unused
  • In ACPIDriver:
    • Variables and private fields were renamed to better match naming conventions
    • Some if conditions were inverted to reduce nesting
    • The Setup() function was removed and the code was put in the Initialize() function
  • In the ACPI sister structs:
    • The readonly modifier was added on a per-struct basis
    • Made the Size field const in each
  • Added DeviceBusType.None and GenericDeviceDriverRegistryEntry to deal with ACPI (as it's neither an ISA nor a PCI driver)
  • In IDEController, the Open() function was moved into the IDiskControllerDevice region for more consistency
  • Runtime device names were changed to better fit naming conventions and their job (e.g. ISA-BUS => ISABus, PCI => PCIController, etc...)
  • The code to trigger an ACPI reboot by writing to the PCI configuration space was removed since it never even worked in the first place
  • The PS/2 mouse code was almost entirely reworked for better code readability and slightly better performance as well
  • The US keyboard map was also reworked to fix bugs mainly related to modifiers

@AnErrupTion AnErrupTion self-assigned this Mar 8, 2024
Copy link
Member

@charsleysa charsleysa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@charsleysa charsleysa merged commit 88ae20f into mosa:master Mar 9, 2024
66 checks passed
@AnErrupTion AnErrupTion deleted the devicedriver-improvements branch March 9, 2024 08:49
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