| Age | Commit message (Collapse) | Author |
|
When msh tries to execute a non-ELF path, lwp_execve() may allocate a PID
before lwp_load() fails. The old error path only dropped the LWP reference,
leaving the PID tree entry pointing to a freed LWP.
In an init-less boot flow, this can poison pid 1 after a failed command from
msh. A later LWP launch may then treat the stale pid 1 entry as a valid parent
LWP, resulting in invalid pgrp/session state and a job-control assertion during
process exit.
Add lwp_pid_rollback() for exec/spawn failures before the process becomes
runnable. Unlike lwp_pid_put(), it always releases the PID lock and does not
enter the "no more pid allocation" state when the PID tree becomes empty.
Use the rollback helper in lwp_execve() failure paths after PID allocation.
Signed-off-by: zhangyang <[email protected]>
|
|
|
|
|
|
This change introduces the `lwp_runtime.c` component, which provides the
necessary runtime environment for the init process, including boot scripts,
shutdown, and poweroff functionalities. The initialization logic has been
moved from `lwp.c` to this new file, enhancing modularity and flexibility
in handling LWP runtime tasks.
Changes:
- Moved the `lwp_startup` function from `lwp.c` to `lwp_runtime.c` to handle
system initialization and runtime environment setup.
- Added `lwp_teardown` placeholder for system shutdown and cleanup tasks in
the future (though not yet implemented).
- Introduced the `LWP_USING_RUNTIME` configuration option in `Kconfig` to
conditionally enable the runtime environment.
- Updated the `SConscript` to conditionally include `lwp_runtime.c` based on
the `LWP_USING_RUNTIME` configuration.
- Removed the old `lwp_startup` code from `lwp.c`, simplifying the file.
Signed-off-by: Shell <[email protected]>
|
|
- `dbg_log` is a “NOT RECOMMENDED API”, convert the calling of this
API to LOG_x and remove this API.
- `dbg_here`/`dbg_enter`/`dbg_exit`: no one use these APIs, remove
them directly.
Signed-off-by: Chen Wang <[email protected]>
|
|
* [smart] add CPU usage tracing config
This patch introduces following features:
- Added CPU usage tracing functionality, enabled by default, for
applications like 'top'
- update time as smart independent
Signed-off-by: Shell <[email protected]>
* fixup: add ump idle thread
---------
Signed-off-by: Shell <[email protected]>
|
|
This patch fixup the script execution capabilities on argv passing
and adds support for arguments larger than 4k.
According to POSIX, the script parameter is quiet different
from the current implementation. Especially on the way it inserts
the path of executables. At the end, when you execute a script
from `$PATH`, it always fails.
For the script, interpreter will be invoked with the following
arguments: `{interpreter [optional-arg] pathname arg...}`
where pathname is the pathname of the file specified as the first
argument of execve(), and arg... is the series of words pointed
to by the argv argument of execve(), starting at argv[1]. Note that
there is no way to get the argv[0] that was passed to the
execve() call.
The changes include:
- Separating argument, environment variable, and auxiliary vector
processing into a new lwp_args.c file.
- Fixing bugs in script argument processing and supporting arguments
larger than 4k.
- Updating lwp_execve to use the new argscopy function and removing
the old lwp_argscopy function.
- Making various modifications to lwp_load and elf_aux_fill to work
with the new argument processing.
- Removing unnecessary code related to dynamic loading and interpreter
scripts.
Signed-off-by: Shell <[email protected]>
|
|
* [smart] select console device dynamically
- Fixed compiler warning on terminal subsystem for
`components/lwp/terminal/terminal.h`
- Updated default console setup to dynamically select an appropriate tty
device based on the configured console device name.
Signed-off-by: Shell <[email protected]>
* fixup: remove useless codes
---------
Signed-off-by: Shell <[email protected]>
|
|
Signed-off-by: Shell <[email protected]>
|
|
In this patch, a hook list has been introduced to address the concerns
regarding coupling issues arising from modifications to the serial code
for integrating TTY logic.
Signed-off-by: Shell <[email protected]>
|
|
Signed-off-by: xqyjlj <[email protected]>
Signed-off-by: Shell <[email protected]>
Co-authored-by: xqyjlj <[email protected]>
|
|
|
|
|
|
Signed-off-by: shell <[email protected]>
Signed-off-by: Shell <[email protected]>
Co-authored-by: xqyjlj <[email protected]>
|
|
Signed-off-by: Shell <[email protected]>
Co-authored-by: Shell <[email protected]>
|
|
Signed-off-by: Shell <[email protected]>
|
|
|
|
Signed-off-by: Shell <[email protected]>
|
|
Prev implementation of lwp_new() including the create of lwp object
and the pid allocation. But not every lwp object need a pid.
So this patch split out the business of lwp_new() to improve the
maintainability.
Signed-off-by: Shell <[email protected]>
|
|
|
|
Signed-off-by: Shell <[email protected]>
|
|
|
|
Signed-off-by: Shell <[email protected]>
|
|
|
|
|
|
* [mm/page] multi-list page manager
[mm/page] page debugger
[libcpu/aarch64] hugepage support
* [quality] remove void-arith
* [format] remove kasan codes
|
|
* [DFS] prepare for dfs_v2. dfs_fd -> dfs_file; dfs_fnode -> dfs_vnode.
* [BSP] fix code analysis warning
* [smart] fix the pointer overflow.
* code format
* [smart] fix the lwp->lwp_obj checking.
|
|
|
|
|
|
fix bugs on cache maintenance when starting user app
|
|
* [fix/lwp] don't restore term for background lwp
|
|
synchronize virtual memory system works.
adding kernel virtual memory management layer for page-based MMU enabled architecture
porting libcpu MMU codes
porting lwp memory related codes
|
|
* [dfs] sync cromfs
* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration
* [format] fix some format issue.
|
|
* [rtdef] rename RT_WEAK attribute as rt_weak
* [rtdef] rename RT_USED attribute as rt_used
* [rtdef] rename RT_SECTION attribute as rt_section
* [rtdef] rename ALIGN attribute as rt_align
* [legacy] add RT_USED ALIGN RT_SECTION RT_WEAK as legacy support
|
|
* [risc-v/libcpu] porting Smart & RTOS
* [fix] rv64 plic
* [risc-v/rv64] remove macro in rtdef
|
|
* Synchronize the code of the rt mart branch to the master branch.
* TTY device
* Add lwP code from rt-smart
* Add vnode in DFS, but DFS will be re-write for rt-smart
* There are three libcpu for rt-smart:
* arm/cortex-a, arm/aarch64
* riscv64
Co-authored-by: Rbb666 <[email protected]>
Co-authored-by: zhkag <[email protected]>
|
|
|
|
|
|
|
|
|
|
修改cpu目录名及相关修改
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|