Kconfig 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. menuconfig LIB_SYSCALL
  6. bool "System call support"
  7. default n
  8. ---help---
  9. Build in support for "system calls". System calls are used to
  10. implement a call gate mechanism that can be be used to call from
  11. user code into the kernel. This is only useful for user code that
  12. lies outside of the kernel such as when the BUILD_PROTECTED or
  13. BUILD_KERNEL builds are selected.
  14. This permits calls from user-mode code into kernel mode; the call
  15. gate will change the mode of operation from user to supervisor mode,
  16. then call into the OS code on behalf of the user-mode application.
  17. If if there are no privilege issues preventing the call, system
  18. calls may also be of value because it can eliminate the need for
  19. symbol tables when linking external modules to the NuttX base code.
  20. The selection will build libsyscall. External modules can then link
  21. with libsyscall when they are built and they can call into the OS
  22. with no knowledge of the actual address in the OS. In this case,
  23. they call into a proxy that is link with the external code; that
  24. proxy then marshals the call parameter and invokes the system call
  25. to accomplish the interface.
  26. if LIB_SYSCALL
  27. config SYS_RESERVED
  28. int "Number of reserved system calls"
  29. default 0
  30. ---help---
  31. Kernel system calls may share the same software trapping mechanism
  32. as other functions used by architecture port. Those software traps
  33. must be reserved for use exclusively by the architecture. These
  34. value specifies the number of reserved software traps used by the
  35. architecture; number of the kernel system calls will begin with this
  36. number.
  37. config SYS_NNEST
  38. int "Number of nested system calls"
  39. default 2
  40. ---help---
  41. This is architecture dependent. Most architectures allocate
  42. resources to manage a fixed, maximum number of nested system calls.
  43. A nested system call occurs in the following scenario: (1) A non-
  44. privileged user thread executes a system call, (2) part of the
  45. system call processing cause a call back into the user space code,
  46. and (3) the user space code performs another system call.
  47. I don't believe that any nested system calls will occur in the
  48. current design so the default maximum nesting level of 2 should be
  49. more than sufficient.
  50. endif # LIB_SYSCALL