-
Notifications
You must be signed in to change notification settings - Fork 331
[feat] aarch64 use dtb to find debug uart #226
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
base: main
Are you sure you want to change the base?
Conversation
ZR233
commented
Mar 27, 2025
- find uart by dtb.
- aux、8250、pl011 support all in one.
- aarch64-bsta1000b should work with this, but we don't have hardwire to test, so did not edit.
@@ -0,0 +1,67 @@ | |||
use core::ptr::NonNull; | |||
|
|||
use any_uart::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you just totally ignore dtb parsing in arceos, but just forward dtb address to the any_uart
.
It seems quite strange, if we want to parse more device info from device tree, do we need to parse the device info in other crates, again and again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This crate is only used for quick debugging. Other bare metal testing environments can directly obtain debug functionality by providing only the dtb address. The actual device tree traversal should be done during the initialization process later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full func uart device should be inited in driver enum process.
@equation314 Is it a proper timer for us to introduce DTB into ArceOS. |
We should not introduce DTB in ArceOS backbone. DTB parsing can be used for some specific platforms (e.g., aarch64-phytium-pi), not all. Platforms are allowed to not use DTB to keep the code base minimal. It's also a bit strange to include DTB parsing in the |