diff options
| author | Marty Gloff <mgloff@us.ibm.com> | 2016-07-27 11:55:38 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-08-10 14:14:54 -0400 |
| commit | 0f64c7b414998e6f9b1b7211f55f0ca481208070 (patch) | |
| tree | baac50f47ccab0274015612fa1faf9c8172fc10f /src/kernel | |
| parent | 15a7b3ec80e826ed07c57739693d9e98a17d2b33 (diff) | |
| download | blackbird-hostboot-0f64c7b414998e6f9b1b7211f55f0ca481208070.tar.gz blackbird-hostboot-0f64c7b414998e6f9b1b7211f55f0ca481208070.zip | |
Handle 8MB reduced cache mode
Check scom register (0x1001181B) for reduced cache mode and expand the
memory footprint appropriately, reduced 8MB or full 10MB.
Change-Id: I5920572077cdcee317e7b3b9abe999e6de295459
RTC:152954
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27522
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/kernel')
| -rw-r--r-- | src/kernel/misc.C | 9 | ||||
| -rw-r--r-- | src/kernel/syscall.C | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/kernel/misc.C b/src/kernel/misc.C index 4343fe9c8..972a30a19 100644 --- a/src/kernel/misc.C +++ b/src/kernel/misc.C @@ -517,7 +517,7 @@ namespace KernelMisc return 0; } - int expand_full_cache() + int expand_full_cache(uint64_t i_expandSize) { static bool executed = false; @@ -538,8 +538,7 @@ namespace KernelMisc case CORE_POWER9_CUMULUS: startAddr = reinterpret_cast<uint64_t*> ( VmmManager::INITIAL_MEM_SIZE ) ; - endAddr = - reinterpret_cast<uint64_t*>(VMM_BASE_BLOCK_SIZE); + endAddr = reinterpret_cast<uint64_t*>(i_expandSize); break; default: @@ -565,7 +564,9 @@ namespace KernelMisc executed = true; KernelMemState::setMemScratchReg(KernelMemState::MEM_CONTAINED_L3, - KernelMemState::FULL_CACHE); + (i_expandSize == VMM_BASE_BLOCK_SIZE) + ? KernelMemState::FULL_CACHE + : KernelMemState::REDUCED_CACHE); return 0; } diff --git a/src/kernel/syscall.C b/src/kernel/syscall.C index 035f7c8e2..44edff61a 100644 --- a/src/kernel/syscall.C +++ b/src/kernel/syscall.C @@ -896,8 +896,8 @@ namespace Systemcalls * Extends the initial footprint of the image further into memory. * * Depending on the syscall parameter, we will either switch from 4MB - * to 8MB cache-contained mode or expand into 32MB of space using real - * system memory. + * to a cache-contained mode (either full 10MB or reduced 8MB) or will + * expand into 32MB of space using real system memory. * @param[in] t: The task used to extend Memory */ @@ -911,8 +911,13 @@ namespace Systemcalls TASK_SETRTN(t, KernelMisc::expand_half_cache()); break; + case MM_EXTEND_REDUCED_CACHE: + TASK_SETRTN(t, KernelMisc::expand_full_cache(8*MEGABYTE)); + break; + case MM_EXTEND_FULL_CACHE: - TASK_SETRTN(t, KernelMisc::expand_full_cache()); + TASK_SETRTN(t, + KernelMisc::expand_full_cache(VMM_BASE_BLOCK_SIZE)); break; case MM_EXTEND_REAL_MEMORY: |

