summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/qoriq/start/bspsmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/powerpc/qoriq/start/bspsmp.c')
-rw-r--r--bsps/powerpc/qoriq/start/bspsmp.c50
1 files changed, 35 insertions, 15 deletions
diff --git a/bsps/powerpc/qoriq/start/bspsmp.c b/bsps/powerpc/qoriq/start/bspsmp.c
index 82dfbae5ee..2b85ba7a88 100644
--- a/bsps/powerpc/qoriq/start/bspsmp.c
+++ b/bsps/powerpc/qoriq/start/bspsmp.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2017 embedded brains GmbH & Co. KG
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/score/smpimpl.h>
@@ -99,11 +118,8 @@ static void bsp_inter_processor_interrupt(void *arg)
static void setup_boot_page(void)
{
#ifdef QORIQ_IS_HYPERVISOR_GUEST
- qoriq_mmu_context mmu_context;
-
- qoriq_mmu_context_init(&mmu_context);
- qoriq_mmu_add(
- &mmu_context,
+ qoriq_mmu_adjust_and_write_to_tlb1(
+ QORIQ_TLB1_ENTRY_COUNT - 1,
0xfffff000,
0xffffffff,
0,
@@ -111,8 +127,6 @@ static void setup_boot_page(void)
FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW,
0
);
- qoriq_mmu_partition(&mmu_context, 1);
- qoriq_mmu_write_to_tlb1(&mmu_context, QORIQ_TLB1_ENTRY_COUNT - 1);
#endif
}
@@ -202,17 +216,23 @@ bool _CPU_SMP_Start_processor(uint32_t cpu_index)
#endif
}
+static rtems_interrupt_entry qoriq_ipi_entry;
+
void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
{
#ifndef QORIQ_IS_HYPERVISOR_GUEST
rtems_status_code sc;
- sc = rtems_interrupt_handler_install(
+ rtems_interrupt_entry_initialize(
+ &qoriq_ipi_entry,
+ bsp_inter_processor_interrupt,
+ NULL,
+ "IPI"
+ );
+ sc = rtems_interrupt_entry_install(
QORIQ_IRQ_IPI_0 + IPI_INDEX,
- "IPI",
RTEMS_INTERRUPT_UNIQUE,
- bsp_inter_processor_interrupt,
- NULL
+ &qoriq_ipi_entry
);
if (sc != RTEMS_SUCCESSFUL) {
bsp_fatal(QORIQ_FATAL_SMP_IPI_HANDLER_INSTALL);