aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-09 22:06:59 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-09 22:06:59 +0100
commite499d74b6f0b57f9a11486c346dbc335e4f8433d (patch)
tree91c35db2d0edc5147f874f5f36c51eca8dd7cdb3
parent380fd19521dd5205ef3da5248899244b5b29dc27 (diff)
downloadkogata-e499d74b6f0b57f9a11486c346dbc335e4f8433d.tar.gz
kogata-e499d74b6f0b57f9a11486c346dbc335e4f8433d.zip
Update README
-rw-r--r--README.md13
-rw-r--r--src/kernel/dev/v86.c15
2 files changed, 6 insertions, 22 deletions
diff --git a/README.md b/README.md
index 22914a8..2fc29d4 100644
--- a/README.md
+++ b/README.md
@@ -116,18 +116,6 @@ running the tests):
### Things to design
-* Cache architecture :
- - A RAM file is basically a bunch of pages that contain the data (rather than a segment of
- malloc()'ed memory)
- - A framebuffer device is basically a bunch of pages at a fixed hardware location, that cannot
- grow
- - In the two previous cases, the pages are never freed : they are not a cache, they are the
- data itself.
- - In the case of an on-disk file, the pages are a copy of the file's data that is originally
- on-disk, and we might want to free these pages even while a process is using them, because
- we can always reload them from the disk.
- - An on-disk file with a page cache must be aware of all the places where the page is mapped,
- so that it can unmap it when reclaiming pages.
* Reclaiming physical memory :
- Freeing some cached stuff, ie swapping pages from mmap regions
- Swapping pages from processes non-mmap regions (ie real data regions)
@@ -142,6 +130,7 @@ running the tests):
### Things not sure
* VFS thread safety : is the design correct ? (probably)
+* Cache architecture (called *pager*, after 4.4BSD terminology)
* Not enough tests!
### Plans for the later future
diff --git a/src/kernel/dev/v86.c b/src/kernel/dev/v86.c
index 68bc375..183b791 100644
--- a/src/kernel/dev/v86.c
+++ b/src/kernel/dev/v86.c
@@ -207,17 +207,12 @@ void v86_ex_handler(registers_t *regs) {
}
void v86_pf_handler(void* zero, registers_t *regs, void* addr) {
- if (addr < (void*)V86_STACK_TOP) {
- pd_map_page(addr, (uint32_t)addr / PAGE_SIZE, true);
- } else {
- dbg_printf("Unexpected V86 PF at 0x%p\n", addr);
+ dbg_printf("Unexpected V86 PF at 0x%p\n", addr);
- if (current_thread->user_ex_handler == v86_ex_handler) {
- // we are in V86 thread
- v86_exit_thread(false);
- } else {
- PANIC("V86 memory access exception.");
- }
+ if (current_thread == v86_thread) {
+ v86_exit_thread(false);
+ } else {
+ PANIC("V86 memory access exception.");
}
}