diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-04-11 14:49:13 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2011-04-11 14:49:13 -0500 |
commit | c0776eaa0548fc3ddec21e3113539198fa1cf875 (patch) | |
tree | 11f96dbbbad5e099b0f33502010a15123027a94b /src/kernel/pagemgr.C | |
parent | 55eaeb37070dc1f635dc5f02ed49c7c7bba4627a (diff) | |
download | talos-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.C | 10 |
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) |