Skip to content

feat(mmio): add new_with_stride#36

Merged
phil-opp merged 1 commit into
rust-osdev:masterfrom
kouchekiniad:mmio_new_with_stride
Nov 13, 2024
Merged

feat(mmio): add new_with_stride#36
phil-opp merged 1 commit into
rust-osdev:masterfrom
kouchekiniad:mmio_new_with_stride

Conversation

@kouchekiniad

Copy link
Copy Markdown
Contributor

This change adds new_with_stride to MmioSerialPort, allowing access to MMIO UART controllers with multi-byte register strides.

@kouchekiniad

Copy link
Copy Markdown
Contributor Author

Hi @phil-opp, I'd appreciate if you could take a look at this PR. Some 16550 controllers use inter-register strides greater than 1, typically either 2 or 4 bytes. As a reference for this behavior, the Linux kernel's console parameter takes options for MMIO register strides of 1 bytes, 2 bytes, and 4 bytes. Adding support for variable register strides, as this PR does, adds support for several UART controllers not currently supported by this crate.

@phil-opp phil-opp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@phil-opp phil-opp enabled auto-merge November 13, 2024 13:56
@phil-opp phil-opp merged commit 67f5437 into rust-osdev:master Nov 13, 2024
phil-opp added a commit that referenced this pull request Nov 13, 2024
@phil-opp

Copy link
Copy Markdown
Member

Published as v0.3.2

@kouchekiniad

Copy link
Copy Markdown
Contributor Author

Thank you!

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