summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-06-02 15:04:18 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-06-14 09:09:39 -0500
commit0f4bb93bb0255db58725cac3979c58784d2563f3 (patch)
treed9f01bb19c8a907e27dace48acb011230928f6fa /src/kernel
parente89e72d2f8a2efe86acad95ed0769aa7a8fe64ae (diff)
downloadtalos-hostboot-0f4bb93bb0255db58725cac3979c58784d2563f3.tar.gz
talos-hostboot-0f4bb93bb0255db58725cac3979c58784d2563f3.zip
Move mbox DMA buffer to unsecure memory.
RTC: 64763 Change-Id: Ie910a57ca96bc6fc673097dbaf72e7df469b2017 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4803 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/pagemgr.C30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C
index c402c51bb..3c05fc6ab 100644
--- a/src/kernel/pagemgr.C
+++ b/src/kernel/pagemgr.C
@@ -211,11 +211,6 @@ void PageManager::_initialize()
uint64_t endBlock = ALIGN_MEGABYTE_DOWN(currentBlock) + 512*KILOBYTE;
- // Populate L3 cache lines for this chunk.
- KernelMisc::populate_cache_lines(
- reinterpret_cast<uint64_t*>(currentBlock),
- reinterpret_cast<uint64_t*>(endBlock));
-
// Adjust address to compensate for reserved hole and add to
// heap...
@@ -246,16 +241,27 @@ void PageManager::_initialize()
// Hole is in the middle... yuck.
else
{
- uint64_t pages =
- (VmmManager::FIRST_RESERVED_PAGE - currentBlock) / PAGESIZE;
+ uint64_t hole_end =
+ (VmmManager::FIRST_RESERVED_PAGE - currentBlock);
+
+ // Populate L3 for the first part of the chunk.
+ KernelMisc::populate_cache_lines(
+ reinterpret_cast<uint64_t*>(currentBlock),
+ reinterpret_cast<uint64_t*>(hole_end));
- iv_heap.addMemory(currentBlock, pages);
- totalPages += pages;
+ // Add it to the heap.
+ iv_heap.addMemory(currentBlock, hole_end / PAGESIZE);
+ totalPages += (hole_end / PAGESIZE);
currentBlock = VmmManager::END_RESERVED_PAGE;
}
}
+ // Populate L3 cache lines for this chunk.
+ KernelMisc::populate_cache_lines(
+ reinterpret_cast<uint64_t*>(currentBlock),
+ reinterpret_cast<uint64_t*>(endBlock));
+
uint64_t pages = (endBlock - currentBlock) / PAGESIZE;
iv_heap.addMemory(currentBlock, pages);
@@ -265,6 +271,12 @@ void PageManager::_initialize()
} while (reinterpret_cast<page_t*>(currentBlock) != endAddr);
+ // Ensure HW page table area is erased / populated.
+ KernelMisc::populate_cache_lines(
+ reinterpret_cast<uint64_t*>(VmmManager::INITIAL_PT_OFFSET),
+ reinterpret_cast<uint64_t*>(VmmManager::INITIAL_PT_OFFSET +
+ VmmManager::PTSIZE));
+
printk("%ld pages.\n", totalPages);
// Reserve pages for the kernel.
OpenPOWER on IntegriCloud