Skip to content

Userspace work#27

Merged
oberrow merged 67 commits into
masterfrom
userspace-work
Dec 31, 2024
Merged

Userspace work#27
oberrow merged 67 commits into
masterfrom
userspace-work

Conversation

@oberrow

@oberrow oberrow commented Dec 26, 2024

Copy link
Copy Markdown
Collaborator

Countless changes to the kernel, adding userspace, rewriting the VMM, PCI interface, power management stuff, and many other miscellaneous changes.

…nctions to copy to and from user memory. NOTE: All these are untested.

Implement weak variants of mem* and str* functions for architectures that don't provide an accelerated version.
Mm: Add a pointer to the physical page for MmS_QueryPageInfo. Remove OBOSS_GetPagePhysicalAddress and replace it with MmS_QueryPageInfo.
Misc: Bug fixes
m68k: Update functions.
x86_64: Update functions.
Core: Implement pushlocks.
ASAN: Add an allocator mismatch violation for when an object is freed with a different allocator than the one it was allocated with.
x86_64: Fix scheduler timing issues.
x86_64: Remove framebuffer and backbuffer from committed memory count.
Mm: Fix bug with paging statistics.
Mm: Add physical memory stats.
Misc: Fix mismatched allocators
Drv: Add a driver trampoline + a driver exit function to handle driver exits better.
Misc: Make logs colourful
FAT: Use pagecache in most areas instead of allocating a buffer + Vfs_FdRead
Mm: Fix a bug in Mm_VirtualMemoryAlloc where an already-committed page in a page range that is reserved is re-committed.
Mm: Fix a bug in Mm_UnrefPage where an invalid nPages count is passed.
x86_64: Free pages properly while setting framebuffer to WC caching.
Vfs: Implement pipes (FIFOs).
Vfs: Fix bugs in pagecache.
Vfs: Fix bugs when reads/page cache accesses are done over file boundaries.
AHCI: Fix bugs when IO is done over disk boundaries.
Misc: When probing for partitions, ignore partitions that go over a disk's boundaries.
Core: Fix bugs in pushlocks.
Mm: Add a method to create a new context from scratch.
x86_64: Fix bugs related to switching to usermode.
Misc: Add signal default actions
Misc: Add a temporary way to start a new process to the kernel entry.
Misc: Add a syscall interface
x86_64: Implement arch-specific part of interface
Misc: Fix bugs with user memcpy variants.
Misc: Move syscall tables to syscall.c
x86_64: Clean up MmS_AllocatePageTable
x86_64: Synchronize pending signals on return to user mode in an IRQ.
x86_64: Switch the current context to Mm_KernelContext on IRQ from kmode.
AHCI: Fix a possible bug while populating physical regions.
Misc: Fix bugs where SIGCONT and SIGSTOP would not do their respective actions properly
x86_64: Fix small bug with parsing the RSDT
Mm: Fix a bug where the page fault handler would do a page in where one would crash.
Misc: Add Sys_Reboot and Sys_Shutdown syscalls
x86_64: Fix a bug where the yield syscall would corrupt the stack.
Misc: Add handles.
Core: Add a handle table to the process structure.
Mm: Fix a bug with file mapping.
Misc: Implement handle closing.
Misc: Implement handle cloning. Needs a per-handle type callback.
Misc: Add MIN() and MAX() macros
Sys: Add new syscalls for threads (see scheduler/sched_sys.h)
x86_64: Change syscall ABI (See syscall.asm:57)
Misc: Give each user thread its own kernel stack.
Core: Make Core_WaitOnObjects take in an array of waitable_header*
Misc: Add (re)set_color callbacks for OBOS_ConsoleOutputCallback
Misc: Fix a handle bug where the kernel might use-after-free if something expands the symbol table in between the lookup and use of the handle_desc.
Sanitizers: Fix bug with ASAN where the uninitialized poison was not recognized properly
Vfs: Use RB Trees for pagecache dirty regions instead of linked lists.
Mm: Implement syscalls
Mm: Implement Mm_ForkContext
Misc: Implement handle clone/close callbacks for handle types which have not implemented one yet.
x86_64: Fix a bug with the LAPIC code
Drv: Drivers can now request a uacpi init level that they must be loaded at.
Drv: Drivers can now request to be ignored during PnP
Drv: Add an optional version field to the driver header, and a reserved area.
Core: Remove Core_SpinlockForcedRelease
Misc: Make syscalls fallback to a default handler when there is no handler.
Misc: Add OBOS_STATUS_NO_SYSCALL
x86_64: Enable SMAP/SMEP, as well as fsgsbase instructions.
ACPI: Implement suspend.
ACPI: Implement device D states
ACPI: Register wake GPEs before finalization
ACPI: Make a function initializing uACPI (instead of depending on the arch)
Core: Make the scheduler able to be "suspended" (hangs on the next yield)
Misc: Move shutdown and reboot into their own functions, instead of just having syscalls for them.
x86_64: Fix a bug in IOAPIC code causing infinite GPEs.
Misc: Add status OBOS_STATUS_WAKE_INCAPABLE.
x86_64: Relocate SMP trampoline to 0x1000.
x86_64: Save MTTRs and restore them in appropriate places.
oberrow and others added 7 commits December 24, 2024 09:40
Elf: Add an ELF loader.
Core: Add void* CoreS_ThreadAlloca(thread_ctx*, size_t, obos_status*);
Mm: Add a stub for Mm_MapViewOfUserMemory.
Core: Add CoreH_AbortWaitingThreads.
Mm: Implement Mm_MapViewOfUserMemory
Mm: Fix bugs related to paged out shared memory.
@oberrow oberrow self-assigned this Dec 26, 2024
@oberrow oberrow added the enhancement New feature or request label Dec 26, 2024
oberrow and others added 15 commits December 25, 2024 20:55
Sys: Finish the remainder of VFS syscalls.
Mm: Add parameter respectUserProtection to Mm_MapViewOfUserMemory.
Sys: Remove redundant syscall Sys_FdClose (implemented through handle close)
Misc: Bump uACPI commit.
Sys: Add syscalls for the functions in signal.h
Misc: Implement execve
x86_64: Add execve support function.
Core: Fix bugs with futexes.
Misc: Change behaviour of OBOS_LoadELF, and add new parameters to it
Mm: Fix bugs with Mm_MapViewOfUserMemory
Elf: Fix bugs with elf loader.
x86_64: Fix bugs with user handover
Misc: Add OBOS_LoadInit
Misc: Add --init-path command line option
Core: Optimize spinlocks.
Core: Make Core_GetCurrentThread weak in case an architecture has a faster implementation.
x86_64: Optimize CoreS_GetCPULocalPtr, Core_GetCurrentThread.
Misc: Fix a bug with reading strings from userspace.
x86_64: Add SSE support.
x86_64: Add Sys_SetFSBase (syscall 0x80000000)
x86_64: Fix a bug with AUX values in OBOSS_HandControlTo.
Misc: Other bug fixes.
@oberrow
oberrow marked this pull request as ready for review December 31, 2024 21:03
@oberrow
oberrow merged commit bad5e3c into master Dec 31, 2024
@oberrow
oberrow deleted the userspace-work branch December 31, 2024 22:45
oberrow added a commit that referenced this pull request Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants