You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "gneworld (via GitHub)" <gi...@apache.org> on 2024/09/18 00:51:41 UTC

[PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

gneworld opened a new pull request, #13518:
URL: https://github.com/apache/nuttx/pull/13518

   ## Summary
      fix sabre-6quad boot failed with kernel mode
   ## Impact
    kernel mode of sabre-6quad
   ## 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2358338439

   @lupyuen this AI bot is very useful to highlight missing things! It will avoid us repeating same thing in all PRs!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2380610930

   @gneworld please revert this patch, we don't need it now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "gneworld (via GitHub)" <gi...@apache.org>.
gneworld closed pull request #13518: qemu:fix sabre-6quad boot failed with kernel mode
URL: https://github.com/apache/nuttx/pull/13518


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2358341700

   @gneworld please include commit log message!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "gneworld (via GitHub)" <gi...@apache.org>.
gneworld commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2365410086

   @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?  :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "pussuw (via GitHub)" <gi...@apache.org>.
pussuw commented on code in PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#discussion_r1769527438


##########
syscall/syscall.csv:
##########
@@ -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 *"

Review Comment:
   Why does userspace know the composition of TCB ?



##########
syscall/syscall.csv:
##########
@@ -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 *"

Review Comment:
   Why does userspace need to know the composition of TCB ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "pussuw (via GitHub)" <gi...@apache.org>.
pussuw commented on code in PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#discussion_r1769527405


##########
include/sys/syscall_lookup.h:
##########
@@ -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)

Review Comment:
   Why are these exposed to userspace ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "gneworld (via GitHub)" <gi...@apache.org>.
gneworld commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2358580243

   > @gneworld please include commit log message!
   
   @acassis done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 closed pull request #13518: qemu:fix sabre-6quad boot failed with kernel mode
URL: https://github.com/apache/nuttx/pull/13518


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "lupyuen (via GitHub)" <gi...@apache.org>.
lupyuen commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2357572177

   [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13494&type=pullrequests)
   
   Let's break down whether this Pull Request (PR) description meets the NuttX requirements.
   
   **Strengths:**
   
   * **Summary:** You clearly state the problem ("sabre-6quad boot failed with kernel mode") and imply it's a fix. However, it would be even better to briefly explain *why* it failed.
   * **Impact:** You correctly identify the affected area (kernel mode of sabre-6quad), but you should expand on the other impact points (see below).
   * **Testing:** You provide a solid testing procedure, which is excellent. 
   
   **Areas for Improvement:**
   
   * **Summary:**
       * **Why is the change necessary?** Be more specific about the cause of the boot failure. Was it a bug, a configuration issue, etc.?
       * **What functional part of the code is changed?** Mention the specific files, modules, or functions you modified.
       * **How does the change work?** Provide a concise explanation of your solution. For example, "Fixed an incorrect memory mapping configuration that prevented kernel mode initialization."
       * **Related Issues:** If there's a corresponding issue on the NuttX or NuttX Apps repositories, link it here. 
   
   * **Impact:**  You need to address all impact points, even if the answer is "NO."  Provide brief explanations where relevant. For example:
       * **New feature?** NO 
       * **Existing feature changed?** YES (Kernel mode functionality on sabre-6quad)
       * **Impact on user?**  Potentially YES (if they rely on kernel mode). Describe any changes users might need to make.
       * **Impact on build?** NO (assuming your changes don't affect the build process).
       * **Impact on hardware?** YES (specifically sabre-6quad). 
       * **Impact on documentation?** Maybe YES (if the fix involves configuration changes users need to be aware of).
       * **Impact on security?**  Consider if your fix has any security implications (positive or negative).
       * **Impact on compatibility?**  Assess potential compatibility issues with older NuttX versions or other hardware.
   
   * **Testing:**
       * **Build Host(s):** Specify your development environment (OS, CPU, compiler version). 
       * **Target(s):**  You mention the board (sabre-6quad:knsh), but clarify the architecture (likely ARM). 
       * **Testing logs:** While you provide the commands, it's essential to include the actual *output* of those commands before and after your changes. This helps reviewers understand the problem and verify the fix.
   
   **Revised PR Description Template:**
   
   ```markdown
   ## 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]
   ```
   
   Testing logs **after** change:
   
   ```
   [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. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2358342110

   @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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] qemu:fix sabre-6quad boot failed with kernel mode [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #13518:
URL: https://github.com/apache/nuttx/pull/13518#issuecomment-2367083408

   > @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? :)
   
   let's replace nxsched_self with pthread_self.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org