summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/basesegment.H
diff options
context:
space:
mode:
authorMissy Connell <missyc@us.ibm.com>2012-09-10 16:05:01 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-10-09 17:10:32 -0500
commit1bf8c6b8376efacd03e3ec62d5ded5b2be4bff39 (patch)
treec266815232142e67f15a61ffcbdf09407737f259 /src/include/kernel/basesegment.H
parentfb1836fd7b1b8839815595db08ae740ec7b86347 (diff)
downloadtalos-hostboot-1bf8c6b8376efacd03e3ec62d5ded5b2be4bff39.tar.gz
talos-hostboot-1bf8c6b8376efacd03e3ec62d5ded5b2be4bff39.zip
Extend VMM to 32M
Add mmLinearMap to create block at a specified phys addr. Added iv_MaptoPhy in the block to indicate we are physically mapped block and to not apply the HRMOR. Change-Id: I75ddb19b82ae9a2035ff873edff8a34a33c74639 RTC:43401 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1846 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel/basesegment.H')
-rw-r--r--src/include/kernel/basesegment.H109
1 files changed, 79 insertions, 30 deletions
diff --git a/src/include/kernel/basesegment.H b/src/include/kernel/basesegment.H
index 293b24f1c..f9761ce2d 100644
--- a/src/include/kernel/basesegment.H
+++ b/src/include/kernel/basesegment.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/kernel/basesegment.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/kernel/basesegment.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/** @file basesegment.H
* @brief Defines the base segment (0TB) class.
*/
@@ -83,10 +83,17 @@ class BaseSegment : public Segment
* @param i_va[in] - Page aligned base virtual address of the block
* to be allocated
* @param i_size[in] - Requested virtual memory size of the block
+ * @param i_mappedToPhy[in] - bool value assigned to the block to
+ * determine if this blocked is mapped directly to a physical
+ * address
+ * DEFAULT - FALSE
+ * @param i_SPTEaddr[in] - address of where the SPTE should be put.
+ * DEFAULT = NULL (no specific address)
* @return int - 0 for successful block allocation, non-zero otherwise
*/
- static int mmAllocBlock(MessageQueue* i_mq,void* i_va,
- uint64_t i_size);
+ static int mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size,
+ bool iv_mappedToPhy = false,
+ uint64_t *i_SPTEaddr = NULL );
/**
* @brief Locate the physical address of the given virtual address
@@ -119,11 +126,28 @@ class BaseSegment : public Segment
static int mmSetPermission(void* i_va,
uint64_t i_size,
uint64_t i_access_type);
- /**
- * @breif Cast out older physical memory pages
- * @param[in] castout Constraint
- */
- virtual void castOutPages(uint64_t i_type);
+ /**
+ * @brief Cast out older physical memory pages
+ * @param[in] castout Constraint
+ */
+ virtual void castOutPages(uint64_t i_type);
+
+ /**
+ * @brief Allocates a block of virtual memory that extends the VMM
+ * space upto 32MEG of Mainstore.
+ */
+ static int mmExtend(void);
+
+ /**
+ * @brief Allocates a block of memory of the given size to at a
+ * specified physical address.
+ * @param i_paddr[in] - physical address of the location of the block of
+ * memory
+ * @param i_size[in] - range of memory being created
+ * @return int - 0 for successful block allocation, non-zero otherwise
+ */
+ static int mmLinearMap(void *i_paddr, uint64_t i_size);
+
private:
/**
@@ -142,9 +166,17 @@ class BaseSegment : public Segment
* @param i_mq[in] - Message queue to be associated with the block
* @param i_va[in] - Base virtual address of the block to be allocated
* @param i_size[in] - Requested virtual memory size of the block
+ * @param i_mappedToPhy[in] - bool value assigned to the block to
+ * determine if this blocked is mapped directly to a physical
+ * address
+ * DEFAULT - FALSE
+ * @param i_SPTEaddr[in] - address of where the SPTE should be put.
+ * DEFAULT = NULL (no specific address)
* @return int - 0 for successful block allocation, non-zero otherwise
*/
- int _mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size);
+ int _mmAllocBlock(MessageQueue* i_mq,void* i_va,uint64_t i_size,
+ bool iv_mappedToPhy = false,
+ uint64_t *i_SPTEaddr = NULL);
/**
* @brief Sets the page permissions for a given virtual address and size.
@@ -170,6 +202,23 @@ class BaseSegment : public Segment
int _mmRemovePages(VmmManager::PAGE_REMOVAL_OPS i_op, void* i_vaddr,
uint64_t i_size, task_t* i_task);
+ /**
+ * @brief Allocates a block of virtual memory that extends the VMM
+ * space upto 32MEG of Mainstore.
+ */
+ int _mmExtend(void);
+
+ /**
+ * @brief Allocates a block of memory of the given size to at a
+ * specified physical address.
+ * @param i_paddr[in] - physical address of the location of the block of
+ * memory
+ * @param i_size[in] - range of memory being created
+ * @return int - 0 for successful block allocation, non-zero otherwise
+ */
+ int _mmLinearMap(void* i_paddr, uint64_t i_size);
+
+
};
#endif
OpenPOWER on IntegriCloud