diff options
Diffstat (limited to 'src/include/kernel')
-rw-r--r-- | src/include/kernel/misc.H | 11 | ||||
-rw-r--r-- | src/include/kernel/pagemgr.H | 6 | ||||
-rw-r--r-- | src/include/kernel/vmmmgr.H | 22 |
3 files changed, 26 insertions, 13 deletions
diff --git a/src/include/kernel/misc.H b/src/include/kernel/misc.H index f0fe0ffd0..544df7c88 100644 --- a/src/include/kernel/misc.H +++ b/src/include/kernel/misc.H @@ -121,6 +121,15 @@ namespace KernelMisc }; + /** @fn expand_half_cache + * + * @brief Expands the image footprint from a quarter-cache (top 512k of + * each cache column) to a half-cache (full 1mb of each column). + * + * @return 0 or -errno + */ + int expand_half_cache(); + /** @fn expand_full_cache * * @brief Expands the image footprint from a half-cache to full-cache @@ -155,7 +164,7 @@ namespace KernelMisc * NOTE: This function is a wrapper function for writeScratchReg that * takes care of modifying the scratch register address value depending * on the getCPUType. The writeScratchReg takes the scratch address - * passed in and puts that date in that register using assembly code + * passed in and puts that data in that register using assembly code * * @param[in] uint64_t - scratch_addr * @param[in] uint64_t - Data diff --git a/src/include/kernel/pagemgr.H b/src/include/kernel/pagemgr.H index 65da0de66..b05e0b237 100644 --- a/src/include/kernel/pagemgr.H +++ b/src/include/kernel/pagemgr.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* COPYRIGHT International Business Machines Corp. 2010,2013 */ /* */ /* p1 */ /* */ @@ -176,8 +176,7 @@ class PageManager enum { - MEMLEN = VmmManager::FIRST_RESERVED_PAGE, - RESERVED_PAGES = 4, + KERNEL_HEAP_RESERVED_PAGES = 4, LOWMEM_NORM_LIMIT = 16, LOWMEM_CRIT_LIMIT = 5, @@ -192,6 +191,7 @@ class PageManager ~PageManager() {}; private: + void _initialize(); void* _allocatePage(size_t,bool); //!< see allocatePage() void _freePage(void*, size_t); //!< see freePage() diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H index b740d03e1..dae3c387d 100644 --- a/src/include/kernel/vmmmgr.H +++ b/src/include/kernel/vmmmgr.H @@ -42,18 +42,22 @@ class VmmManager { INITIAL_MEM_SIZE = 4*MEGABYTE, - // put the Page Table at the end of our memory space - PTSIZE = (1 << 18), - HTABORG_OFFSET = (INITIAL_MEM_SIZE - PTSIZE), + // Place the page table at the top side of the cache, 256k in size. + INITIAL_PT_OFFSET = INITIAL_MEM_SIZE - 1*MEGABYTE, + PTSIZE = 256*KILOBYTE, + HTABORG_OFFSET = INITIAL_PT_OFFSET, - // Put the DMA Pages just under the Page Table + // Put the DMA Pages just after the Page Table MBOX_DMA_PAGES = 64, // must be <= 64 MBOX_DMA_PAGESIZE = (1 * KILOBYTE), - MBOX_DMA_ADDR = (HTABORG_OFFSET - - (MBOX_DMA_PAGES * MBOX_DMA_PAGESIZE)), - - /** The base image and heap must be below this address. */ - FIRST_RESERVED_PAGE = MBOX_DMA_ADDR, + MBOX_DMA_ADDR = INITIAL_PT_OFFSET + PTSIZE, + MBOX_DMA_SIZE = MBOX_DMA_PAGES * MBOX_DMA_PAGESIZE, + + /** We need to reserve a hole in heap memory for the page table, + * etc. Use these constants to define the hole. */ + FIRST_RESERVED_PAGE = INITIAL_PT_OFFSET, + END_RESERVED_PAGE = INITIAL_PT_OFFSET + + PTSIZE + MBOX_DMA_SIZE, // Tells processor to ignore HRMOR FORCE_PHYS_ADDR = 0x8000000000000000, |