Skip to content

[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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ZR233
Copy link
Contributor

@ZR233 ZR233 commented Mar 27, 2025

  1. find uart by dtb.
  2. aux、8250、pl011 support all in one.
  3. 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::*;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@hky1999
Copy link
Contributor

hky1999 commented Mar 28, 2025

@equation314 Is it a proper timer for us to introduce DTB into ArceOS.

@equation314
Copy link
Member

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 any_uart crate, which should only be responsible for UART device operations.

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.

3 participants