[rtems commit] bsp/qoriq: MMU configuration as hypervisor guest
Sebastian Huber
sebh at rtems.org
Tue Sep 19 12:37:08 UTC 2017
Module: rtems
Branch: master
Commit: 31540bfb81bb90b2aca8200b607c69f53ebab7b5
Changeset: http://git.rtems.org/rtems/commit/?id=31540bfb81bb90b2aca8200b607c69f53ebab7b5
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Sep 19 14:34:21 2017 +0200
bsp/qoriq: MMU configuration as hypervisor guest
Re-enable MMU configuration as hypervisor guest. Make sure the
QORIQ_TLB1_ENTRY_COUNT is set according to the hypervisor configuration.
Update #3085.
---
c/src/lib/libbsp/powerpc/qoriq/start/start.S | 13 +++----------
c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c | 2 ++
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/qoriq/start/start.S b/c/src/lib/libbsp/powerpc/qoriq/start/start.S
index 100173c..d5a2ceb 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/start/start.S
+++ b/c/src/lib/libbsp/powerpc/qoriq/start/start.S
@@ -200,13 +200,6 @@ _start:
.Linitmore:
mflr SAVED_LINK_REGISTER
-#ifdef QORIQ_IS_HYPERVISOR_GUEST
- /* MSR initialization with guest state */
- LWI INITIAL_MSR, QORIQ_INITIAL_MSR
- oris r0, INITIAL_MSR, MSR_GS >> 16
- mtmsr r0
- isync
-#else
/* Invalidate all TS1 MMU entries */
li r3, 1
bl qoriq_tlb1_invalidate_all_by_ts
@@ -226,9 +219,11 @@ _start:
/* MSR initialization and use TS1 for address translation */
LWI INITIAL_MSR, QORIQ_INITIAL_MSR
ori r0, INITIAL_MSR, MSR_IS | MSR_DS
+#ifdef QORIQ_IS_HYPERVISOR_GUEST
+ oris r0, r0, MSR_GS >> 16
+#endif
mtmsr r0
isync
-#endif
/*
* Initialize start stack. Make sure that we do not share a cache line
@@ -248,7 +243,6 @@ _start:
blr
.Linitmmu:
-#ifndef QORIQ_IS_HYPERVISOR_GUEST
mflr SAVED_LINK_REGISTER
/* Configure MMU */
@@ -263,7 +257,6 @@ _start:
PPC64_NOP_FOR_LINKER_TOC_POINTER_RESTORE
mtlr SAVED_LINK_REGISTER
-#endif
blr
#ifdef INITIALIZE_FPU
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c b/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
index ab0d080..90b0534 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
@@ -135,6 +135,7 @@ static entry DATA config[] = {
ENTRY_RW(bsp_section_stack_begin, bsp_section_stack_size),
ENTRY_IO(bsp_section_nocache_begin, bsp_section_nocache_size),
ENTRY_IO(bsp_section_nocachenoload_begin, bsp_section_nocachenoload_size),
+#ifndef QORIQ_IS_HYPERVISOR_GUEST
#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
/* BMan Portals */
ENTRY_DEV_CACHED(&qoriq_bman_portal[0][0], sizeof(qoriq_bman_portal[0])),
@@ -144,6 +145,7 @@ static entry DATA config[] = {
ENTRY_DEV(&qoriq_qman_portal[1][0], sizeof(qoriq_qman_portal[1])),
#endif
ENTRY_DEV(&qoriq, sizeof(qoriq))
+#endif
};
static DATA char memory_path[] = "/memory";
More information about the vc
mailing list