Commit Graph

365 Commits

Author SHA1 Message Date
Gregory Nutt
da1a561b6e binfmt/libelf/libelf_bind.c: Make naming of internal type compliant with coding standard. Yes, the ELF32 types do not follow the standard for historical reasons (and will be fixed someday), but let's not perpetuate the naming violation. 2019-03-20 09:34:08 -06:00
Xiang Xiao
64252a298f arch/: Unify the cache interface for all architectures 2019-03-19 10:37:13 -06:00
anchao
6e69dba341 binfmt/libelf/ and libs/libc/modlib: Add symbol buffer table to reduce filesystem access. 2019-03-19 09:13:50 -06:00
anchao
2f2d432f7c binfmt/libelf and libs/libc/modlib: Add relocation buffer table to reduce access fs. 2019-03-19 08:57:13 -06:00
Valmantas Palikša
956175d9b1 binfmt/libnxflat/libnxflat_init.c: File descriptor leaks when nxflat loading fails 2019-03-19 07:00:54 -06:00
Gregory Nutt
ba859ad302 tools/nxstyle.c: Don't complain about certain lowercase characters in otherwise uppercase pre-processor identifers: IPv6, IPv4, ICMPv6, IGMPv2, p as a decimal point, d signifying a divisor. It was a bad idea to let the door open a crack for there. While they improve readability, the inconsistently also causes other problems. 2019-03-12 14:22:52 -06:00
Gregory Nutt
82b276a34c binfmt/nxflat.c: Trivial design simplification. 2019-03-12 10:09:03 -06:00
Gregory Nutt
622202da20 binfmt/nxflat.c: Update to last NxFLAT change: The logic must respect the reference count before freeing the dspace memory region. 2019-03-12 09:44:18 -06:00
Valmantas Palikša
ba8714daac binfmt/nxflat.c: Correct a double free debug assertion. This occurs when groups are enabled: (1) once via binfmt_exit and unload_module, and (2) once via sched_releasetcb(). this was corrected by adding logic to free/unload the memory once and nullify the pointer so that cannot be freed a second time. This commit resolves Bitbucket issue #145. 2019-03-12 09:44:04 -06:00
Gregory Nutt
a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt
bb623d1e04 This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:

    Trivial, cosmetic
    sched/, arch/, and include:  Rename task_vforkstart() as nxtask_vforkstart()
    sched/, arch/, and include:  Rename task_vforkabort() as nxtask_vforkabort()
    sched/, arch/, and include:  Rename task_vforksetup() as nxtask_vfork_setup()
    sched/:  Rename notify_cancellation() as nxnotify_cancellation()
    sched/:  Rename task_recover() to nxtask_recover()
    sched/task, sched/pthread/, Documentation/:  Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
    sched/task:  Rename task_schedsetup() to nxtask_schedsetup()
    sched/ (plus some binfmt/, include/, and arch/):  Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
    arch/ and sched/:  Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
    sched/task:  Rename all internal, static, functions to begin with the nx prefix.
2019-02-04 13:42:51 -06:00
Gregory Nutt
c17145e550 Revert "binfmt/libelf/libelf_load.c: Remove the guard(CONFIG_BUILD_KERNEL) for umm_initialize()"
This commit has to be reverted because it causes errors in build testing.

