diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-03-26 11:23:47 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-06-14 09:09:09 -0500 |
commit | e89e72d2f8a2efe86acad95ed0769aa7a8fe64ae (patch) | |
tree | 5541b72a698f58757ab2fe36b1a264fff6bcb3a2 /src/kernel/basesegment.C | |
parent | 92255af10842c672550a586d342c67ac1c7e11ca (diff) | |
download | talos-hostboot-e89e72d2f8a2efe86acad95ed0769aa7a8fe64ae.tar.gz talos-hostboot-e89e72d2f8a2efe86acad95ed0769aa7a8fe64ae.zip |
Secureboot memory layout support.
* Start kernel in 1/4 cache mode per Secureboot.
* Copy Secureboot header for base image for later use.
* Blind-purge bottom half of cache.
* Add bottom of cache into memory maps for 1/2 cache mode.
RTC: 64762
Change-Id: I1b45f30a2d45c9709d4fd486cfe0ca2ce86b051c
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3773
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/basesegment.C')
-rw-r--r-- | src/kernel/basesegment.C | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/kernel/basesegment.C b/src/kernel/basesegment.C index 5317d2a25..e9f966433 100644 --- a/src/kernel/basesegment.C +++ b/src/kernel/basesegment.C @@ -62,8 +62,6 @@ void BaseSegment::_init() iv_block = new Block(0x0, iv_physMemSize); iv_block->setParent(this); - // TODO iv_physMemSize needs to be recalculated when DIMM memory is avail. - // Set default page permissions on block. for (uint64_t i = 0; i < VMM_BASE_BLOCK_SIZE; i += PAGESIZE) { @@ -246,9 +244,9 @@ int BaseSegment::_mmExtend(void) // Call to allocate a block passing in the requested address of where the // SPTEs should be created - int rc = _mmAllocBlock(NULL, reinterpret_cast<void *>(l_vaddr), l_size, false, - /*(uint64_t *)*/reinterpret_cast<uint64_t *>(l_vaddr)); - + int rc = _mmAllocBlock(NULL, reinterpret_cast<void *>(l_vaddr), l_size, + false, reinterpret_cast<uint64_t *>(l_vaddr)); + if (rc) { printk("Got an error in mmAllocBlock\n"); @@ -264,7 +262,8 @@ int BaseSegment::_mmExtend(void) // Now need to take the pages past the SPTE and add them to the heap. //get the number of pages needed to hold the SPTE entries. - uint64_t spte_pages = (ALIGN_PAGE(l_size)/PAGESIZE * sizeof(ShadowPTE))/PAGESIZE; + uint64_t spte_pages = (ALIGN_PAGE(l_size)/PAGESIZE * + sizeof(ShadowPTE))/PAGESIZE; printkd("Number of SPTE pages %ld\n", spte_pages); @@ -273,7 +272,8 @@ int BaseSegment::_mmExtend(void) // used for the SPTE. // Call Add Memory with the starting address , size.. it will put the pages - // on the heap call this with the address being the first page past the SPTE. + // on the heap call this with the address being the first page past the + // SPTE. PageManager::addMemory(l_vaddr + (spte_pages*PAGESIZE), l_size/PAGESIZE - spte_pages); @@ -291,7 +291,7 @@ int BaseSegment::_mmExtend(void) /** * Allocates a block of virtual memory of the given size - * to at a specified physical address. + * to at a specified physical address. */ int BaseSegment::mmLinearMap(void *i_paddr, uint64_t i_size) { @@ -300,7 +300,7 @@ int BaseSegment::mmLinearMap(void *i_paddr, uint64_t i_size) /** * Allocates a block of virtual memory of the given size - * to at a specified physical address + * to at a specified physical address */ int BaseSegment::_mmLinearMap(void *i_paddr, uint64_t i_size) { |