]> git.corax.cc Git - corax/log
corax
5 years agolibc: Add definition for ENOTDIR io-next
Matthias Kruk [Sun, 16 Aug 2020 07:58:30 +0000 (16:58 +0900)]
libc: Add definition for ENOTDIR

5 years agosys/io: Remove unused CXIO_FORK message type
Matthias Kruk [Sun, 16 Aug 2020 04:57:20 +0000 (13:57 +0900)]
sys/io: Remove unused CXIO_FORK message type

5 years agosys/io: Make _handle_msg() handle CXIO_READ and CXIO_WRITE requests
Matthias Kruk [Sat, 15 Aug 2020 06:24:43 +0000 (15:24 +0900)]
sys/io: Make _handle_msg() handle CXIO_READ and CXIO_WRITE requests

5 years agosys/io: Add fd_read() and fd_write() wrapper functions for performing reads and write...
Matthias Kruk [Sat, 15 Aug 2020 06:24:03 +0000 (15:24 +0900)]
sys/io: Add fd_read() and fd_write() wrapper functions for performing reads and writes on a fd's file

5 years agosys/io: Implement _pipe_read() and _pipe_write()
Matthias Kruk [Sat, 15 Aug 2020 06:22:01 +0000 (15:22 +0900)]
sys/io: Implement _pipe_read() and _pipe_write()

5 years agosys/io: Add sys_write() implementation
Matthias Kruk [Sat, 15 Aug 2020 06:20:52 +0000 (15:20 +0900)]
sys/io: Add sys_write() implementation

5 years agosys/io: Add sys_read() implementation
Matthias Kruk [Sat, 15 Aug 2020 06:20:42 +0000 (15:20 +0900)]
sys/io: Add sys_read() implementation

5 years agosys/io: Add proc_get_fd() function implementation
Matthias Kruk [Sat, 15 Aug 2020 06:20:11 +0000 (15:20 +0900)]
sys/io: Add proc_get_fd() function implementation

5 years agosys/io: Add file_read() and file_write() wrapper functions for a file's f_ops->read...
Matthias Kruk [Sat, 15 Aug 2020 06:19:25 +0000 (15:19 +0900)]
sys/io: Add file_read() and file_write() wrapper functions for a file's f_ops->read() and f_ops->write() functions

5 years agolibc: Add implementations of read() and write()
Matthias Kruk [Sat, 15 Aug 2020 06:16:43 +0000 (15:16 +0900)]
libc: Add implementations of read() and write()

5 years agolibc: Add strerror() implementation
Matthias Kruk [Sat, 15 Aug 2020 06:15:40 +0000 (15:15 +0900)]
libc: Add strerror() implementation

5 years agosys/test: Implement simple test for reading and writing on a pipe
Matthias Kruk [Sat, 15 Aug 2020 06:14:30 +0000 (15:14 +0900)]
sys/test: Implement simple test for reading and writing on a pipe

5 years agosys/test: Print the return value of pipe() and the file descriptors that we got from...
Matthias Kruk [Mon, 10 Aug 2020 15:49:12 +0000 (00:49 +0900)]
sys/test: Print the return value of pipe() and the file descriptors that we got from the IO process

5 years agosys/io: Send a response at the end of sys_pipe()
Matthias Kruk [Mon, 10 Aug 2020 15:47:46 +0000 (00:47 +0900)]
sys/io: Send a response at the end of sys_pipe()

5 years agosys/io: Rename cxio_pipe() to sys_pipe(); change several functions so they behave...
Matthias Kruk [Mon, 10 Aug 2020 15:03:33 +0000 (00:03 +0900)]
sys/io: Rename cxio_pipe() to sys_pipe(); change several functions so they behave as documented

5 years agosys/io: Implement handling of processes and file descriptors
Matthias Kruk [Mon, 10 Aug 2020 12:08:54 +0000 (21:08 +0900)]
sys/io: Implement handling of processes and file descriptors

5 years agosys/io: Cleanup main.c
Matthias Kruk [Mon, 10 Aug 2020 11:44:36 +0000 (20:44 +0900)]
sys/io: Cleanup main.c

5 years agolibc: Add cx_array dynamic array type libc-next unstable
Matthias Kruk [Mon, 10 Aug 2020 06:57:48 +0000 (15:57 +0900)]
libc: Add cx_array dynamic array type

