summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-12-10 22:50:29 +0100
committerRichard Braun <rbraun@sceen.net>2014-12-10 23:16:47 +0100
commita171aad8daea3576f1c57e235c9d0c511a1f361c (patch)
tree482045d5de606a593d8b0c5d5940bc4ac88af2e0 /kern
parentaf0a3193f5c3cd859313660bdfb5cd4f226991cc (diff)
x86/pmap: directmap update
This module is probably the most impacted by the direct physical mapping. First, it establishes the direct physical mapping before paging is enabled, and uses the largest available page size when doing so. In addition, the recursive mapping of PTEs is removed, since all page table pages are allocated from the direct physical mapping. This changes the way mapping requests are processed. The ability to access any page table page at any time removes the need for virtual addresses reserved for temporary mappings. Since it's now perfectly possible to return physical address 0 for a kernel mapping, change the interface of the pmap_extract function and rename it to pmap_kextract to stress the fact that it should only be used for kernel mappings.
Diffstat (limited to 'kern')
-rw-r--r--kern/error.c2
-rw-r--r--kern/error.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/kern/error.c b/kern/error.c
index f448b4d9..a86e913c 100644
--- a/kern/error.c
+++ b/kern/error.c
@@ -32,6 +32,8 @@ error_str(int error)
return "invalid argument";
case ERROR_BUSY:
return "device or resource busy";
+ case ERROR_FAULT:
+ return "Bad address";
default:
return "unknown error";
}
diff --git a/kern/error.h b/kern/error.h
index cf88775d..eb11cda0 100644
--- a/kern/error.h
+++ b/kern/error.h
@@ -22,6 +22,7 @@
#define ERROR_AGAIN 2
#define ERROR_INVAL 3
#define ERROR_BUSY 4
+#define ERROR_FAULT 5
/*
* Return a string describing the given error.