summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/vmparam.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-01-08 16:13:44 +0000
committerkib <kib@FreeBSD.org>2011-01-08 16:13:44 +0000
commit06eb8de1e11605ee7d4ae2e5c58cdadccc659f0d (patch)
tree89f01dcb94af1295c1d16e6a0cf6aa53ea8dcefc /sys/amd64/include/vmparam.h
parent12d561f88acf9296f4d7f1ba98ad4d9a8da70bf3 (diff)
downloadFreeBSD-src-06eb8de1e11605ee7d4ae2e5c58cdadccc659f0d.zip
FreeBSD-src-06eb8de1e11605ee7d4ae2e5c58cdadccc659f0d.tar.gz
Create shared (readonly) page. Each ABI may specify the use of page by
setting SV_SHP flag and providing pointer to the vm object and mapping address. Provide simple allocator to carve space in the page, tailored to put the code with alignment restrictions. Enable shared page use for amd64, both native and 32bit FreeBSD binaries. Page is private mapped at the top of the user address space, moving a start of the stack one page down. Move signal trampoline code from the top of the stack to the shared page. Reviewed by: alc
Diffstat (limited to 'sys/amd64/include/vmparam.h')
-rw-r--r--sys/amd64/include/vmparam.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
index 7a50c59..88d68b9 100644
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -186,7 +186,8 @@
#define VM_MAXUSER_ADDRESS UVADDR(NUPML4E, 0, 0, 0)
-#define USRSTACK VM_MAXUSER_ADDRESS
+#define SHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE)
+#define USRSTACK SHAREDPAGE
#define VM_MAX_ADDRESS UPT_MAX_ADDRESS
#define VM_MIN_ADDRESS (0)
OpenPOWER on IntegriCloud