5 years agoinclude: Include sys/types.h from stdlib.h
Matthias Kruk [Mon, 10 Aug 2020 04:50:14 +0000 (13:50 +0900)]
include: Include sys/types.h from stdlib.h

5 years agolibc: Add simple mmap() based heap implementation
Matthias Kruk [Sun, 9 Aug 2020 07:23:27 +0000 (16:23 +0900)]
libc: Add simple mmap() based heap implementation

5 years agolibc: Add cx_spinlock_t type
Matthias Kruk [Sat, 8 Aug 2020 10:27:27 +0000 (19:27 +0900)]
libc: Add cx_spinlock_t type

5 years agosys/test: Add userspace process for libc testing
Matthias Kruk [Sat, 1 Aug 2020 06:08:47 +0000 (15:08 +0900)]
sys/test: Add userspace process for libc testing

5 years agolibc: Include unistd.c in the compilation
Matthias Kruk [Sat, 1 Aug 2020 06:06:24 +0000 (15:06 +0900)]
libc: Include unistd.c in the compilation

5 years agoMerge branch 'io' into unstable
Matthias Kruk [Sat, 8 Aug 2020 09:13:16 +0000 (18:13 +0900)]
Merge branch 'io' into unstable

5 years agokernel/core: Remove unused code that was left over from the attempt to implement...
Matthias Kruk [Sat, 8 Aug 2020 08:49:36 +0000 (17:49 +0900)]
kernel/core: Remove unused code that was left over from the attempt to implement the network stack in the kernel

5 years agokernel/klibc: Remove unused kheap type
Matthias Kruk [Sat, 8 Aug 2020 08:32:55 +0000 (17:32 +0900)]
kernel/klibc: Remove unused kheap type

5 years agolibc: Remove brk() and sbrk() syscalls
Matthias Kruk [Sat, 8 Aug 2020 08:31:40 +0000 (17:31 +0900)]
libc: Remove brk() and sbrk() syscalls

5 years agokernel: Remove brk() and sbrk() syscalls and related functions
Matthias Kruk [Sat, 8 Aug 2020 08:30:42 +0000 (17:30 +0900)]
kernel: Remove brk() and sbrk() syscalls and related functions

5 years agokernel/arch: Add missing manpage-style comments to paging functions
Matthias Kruk [Sat, 8 Aug 2020 08:07:26 +0000 (17:07 +0900)]
kernel/arch: Add missing manpage-style comments to paging functions

5 years agokernel/arch: Rename _pg_dir_memset() to _pg_dir_memset_page()
Matthias Kruk [Sun, 2 Aug 2020 05:41:18 +0000 (14:41 +0900)]
kernel/arch: Rename _pg_dir_memset() to _pg_dir_memset_page()

5 years agokernel/arch: Split _pg_dir_debug_arch() into three functions, add documentation for...
Matthias Kruk [Sat, 1 Aug 2020 17:06:35 +0000 (02:06 +0900)]
kernel/arch: Split _pg_dir_debug_arch() into three functions, add documentation for pg_dir_memcpy()

5 years agoMerge branch 'mm-cleanup' of ssh://corax.cc:2975/home/mk/devel/corax into mm-cleanup
Matthias Kruk [Sat, 1 Aug 2020 15:59:37 +0000 (00:59 +0900)]
Merge branch 'mm-cleanup' of ssh://corax.cc:2975/home/mk/devel/corax into mm-cleanup

5 years agokernel/arch: Reformat text flow of documentation
Matthias Kruk [Sat, 1 Aug 2020 15:59:20 +0000 (00:59 +0900)]
kernel/arch: Reformat text flow of documentation

5 years agokernel/arch: Add documentation for several paging functions
Matthias Kruk [Sat, 1 Aug 2020 13:37:22 +0000 (22:37 +0900)]
kernel/arch: Add documentation for several paging functions

5 years agokernel/arch: Split pg_init() function into smaller, more comprehensible functions
Matthias Kruk [Sat, 1 Aug 2020 09:21:27 +0000 (18:21 +0900)]
kernel/arch: Split pg_init() function into smaller, more comprehensible functions

- Split the pg_init() function into several functions
  - the _identity_map() function, for creating the identity map
  - the _pae_identity_map() function, for the actual work on PAE systems
  - the _legacy_identity_map() function, for the actual work on non-PAE systems
  - the _clear_available_frames() function, to clear usable frames from the frame map
- Add comments explaining all of the new functions
- Expand existing comments where necessary

