diff options
author | Ilya Smirnov <ismirno@us.ibm.com> | 2018-09-26 10:35:24 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-11-13 13:23:59 -0600 |
commit | 1aae1ba2930ceb5d72b9855c8003c1d8371c0791 (patch) | |
tree | 4da3ed64fb3558db00e68b659c9bfdde79d26258 /src/usr/targeting | |
parent | de9ec8dc9ca52d350d02c0862409fba939692c1e (diff) | |
download | talos-hostboot-1aae1ba2930ceb5d72b9855c8003c1d8371c0791.tar.gz talos-hostboot-1aae1ba2930ceb5d72b9855c8003c1d8371c0791.zip |
Move HOMER BAR to Secure Memory in SMF Mode
This commits enables HOMER BAR to point to the top
of the secure memory on SMF-enabled systems. Consequently,
the HOMER image and hostboot reserved memory will
be moved to the secure memory if SMF is enabled.
Change-Id: I37c7527b06688a41e57f14b4107ff53a507ffae8
RTC: 198825
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66702
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-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/usr/targeting')
-rw-r--r-- | src/usr/targeting/common/util.C | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/src/usr/targeting/common/util.C b/src/usr/targeting/common/util.C index 26b63966e..c8b8c7c5f 100644 --- a/src/usr/targeting/common/util.C +++ b/src/usr/targeting/common/util.C @@ -201,114 +201,6 @@ bool is_no_load(void) return (PAYLOAD_KIND_NONE == sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>()); } -/** - * @brief Utility function to obtain the highest known address in the system - */ -uint64_t get_top_mem_addr(void) -{ - uint64_t top_addr = 0; - - do - { - // Get all functional proc chip targets - TARGETING::TargetHandleList l_cpuTargetList; - TARGETING::getAllChips(l_cpuTargetList, TYPE_PROC); - - for ( size_t proc = 0; proc < l_cpuTargetList.size(); proc++ ) - { - TARGETING::Target * l_pProc = l_cpuTargetList[proc]; - top_addr = std::max(top_addr,get_top_mem_addr(l_pProc)); - } - - } while(0); - - return top_addr; -} - -/** - * @brief Utility function to obtain the highest known address in a given proc - */ -uint64_t get_top_mem_addr(TargetHandle_t i_proc) -{ - uint64_t top_addr = 0; - - //Not checking success here as fail results in no change to - // top_addr - uint64_t l_mem_bases[8] = {0,}; - uint64_t l_mem_sizes[8] = {0,}; - i_proc->tryGetAttr<TARGETING::ATTR_PROC_MEM_BASES>(l_mem_bases); - i_proc->tryGetAttr<TARGETING::ATTR_PROC_MEM_SIZES>(l_mem_sizes); - - for (size_t i=0; i< 8; i++) - { - if(l_mem_sizes[i]) //non zero means that there is memory present - { - top_addr = std::max(top_addr, - l_mem_bases[i] + l_mem_sizes[i]); - } - } - - return top_addr; -} - -/** - * @brief Utility function to obtain the lowest known address in the system - */ -uint64_t get_bottom_mem_addr(void) -{ - uint64_t bottom_addr = UINT64_MAX; - - do - { - // Get all functional proc chip targets - TARGETING::TargetHandleList l_cpuTargetList; - TARGETING::getAllChips(l_cpuTargetList, TYPE_PROC); - - for ( size_t proc = 0; proc < l_cpuTargetList.size(); proc++ ) - { - TARGETING::Target * l_pProc = l_cpuTargetList[proc]; - bottom_addr = std::min(bottom_addr, get_bottom_mem_addr(l_pProc)); - } - }while(0); - - // There's no reason the lowest address should be the largest - // 64 bit value - TARG_ASSERT( - bottom_addr < UINT64_MAX, - "Lowest address is maximum 64-bit value, probably have no memory"); - - return bottom_addr; -} - - -/** - * @brief Utility function to obtain the lowest known address in a given proc - */ -uint64_t get_bottom_mem_addr(TargetHandle_t i_proc) -{ - uint64_t bottom_addr = UINT64_MAX; - - uint64_t l_mem_bases[8] = {}; - uint64_t l_mem_sizes[8] = {}; - TARG_ASSERT( - i_proc->tryGetAttr<TARGETING::ATTR_PROC_MEM_BASES>(l_mem_bases), - "Unable to get ATTR_PROC_MEM_BASES attribute"); - - TARG_ASSERT( - i_proc->tryGetAttr<TARGETING::ATTR_PROC_MEM_SIZES>(l_mem_sizes), - "Unable to get ATTR_PROC_MEM_SIZES attribute"); - - for (size_t i=0; i< 8; i++) - { - if(l_mem_sizes[i]) //non zero means that there is memory present - { - bottom_addr = std::min(bottom_addr, l_mem_bases[i]); - } - } - - return bottom_addr; -} - bool orderByNodeAndPosition( Target* i_firstProc, Target* i_secondProc) { |