diff options
| author | Dan Crowell <dcrowell@us.ibm.com> | 2012-08-10 14:48:06 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-09-16 15:09:40 -0500 |
| commit | 2f50c376a718ea6542b42e029a6735f719a8f407 (patch) | |
| tree | f54c4c46d71f1a3226a3e12e69664614ce4db138 /src/kernel/ptmgr.C | |
| parent | a0206bc94f427a1a4e3913fa9122b5530c5500ad (diff) | |
| download | blackbird-hostboot-2f50c376a718ea6542b42e029a6735f719a8f407.tar.gz blackbird-hostboot-2f50c376a718ea6542b42e029a6735f719a8f407.zip | |
Support for Non-zero HRMOR
Changes to kernel code to support detection and use of HRMOR
offset in memory
Changes to tooling to handle the real memory offset
New interface to retrieve the physical address that
corresponds to a virtual address
To test, run these commands before starting up Hostboot:
system_cmp0.cpu0_0_05_0.write-reg HRMOR 0x8000000
proc_venicechip_cmp0.phys_mem.del-map p8Proc0.l3_cache_ram 0 0
RTC: 46032
Change-Id: I50ab248f941218a3a14a8f0fc12a551b56dc7cf3
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1553
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/ptmgr.C')
| -rw-r--r-- | src/kernel/ptmgr.C | 68 |
1 files changed, 42 insertions, 26 deletions
diff --git a/src/kernel/ptmgr.C b/src/kernel/ptmgr.C index bf8937b78..573712994 100644 --- a/src/kernel/ptmgr.C +++ b/src/kernel/ptmgr.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/kernel/ptmgr.C $ - * - * 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 other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/ptmgr.C $ */ +/* */ +/* 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 */ #include <kernel/ptmgr.H> #include <kernel/vmmmgr.H> #include <util/singleton.H> @@ -35,6 +34,7 @@ #define Tprintk(args...) #define Eprintk(args...) printk(args) + // Utilities to do some bit manipulation /** @@ -208,7 +208,15 @@ void PageTableManager::addEntry( uint64_t i_vAddr, uint64_t i_page, uint64_t i_accessType ) { - return Singleton<PageTableManager>::instance()._addEntry( i_vAddr, i_page, i_accessType ); + // adjust physical address for the HRMOR unless this is a mmio + if( SegmentManager::CI_ACCESS != i_accessType ) + { + i_page |= (getHRMOR() / PAGESIZE); + } + + return Singleton<PageTableManager>::instance()._addEntry( i_vAddr, + i_page, + i_accessType ); } /** @@ -235,8 +243,16 @@ void PageTableManager::delRangeVA( uint64_t i_vAddrStart, * @brief Remove a range of entries from the hardware page table */ void PageTableManager::delRangePN( uint64_t i_pnStart, - uint64_t i_pnFinish ) + uint64_t i_pnFinish, + bool i_applyHRMOR ) { + // adjust physical address for the HRMOR unless this is a mmio + if( i_applyHRMOR ) + { + i_pnStart |= (getHRMOR() / PAGESIZE); + i_pnFinish |= (getHRMOR() / PAGESIZE); + } + return Singleton<PageTableManager>::instance()._delRangePN(i_pnStart,i_pnFinish); } @@ -857,7 +873,7 @@ uint64_t PageTableManager::getAddress( void ) if(unlikely(ivTABLE != NULL)) { return (uint64_t)ivTABLE; } else { - return VmmManager::HTABORG; + return VmmManager::HTABORG(); } } |