5 years agokernel/arch: Move computation of the end of usable memory into a separate function...
Matthias Kruk [Sat, 1 Aug 2020 07:36:18 +0000 (16:36 +0900)]
kernel/arch: Move computation of the end of usable memory into a separate function, add documentation

 * Move computation of the end of usable memory from pg_init() into _get_memory_end
 * Add documentation to the following functions
   - _pg_dir_debug_regions()
   - _pg_dir_debug_arch()
   - _get_memory_end()
   - pg_init()

5 years agokernel/include: Make sure gcc does not add alignment to multiboot structures
Matthias Kruk [Sat, 1 Aug 2020 07:35:03 +0000 (16:35 +0900)]
kernel/include: Make sure gcc does not add alignment to multiboot structures

5 years agokernel/arch: Add comments describing how the _phys_alloc(), pg_frame_alloc_start...
Matthias Kruk [Fri, 31 Jul 2020 19:52:59 +0000 (04:52 +0900)]
kernel/arch: Add comments describing how the _phys_alloc(), pg_frame_alloc_start(), pg_frame_alloc_end(), pg_frame_free() functions work

5 years agokernel/arch: Add page_attrs_t type for page attributes
Matthias Kruk [Fri, 31 Jul 2020 17:06:45 +0000 (02:06 +0900)]
kernel/arch: Add page_attrs_t type for page attributes

5 years agokernel/arch: Add region_type_t and region_opts_t types to describe the type and optio...
Matthias Kruk [Fri, 31 Jul 2020 16:22:32 +0000 (01:22 +0900)]
kernel/arch: Add region_type_t and region_opts_t types to describe the type and options of memory regions

5 years agoMerge remote-tracking branch 'origin/userstack' into io
Matthias Kruk [Wed, 29 Jul 2020 11:09:00 +0000 (20:09 +0900)]
Merge remote-tracking branch 'origin/userstack' into io

5 years agokernel: Grow the userspace stack if an application runs out of stack space userstack
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

5 years agoinclude: Add some file descriptor flags to include/fcntl.h io
Matthias Kruk [Tue, 28 Jul 2020 13:24:20 +0000 (22:24 +0900)]
include: Add some file descriptor flags to include/fcntl.h

5 years agosys: Include IO process in initfs compilation
Matthias Kruk [Tue, 28 Jul 2020 13:23:46 +0000 (22:23 +0900)]
sys: Include IO process in initfs compilation

5 years agolibc: Add pipe() function for use in userspace processes
Matthias Kruk [Tue, 28 Jul 2020 13:22:15 +0000 (22:22 +0900)]
libc: Add pipe() function for use in userspace processes

5 years agosys/io: Add dummy IO process
Matthias Kruk [Tue, 28 Jul 2020 13:19:33 +0000 (22:19 +0900)]
sys/io: Add dummy IO process

5 years agoinclude/corax: Add IPC message definitions for IO process
Matthias Kruk [Tue, 28 Jul 2020 13:13:50 +0000 (22:13 +0900)]
include/corax: Add IPC message definitions for IO process

5 years agoinclude/corax: Add PID_IO to ipc.h and simplify struct cxmsg definition
Matthias Kruk [Tue, 28 Jul 2020 13:12:26 +0000 (22:12 +0900)]
include/corax: Add PID_IO to ipc.h and simplify struct cxmsg definition

5 years agolibc, kernel/klibc: Fix bug in snprintf() that would cause the wrong string length...
Matthias Kruk [Sun, 26 Jul 2020 08:12:19 +0000 (17:12 +0900)]
libc, kernel/klibc: Fix bug in snprintf() that would cause the wrong string length to be compied for %s formats under certain circumstances

5 years agolibc, kernel/klibc: Fix bug in memcpy() where quantities less than 4 byte wouldn...
Matthias Kruk [Sun, 26 Jul 2020 08:09:52 +0000 (17:09 +0900)]
libc, kernel/klibc: Fix bug in memcpy() where quantities less than 4 byte wouldn't be copied correctly (replacing the implementation with an assembly one)

5 years agolibc: Add _exit syscall stub
Matthias Kruk [Sun, 26 Jul 2020 04:16:46 +0000 (13:16 +0900)]
libc: Add _exit syscall stub

5 years agoinclude: Add global errno variable to errno.h
Matthias Kruk [Sun, 26 Jul 2020 04:15:38 +0000 (13:15 +0900)]
include: Add global errno variable to errno.h

