]>
git.corax.cc Git - corax/log
Matthias Kruk [Wed, 29 Jul 2020 00:54:42 +0000 (09:54 +0900)]
kernel: Grow the userspace stack if an application runs out of stack space
Matthias Kruk [Sun, 17 May 2020 05:45:08 +0000 (14:45 +0900)]
libc: Add implementation for _exit(), add vfork() dummy implementation
Matthias Kruk [Fri, 8 May 2020 14:19:56 +0000 (23:19 +0900)]
kernel/core: Fix some compiler warnings
Matthias Kruk [Wed, 6 May 2020 07:00:29 +0000 (16:00 +0900)]
kernel/core: Clean up the init process
Matthias Kruk [Wed, 6 May 2020 06:50:34 +0000 (15:50 +0900)]
kernel/core: Assign pids starting with 0
Matthias Kruk [Wed, 6 May 2020 06:50:03 +0000 (15:50 +0900)]
kernel/core: Clean up and remove unused code in main.c
Matthias Kruk [Wed, 6 May 2020 06:42:22 +0000 (15:42 +0900)]
kernel/core: Remove pid argument from process_create()
Matthias Kruk [Wed, 6 May 2020 04:34:56 +0000 (13:34 +0900)]
kernel: Remove kbd and vga processes from kernel tree
Matthias Kruk [Wed, 6 May 2020 04:00:45 +0000 (13:00 +0900)]
Add VGA system process
Matthias Kruk [Wed, 6 May 2020 03:59:40 +0000 (12:59 +0900)]
libc: Call _exit() after returning from main()
Matthias Kruk [Wed, 6 May 2020 03:17:35 +0000 (12:17 +0900)]
libc: Clean up syscall assembly stubs
Matthias Kruk [Wed, 6 May 2020 03:16:03 +0000 (12:16 +0900)]
libc: Rename assembly stub for SYS_EXIT from exit to _exit
Matthias Kruk [Tue, 5 May 2020 17:26:06 +0000 (02:26 +0900)]
sys/kbd: Remove unused variable
Matthias Kruk [Tue, 5 May 2020 17:24:55 +0000 (02:24 +0900)]
kernel/core: Execute system processes from initfs once the kernel has been initialized
Matthias Kruk [Tue, 5 May 2020 17:23:39 +0000 (02:23 +0900)]
kernel/core: Finish execeve() implementation
Matthias Kruk [Tue, 5 May 2020 17:21:37 +0000 (02:21 +0900)]
libc: Add snprintf() implementation
Matthias Kruk [Tue, 5 May 2020 17:20:33 +0000 (02:20 +0900)]
libc: Add memcpy() implementation, fix bug in memset()
Matthias Kruk [Tue, 5 May 2020 03:07:53 +0000 (12:07 +0900)]
kernel/arch: Don't pass uninitialized variables to pg_dir_map() in pg_dir_mmap()
Matthias Kruk [Mon, 4 May 2020 19:20:41 +0000 (04:20 +0900)]
kernel/core: Make elf_phdr_foreach() calculate the address of the headers correctly
Matthias Kruk [Mon, 4 May 2020 17:08:32 +0000 (02:08 +0900)]
kernel/core: Update the process's tasks' t_kstack member when the process's page directory is changed
Matthias Kruk [Mon, 4 May 2020 09:30:08 +0000 (18:30 +0900)]
include: Add missing prototype for execeve() to unistd.h
Matthias Kruk [Mon, 4 May 2020 08:53:31 +0000 (17:53 +0900)]
Add a simple kbd binary to the initfs for testing purposes
Matthias Kruk [Mon, 4 May 2020 08:52:34 +0000 (17:52 +0900)]
sys: Use the _binary_*_size symbol to determine the size of binaries in the initfs
Matthias Kruk [Mon, 4 May 2020 08:49:16 +0000 (17:49 +0900)]
kernel/core: Add missing parameter in call to dbg_printf()
Matthias Kruk [Mon, 4 May 2020 08:30:09 +0000 (17:30 +0900)]
Merge branch 'libc' into elf-loader
Matthias Kruk [Mon, 4 May 2020 08:29:50 +0000 (17:29 +0900)]
Merge branch 'initfs' into elf-loader
Matthias Kruk [Mon, 4 May 2020 08:28:53 +0000 (17:28 +0900)]
kernel/core: Implement sys_execeve() syscall handler
Matthias Kruk [Mon, 4 May 2020 08:27:43 +0000 (17:27 +0900)]
kernel/core: Add simple ELF file support
Matthias Kruk [Mon, 4 May 2020 08:26:15 +0000 (17:26 +0900)]
kernel/arch: Add pg_dir_memset() function, enhance pg_dir_mmap() function to support mapping of virtual memory for text and data segments
Matthias Kruk [Sun, 3 May 2020 17:22:24 +0000 (02:22 +0900)]
kernel: Add execeve syscall for execution of ELF files
Matthias Kruk [Fri, 1 May 2020 09:41:48 +0000 (18:41 +0900)]
libc: Add dummy _start function
Matthias Kruk [Fri, 1 May 2020 09:41:09 +0000 (18:41 +0900)]
libc: Add signal handling code from klibc
Matthias Kruk [Fri, 1 May 2020 09:40:17 +0000 (18:40 +0900)]
libc: Add debug and sigaction syscall stubs
Matthias Kruk [Fri, 1 May 2020 09:39:21 +0000 (18:39 +0900)]
libc: Add memset() function
Matthias Kruk [Fri, 1 May 2020 05:36:09 +0000 (14:36 +0900)]
corax/sys: Add initfs infrastructure
Matthias Kruk [Fri, 1 May 2020 01:41:40 +0000 (10:41 +0900)]
kernel/core: Wake up sleeping processes upon signal reception
Matthias Kruk [Fri, 1 May 2020 01:39:36 +0000 (10:39 +0900)]
sched/lazy: Fix bug in _lazy_tick() causing waiting processes to be scheduled
Matthias Kruk [Fri, 1 May 2020 01:35:12 +0000 (10:35 +0900)]
kernel/kbd: Add debug output to see what's going on in kbd_main()
Matthias Kruk [Sat, 4 Apr 2020 15:57:57 +0000 (00:57 +0900)]
kernel/core: Make mailbox_get() return -EINTR if the call to sem_wait() failed
Matthias Kruk [Sat, 4 Apr 2020 15:57:03 +0000 (00:57 +0900)]
klibc/sem: Make sem_wait() return -EINTR if interrupted due to a signal
Matthias Kruk [Fri, 27 Mar 2020 03:07:19 +0000 (12:07 +0900)]
kernel/kbd: Make the interrupt handler print something
Matthias Kruk [Fri, 27 Mar 2020 03:04:34 +0000 (12:04 +0900)]
kernel/core: Make init process wait() indefinitely, for now
Matthias Kruk [Sat, 21 Mar 2020 17:45:19 +0000 (02:45 +0900)]
sched/lazy: Make sure _lazy_tick() doesn't break if ctask is NULL, which happens the first time it is called
Matthias Kruk [Sat, 21 Mar 2020 17:12:25 +0000 (02:12 +0900)]
kernel/arch: Fix task_lock() and task_unlock() functions
Matthias Kruk [Sat, 21 Mar 2020 09:15:42 +0000 (18:15 +0900)]
core/process: Use new scheduler calls, fix compiler warnings
Matthias Kruk [Sat, 21 Mar 2020 09:13:40 +0000 (18:13 +0900)]
kernel/core: Include <sys/wait.h> from main.c
Matthias Kruk [Sat, 21 Mar 2020 09:12:32 +0000 (18:12 +0900)]
core/posixcall: Use sched_sleep() to suspend running task, instead of process_wait(), fix compiler warning
Matthias Kruk [Sat, 21 Mar 2020 09:11:07 +0000 (18:11 +0900)]
kernel/include: Remove prototypes for old scheduler functions
Matthias Kruk [Sat, 21 Mar 2020 09:09:50 +0000 (18:09 +0900)]
include/sys: Add sys/wait.h header
Matthias Kruk [Sat, 21 Mar 2020 09:08:35 +0000 (18:08 +0900)]
kernel/vga: Remove unused variable
Matthias Kruk [Sat, 14 Mar 2020 09:03:39 +0000 (18:03 +0900)]
kernel/core: Use IPC mailboxes in process and cxipc implementation
Matthias Kruk [Fri, 13 Mar 2020 18:14:05 +0000 (03:14 +0900)]
kernel/core: Finish IPC mailbox implementation
Matthias Kruk [Fri, 13 Mar 2020 18:11:03 +0000 (03:11 +0900)]
kernel/core: Add -nostdinc -fno-builtin -fno-builtin-memcpy to Makefile
Matthias Kruk [Fri, 13 Mar 2020 17:08:27 +0000 (02:08 +0900)]
Add header with documentation for IPC mailboxes, along with a half-baked implementation
Matthias Kruk [Fri, 13 Mar 2020 16:48:42 +0000 (01:48 +0900)]
Add sizeof_a() convenience macro for determining the number of elements in a static array
Matthias Kruk [Tue, 18 Feb 2020 12:00:21 +0000 (21:00 +0900)]
kernel/klibc: Add FCFS-semaphore implementation
- Add ffs type and ffs_* functions
- Fix grammar in documentation of sem_* functions
- Make sure lines in sem.h don't exceed 80 columns
Matthias Kruk [Mon, 10 Feb 2020 11:48:40 +0000 (20:48 +0900)]
klibc/sem: Add sem_peek() method and documentation for all semaphore functions
Matthias Kruk [Mon, 10 Feb 2020 10:50:29 +0000 (19:50 +0900)]
kernel/core: Exclude sched.c from compilation
Matthias Kruk [Mon, 10 Feb 2020 10:49:15 +0000 (19:49 +0900)]
sched/common: Define __SCHED_COMMON in common.c so that scheduler-global variables will be declared
Matthias Kruk [Mon, 10 Feb 2020 10:47:05 +0000 (19:47 +0900)]
kernel/core: Initialize the scheduler at boot time
Matthias Kruk [Mon, 10 Feb 2020 10:45:48 +0000 (19:45 +0900)]
arch/interrupt: Remove declaration of sched_wait() and include <sched.h> instead
Matthias Kruk [Mon, 10 Feb 2020 10:42:06 +0000 (19:42 +0900)]
Merge branch 'sched-next' of ssh://corax.cc:2975/home/mk/devel/corax into sched-next
Matthias Kruk [Sat, 8 Feb 2020 15:45:07 +0000 (00:45 +0900)]
klibc/sem: Add semaphore implementation
Matthias Kruk [Sat, 8 Feb 2020 15:42:54 +0000 (00:42 +0900)]
errno: Add definition for EOVERFLOW
Matthias Kruk [Sat, 8 Feb 2020 15:40:35 +0000 (00:40 +0900)]
klibc/mutex: Reduce the amount of code executed in mutex_trylock() while the spinlock is held
Matthias Kruk [Sat, 8 Feb 2020 15:03:25 +0000 (00:03 +0900)]
klibc/mutex: Move mutex definition to mutex.h and remove unused includes
Matthias Kruk [Sat, 8 Feb 2020 14:26:08 +0000 (23:26 +0900)]
klibc/mutex: Avoid priority inversion in the mutex implementation
Wake up all tasks waiting on a mutex when it gets unlocked. This way,
the order in which the waiting tasks will acquire the mutex depends
solely on the scheduler (and the tasks priority), not implicitly on
the mutex.
Matthias Kruk [Tue, 4 Feb 2020 12:37:00 +0000 (21:37 +0900)]
Change pid_t to be a signed integer, in accordance with IEEE Std 1003.1-2004
Matthias Kruk [Tue, 4 Feb 2020 11:31:53 +0000 (20:31 +0900)]
Make sure klibc is the last element in OBJECTS
Matthias Kruk [Tue, 4 Feb 2020 11:21:01 +0000 (20:21 +0900)]
Fix compiler errors and warnings in lazy scheduler
Matthias Kruk [Tue, 4 Feb 2020 11:20:10 +0000 (20:20 +0900)]
Add EINTR to <corax/errno.h>
Matthias Kruk [Mon, 3 Feb 2020 22:34:13 +0000 (07:34 +0900)]
Add "lazy" scheduler implementation
Matthias Kruk [Mon, 3 Feb 2020 22:31:16 +0000 (07:31 +0900)]
Add simple kernel queue implementation to klibc
Matthias Kruk [Mon, 3 Feb 2020 22:26:28 +0000 (07:26 +0900)]
Move CPU_ID macro to kernel/include/arch.h
Matthias Kruk [Sat, 1 Feb 2020 06:47:15 +0000 (15:47 +0900)]
Add generic scheduler interface, to be implemented by all schedulers
Matthias Kruk [Fri, 31 Jan 2020 11:32:06 +0000 (20:32 +0900)]
Clean up message handling in the stdio daemon by moving it into a separate function
Matthias Kruk [Fri, 31 Jan 2020 11:31:20 +0000 (20:31 +0900)]
Initialize the heap when starting the net daemon
Matthias Kruk [Fri, 31 Jan 2020 11:30:45 +0000 (20:30 +0900)]
Remove some unused code from main.c
Matthias Kruk [Fri, 31 Jan 2020 11:29:32 +0000 (20:29 +0900)]
Implement several of the syscalls of the socket interface
Matthias Kruk [Fri, 31 Jan 2020 11:28:30 +0000 (20:28 +0900)]
Add some more refined definitions for ipc messages to corax/ipc.h (but don't use them yet)
Matthias Kruk [Fri, 31 Jan 2020 11:26:41 +0000 (20:26 +0900)]
Correctly check the return value of cxrecv() in vga daemon, print a message during startup
Matthias Kruk [Fri, 31 Jan 2020 11:24:53 +0000 (20:24 +0900)]
Add strlen() function to userspace libc
Matthias Kruk [Fri, 31 Jan 2020 11:23:55 +0000 (20:23 +0900)]
Add fork and execfve syscall stubs to userspace libc
Matthias Kruk [Sat, 25 Jan 2020 07:46:31 +0000 (16:46 +0900)]
Add functions to raise sleeping processes and tasks
- Implement sched_task_raise()
- Implement sched_raise()
Matthias Kruk [Sat, 25 Jan 2020 07:41:55 +0000 (16:41 +0900)]
Fix some minor problems in the process implementation
- Don't lock tasks in process_task_foreach()
- Wake up processes when they receive signals
Matthias Kruk [Sun, 19 Jan 2020 09:11:43 +0000 (18:11 +0900)]
Deliver signals to processes by storing pending signals and accompanying
signal information in the destination process structure, from where the
destination process will retrieve it before returning from an interrupt
or system call. Exception delivery is not affected by this because
exceptions can be delivered directly.
Function implementations added:
- task_signal_handle()
- process_put_signal()
- process_get_signal()
- process_clear_signal()
- process_set_sighandler()
Matthias Kruk [Sun, 19 Jan 2020 09:08:58 +0000 (18:08 +0900)]
Add definitions for SA_* flags to signal.h
Matthias Kruk [Sat, 18 Jan 2020 08:30:42 +0000 (17:30 +0900)]
Deliver keyboard interrupts to keyboard driver
Matthias Kruk [Sat, 18 Jan 2020 08:17:45 +0000 (17:17 +0900)]
Clean up kernel/include/arch.h a little and add IRQ() macro
Matthias Kruk [Sat, 18 Jan 2020 07:39:58 +0000 (16:39 +0900)]
Change return type of _process_hwint_deliver() so that the caller can find out whether or not the interrupt has been successfully delivered
Matthias Kruk [Thu, 16 Jan 2020 10:49:51 +0000 (19:49 +0900)]
Use parentheses in the definition of sigset_t's val member, otherwise it will be 16 times as large as intended
Matthias Kruk [Tue, 14 Jan 2020 12:23:45 +0000 (21:23 +0900)]
Implement mechanism to deliver hardware interrupts to userspace processes by
co-opting the sigaction() syscall in combination with a new signal, SIGHWINT.
The signal mask that is passed to sigaction() by means of a struct sigaction
is used to notify the kernel which interrupts the process would like to receive.
Processes that choose to use the same handler for multiple hardware interrupts
should set the SA_SIGINFO flag in the sigaction structure. The interrupt handler
will then be passed an additional siginfo_t structure (and a struct ucontext*)
which can be used to find out the hardware interrupt number by inspecting the
siginfo_t structure's si_trapno member.
Matthias Kruk [Tue, 14 Jan 2020 12:07:34 +0000 (21:07 +0900)]
Extend task_signal_deliver() function to allow passing of a siginfo_t to the signal handler
Matthias Kruk [Tue, 14 Jan 2020 12:03:03 +0000 (21:03 +0900)]
Move several definitions from kernel/arch/defs.h to kernel/include/arch.h to make them visible to other parts of the kernel (especially device drivers)
Matthias Kruk [Tue, 14 Jan 2020 11:44:16 +0000 (20:44 +0900)]
Provide a dummy errno.h
Matthias Kruk [Tue, 14 Jan 2020 11:37:18 +0000 (20:37 +0900)]
Provide a dummy printf() function in klibc
Matthias Kruk [Tue, 14 Jan 2020 11:27:24 +0000 (20:27 +0900)]
Implement functions for manipulating sigset_t types in klibc
- sigemptyset()
- sigfillset()
- sigaddset()
- sigdelset()
- sigismember()
Matthias Kruk [Tue, 14 Jan 2020 11:27:07 +0000 (20:27 +0900)]
Add prototypes for functions manipulating sigset_t types
Matthias Kruk [Tue, 14 Jan 2020 10:56:13 +0000 (19:56 +0900)]
Add assembly stub for sigaction syscall to klibc
Matthias Kruk [Tue, 14 Jan 2020 10:55:13 +0000 (19:55 +0900)]
Add definition for SYS_SIGACTION