Update kernel

This commit is contained in:
EnderIce2
2024-01-19 06:47:42 +02:00
parent fd15592608
commit 96daa43d38
282 changed files with 25486 additions and 15700 deletions

40
TODO.md
View File

@ -1,20 +1,24 @@
# TODO
---
- [x] Optimize SMP.
- [ ] Support IPv6.
- [ ] Endianess of the network stack (currently: [HOST](LSB)<=>[NETWORK](MSB)). Not sure if this is a standard or not.
- [ ] ~~Endianess of the network stack (currently: [HOST](LSB)<=>[NETWORK](MSB)). Not sure if this is a standard or not.~~ (???)
- [ ] Support 32-bit applications (ELF, PE, etc).
- [ ] Do not map the entire memory. Map only the needed memory address at allocation time.
- [ ] ~~Do not map the entire memory. Map only the needed memory address at allocation time.~~ (we just copy the pages for userland, see `Fork()` inside [core/memory/page_table.cpp](core/memory/page_table.cpp))
- [ ] Implementation of logging (beside serial) with log rotation.
- [x] Implement a better task manager. (replace struct P/TCB with classes)
- [ ] Rewrite virtual file system. (it's very bad, I don't know how I wrote it this bad)
- [ ] Rewrite virtual file system.
- [ ] Colors in crash screen are not following the kernel color scheme.
- [x] Find a way to add intrinsics.
- [x] ~~Find a way to add intrinsics.~~ (not feasible, use inline assembly)
- [ ] Rework PSF1 font loader.
- [x] The cleanup should be done by a thread (tasking). This is done to avoid a deadlock.
- [x] ~~The cleanup should be done by a thread (tasking). This is done to avoid a deadlock.~~ (not needed, everything is done by the scheduler)
- [ ] Implement a better Display::SetBrightness() function.
- [ ] Fix memcpy, memset and memcmp functions (they are not working properly with SIMD).
- [x] Fully support i386.
- [ ] Fully support i386.
- [ ] Support Aarch64.
- [ ] SMP trampoline shouldn't be hardcoded at 0x2000.
- [ ] ~~SMP trampoline shouldn't be hardcoded at 0x2000.~~ (0x2000 is in the conventional memory, it's fine)
- [ ] Rework the stack guard.
- [x] Mutex implementation.
- [ ] Update SMBIOS functions to support newer versions and actually use it.
@ -22,7 +26,23 @@
- [ ] Implement lazy allocation. (page faults)
- [ ] Bootstrap should have a separate bss section + PHDR.
- [ ] Reimplement the driver conflict detection.
- [ ] Elf loader shouldn't create a full copy of the elf binary. Copy only the needed sections.
- [x] Elf loader shouldn't create a full copy of the elf binary. Copy only the needed sections.
- [ ] Use NX-bit.
- [ ] Fix std::string
- [ ] Rewrite PS/2 drivers.
- [ ] Fix std::string.
- [x] Rewrite PS/2 drivers.
- [ ] Improve signal handling.
- [ ] Improve the way the kernel crashes.
- Add panic() function.
- Handle assertion failures.
- [ ] Optimize screen printing.
- On real hardware it's very slow, a solution is dirty printing.
- [ ] Thread ids should follow the POSIX standard.
- When a new process is created, the first thread should have the same id as the process id.
- If pid is 400, the first thread should have the id 400. The second thread should have the id 401, etc.
- [ ] Optimize the scheduler
- Create a separate list for processes that are waiting for a resource or a signal, etc.
- Use all cores to schedule threads.