summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-05-20 14:34:56 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-06-10 10:04:07 -0500
commit857112a56dc57b18b1feacf948b87875dc4aea45 (patch)
treef0ee915b3e37f9134a9268ea0c2a7e32c56a17ee /src/include/kernel
parente3d115c541291493888f533b215e28b890776e50 (diff)
downloadblackbird-hostboot-857112a56dc57b18b1feacf948b87875dc4aea45.tar.gz
blackbird-hostboot-857112a56dc57b18b1feacf948b87875dc4aea45.zip
New mm_block_map syscall.
RTC: 71081 Change-Id: Ic5531fbba92cfc7aad7d303f043d6a350483d63d Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4607 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/devicesegment.H15
-rw-r--r--src/include/kernel/segmentmgr.H49
-rw-r--r--src/include/kernel/vmmmgr.H7
3 files changed, 37 insertions, 34 deletions
diff --git a/src/include/kernel/devicesegment.H b/src/include/kernel/devicesegment.H
index c010ffba8..411d4a37c 100644
--- a/src/include/kernel/devicesegment.H
+++ b/src/include/kernel/devicesegment.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -69,9 +69,10 @@ class DeviceSegment : public Segment
* @brief Map a device into the device segment.
* @param ra[in] - Void pointer to real address to be mapped in
* @param i_devDataSize[in] - Size of device segment block
+ * @param i_nonCI[in] - Device should be mapped cacheable instead of CI
* @return void* - Pointer to beginning virtual address, NULL otherwise
*/
- void* devMap(void* ra, uint64_t i_devDataSize);
+ void* devMap(void* ra, uint64_t i_devDataSize, bool i_nonCI);
/**
* @brief Unmap a device from the device segment.
@@ -86,7 +87,7 @@ class DeviceSegment : public Segment
* @return the physical address bound to the virtual address, or
* -EFAULT if i_vaddr not found. @see errno.h
*/
- uint64_t findPhysicalAddress(uint64_t i_vaddr) const;
+ uint64_t findPhysicalAddress(uint64_t i_vaddr) const;
private:
/**
@@ -94,9 +95,9 @@ class DeviceSegment : public Segment
*/
struct devSegData
{
- uint64_t addr; /* Real address assigned to device */
- uint64_t size; /* A particular device's segment block size */
- devSegData(): addr(0),size(THIRTYTWO_GB){};
+ uint64_t addr; //< Real address assigned to device
+ uint64_t no_ci:1; //< Device should be mapped non-CI.
+ uint64_t size:63; //< A particular device's segment block size
};
/**
@@ -105,7 +106,7 @@ class DeviceSegment : public Segment
enum
{
MMIO_MAP_DEVICES = 32
- }; //TODO - Only necessary if a device uses a SCOM region other than 32GB
+ };
devSegData iv_mmioMap[MMIO_MAP_DEVICES];
diff --git a/src/include/kernel/segmentmgr.H b/src/include/kernel/segmentmgr.H
index ecefbc0dd..cfc17597e 100644
--- a/src/include/kernel/segmentmgr.H
+++ b/src/include/kernel/segmentmgr.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/kernel/segmentmgr.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/segmentmgr.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* 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 segmentmgr.H
* Provides definition of the SegmentManager class.
*/
@@ -137,9 +137,10 @@ class SegmentManager
* @brief Map a device into the device segment
* @param ra[in] - Void pointer to real address to be mapped in
* @param i_devDataSize[in] - Size of device segment block
+ * @param i_nonCI[in] - Device should be mapped cacheable instead of CI
* @return void* - Pointer to beginning virtual address, NULL otherwise
*/
- static void* devMap(void* ra, uint64_t i_devDataSize);
+ static void* devMap(void* ra, uint64_t i_devDataSize, bool i_nonCI);
/**
* @brief Unmap a device from the device segment
@@ -165,7 +166,7 @@ class SegmentManager
/** See castOutPages */
void _castOutPages(uint64_t i_type);
/** See devMap */
- void* _devMap(void* ra, uint64_t i_devDataSize);
+ void* _devMap(void* ra, uint64_t i_devDataSize, bool i_nonCI);
/** See devUnmap */
int _devUnmap(void* ea);
diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H
index 87ae0caf6..b740d03e1 100644
--- a/src/include/kernel/vmmmgr.H
+++ b/src/include/kernel/vmmmgr.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2012 */
+/* COPYRIGHT International Business Machines Corp. 2010,2013 */
/* */
/* p1 */
/* */
@@ -103,9 +103,10 @@ class VmmManager
* @brief Map a device into the device segment
* @param ra[in] - Void pointer to real address to be mapped in
* @param i_devDataSize[in] - Size of device segment block
+ * @param i_nonCI[in] - Device should be mapped cacheable instead of CI
* @return void* - Pointer to beginning virtual address, NULL otherwise
*/
- static void* devMap(void* ra, uint64_t i_devDataSize);
+ static void* devMap(void* ra, uint64_t i_devDataSize, bool i_nonCI);
/**
* @brief Unmap a device from the device segment
@@ -246,7 +247,7 @@ class VmmManager
int _mmExtend( void );
/** See devMap */
- void* _devMap(void* ra, uint64_t i_devDataSize);
+ void* _devMap(void* ra, uint64_t i_devDataSize, bool i_nonCI);
/** See devUnmap */
int _devUnmap(void* ea);
OpenPOWER on IntegriCloud