-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
Conversation
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")); |
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.
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?
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.
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()?
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.
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.
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.
Does anyone object if I cherry-pick this patchset to #73 to improve the argument parsing with my ongoing changes? ^^
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.
Especially if you give it a new CLI flag, absolutely, please! 😃
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.