[feat] Enhance dyn driver#270
Open
ZR233 wants to merge 2 commits into
Open
Conversation
Azure-stars
reviewed
Jun 26, 2025
Azure-stars
reviewed
Jun 27, 2025
|
|
||
| #[allow(unused)] | ||
| /// maps a mmio physical address to a virtual address. | ||
| fn iomap(addr: PhysAddr, size: usize) -> Result<NonNull<u8>, Box<dyn Error>> { |
Contributor
There was a problem hiding this comment.
Why return Box<dyn Error> as error type?
Maybe you just return a string? Can we return AxError?
Contributor
Author
There was a problem hiding this comment.
OnProbeError uses Box<dyn Error>, these two error type are in other crates, if we want to use ? to convert err, need to create new type to warp a String or AxError,and boxed error has more err msg than AxError, make it easier to find error location.
Member
|
This PR is scheduled to be included in the next release window (0.3.0, expected 9/30), and PRs marked 0.2.0 will be processed first. |
[fix] 优化错误处理格式,简化 MMIO 区域映射失败的错误信息 feat(axdriver): update rdrive dependency and add block driver support - Updated rdrive dependency version from 0.14 to 0.14.4 in Cargo.toml. - Introduced a new block driver module with implementations for block operations. - Added virtio block driver support with MMIO transport. - Refactored interrupt controller (GIC) driver probes to use OnProbeError for error handling. - Enhanced dynamic driver probing to include block devices when the "block" feature is enabled. - Improved error handling in block driver operations by mapping errors between driver and I/O layers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(axdriver):
downcast, which allows converting aClassdriver to a specific type. For example,Device<Intc>.downcast -> Device<Gicv3>.test cmd: