-
Notifications
You must be signed in to change notification settings - Fork 3.1k
patch for early putc ns8250 on arm #1808
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
Thank you for taking the time to contribute to FreeBSD!
Please review CONTRIBUTING.md, then update and push your branch again. |
705a113
to
48f3933
Compare
50680a2
to
0545a39
Compare
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.
I think this is ready. There's no socdev_va/pa on other platofrms, so arm and arm64 is the complete list.
Ok. Thank you. |
Unfortunately, this only works for some UART implementations. It does not take into account the register layout and access restrictions of different UARTs ("reg-shift", "reg-io-width"). These are not available at an early stage, which is why we do not yet have the early_putc() function implemented. It should not be commited in this form. |
Ok. I thought it was okay. |
We could add options to set them, e.g. |
Couldn't we just read the SPCR table to get these values as well? |
I would prefer to not depend on the SPCR/FDT so printf works before we parse them, e.g. we may need to call printf from within the parsing code to debug it. |
Since we parse it in the boot loader, maybe it could provide adequate hints? Or do we have the same issue? |
IMHO, early_putc() should work from the first line of initarm(). I am afraid that the only viable solution is #define at compile time, runtime detection looks impossible. |
fdc9de8
to
175171a
Compare
d556ab2
to
8cd1964
Compare
Hi, @bsdimp
This is patch for early putc ns8250 on arm
I tested on bananapi-r64