Age | Commit message (Collapse) | Author |
|
This is just for simplicity's sake.
I think I could even omit the `movw $TSS, (GdtTss + 2)` and have the linker
fill that out as a relocation, but that would probably be more complex overall.
|
|
Once again, needed for the interrupt return syscall.
Seems to have made the kernel slower in timebench?
|
|
I want to implement a new syscall for returning from "interrupts" (my
crappy take on Plan 9's notes / UNIX signals), and I've realized that
I can't use SYSRET for that, as it clobbers RCX and R11.
This hasn't been an issue so far, as I've only been switching into usermode
to return from syscalls, but now I might be switching into it at arbitrary
moments (right after an interrupt handler recovers from a page fault, etc).
I could make it so I switch between IRET and SYSRET depending on the context,
but I don't think it's worth it.
|
|
On the assembly side, ensure the stack frame looks always the same, by pushing
a fake "error code" for the interrupts that don't generate one.
On the C side, use a struct instead of magic indices into an "array", and
make it consistent with the current style.
|
|
This will both let me save space in the allocation header, and make the
debugprint more readable.
|
|
I'm still not sure if I should use sys/queue.h for this.
But yeah, this is more consistent, and it will also let me switch over to O(1)
insertions later on.
|
|
Keeping its old name for now to make things easier for myself.
This might just be replaced by sys/queue.h soon.
|
|
* I'm being more strict about the linked list state to hopefully ensure
I'm not leaking any references.
* vfsreq_create was renamed to vfsreq_dispatchcopy as that name feels more
clear. It copies its argument, and dispatches it.
* Requests for user backends are now handled more like requests for kernel
backends - there's an accept() function that accepts a request.
|
|
|
|
|
|
|
|
|
|
the vm isn't getting an NMI for any real reason anyways, so I might as well
abuse it
|
|
|
|
not strictly necessary, but this should improve:
1. sleep performance
2. power efficiency when idle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the rtl8139 mac wasn't being read correctly anyways, and the init stuff
wasn't revelant in ages.
the rest is relatively useful
|
|
|
|
|
|
there's no real reason for bootstrap to be doing that, and this brings it closer
to only doing the elf loading
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I've wanted to do this for a while, and since I've just had a relatively
large refactor commit (pcpy), this is as good of a time as any.
Typedefing structs was mostly inspired by Plan 9's coding style. It makes
some lines of code much shorter at basically no expense.
Everything related to userland kept old-style struct definitions, so as not
to force that style onto other people.
I also considered changing SCREAMING_ENUM_FIELDS to NicerLookingCamelcase,
but I didn't, just in case that'd be confusing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* changed vfs_root_register's name because the _mount didn't add anything
* removed the old pointless vfs_backend_tryaccept calls from drivers
* because of that, i could remove the vfs_backend globals
* replaced the horrible BACKEND_KERN macro
* all vfs_backends are now stored on the heap
|
|
|
|
I was reading from the buffer as if the WRAP flag was enabled, but it
actually isn't supported with a 64K buffer.
Besides, if it worked correctly, then the code for updating the ring
position would land in the wrong place, because it didn't take WARP
into account.
|
|
|