diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2018-01-15 21:11:18 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-01-18 11:11:16 -0500 |
commit | bba738e7b179d004a7aebb5d87f454859080a3ec (patch) | |
tree | 1be01ada99a5b2533d8e8a4caf34ec2c0c574094 /src | |
parent | 0761000af3d16e2a528e21140a0d61a9ba147413 (diff) | |
download | talos-hostboot-bba738e7b179d004a7aebb5d87f454859080a3ec.tar.gz talos-hostboot-bba738e7b179d004a7aebb5d87f454859080a3ec.zip |
Compute PAYLOAD_BASE attr based on phys_addr passed from PHYP
PHYP is writing the physical address of their new HRMOR into the
provided hdat address. Hostboot will now take that physical address
and mask off 0 bit of the address. Also the PAYLOAD_BASE
attribute is the unit MB so we will divide the masked address by 1 MB
Change-Id: Ic01a1ad489b8051f96d77195f73848b09e2ae89b
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51990
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@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')
-rwxr-xr-x | src/usr/targeting/targetservicestart.C | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C index d5405e511..6509b320d 100755 --- a/src/usr/targeting/targetservicestart.C +++ b/src/usr/targeting/targetservicestart.C @@ -37,6 +37,7 @@ // STD #include <stdio.h> #include <stdlib.h> +#include <limits.h> // Other components #include <sys/misc.h> @@ -494,9 +495,13 @@ static void initializeAttributes(TargetService& i_targetService, // if the hrmor in the comm area is non-zero then set the payload base attribute if( l_hbHypComm_ptr->hrmorAddress) { + const uint64_t THREAD_STATE_RUNNING = 0x8000000000000000ULL; TARG_INF("Setting ATTR_PAYLOAD_BASE to new hrmor given by hypervisor: 0x%lx", l_hbHypComm_ptr->hrmorAddress); - l_pTopLevel->setAttr<ATTR_PAYLOAD_BASE>(l_hbHypComm_ptr->hrmorAddress); + //Mask off THREAD_STATE_RUNNING bit and then divide remaining address by 1 MB + uint64_t l_payloadBase_MB = ((~(THREAD_STATE_RUNNING)) & l_hbHypComm_ptr->hrmorAddress) / MEGABYTE; + //ATTR_PAYLOAD_BASE's is MB + l_pTopLevel->setAttr<ATTR_PAYLOAD_BASE>(l_payloadBase_MB); } else { |