Luna/kernel/include
apio e5cf32c7b3 Kernel: Introduce page ownership
Some pages, such as framebuffer pages, are not physical memory frames reserved for the current process.
Some, such as the framebuffer, may be shared between all processes.
Yet, on exit() or on exec(), a process frees all frames mapped into its address spaces.
And on fork(), it copies all data between frames. So how could we map framebuffers.

Simple: we use one of the bits in page table entries which are available to the OS, and mark whether that page is owned by the current process.

If it is owned, it will be:
- Freed on address space destruction
- Its data will be copied to a new page owned by the child process on fork()

If it is not owned, it will be:
- Left alone on address space destruction
- On fork(), the child's virtual page will be mapped to the same physical frame as the parent

This still needs a bit more work, such as keeping a reference of how many processes use a page to free it when all processes using it exit/exec.
This should be done for MAP_SHARED mappings, for example, since they are not permanent forever,
unlike the framebuffer for example.
2022-11-02 19:32:28 +01:00
..
acpi Fix naming 2022-09-25 21:43:28 +02:00
cpu Kernel: Add support for the NX bit 2022-11-02 18:34:57 +01:00
fs VFS: Add support for an implementation-defined value 2022-10-30 20:53:45 +01:00
gdt Ready. Set. Go! 2022-09-05 16:13:51 +02:00
init Kernel: Read file modes from the initrd, filtering out write permissions 2022-10-28 20:52:10 +02:00
interrupts Kernel: Add functions to push and pop the interrupt state 2022-10-12 12:58:56 +02:00
io Add a Device class to PCI and a PCITypes file for string names for PCI device types 2022-09-23 18:01:07 +02:00
log Panic: show panic message on screen 2022-10-16 18:23:33 +02:00
memory Kernel: Introduce page ownership 2022-11-02 19:32:28 +01:00
misc sh: Add a simple interactive shell 2022-10-19 19:42:05 +02:00
panic Panic: show panic message on screen 2022-10-16 18:23:33 +02:00
rand Randomness and stack protection!! 2022-09-14 18:54:40 +02:00
render Separate the logging stack into toggleable backends, to disable console logging once boot finishes. 2022-10-01 15:35:11 +02:00
std Kernel, libc: Add ECHILD 2022-10-30 19:24:26 +01:00
sys Kernel, libc: Implement umask() 2022-10-30 19:55:38 +01:00
thread Kernel, libc: Implement umask() 2022-10-30 19:55:38 +01:00
trace Kernel: Switch to strlcpy() as well 2022-10-15 17:30:34 +02:00
utils Kernel: Keep track of boot time 2022-10-30 09:07:03 +01:00
bootboot.h Ready. Set. Go! 2022-09-05 16:13:51 +02:00
config.h Add a moon_version function that returns the full version string 2022-09-20 16:34:24 +02:00
font.h Some more userland and font failing 2022-09-23 16:41:43 +02:00