5 years agoinclude/corax: Add definition for ECONNREFUSED
Matthias Kruk [Sun, 26 Jul 2020 04:13:47 +0000 (13:13 +0900)]
include/corax: Add definition for ECONNREFUSED

5 years agolibc: Add implementation for _exit(), add vfork() dummy implementation
Matthias Kruk [Sun, 17 May 2020 05:45:08 +0000 (14:45 +0900)]
libc: Add implementation for _exit(), add vfork() dummy implementation

5 years agokernel/core: Fix some compiler warnings
Matthias Kruk [Fri, 8 May 2020 14:19:56 +0000 (23:19 +0900)]
kernel/core: Fix some compiler warnings

5 years agokernel/core: Clean up the init process
Matthias Kruk [Wed, 6 May 2020 07:00:29 +0000 (16:00 +0900)]
kernel/core: Clean up the init process

5 years agokernel/core: Assign pids starting with 0
Matthias Kruk [Wed, 6 May 2020 06:50:34 +0000 (15:50 +0900)]
kernel/core: Assign pids starting with 0

5 years agokernel/core: Clean up and remove unused code in main.c
Matthias Kruk [Wed, 6 May 2020 06:50:03 +0000 (15:50 +0900)]
kernel/core: Clean up and remove unused code in main.c

5 years agokernel/core: Remove pid argument from process_create()
Matthias Kruk [Wed, 6 May 2020 06:42:22 +0000 (15:42 +0900)]
kernel/core: Remove pid argument from process_create()

5 years agokernel: Remove kbd and vga processes from kernel tree
Matthias Kruk [Wed, 6 May 2020 04:34:56 +0000 (13:34 +0900)]
kernel: Remove kbd and vga processes from kernel tree

5 years agoAdd VGA system process elf-loader
Matthias Kruk [Wed, 6 May 2020 04:00:45 +0000 (13:00 +0900)]
Add VGA system process

5 years agolibc: Call _exit() after returning from main()
Matthias Kruk [Wed, 6 May 2020 03:59:40 +0000 (12:59 +0900)]
libc: Call _exit() after returning from main()

5 years agolibc: Clean up syscall assembly stubs
Matthias Kruk [Wed, 6 May 2020 03:17:35 +0000 (12:17 +0900)]
libc: Clean up syscall assembly stubs

5 years agolibc: Rename assembly stub for SYS_EXIT from exit to _exit
Matthias Kruk [Wed, 6 May 2020 03:16:03 +0000 (12:16 +0900)]
libc: Rename assembly stub for SYS_EXIT from exit to _exit

5 years agosys/kbd: Remove unused variable
Matthias Kruk [Tue, 5 May 2020 17:26:06 +0000 (02:26 +0900)]
sys/kbd: Remove unused variable

5 years agokernel/core: Execute system processes from initfs once the kernel has been initialized
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

5 years agokernel/core: Finish execeve() implementation
Matthias Kruk [Tue, 5 May 2020 17:23:39 +0000 (02:23 +0900)]
kernel/core: Finish execeve() implementation

5 years agolibc: Add snprintf() implementation
Matthias Kruk [Tue, 5 May 2020 17:21:37 +0000 (02:21 +0900)]
libc: Add snprintf() implementation

5 years agolibc: Add memcpy() implementation, fix bug in memset()
Matthias Kruk [Tue, 5 May 2020 17:20:33 +0000 (02:20 +0900)]
libc: Add memcpy() implementation, fix bug in memset()

5 years agokernel/arch: Don't pass uninitialized variables to pg_dir_map() in pg_dir_mmap()
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()

5 years agokernel/core: Make elf_phdr_foreach() calculate the address of the headers correctly
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

5 years agokernel/core: Update the process's tasks' t_kstack member when the process's page...
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

5 years agoinclude: Add missing prototype for execeve() to unistd.h
Matthias Kruk [Mon, 4 May 2020 09:30:08 +0000 (18:30 +0900)]
include: Add missing prototype for execeve() to unistd.h

5 years agoAdd a simple kbd binary to the initfs for testing purposes
Matthias Kruk [Mon, 4 May 2020 08:53:31 +0000 (17:53 +0900)]
Add a simple kbd binary to the initfs for testing purposes

5 years agosys: Use the _binary_*_size symbol to determine the size of binaries in the initfs
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

5 years agokernel/core: Add missing parameter in call to dbg_printf()
Matthias Kruk [Mon, 4 May 2020 08:49:16 +0000 (17:49 +0900)]
kernel/core: Add missing parameter in call to dbg_printf()

