Commit 063112e6 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan

pmfs: mount: Make trampoline memory executable, fix ram map.

Kmalloc memory is not executable by default.

I also needed to make the maximum size ram map allocation bigger
in order to map 2 GBs.
parent 829b8de1
......@@ -47,13 +47,13 @@
*
* -- 1 GB HOLE (unmapped)
*
* -- 1 GB for RAM memory mapping region (think: kmap)
* -- 4 GB for RAM memory mapping region (think: kmap)
*
* -- 1 GB HOLE (unmapped)
*
* -- 1 GB for ioremap region (unmapped at boot)
*
* -- 500 GB HOLE (unmapped)
* -- 497 GB HOLE (unmapped)
*
* -- 2 GB for kernel module mapping area. The kernel module itself
* is mapped at the correct offset into this area so that
......@@ -75,16 +75,16 @@
* | (2 GB) |
* +---------------------------+ 0x0000 007f 8000 0000 (510 GB)
* | HOLE / Unmapped |
* | (500 GB) |
* +---------------------------+ 0x0000 0002 8000 0000 (10 GB)
* | (497 GB) |
* +---------------------------+ 0x0000 0003 4000 0000 (13 GB)
* | ioremap Region |
* | (1 GB) |
* +---------------------------+ 0x0000 0002 4000 0000 (9 GB)
* +---------------------------+ 0x0000 0003 0000 0000 (12 GB)
* | HOLE / Unmapped |
* | (1 GB) |
* +---------------------------+ 0x0000 0002 0000 0000 (8 GB)
* +---------------------------+ 0x0000 0002 c000 0000 (11 GB)
* | RAM Map Region |
* | (1 GB) |
* | (4 GB) |
* +---------------------------+ 0x0000 0001 c000 0000 (7 GB)
* | HOLE / Unmapped |
* | (1 GB) |
......@@ -155,8 +155,8 @@
#define LCD_MISC_REGION_SIZE (1UL << 30) /* .................... 1 GB */
#define LCD_STACK_REGION_SIZE (1UL << 30) /* ................... 1 GB */
#define LCD_HEAP_REGION_SIZE (1UL << 30) /* .................... 1 GB */
#define LCD_RAM_MAP_REGION_SIZE (1UL << 30) /* ................. 1 GB */
#define LCD_IOREMAP_REGION_SIZE (1UL << 30) /* ................. 1 GB */
#define LCD_RAM_MAP_REGION_SIZE (4UL << 30) /* ................. 4 GBs */
#define LCD_IOREMAP_REGION_SIZE (1UL << 30) /* ................. 1 GB */
#define LCD_KERNEL_MODULE_REGION_SIZE (2UL << 30) /* ........... 2 GBs */
/* Component Sizes. */
......@@ -211,7 +211,7 @@
/* HOLE */
#define LCD_KERNEL_MODULE_REGION_OFFSET \
(LCD_IOREMAP_REGION_OFFSET + LCD_IOREMAP_REGION_SIZE + (500UL << 30))
(LCD_IOREMAP_REGION_OFFSET + LCD_IOREMAP_REGION_SIZE + (497UL << 30))
/* Addresses */
......
......@@ -82,7 +82,7 @@ int __liblcd_heap_init(void);
/*
* RAM MAPPING --------------------------------------------------
*
* RAM mapping area is 1 GB (2^18 pages).
* RAM mapping area is 4 GB (2^20 pages).
*
* The minimum address space block you can allocate from the RAM map
* area is 2 MBs (2^9 = 512 pages). This leads to a lot of internal
......@@ -94,19 +94,13 @@ int __liblcd_heap_init(void);
* RAM map allocator.)
*
* The maximum address space block you can allocate from the RAM map
* area is 256 MB (2^16 = 65,536 pages).
*
* In hindsight, maybe a simple bitmap would have been just as good
* here since there are only 1GB/64MB = 512 allocation blocks. Oh well. (These
* mapping regions were originally gonna be a lot bigger, but I had
* to switch over to 2MB guest virtual pages instead of 1GB pages. Etc.
* etc.)
* area is 2 GB (2^19 = 524,288 pages).
*/
#define LCD_RAM_MAP_NR_PAGES_ORDER \
(ilog2(LCD_RAM_MAP_REGION_SIZE >> PAGE_SHIFT))
#define LCD_RAM_MAP_SIZE LCD_RAM_MAP_REGION_SIZE
#define LCD_RAM_MAP_MIN_ORDER 9
#define LCD_RAM_MAP_MAX_ORDER 16
#define LCD_RAM_MAP_MAX_ORDER 19
/*
* IOREMAP area ----------------------------------------------------
......
......@@ -67,6 +67,7 @@ struct lcd_trampoline_handle {
hidden_args = *(__ip - 1); \
}
#define LCD_TRAMPOLINE_SIZE(name) ((unsigned long)name##_size)
/**
* You should "call" this macro when you want to duplicate a trampoline.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment