-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
qemu:fix sabre-6quad boot failed with kernel mode #13518
Conversation
[Experimental Bot, please feedback here] Let's break down whether this Pull Request (PR) description meets the NuttX requirements. Strengths:
Areas for Improvement:
Revised PR Description Template: ## Summary
The sabre-6quad board was failing to boot in kernel mode due to [briefly explain the root cause, e.g., an incorrect memory mapping configuration]. This PR fixes the issue by [concisely describe your solution, e.g., adjusting the memory regions assigned to the kernel during initialization in the board-specific configuration file].
This change modifies [mention the specific files or modules affected, e.g., `boards/arm/armv7-m/sabre-6quad/src/sabre_boot.c`].
* Related Issue: [Link to NuttX issue if applicable]
## Impact
* Is new feature added? NO
* Is existing feature changed? YES (Kernel mode functionality on sabre-6quad).
* Impact on user? Potentially YES (if they rely on kernel mode). [Describe any user-facing changes, e.g., "Users may need to rebuild their kernel modules for kernel mode."]
* Impact on build? NO
* Impact on hardware? YES (specifically sabre-6quad).
* Impact on documentation? [YES/NO] [Explain if documentation needs updates.]
* Impact on security? [YES/NO] [Explain any security implications.]
* Impact on compatibility? [YES/NO] [Explain any compatibility concerns.]
## Testing
I confirm that changes are verified on my local setup and work as intended:
* Build Host(s): [Your OS] ([Your CPU]), [Your compiler] ([compiler version])
* Target(s): ARM, sabre-6quad:knsh
Testing logs **before** change:
[Paste the output of your test commands here]
[Paste the output of your test commands after applying your fix]
Remember: A well-written PR description significantly increases the chances of your contribution being reviewed and merged quickly. |
@lupyuen this AI bot is very useful to highlight missing things! It will avoid us repeating same thing in all PRs! |
@gneworld please include commit log message! |
@lupyuen is there a way to highlight the PR is missing commit log message? Maybe we could issue automatically a request change to avoid us to repeating it too |
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.
Please include commit log message
@@ -44,6 +44,8 @@ SYSCALL_LOOKUP(sched_setscheduler, 3) | |||
SYSCALL_LOOKUP(sched_unlock, 0) | |||
SYSCALL_LOOKUP(sched_yield, 0) | |||
SYSCALL_LOOKUP(nxsched_get_stackinfo, 2) | |||
SYSCALL_LOOKUP(nxsched_self, 0) |
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.
Why are these exposed to userspace ?
@@ -84,6 +84,8 @@ | |||
"nx_pthread_exit","nuttx/pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","noreturn","pthread_addr_t" | |||
"nx_vsyslog","nuttx/syslog/syslog.h","","int","int","FAR const IPTR char *","FAR va_list *" | |||
"nxsched_get_stackinfo","nuttx/sched.h","","int","pid_t","FAR struct stackinfo_s *" | |||
"nxsched_self","nuttx/sched.h","","FAR struct tcb_s *" |
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.
Why does userspace need to know the composition of TCB ?
@anjiahao1 When will this feature "nsh:support wait command to wait task exit" which has calling of nxsched_self and nxsched_get_tcb be upstreamed to the community? :) |
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
let's replace nxsched_self with pthread_self. |
@gneworld please revert this patch, we don't need it now. |
Summary
fix sabre-6quad boot failed with kernel mode, for the lack of two syscall api nxsched_self and nxsched_get_tcb
Impact
Testing
./tools/configure.sh sabre-6quad:knsh
make -j10
make export V=1
cd ../apps
./tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz
make import
cd ../nuttx
qemu-system-arm -semihosting -M sabrelite -m 1024 -smp 4 -nographic -kernel ./nuttx