This reverts commit b9c7a9a18f.
2019-02-03 18:08:46 -06:00
Xiang Xiao
b9c7a9a18f binfmt/libelf/libelf_load.c: Remove the guard(CONFIG_BUILD_KERNEL) for umm_initialize() 2019-01-28 06:19:48 -06:00
Gregory Nutt
78c8485b0d Fix some warnings found in build testing. 2019-01-27 17:23:01 -06:00
Gregory Nutt
6e64b05ef3 Update some Kconfig comments. 2019-01-26 13:34:01 -06:00
Xiang Xiao
b7f958a02e binfmt/, binfmt/libelf: binfmt/elf: Call umm_initialize as soon as possible otherwise elf_loadctors/elf_loaddtors will fail to allocate memory. 2019-01-26 11:36:38 -06:00
Xiang Xiao
0edcd6b85e binfmt/libelf, libs/libc/modlib: Optimize elf load speed: (1) Don't zero out memory, (2) Reduce the initial buffer size to 32 bytes. 2019-01-26 11:34:40 -06:00
Xiang Xiao
264a7164bc binfmt/: If there is an address environment (CONFIG_ARCH_ADDRENV), binfmt/elf doesn't need to free ctor/dtor alloc since freeing the address environment releases the heap automatically. 2019-01-26 11:29:08 -06:00
Xiang Xiao
38ffb98f1b Kconfig files, binfmt/libelf, libs/libc/machin, libs/libxx: Correct libcxx exception handling by introducing the generic config(CXX_EXCEPTION and CXX_LIBSUPCXX) 2019-01-26 11:23:31 -06:00
Xiang Xiao
095e28d45e binfmt/, binfmt/libelf/, include/nuttx, libs/libc/machine, libs/libc/modlib, and others: Move elf related arch function to include/nuttx/elf.h because the implementation is located in libs/libc/machine and in order to avoid the conflict with the 3rd party libraries and clean up the file inclusion: (1) Remove redundant elf32.h, (2) Remove nuttx/binfmt/elf.h in libs/libc/machine, (2) Remove nuttx/binfmt/elf.h in modlib, and (4) Rmove nuttx/module.h in modlib. 2019-01-26 11:18:45 -06:00
nchao
6509a0c0ca binfmt/ and libs/libc: Make exepath_*() more common:
1. Move exepath_*() related code to libc/misc
  1. Rename exepath_ to envpath_
  2. Rename BINFMT_EXEPATH to LIB_ENVPATH

libs/libc/modlib:  Add pre module library symbol table support
2018-11-08 07:27:14 -06:00
Gregory Nutt
a83b6d990b Replace callse to ioctl() in the OS to file_ioctl() 2018-09-15 11:47:24 -06:00
Gregory Nutt
a7fd58c4db Squashed commit of the following:
many locations:  Change occurences of open() followed by file_detach() to file_open().  Change most non-controversion calls to open() to nx_open().

    fs/inode/fs_fileopen.c:  Flesh out file_open() with some interim, placeholder logic.

    fs/inode/fs_fileopen.c:  Add a framework for a file_open() implementation (no real logic in place yet).

    fs/vfs/fs_open.c:  Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
Gregory Nutt
9546481054 Fix some typographical errors. 2018-09-14 06:55:45 -06:00
Gregory Nutt
e90f0403a6 binfmt/: Mostly cosmetic changes from review of a previous commit. 2018-08-24 06:10:50 -06:00
Gregory Nutt
2722fd8192 tools/nxstyle.c: Add capability to detect multiple blank lines. Single spacing required by the coding standard. Also coding standard fixes to server .c files for problems found during testing nxstyle. 2018-08-24 05:51:44 -06:00
Xiang Xiao
86eef8ce3a mm/: add mm_heapmember function and reimplement kmm_heapmember base on mm_heapmember since this function is very useful if multiple heaps exist. 2018-08-23 09:38:49 -06:00
Xiang Xiao
377eb30129 binfmt: Add binfmt_initialize(). All binary formats are now registered centrally vs. in board-specific logic. This simplifies the usage of the binfmt subsystem. 2018-08-23 09:09:39 -06:00
Gregory Nutt
2edfe7ed42 Revert "binfmt/elf: Set elf tcb priority level to default"
This reverts commit 1137927bd7.

Superceded by commit f1b5a80ae9
2018-08-22 08:35:52 -06:00
anchao
f1b5a80ae9 binfmt/elf: Set priority level to default if parent has no priority. 2018-08-22 07:20:24 -06:00
anchao
1137927bd7 binfmt/elf: Set elf tcb priority level to default 2018-08-22 07:16:52 -06:00
Gregory Nutt
4becaea8e3 This commit extends support for the two-pass build. Its primary purpose is to incorporate source logic generated by applications into the kernel phase of the build.
In the two pass build, the application logic is built during the first phase, pass 1.  In that phase, the application may generate and install source files in the pass1/directory.  The operating system is built during phase 2 of the build.  At that time, those source files in the pass1/ directory will be built and incorporated into the kernel address space.

