Commit Graph

175 Commits

Author SHA1 Message Date
02ad199138 Kernel: Move interrupt status functions to kernel/Interrupts.h 2024-03-01 02:13:28 +02:00
b45d27593f Kernel: Implement super simple PRNG 2024-02-12 04:25:06 +02:00
99eed9c37a Kernel: Start work on network stack 2024-02-01 23:38:06 +02:00
c6130f33d7 Kernel: Implement MSI, MSI-X and interrupt reservation 2024-01-13 18:21:21 +02:00
8f89519bcf Kernel: Keymaps can now be loaded from files 2024-01-10 14:43:19 +02:00
961ab9768a Kernel: KeyEvent is now well known keycode
Keycodes are easier to handle as you need only one keyboard layout
for keycodes. Otherwise you would need to implement keyboard layout
for every keyboard driver in every language.
2024-01-10 12:51:24 +02:00
d4191c0d94 Kernel: Reorganize PS/2 files to their own directory 2024-01-04 12:04:45 +02:00
4275d2ce48 Kernel: Add framebuffer device to devfs 2023-11-28 23:51:28 +02:00
fd18071975 Kernel: Implement TerminalDriver for Framebuffer device
Use this new FramebufferTerminalDriver for terminal instead of the
old VesaTerminalDriver. Only drawback with this is that framebuffer
device can only be intialized after DevFS is initialized.
2023-11-22 21:57:17 +02:00
84040e64b8 Kernel: Don't use multiboot2 explicitly. Parse it to common structure
This allows support of multiple different bootloaders
2023-11-17 18:54:59 +02:00
b80b59ce24 Kernel: Remove unused externs in kernel.cpp 2023-10-30 19:09:31 +02:00
69a39b7077 Kernel: Start using multiboot2 instead of multiboot
This allows better compatibility with (U)EFI and gives RSDP location
instead of me having to scan ram to find it.
2023-10-17 01:06:24 +03:00
37bc52988c Kernel: Don't require framebuffer
Initializes virtual tty only if framebuffer is initialized
2023-10-16 01:44:54 +03:00
9c143d18b9 Kernel: Add temporary terminal output before controlling terminal
Starting work on getting this boot on real hardware.
2023-10-13 03:31:36 +03:00
f21d4e794c Kernel: Rework whole ATA driver structure
Make ATA driver more compatible when we are adding SATA support
2023-10-08 02:50:23 +03:00
8f630a97df Kernel: Add procfs that contains only pids 2023-09-30 21:19:36 +03:00
d45bf363f1 Kernel: Enter ACPI mode with lai 2023-09-28 12:30:27 +03:00
11717f90c1 Kernel: PCI devices can now create region for BAR
This creates either MEM or IO region for read/write access to PCI
device.
2023-09-22 17:20:35 +03:00
921d95d18f All: Clear lines with only whitspace in them 2023-09-10 00:31:42 +03:00
dd9af56e21 Kernel: Start work on making inodes more thread safe
All inode operations are now locked and thread blocked
2023-09-10 00:31:42 +03:00
323de3c866 Kernel: Rework whole Terminal structure
Serial monitors can now be used as a output. This requires editing
init code for the stdio opening. Serial input is not supported, so qemu
still needs graphical window for ps/2 keyboard.
2023-09-04 19:34:18 +03:00
5d0a6e7b08 Kernel: HPET is now used in legacy mode when PIC is forced 2023-08-10 22:01:30 +03:00
c732297623 Kernel: Rename TimerHandler to SystemTimer
I changed SystemTimer to only handle the "best" supported timer
it can initialize.
2023-08-04 16:06:47 +03:00
7eb2c140fe Kernel: Move RTC to Timer directory
PIT ms counter seems to be off by multiple seconds/minute. I will
be probably changing to HPET for system time
2023-08-04 11:12:16 +03:00
659adb89a6 Kernel: Start work on abstracting Timers 2023-08-04 10:29:42 +03:00
c2cf98e32f Kernel/LibC: Add bareboness signals
You can now call raise() to raise a signal. Signal handlers are
not yet supported, but the handling works :)
2023-07-21 15:45:02 +03:00
9bcfb34524 Kernel: Rewrite whole device structure
We now have DevFileSystem which is derived from RamFileSystem. All
devices are RamInodes. We don't have separate DeviceManager anymore.
To iterate over devices, you can loop througn every inode in devfs.
2023-07-10 23:17:14 +03:00
9a7b2587af Kernel: kmalloc has now somewhat dynamic storage
Allocations bigger than PAGE_SIZE and those not forced to be identity
mapped are now done on a GeneralAllocator. This allows us to use kmalloc
for big allocations; bigger than the fixed 1 MiB storage.

