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

Use bus interface in the serial device #14

Merged
merged 2 commits into from
May 17, 2023

Conversation

yanjiew1
Copy link
Collaborator

Originally, the I/O port handler checks the hard-coded I/O port range of the serial device and call the serial device I/O handler if the port number is within the range.

This pull request moves the bus interface and its implementations into dedicated files (bus.c and bus.h), changes the serial device to register its I/O port using the bus interface and removes the hard-coded port numbers in VM exit handling routine.

This fixes #10.

yanjiew1 added 2 commits May 17, 2023 10:54
The bus interface can be used by other non-PCI MMIO and PIO devices.
This pave the way for the serial device to use it.
Before this change, the VM exit handler used the hard-coded I/O port
numbers to handle I/O for the serial device. This change makes the
serial device registers its I/O port interface by using bus interface
and removes the hard-coded I/O port numbers in the VM exit handling
routine.
@jserv jserv requested a review from RinHizakura May 17, 2023 04:06
Copy link
Collaborator

@RinHizakura RinHizakura left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@jserv jserv merged commit 92b29b0 into sysprog21:master May 17, 2023
@jserv
Copy link
Contributor

jserv commented May 17, 2023

Thank @yanjiew1 for contributing!

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.

Implement UART device on the same abstraction of PCI
3 participants