Age | Commit message (Collapse) | Author |
|
Now the userspace page allocator will search through physical regions,
and stop the search as it finds an available page.
Also remove an "address of" sign since we don't need that when
counting size of physical regions
|
|
Now the kernel page directory and the page tables are located at a
safe address, to prevent from paging data colliding with garbage.
|
|
This was too noisy and important-sounding, when it doesn't really
matter that much. It's not the end of the world if symbolication fails
for one reason or another.
|
|
|
|
It's not safe to use a raw pointer for Process::m_tty. A pseudoterminal
pair will disappear when file descriptors are closed, and we'd end up
looking dangly. Just use a RefPtr.
|
|
Scheduling priority is now set at the thread level instead of at the
process level.
This is a step towards allowing processes to set different priorities
for threads. There's no userspace API for that yet, since only the main
thread's priority is affected by sched_setparam().
|
|
Whatever this was supposed to be, it was ironically... not implemented.
|
|
|
|
Let's arrange things like this instead. It didn't feel right for all of
the ELF handling code to live in AK.
|
|
|
|
Oops, we were creating these and then throwing them away. They will
get instantiated a bit later, when we bring up the mounts in /etc/fstab
from userspace.
|
|
It was silly to push the address of the stack pointer when we can also
just change the callee argument to be a value type.
|
|
This allows us to get rid of all the custom 64-bit division helpers.
I wanted to do this ages ago but couldn't get it working. Turns out it
was unstable due to libgcc using the regular ABI and the kernel being
built with -mregparm=3.
Now that we build the kernel with regular calls, we can just link with
libgcc and get this stuff for free. :^)
|
|
It was really confusing to have different calling conventions in kernel
and userspace. Also this has prevented us from linking with libgcc.
|
|
Also rename a local variable to be consistent with what it represents.
|
|
Having four virtual (text) consoles by default seems really overkill
for a system that can't even switch to them anyway (yet!)
|
|
This used to be the base class of ProcFS and DevPtsFS but not anymore.
|
|
Files opened with O_DIRECT will now bypass the disk cache in read/write
operations (though metadata operations will still hit the disk cache.)
This will allow us to test actual disk performance instead of testing
disk *cache* performance, if that's what we want. :^)
There's room for improvment here, we're very aggressively flushing any
dirty cache entries for the specific block before reading/writing that
block. This is done by walking the entire cache, which may be slow.
|
|
|
|
|
|
Run sudo and keep environment just like in makeall.sh
|
|
The Clang parser used by Qt Creator kept getting confused by this code.
|
|
If an inode is observed by watch_file(), we won't uncache it.
This allows a program to watch a file without keeping it open.
|
|
This helps aid debugging of issues such as #695, where the bridge chip
that controls IDE is NOT a PIIX3/4 compatible controller. Instead of
just hanging when the DMA registers can't be accessed, the system will
inform the user that no valid IDE controller has been found. In this
case, the system will not attempt to initialise the DMA registers and
instead use PIO mode.
|
|
Asking a File if we could possibly read or write it will never mutate
the asking FileDescription&, so it should be const.
|
|
If something goes wrong with a read or write operation, we don't want
to add the error number to the fd's offset. :^)
|
|
...if there are no packets in the receive queue.
|
|
|
|
Don't keep Inodes around in memory forever after we've interacted with
them once. This is a slight performance pessimization when accessing
the same file repeatedly, but closing it for a while in between.
Longer term we should find a way to keep a limited number of unused
Inodes cached, whichever ones we think are likely to be used again.
|
|
Move the kernel image to the 1 MB physical mark. This prevents it from
colliding with stuff like the VGA memory. This was causing us to end
up with the BIOS screen contents sneaking into kernel memory sometimes.
This patch also bumps the kmalloc heap size from 1 MB to 3 MB. It's not
the perfect permanent solution (obviously) but it should get the OOM
monkey off our backs for a while.
|
|
dispatch_signal() expected a RegisterDump on the kernel stack. However
in certain cases, like just after a clone, this was not the case and
dispatch_signal() would instead write to an incorrect user stack pointer.
We now use the threads TSS in situations where the RegisterDump may not
be valid, fixing the issue.
|
|
This refactors some the RegisterDump code from dispatch_signal
into a stand-alone function, allowing for better reuse.
|
|
|
|
After the page fault handler has found the region in which the fault
occurred, do the rest of the work in the region itself.
This patch also makes all fault types consistently crash the process
if a new page is needed but we're all out of pages.
|
|
Now that region manages its own mapping/unmapping, there's no need for
the outside world to be able to grab at its page directory.
|
|
This is done implicitly by mapping or unmapping the region.
|
|
It's never valid to construct a Region with a null Inode pointer using
this constructor, so just take a NonnullRefPtr<Inode> instead.
|
|
|
|
Regions with an offset into their VMObject were incorrectly adding the
page offset when indexing into the CoW bitmap.
|
|
Since the kernel page tables are shared between all processes, there's
no need to (implicitly) flush the TLB for them on every context switch.
Setting the G bit on kernel page tables allows the CPU to keep the
translation caches around.
|
|
Now remapping (i.e flushing kernel metadata to the CPU page tables)
is done by simply calling Region::remap().
|
|
This patch changes the parameter to Region::map() to be a PageDirectory
since that matches how we think about the memory model:
Regions are views onto VMObjects, and are mapped into PageDirectories.
Each Process has a PageDirectory. The kernel also has a PageDirectory.
|
|
The more Region can take care of itself, the better.
|
|
|
|
Since a Region is merely a "window" onto a VMObject, it can both begin
and end at a distance from the VMObject's boundaries.
Therefore, we should always be computing indices into a VMObject's
physical page array by adding the Region's "first_page_index()".
There was a whole bunch of code that forgot to do that. This fixes
many wrong behaviors for Regions that start part-way into a VMObject.
|
|
Let Region deal with this, instead of everyone calling MemoryManager.
|
|
This code was not doing anything important. Since we're building the
kernel with -mregparm=3, the first function argument goes in %eax.
|
|
If we get preempted during initialization, we really don't want to try
doing a sync on a partially-initialized filesystem.
|
|
This triggered a stack overflow because ubsan can call kprintf() at any
time, even before Console is initialized.
|
|
|