This is still a hack and the whole kmalloc will have to be rewritten at
some point, but for now this does the job :D
2023-06-18 23:27:00 +03:00
95c4e608de Kernel: Move print during boot 2023-06-12 23:45:36 +03:00
2253c45feb Kernel: Remove Shell from kernel
This is now obsolete since we have a userspace Shell.
2023-06-12 02:04:52 +03:00
78536f9678 Kernel/Userspace: Add basic init process
This process parses /etc/passwd and promps login screen.
When an username is entered, it will launch that users shell
2023-06-11 22:37:00 +03:00
c7ec19c25c Kernel: Add basic Credentials for the system
Now filesystem access/open, etc confirm that you have access for rwxs
2023-06-11 20:06:06 +03:00
d1ad38c8d4 Kernel/LibC: add SYS_STAT and stat(), lstat() 2023-06-05 14:37:14 +03:00
ff548bd898 Kernel: Shell can now list symlinks 2023-06-01 00:25:53 +03:00
5bb1f2a48c Kernel: Rename MMU to PageTable
This is more descriptive name for what it actually represents
2023-05-29 21:06:09 +03:00
fb17af4844 Kernel/LibC: opening standard files is done in libc 2023-05-29 20:21:19 +03:00
f2d767b799 Kernel: Add bareboness fork() function 2023-05-28 18:08:49 +03:00
27147790fd Userspace: Start work on shell 2023-05-26 22:31:21 +03:00
e0a72defa2 Kernel: Add argc and argv to process entry 2023-05-16 00:27:49 +03:00
177b205c48 BuildSystem: userspace has cmake target 2023-05-11 16:19:53 +03:00
55bb0084aa Kernel: namespace and function renames
MMU moved to namespace kernel
Kernel::Memory::Heap moved to just Kernel
MMU::map_{page,range} renamed to identity_map_{page,range}

Add MMU::get_page_flags
2023-04-28 14:48:38 +03:00
7530482cc2 Kernel: Cleanup process creation for userspace 2023-04-22 16:51:50 +03:00
e0ce2394fe Kernel: Remove obsolete userspace stuff from kernel 2023-04-22 15:38:45 +03:00
fadce063a7 Kernel: Usespace programs are now ran through ELF files
only 64 bit elf files are supported for now.
2023-04-22 15:35:32 +03:00
26fe6ad898 Kernel: kmalloc does not dump stack trace
dump_stack_trace() page faults and i dont feel like debugging this
now :)
2023-04-21 13:45:13 +03:00
9c506ef85b Kernel: Stack pointer is validated when updated
This allows us not to fail stack pointer when in syscall since
interrupts use their own stack
2023-04-21 10:40:24 +03:00
b1c7af38d0 Kernel: Add barebones per process virtual addresses
We now assign every (userspace) process its own MMU which we load
in scheduler. This allows every process to have separate virtual
address space.

This is very hackish implementations but it works for now
2023-04-20 00:45:41 +03:00
0030f035be Kernel: Rename MMU::{un,}allocate... to MMU::{un,}map
This is more appropriate name for the behaviour :D
2023-04-19 21:50:30 +03:00
dcce18799f Kernel: We now launch Shell again on boot
Adding this just before push :D
2023-04-19 00:41:24 +03:00
a9a15ea2c0 Kernel: init2 is now launched as a process instead of thread
Also only process can now add threads to scheduler. Nobody should
have raw access to scheduler and everything should be through
Process::current() or irqs (reschedules)
2023-04-19 00:39:06 +03:00