summaryrefslogtreecommitdiffstats
path: root/src/kernel/pagemgr.C
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-04-11 14:49:13 -0500
committerPatrick Williams <iawillia@us.ibm.com>2011-04-11 14:49:13 -0500
commitc0776eaa0548fc3ddec21e3113539198fa1cf875 (patch)
tree11f96dbbbad5e099b0f33502010a15123027a94b /src/kernel/pagemgr.C
parent55eaeb37070dc1f635dc5f02ed49c7c7bba4627a (diff)
downloadtalos-hostboot-c0776eaa0548fc3ddec21e3113539198fa1cf875.tar.gz
talos-hostboot-c0776eaa0548fc3ddec21e3113539198fa1cf875.zip
VBU: Move dcbz code into PageManager.
The space after our code image but before the first page is unused, so we only need to dcbz the pages. This reduces any dependency on cache size in the dcbz loop boundary condition calculations.
Diffstat (limited to 'src/kernel/pagemgr.C')
-rw-r--r--src/kernel/pagemgr.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C
index 972508420..5d6637203 100644
--- a/src/kernel/pagemgr.C
+++ b/src/kernel/pagemgr.C
@@ -2,6 +2,7 @@
#include <util/singleton.H>
#include <kernel/console.H>
#include <sys/vfs.h>
+#include <arch/ppc.H>
void PageManager::init()
{
@@ -36,6 +37,15 @@ PageManager::PageManager()
length,
(uint64_t)page);
+ // Populate L3 cache lines.
+ uint64_t* cache_line = (uint64_t*) addr;
+ uint64_t* end_cache_line = (uint64_t*) VmmManager::FULL_MEM_SIZE;
+ while (cache_line != end_cache_line)
+ {
+ dcbz(cache_line);
+ cache_line++;
+ }
+
// Allocate pages to buckets.
size_t page_length = BUCKETS-1;
while(length > 0)
OpenPOWER on IntegriCloud