The primary purpose of the pass1/ directory is to such application-generated kernel symbol tables.  For an example of the use of this feature, look at apps/examples/module/drivers/Makefile.  Kernel symbol tables are needed to support kernel modules.  Of course, addition board-specific logic in, say, configs/<board>/src would have to be included to make use of the application-installed symbol tables.
2018-08-07 08:31:00 -06:00
Gregory Nutt
20a86dfc1b binfmt/ and sched/group: Re-architect the way that loadable ELF or NXFLAT modules are unloaded. Memory resources must be recovered when the task loaded into memory exits. The originmal implementatino used the death-of-child SIGCHLD signal to perform the unload. There are several problems with this: It is overly complex, it requires that the parent task stay resident while the loaded task runs, and it has fatal logic flaws in the protected and kernel model builds because the user signal handler attempts to run in the kernel address space. This commit corrects with using a mindlessly simply BINFMT callback when the task exits. 2018-08-05 08:09:54 -06:00
Masayuki Ishikawa
8ec22e916e Merged in masayuki2009/nuttx.nuttx/refactor_binfmt_exec (pull request #697)
binfmt: Refactor binfmt_exec.c

This change also fixes an argv issue for CONFIG_SCHED_ONEXIT=n
or CONFIG_SCHED_HAVE_PARENT=n

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-26 13:40:28 +00:00
Gregory Nutt
2553df7edc binfmt/binfmt_execsymtab.c: Fix a recently introduced error: The size of the symbol table is now an 'int' variable; but a variable cannot be used as an initializer because it is not constant. Also updates a README file. 2018-07-17 10:34:56 -06:00
Gregory Nutt
a3f80e1894 binfmt/binfmt_execsymtab.c: Fix a typo in a configuration variable name. 2018-07-16 12:15:09 -06:00
Gregory Nutt
4c67062457 Squashed commit of the following:
binfmt/, libs/libc/unistd, and others:  Rename CONFIG_EXECFUNCS_SYMTAB to CONFIG_EXECFUNCS_SYMTAB_ARRAY.  Rename CONFIG_EXECFUNCS_NSYMBOLS to CONFIG_EXECFUNCS_NSYMBOLS_VAR.  Unlike CONFIG_EXECFUNCS_NSYMBOLS, CONFIG_EXECFUNCS_NSYMBOLS_VAR holds the name of an 'int' variable that contains the number of symbols in the symbol table.

    configs/sama5d4-ek:  Partial update to knsh build instructions.
2018-07-15 11:20:37 -06:00
Gregory Nutt
664af2a69b Default for CONFIG_EXECFUNCS_HAVE_SYMTAB should be 'not set' 2018-07-13 14:56:45 -06:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
8b4b61f140 fs/cromfs: Fix a error in reading partial compressed blocks. The LZF decompressor does not support that operation. Instead we have to decompress full block into a temporary buffer and copy out the parts that we need. To compensate for the performance hit, a caching mechanism was added so that we do not have to read the same block repeatedly. Unrelated: Also updates some README files. 2018-03-24 11:30:35 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
a096bc1266 binfmt/: Fix one more inappropriate access to the errno variable. 2018-02-01 08:33:04 -06:00
Gregory Nutt
3521aaf944 Squashed commit of the following:
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
    arch/arm/src/stm32 and stm32f7:  Architecture-specific code is not permitted to modify the errno variable.  drivers/ and libc/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
2018-01-30 17:57:36 -06:00
Gregory Nutt
30f2927101 binfmt/, drivers/, graphics/: Fix several inappropriate accesses to get_errno() that were missed in previous changes (some going back to nuttx-.23). 2018-01-30 17:23:10 -06:00
Gregory Nutt
170a50c690 Squashed commit of the following:
sched/sched:  Correct some build issues introduced by last set of changes.
    sched/sched:  Add new internal OS function nxsched_setaffinity() that is identical to sched_isetaffinity() except that it does not modify the errno value.  All usage of sched_setaffinity() within the OS is replaced with nxsched_setaffinity().
    sched/sched:  Internal functions sched_reprioritize() and sched_setpriority() no longer movidify the errno value.  Also renamed to nxsched_reprioritize() and sched_setpriority().
    sched/sched:  Add new internal OS function nxsched_getscheduler() that is identical to sched_getscheduler() except that it does not modify the errno value.  All usage of sched_getscheduler() within the OS is replaced with nxsched_getscheduler().
    sched/sched:  Add new internal OS function nxsched_setparam() that is identical to sched_setparam() except that it does not modify the errno value.  All usage of sched_setparam() within the OS is replaced with nxsched_setparam().
    sched/sched:  Add new internal OS function nxsched_getparam() that is identical to sched_getparam() except that it does not modify the errno value (actually, the previous value erroneously neglected to set the errno value to begin with, but this fixes both issues).  All usage of sched_getparam() within the OS is replaced with nxsched_getparam().
2018-01-30 11:08:18 -06:00
Gregory Nutt
181875f3ba fs/vfs: Add new internal OS interface nx_read(). nx_read() is functionally equivalent to read() except that it does not modify the errno variable and it is not a cancellation point. Changed all references to read() in the OS to nx_read(). 2017-10-11 12:13:41 -06:00
Gregory Nutt
d633c9bf8c Squashed commit of the following:
Replace all calls to sigprocmask() in the OS proper with calls to nxsig_procmask().

    sched/signal:  Add internal OS interface nxsig_procmask().  This internal interface is equivalent to the standard sigprocmask() used by applications except that it does not modify the errno value.  Also fixes a problem in that the original sigprocmask() was not setting the errno.
2017-10-07 12:16:10 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt
5c4d45a331 Documentation and comments updated to further enshrine exec() as an official NuttX interface. 2017-10-03 07:52:05 -06:00
Gregory Nutt
bc2cded397 Squashed commit of the following:
binfmt: Fix some compilation issues introduced in previous changes.  Verfied with the STM32F4-Discovery ELF configuration.

    binfmt:  schedule_unload() is an internal OS function and must not alter the errno variable.

    binfmt:  unload_module() is an internal OS function and must not alter the errno variable.

    binfmt:  load_module() is an internal OS function and must not alter the errno variable.

    binfmt:  exec_module() is an internal OS function and must not alter the errno variable.
2017-10-02 15:30:55 -06:00
Gregory Nutt
374f1bd46c binfmt: Don't schedule starthook if there are no constructors. 2017-10-02 14:04:50 -06:00
Cristian Condurache
2ea054fead Merged in ccondurache/nuttx/fix_elf_arm_checkarch (pull request #422)
Fix ELF loader up_checkarch on ARM arch

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-06-28 16:19:51 +00:00
Cristian Condurache
d4add14823 Fix ELF loader up_checkarch on ARM arch 2017-06-28 18:11:39 +03:00
Yasuhiro Osaki
b1008477ac binfmt: Fix .dtor memory allocation
Jira: PDFW15IS-265
Coverity-ID: 11053
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-05-19 17:01:48 +09:00
Gregory Nutt
0de294a586 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
Yasuhiro Osaki
c109e92962 binfmt: Fix offset value when calling elf_read() in elf_sectname()
Jira: PDFW15IS-3030
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-28 17:23:02 +09:00
Yasuhiro Osaki
dd2efb909a binfmt: Fix offset value when calling elf_read() in elf_symname()
Jira: PDFW15IS-1650
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-26 14:46:34 +09:00
Gregory Nutt
edd9186540 ELF: Move ARMv7-A and ARMv7-R versions of ELF relocation logic to libc/machine 2017-01-21 14:40:26 -06:00
Gregory Nutt
ee9c66186c ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers. 2016-07-20 14:02:18 -06:00
Gregory Nutt
378b22ec07 binfmt: Remove PCODE dependency on apps/pcode.h 2016-06-30 11:25:59 -06:00
Gregory Nutt
2a751068e6 Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err(). 2016-06-20 12:44:38 -06:00
Gregory Nutt
43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt
3fa41c0f18 Kconfig files: Fix some dependencies that have CONFIG_ in the variable name 2016-06-17 19:30:19 -06:00
Gregory Nutt
0c8c7fecf0 Add _ to the beginning of all debug macros to avoid name collisions 2016-06-16 12:33:32 -06:00
Gregory Nutt
a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2 Rename *lldbg to *llerr 2016-06-11 14:55:27 -06:00
Gregory Nutt
86b79b33cf Reserver the name 'err' for other purposes 2016-06-11 14:40:07 -06:00
Gregory Nutt
1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt
3a74a438d9 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:18 -06:00
Gregory Nutt
e523c93391 Several Makefiles: Add .PHONY definitions to prevent 'clean up to date' message weirdness. 2016-05-10 15:44:06 -06:00
Gregory Nutt
f45db0313d nuttx/binfmt: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 08:46:08 -06:00
Gregory Nutt
3ba9e82c72 Update README 2016-01-22 17:21:49 -06:00
Gregory Nutt
e8d0f85c8b Modules: Add mod_setsymtab to set global symtol table once. Now we can remove symbol table parameters from the insmod call. This will make implementing an NSH insmod command much easier 2015-12-13 08:10:01 -06:00
Gregory Nutt
49554fe4fc Move module support from binfmt/ to sched/ so that it can be configured and built independently from binfmt features 2015-12-12 07:09:17 -06:00
Gregory Nutt
44e45f0f91 insmod is code complete and ready for test 2015-12-11 10:55:21 -06:00
Gregory Nutt
05cb7a9043 Call initializer entry point on start-up; do not create a task 2015-12-11 07:27:45 -06:00
Gregory Nutt
251e8395c7 Mostly cosmetic renaming to straighten out namespace 2015-12-10 16:56:10 -06:00
Gregory Nutt
8bcf35ff39 binfmt/libmodule: Add support for kernel modules. Initial commit is just the ELF module support with name changes 2015-12-10 09:53:31 -06:00
Gregory Nutt
4a7fb2cbc1 binfmt: Cosmetic -- rename binfmt_internal.h to binfmt.h. Move related argument copy logic into new file, binfmt_copyargv.c 2015-11-14 07:29:47 -06:00
Gregory Nutt
45eebacbb4 binfmt/: More spacing/alignment fixes 2015-10-08 19:20:17 -06:00
Gregory Nutt
0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt
0f90500f72 Standardize the width of all comment boxes in header files 2015-10-02 17:48:24 -06:00
Gregory Nutt
5b51a9fcdd Standardize the width of all comment boxes in C files 2015-10-02 17:43:18 -06:00
Gregory Nutt
cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Bruno Herrera
3fd07e32e9 binfmt/builtin.c: Fix a memory leak: File was not being closed. 2015-08-30 07:14:45 -06:00
Anton D. Kachalov
2ca1dd6efe Eliminate `sigset' shadow warning
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-07-31 21:28:40 +03:00
Gregory Nutt
342f5fe33d Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation 2015-06-28 08:08:57 -06:00
Gregory Nutt
c704a5289c Comment out references to fstat(). It is not yet supported. 2015-06-02 11:43:44 -06:00
Gregory Nutt
6068820bf3 Add support uClibc++ excpetions. This involves additional handling for relative relation types, additional support for unwinding, as well as additional changes. The culmination of a big effort fromo Leo Aloe3132 2015-06-01 14:16:18 -06:00
Gregory Nutt
56dee97fbf Fix a misnamed symbol in a linker script. I don't think that this symbol is used 2015-05-04 13:45:24 -06:00
Gregory Nutt
916ccc78bb binfmt: Fix a debug statement that does not have the correct number of arguments. From Leo aloe3132 2015-04-30 14:31:04 -06:00
Gregory Nutt
48271cca05 Make some file section headers more consistent with standard 2015-04-08 08:29:03 -06:00
Gregory Nutt
2407008b6e drivers/ramdisk.c and include/nuttx/fs/ramdisk.h: Add logic to dispose of the drvier and RAM buffer when the RAM disk has been unlinked and all open references to the RAM disk have been closed. Add new parameters to romdisk() to specify what should be done with the RAM/ROM buffer -- Should it be freed or not? Changed all calls to ramdisk() to use these new parameters. 2015-02-01 07:24:16 -06:00
Gregory Nutt
771bbc1be8 Cosmetic change to debug output 2014-12-08 09:43:01 -06:00
Gregory Nutt
d9344793a9 Remove unused setting of a variable 2014-12-07 07:16:20 -06:00
Gregory Nutt
bd1b5094b4 Trivial binfmt logic clean-up 2014-11-14 10:38:58 -06:00
Gregory Nutt
9e290c10b5 Fix some compile issues introduces with removal of CONFIG_MAX_TASK_ARGS 2014-11-14 09:53:11 -06:00
Gregory Nutt
7c119ba787 Binfmt no longer depends on a fixed sized argv[] list 2014-11-12 18:31:32 -06:00
Gregory Nutt
179fabb019 Add description of work queues to the porting guide. Update comments 2014-10-14 10:21:18 -06:00
Gregory Nutt
dd9e42ec0c Fix a compile problem noted by Marco Cruz 2014-10-13 12:07:40 -06:00
Gregory Nutt
2311a97ad6 Remaining files under nuttx/binfmt changed to use the corrected syslog interfaces 2014-10-08 15:34:51 -06:00
Gregory Nutt
dadbbb8ac5 Fix some misleading debug output 2014-09-26 14:58:03 -06:00
Gregory Nutt
b33c2d9cef Move include/nuttx/mm.h to include/nuttx/mm/mm.h 2014-09-24 07:29:09 -06:00
Gregory Nutt
1863370672 Move include/nuttx/shm.h to include/nuttx/mm/shm.h 2014-09-24 07:05:02 -06:00
Gregory Nutt
2fa7431ee7 Move include/nuttx/gran.h to include/nuttx/mm/gran.h 2014-09-24 06:55:26 -06:00
Gregory Nutt
835c91b03a Add support for a per-process virtual page allocator. This is a new member of the task_group_s structure. The allocaor must be initialized when a new user process is started and uninitialize when the process group is finally destroyed. It is used by shmat() and shmdt() to pick the virtual address onto which to map the shared physical memory. 2014-09-23 16:04:39 -06:00
Gregory Nutt
398f7b594f execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic 2014-09-15 10:15:47 -06:00
Gregory Nutt
da7a440b35 execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic 2014-09-15 10:15:19 -06:00
Gregory Nutt
62880f60c4 In kernel mode, we have to duplicate the callers argv[] buffer when exec'ing new tasks. When the argv[] buffer is needed, the caller's address environment will not longer be in place 2014-09-14 14:10:23 -06:00
Gregory Nutt
2eb71d5a35 Fix an ordering problem in integration of kernel stack logic 2014-09-14 12:40:09 -06:00
Gregory Nutt
3649dab9bd Initial integration of kernel stack (does not work) 2014-09-14 11:19:34 -06:00
Gregory Nutt
1329c29ecd ELF: Critical bugfix.. BSS was not being cleared 2014-09-12 10:32:23 -06:00
Gregory Nutt
67838239c4 Update some comments/function headers 2014-09-11 17:15:26 -06:00
Gregory Nutt
0fc55d042f Misc fixes to repair some of the breakage to the SAMA5D4-EK elf configuration caused by changes for the knsh configuration 2014-09-11 10:31:12 -06:00
Gregory Nutt
205c23b9d6 Add logic to initialize the per-process user heap when each user process is started 2014-09-10 15:55:36 -06:00
Gregory Nutt
df4682fd1f Add configuration to use the fixed DRAM mapping for the page pool (if available) instead of remapping dynamically to access L2 page tables and page data. Also, add logic in address environment creation to initialize the shared data at the beginning of the .bss/.data process memory region. 2014-09-10 08:41:01 -06:00
Gregory Nutt
76957599a2 When allocating a stack for a new process using the user-sapce allocator, need to select the address environment first 2014-09-09 17:32:32 -06:00
Gregory Nutt
c458e72b70 ELF relocations. Some relocation types do not have a named symbol associated with them. The design did not account for that case 2014-09-09 16:52:51 -06:00
Gregory Nutt
b63eea45b6 Improved binfmt debug output 2014-09-07 13:47:01 -06:00
Gregory Nutt
39c95050ab Fix typo in ELF variable name (only see it when C++ support is enabled) 2014-09-07 13:46:13 -06:00
Gregory Nutt
23147c40a5 Remove final traces of the 8015 from the NuttX source tree 2014-09-01 13:21:15 -06:00
Gregory Nutt
205260d5e2 Reanem kzalloc to kmm_zalloc for consistency 2014-08-31 17:34:44 -06:00
Gregory Nutt
1780810d3d Rename kmalloc to kmm_malloc for consistency 2014-08-31 17:26:36 -06:00
Gregory Nutt
54fa3b0b59 Rename kfree to kmm_free for consistency with other naming conventions 2014-08-31 17:04:02 -06:00
Gregory Nutt
9aca0c1c84 Rename kumalloc to kumm_malloc and kuzalloc to kumm_zalloc for consistency with other naming 2014-08-31 16:24:24 -06:00
Gregory Nutt
9ad7dae4c1 Rename kufree to kumm_free for consistency with other naming 2014-08-31 16:15:11 -06:00
Gregory Nutt
9cd1ddada4 Rename kmemalign to kmm_memalign and krealloc to kmm_realooc for consistency with other naming 2014-08-31 15:27:37 -06:00
Gregory Nutt
e3ff0689bb Rename CONFIG_NUTTX_KERNEL to CONFIG_BUILD_PROTECTED; Partially integrate new CONFIG_BUILD_KERNEL 2014-08-29 14:47:22 -06:00
Gregory Nutt
89593969be nuttx/sched: Remove explicit references to errno. That is a problem from within the kernel for certain configurations 2014-08-28 17:00:43 -06:00
Gregory Nutt
ad53cabf34 ADDRENV: Use a group flag to determine if there is an address environment (instead of the thread type) 2014-08-27 09:37:28 -06:00
Gregory Nutt
0db7da1858 Add up_addrenv_coherent which will be called before address environment switches 2014-08-26 14:53:19 -06:00
Gregory Nutt
b13d9b4161 Rename up_addrenv_assign() to up_addrenv_clone() and generalize its arguments so that can be used for other purposes 2014-08-26 12:16:05 -06:00
Gregory Nutt
7e0ce83e47 Can't dump loaded code unless we first establish the mappings 2014-08-26 10:42:42 -06:00
Gregory Nutt
d52599fe8e Change when address environment is instantiated; there are/were locations where access is made to the allocation address environment when it is not yet in place 2014-08-26 07:57:30 -06:00
Gregory Nutt
66a5328a68 Cortex-A address environment: Fix some section mapping and address increments 2014-08-26 06:33:26 -06:00
Gregory Nutt
1725946447 Misc changed to get the SAMA5 ELF configuration with address environments working 2014-08-25 13:28:13 -06:00
Gregory Nutt
e0a48b60b6 Change naming of ELF interfaces from arch_ to up_ for consistency 2014-08-25 06:47:14 -06:00
Gregory Nutt
7aea220ebf After cached related fix, the ELF example is now functional 2014-08-24 14:12:45 -06:00
Gregory Nutt
1708a133f5 Fix some compilation errors in ELF logic that were introduced in a recent commit 2014-08-24 12:57:02 -06:00
Gregory Nutt
241a7e17bd addrenv interface changes: up_addrenv_create() may need to create .text and .bss/.data separately because of differing access privileges (read/execute vs read/write). And, as a consequence, up_addrenv_vaddr() needs to be split into up_addrenv_vtext(0 and up_addrenv_vdata(). 2014-08-24 11:54:14 -06:00
Gregory Nutt
2cb9d5c7b0 Add addrenv.h; First cut at Cortex-A address environment structures; Add configuration options to setup address enviornment 2014-08-24 09:57:53 -06:00
Gregory Nutt
1624e2fbcf Change CONFIG_ADDRENV to CONFIG_ARCH_ADDRENV; change how it is selected -- the architecure must first declare support 2014-08-24 06:42:11 -06:00
Gregory Nutt
e79d6e3c8b A few fixes for compilation errors due to recent address environment fixes 2014-08-22 15:55:00 -06:00
Gregory Nutt
1d586e6136 An address environment is the property of a task group, not of a thread 2014-08-22 12:32:34 -06:00
Gregory Nutt
d798dd37a7 Replace os_internal.h with sched/sched.h in files that actually reference something in sched.h 2014-08-08 17:53:55 -06:00
Gregory Nutt
2dd9ce50c8 Clean-up up some warning 2014-07-11 11:58:46 -06:00
Gregory Nutt
5df891ff28 Fix an error in exec(). argv[] has not being passed 2014-06-15 13:22:44 -06:00