Commit Graph

1180 Commits

Author SHA1 Message Date
e2e21923d7
Result: Implement operator=()
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 19:06:47 +01:00
4081186b27
Heap: Rewrite kmalloc to use Option<HeapBlock*> instead of nullable pointers to iterate over the heap
All checks were successful
continuous-integration/drone/push Build is passing
At some point, this should be done inside LinkedList itself, but we have no such thing as break in for_each().
It's iterate over everything or nothing.

This also requires operator= in Option, might be also added to Result in the future.
2022-12-30 19:02:25 +01:00
3a3968b268
Result: Add nonnull_or_error() 2022-12-30 18:46:27 +01:00
973e39a255
LinkedList: Move nonnull_or_empty_option to Option.h so everyone can use it 2022-12-30 18:46:18 +01:00
28f53f9ccf
LinkedList: Rename the nonnull_or_error() helper to a more accurate nonnull_or_empty_option() 2022-12-30 18:44:37 +01:00
1f36ecd044
LinkedList: Make expect_first() and expect_last() show a more accurate error description on panic
Instead of showing a generic "Option::value() called on an empty Option" with no useful source location,
you will get something like "check failed: m_start_node at LinkedList.h:139"
2022-12-30 18:43:39 +01:00
24773fbece
kernel/main: Remove reference to 'extern const BOOTBOOT bootboot' 2022-12-30 18:38:50 +01:00
74aa30a44f
Init: Call efficient_halt() on magic number mismatch instead of busy-looping 2022-12-30 18:36:22 +01:00
9569385691
Remove unused include 2022-12-30 18:32:44 +01:00
400d0395a2
Result: Avoid double-checking when calling through to the underlying Option
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 15:00:02 +01:00
8e59a0a79f
CMakeLists improvements
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 11:48:18 +01:00
7952d1d8a0
x86_64: Add basic keyboard support with an ASYNC DRIVER
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-26 19:59:18 +01:00
ed34009b50
Heap: Log more details of blocks
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-26 16:17:24 +01:00
2af3997456
LinkedList: Fixed some boogs, LinkedList is now boog-free :) 2022-12-26 15:54:29 +01:00
1c70ab5a1a
Heap: Avoid combines with blocks outside a range 2022-12-26 15:20:56 +01:00
a1eca479d5
x86_64: Add a getter for the initial page directory
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-26 12:57:25 +01:00
2600acc96c
Thread: Add init_regs_user() 2022-12-26 12:46:07 +01:00
7efb79dd26
LinkedList: Check for nullptrs in detach_from_list() 2022-12-26 12:45:49 +01:00
7e62ee66be
Change heap.first().has_value() to the cheaper heap.count()
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-26 12:24:39 +01:00
73c58bd902
Init: Move platform_init() before MemoryManager::init()
All checks were successful
continuous-integration/drone/push Build is passing
This enables NX before we actually use it.
Wasn't causing problems with KVM on, but crashed with KVM off with a 'reserved bit set' page fault.
2022-12-26 12:12:55 +01:00
0054777e7d
x86_64: Warn if NX is not supported 2022-12-26 12:11:10 +01:00
08984e1673
x86_64: Create a has_flag() helper function and remove redundant clearing of reserved bits 2022-12-26 12:10:47 +01:00
59d69f684f
x86_64: Add general protection fault handler
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-24 11:49:47 +01:00
f71ccde833
Add an overload for aligned deletes which just calls the normal operator delete 2022-12-24 11:49:12 +01:00
f2cc797599
Add a simple ELF loader
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 13:09:21 +01:00
e5ae2b0435
TarStream: Make read_contents and friends const 2022-12-23 13:08:31 +01:00
ad0f6546d7
Add a global initrd TarStream to make the initial ramdisk accessible everywhere
All checks were successful
continuous-integration/drone/push Build is passing
It's also mapped into virtual memory instead of directly going into the physical location!!
2022-12-23 11:33:23 +01:00
6ff92b1714
MemoryManager: Add get_kernel_mapping_for_frames()
This function allocates a continuous range of VM and maps the physical frames passed to said VM range.
2022-12-23 11:30:49 +01:00
74235c2c99
Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 11:06:59 +01:00
e6384ae90d
Use the new toolchain location
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 11:06:37 +01:00
575752eb23
Update drone config to pull toolchain from a new purpose-built toolchain archive for CI 2022-12-23 11:04:50 +01:00
c39e54b7c6
Make TarStream::read_contents take any pointer as output 2022-12-23 10:51:55 +01:00
34e6c05cef
Fix it up a bit more
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 10:48:00 +01:00
913b13b380
Fix up the header install script
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 10:46:44 +01:00
4fa33a9689
SharedPtr: Add operator=
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 10:31:48 +01:00
bd4b05e534
Add OwnedPtr and SharedPtr
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 10:23:13 +01:00
9afaad8fed
Add dbgln() for the luna library
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-22 18:00:35 +01:00
a3595e71a9
Update .clang-format
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-21 20:22:44 +01:00
96135ff808
Use limits.h for the standard definition of WCHAR_MAX
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-21 20:11:00 +01:00
16bf8b38ea
UTF-8 decoder: Error out on overlong encodings
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-21 20:08:43 +01:00
fcefab4383
TextConsole: Add wide-character overloads for print() and println()
All checks were successful
continuous-integration/drone/push Build is passing
These can't fail from UTF-8 decoding errors.
2022-12-21 19:41:13 +01:00
293b7b0f11
TextConsole: Propagate UTF-8 decoding errors
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-21 17:38:19 +01:00
2e8ea724a0
arch/x86_64: Refactor the stack tracing code to remove duplicate code
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-21 17:21:01 +01:00
7a2cb28475
Make sure isize matches ssize_t on most cases
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-20 17:12:44 +01:00
e2a6cba3c6
Log: Update formatting to make ANSI weirdness more sensible
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 21:42:53 +01:00
703c3f44fb
Add two FIXMEs
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 21:41:27 +01:00
042f999677
Heap: SCRUB IT ALL
All checks were successful
continuous-integration/drone/push Build is passing
If your memory is all 0xacacacac there is a big probability you haven't initialized it.
2022-12-19 13:20:38 +01:00
a11a5dec1f
DoublyLinkedList -> LinkedList
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 12:43:23 +01:00
1269a045bd
LinkedList: Add a convenience delayed_for_each() method.
This is a special way of iterating over the list which permits removing items while iterating.
2022-12-19 12:41:25 +01:00
5b72144fac
Add a handy consume() method to LinkedList
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 12:35:08 +01:00