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

bridge: debug: Always try to exit debug first #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Manawyrm
Copy link
Contributor

@Manawyrm Manawyrm commented Oct 14, 2024

The Debug UART inside the BMC can be brought into a stuck state by sending a lot of requests quickly or after sending a broken command.
Sending 2 exit commands at 115200 baud before trying to enter debug mode again seems to mitigate this issue.

Sidenote: I wonder how that Debug UART is actually realized inside the ASPEED. I'm almost guessing it's a little 8051 core or something similar, which might crash here. I would expect to see a little bit different behaviour from a hardware state machine.

The Debug UART inside the BMC can be brought into a
stuck state by sending a lot of requests quickly or after
sending a broken command.
Sending 2 exit commands at 115200 baud before trying to
enter debug mode again seems to mitigate this issue.

Signed-off-by: Sarah Mädel <[email protected]>

// Escape character should cancel previous commands
// q will exit debug mode
rc = prompt_write(&ctx->prompt, "\x1Bq\r\n\x1Bq\r\n", strlen("\x1Bq\r\n\x1Bq\r\n"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I was trying to avoid injecting things into the BMC console if I could help it. Maybe we could add this behind a --recover or --force-quit option so we can at least control when it is run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yup... But now we have that problem with the command line argument parsing again 😄
Would you implement this as a flag in the main culvert.c getopt()?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a fair criticism :D Maybe let's leave this to lie for a bit, I'm thinking about what we can do to improve the command line parsing experience.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anyone object if I cherry-pick this patchset to #73 to improve the argument parsing with my ongoing changes? ^^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially if you give it a new CLI flag, absolutely, please! 😃

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