Skip to content
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

Output debug logs until kernel has fully started, then store them somewhere #438

Open
willdurand opened this issue Nov 30, 2021 · 1 comment
Labels
priority: p3 This priority level reflects our backlog.

Comments

@willdurand
Copy link
Owner

Instead of having a dedicated serial line for the debug logs, an idea could be to send them to the main (and likely only) serial line until the kernel has started. From there, we can avoid showing them because that would mess with the "UI" (e.g., kshell).

We could use a pseudo-file to show them if needed (e.g., we would use a ring buffer to store the logs exposed via the proc fs). It is going to work well until the system crashes, though because we'll lose everything probably. We could dump all the logs in PANIC() but, if it is a different crash, like unexpected, we'll be left without anything.

Another idea could be to use a feature flag for this?

@willdurand
Copy link
Owner Author

Lately, I started to print INFO logs to the main output (e.g., screen or serial).

For DEBUG logs, especially on real hardware, we probably want them in a file as opposed to printed on the screen or serial, even if it is a second serial line.

For local dev, maybe there is a semihosting feature that we could leverage somehow?

@willdurand willdurand added the priority: p3 This priority level reflects our backlog. label Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 This priority level reflects our backlog.
Projects
None yet
Development

No branches or pull requests

1 participant