summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2012-10-19 13:24:04 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-12-13 15:11:25 -0600
commitca661f64019de70c4e18060d8bf67b143f6b7376 (patch)
tree5481c8e3d17969c3d837f2e44d70447b556e7a75 /src/kernel
parent219b91a0ae64a987471cfe07e669bb55d70cf594 (diff)
downloadtalos-hostboot-ca661f64019de70c4e18060d8bf67b143f6b7376.tar.gz
talos-hostboot-ca661f64019de70c4e18060d8bf67b143f6b7376.zip
Host Data Service
Implemented functions to load the Host Interface Data into memory and retrieve pointers to specific pieces of data therein. Verified in Murano and Tuleta configs. RTC: 49509 Change-Id: I18b44cd53f2cab91b83ecad283b998783e275d4f Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2367 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Terry J. Opie <opiet@us.ibm.com> Reviewed-by: Melissa J. Connell <missyc@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/basesegment.C6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/basesegment.C b/src/kernel/basesegment.C
index 79cf7ada8..0b4ad5969 100644
--- a/src/kernel/basesegment.C
+++ b/src/kernel/basesegment.C
@@ -117,12 +117,14 @@ int BaseSegment::_mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size,
uint64_t l_vaddr = reinterpret_cast<uint64_t>(i_va);
uint64_t l_blockSizeTotal = 0;
iv_block->totalBlocksAlloc(l_blockSizeTotal);
+
//Verify input address and size falls within this segment's address range
if (l_vaddr < this->getBaseAddress() ||
l_vaddr >= (this->getBaseAddress() + (1ull << SLBE_s)) ||
(l_blockSizeTotal + ALIGN_PAGE(i_size)) >= (1ull << SLBE_s) ||
(l_vaddr != ALIGN_PAGE_DOWN(l_vaddr)))
{
+ printkd("_mmAllocBlock: Address %lX is not part of BaseSegment : baseaddr=%lX, totalblocks=%ld\n", l_vaddr, this->getBaseAddress(), l_blockSizeTotal);
return -EINVAL;
}
@@ -135,8 +137,8 @@ int BaseSegment::_mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size,
// block.. if so return error
if (temp_block->isContained(l_vaddr))
{
- printk("mmAllocBlock Address = %lx is already in a block\n",l_vaddr);
- return -EINVAL;
+ printkd("_mmAllocBlock Address = %lx is already in a block\n",l_vaddr);
+ return -EALREADY;
}
temp_block = temp_block->iv_nextBlock;
OpenPOWER on IntegriCloud