summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-11-13 15:36:05 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-11-14 15:45:36 -0600
commit073d82a61ee7ce0ec4522c18ce92cd93537025db (patch)
tree382b3db4c6032fb83b2e1c7e9f50eb6c0507fb5b /src/include/kernel
parentf5fc4c94d84ed3a5263d4139cb09179a5722f382 (diff)
downloadtalos-hostboot-073d82a61ee7ce0ec4522c18ce92cd93537025db.tar.gz
talos-hostboot-073d82a61ee7ce0ec4522c18ce92cd93537025db.zip
Expand memory footprint to full 8MB cache.
If fake PNOR isn't being used, we can expand our memory space to the full 8MB cache. There will be follow up work with RTC: 49137 to support 4MB degraded caches for bring-up. Change-Id: I1248efa37965f39ebab62aae556349c34aa24b66 RTC: 47356 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2319 Tested-by: Jenkins Server Reviewed-by: Melissa J. Connell <missyc@us.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/misc.H69
-rw-r--r--src/include/kernel/pagemgr.H2
-rw-r--r--src/include/kernel/vmmmgr.H9
3 files changed, 53 insertions, 27 deletions
diff --git a/src/include/kernel/misc.H b/src/include/kernel/misc.H
index c970c337e..5a818078e 100644
--- a/src/include/kernel/misc.H
+++ b/src/include/kernel/misc.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/kernel/misc.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/kernel/misc.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/** @file misc.H
* @brief Misc. Kernel functions and utilities.
*/
@@ -88,5 +87,29 @@ namespace KernelMisc
/** Current time-base value for restore after winkle. */
uint64_t iv_timebase;
};
+
+ /** @fn expand_full_cache
+ *
+ * @brief Expands the image footprint from a half-cache to full-cache
+ * mode.
+ *
+ * @return 0 or -errno
+ */
+ int expand_full_cache();
+
+ /** @fn populate_cache_lines
+ *
+ * @brief Populates a range of memory addresses into the cache via dcbz.
+ *
+ * This is meant to be used while the processor is in cache-contained
+ * mode. The entire cache line is zero'd so if the range is less then
+ * a cache-line, or starts misaligned, then more memory might be zero'd
+ * then would be expected.
+ *
+ * @param[in] i_start - Address to start dcbz at.
+ * @param[in] i_end - Address to stop dcbz at.
+ * (This address is not dcbz'd itself)
+ */
+ void populate_cache_lines(uint64_t* i_start, uint64_t* i_end);
};
#endif
diff --git a/src/include/kernel/pagemgr.H b/src/include/kernel/pagemgr.H
index ad94d0522..65da0de66 100644
--- a/src/include/kernel/pagemgr.H
+++ b/src/include/kernel/pagemgr.H
@@ -176,7 +176,7 @@ class PageManager
enum
{
- MEMLEN = VmmManager::MBOX_DMA_ADDR,
+ MEMLEN = VmmManager::FIRST_RESERVED_PAGE,
RESERVED_PAGES = 4,
LOWMEM_NORM_LIMIT = 16,
diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H
index 7b8bd07bc..87ae0caf6 100644
--- a/src/include/kernel/vmmmgr.H
+++ b/src/include/kernel/vmmmgr.H
@@ -40,11 +40,11 @@ class VmmManager
*/
enum VMM_CONSTS
{
- FULL_MEM_SIZE = 4*MEGABYTE,
+ INITIAL_MEM_SIZE = 4*MEGABYTE,
// put the Page Table at the end of our memory space
PTSIZE = (1 << 18),
- HTABORG_OFFSET = (FULL_MEM_SIZE - PTSIZE),
+ HTABORG_OFFSET = (INITIAL_MEM_SIZE - PTSIZE),
// Put the DMA Pages just under the Page Table
MBOX_DMA_PAGES = 64, // must be <= 64
@@ -52,6 +52,9 @@ class VmmManager
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,
+
// Tells processor to ignore HRMOR
FORCE_PHYS_ADDR = 0x8000000000000000,
};
@@ -187,7 +190,7 @@ class VmmManager
/**
* @brief Allocates a block of virtual memory that extends the VMM
- * space upto 32MEG of Mainstore.
+ * space upto 32MEG of Mainstore.
*/
static int mmExtend( void);
OpenPOWER on IntegriCloud