5 years agoMerge branch 'libc' into elf-loader
Matthias Kruk [Mon, 4 May 2020 08:30:09 +0000 (17:30 +0900)]
Merge branch 'libc' into elf-loader

5 years agoMerge branch 'initfs' into elf-loader
Matthias Kruk [Mon, 4 May 2020 08:29:50 +0000 (17:29 +0900)]
Merge branch 'initfs' into elf-loader

5 years agokernel/core: Implement sys_execeve() syscall handler
Matthias Kruk [Mon, 4 May 2020 08:28:53 +0000 (17:28 +0900)]
kernel/core: Implement sys_execeve() syscall handler

5 years agokernel/core: Add simple ELF file support
Matthias Kruk [Mon, 4 May 2020 08:27:43 +0000 (17:27 +0900)]
kernel/core: Add simple ELF file support

5 years agokernel/arch: Add pg_dir_memset() function, enhance pg_dir_mmap() function to 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

5 years agokernel: Add execeve syscall for execution of ELF files
Matthias Kruk [Sun, 3 May 2020 17:22:24 +0000 (02:22 +0900)]
kernel: Add execeve syscall for execution of ELF files

5 years agolibc: Add dummy _start function libc
Matthias Kruk [Fri, 1 May 2020 09:41:48 +0000 (18:41 +0900)]
libc: Add dummy _start function

5 years agolibc: Add signal handling code from klibc
Matthias Kruk [Fri, 1 May 2020 09:41:09 +0000 (18:41 +0900)]
libc: Add signal handling code from klibc

5 years agolibc: Add debug and sigaction syscall stubs
Matthias Kruk [Fri, 1 May 2020 09:40:17 +0000 (18:40 +0900)]
libc: Add debug and sigaction syscall stubs

5 years agolibc: Add memset() function
Matthias Kruk [Fri, 1 May 2020 09:39:21 +0000 (18:39 +0900)]
libc: Add memset() function

5 years agocorax/sys: Add initfs infrastructure initfs
Matthias Kruk [Fri, 1 May 2020 05:36:09 +0000 (14:36 +0900)]
corax/sys: Add initfs infrastructure

5 years agokernel/core: Wake up sleeping processes upon signal reception sched-next
Matthias Kruk [Fri, 1 May 2020 01:41:40 +0000 (10:41 +0900)]
kernel/core: Wake up sleeping processes upon signal reception

5 years agosched/lazy: Fix bug in _lazy_tick() causing waiting processes to be scheduled
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

5 years agokernel/kbd: Add debug output to see what's going on in kbd_main()
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()

5 years agokernel/core: Make mailbox_get() return -EINTR if the call to sem_wait() failed
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

5 years agoklibc/sem: Make sem_wait() return -EINTR if interrupted due to a signal
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

5 years agokernel/kbd: Make the interrupt handler print something
Matthias Kruk [Fri, 27 Mar 2020 03:07:19 +0000 (12:07 +0900)]
kernel/kbd: Make the interrupt handler print something

5 years agokernel/core: Make init process wait() indefinitely, for now
Matthias Kruk [Fri, 27 Mar 2020 03:04:34 +0000 (12:04 +0900)]
kernel/core: Make init process wait() indefinitely, for now

5 years agosched/lazy: Make sure _lazy_tick() doesn't break if ctask is NULL, which happens...
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

5 years agokernel/arch: Fix task_lock() and task_unlock() functions
Matthias Kruk [Sat, 21 Mar 2020 17:12:25 +0000 (02:12 +0900)]
kernel/arch: Fix task_lock() and task_unlock() functions

5 years agocore/process: Use new scheduler calls, fix compiler warnings
Matthias Kruk [Sat, 21 Mar 2020 09:15:42 +0000 (18:15 +0900)]
core/process: Use new scheduler calls, fix compiler warnings

5 years agokernel/core: Include <sys/wait.h> from main.c
Matthias Kruk [Sat, 21 Mar 2020 09:13:40 +0000 (18:13 +0900)]
kernel/core: Include <sys/wait.h> from main.c

5 years agocore/posixcall: Use sched_sleep() to suspend running task, instead of process_wait...
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

5 years agokernel/include: Remove prototypes for old scheduler functions
Matthias Kruk [Sat, 21 Mar 2020 09:11:07 +0000 (18:11 +0900)]
kernel/include: Remove prototypes for old scheduler functions