Changeset 73de9393 in rtems


Ignore:
Timestamp:
Mar 2, 2016, 12:32:44 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
eead8f7
Parents:
e468ba5
git-author:
Sebastian Huber <sebastian.huber@…> (03/02/16 12:32:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/03/16 08:10:13)
Message:

bsp/qoriq: Do not touch MMU config for SMP start

Assume that the boot page is visible in the currently unused heap area.

Location:
c/src/lib/libbsp/powerpc/qoriq/startup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c

    re468ba5 r73de9393  
    11/*
    2  * Copyright (c) 2013-2015 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2013, 2016 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    148148#endif
    149149
    150 static uint32_t discover_processors(uint32_t *boot_begin, uint32_t *boot_last)
     150static uint32_t discover_processors(void)
    151151{
    152152#if defined(HAS_UBOOT)
    153   *boot_begin = BOOT_BEGIN;
    154   *boot_last = BOOT_LAST;
    155 
    156153  return QORIQ_CPU_COUNT;
    157154#elif defined(U_BOOT_USE_FDT)
     
    186183  }
    187184
    188   *boot_begin = begin;
    189   *boot_last = last;
    190 
    191185  return cpu * QORIQ_THREAD_COUNT;
    192186#endif
     
    198192
    199193  if (rtems_configuration_get_maximum_processors() > 0) {
    200     qoriq_mmu_context mmu_context;
    201     uint32_t boot_begin;
    202     uint32_t boot_last;
    203 
    204     cpu_count = discover_processors(&boot_begin, &boot_last);
    205 
    206     qoriq_mmu_context_init(&mmu_context);
    207     qoriq_mmu_add(
    208       &mmu_context,
    209       boot_begin,
    210       boot_last,
    211       0,
    212       0,
    213       FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW,
    214       0
    215     );
    216     qoriq_mmu_partition(&mmu_context, TLB_COUNT);
    217     qoriq_mmu_write_to_tlb1(&mmu_context, TLB_BEGIN);
     194    cpu_count = discover_processors();
    218195  }
    219196
     
    270247}
    271248
    272 static void mmu_config_undo(void)
    273 {
    274   int i;
    275 
    276   for (i = TLB_BEGIN; i < TLB_END; ++i) {
    277     qoriq_tlb1_invalidate(i);
    278   }
    279 }
    280 
    281249void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
    282250{
    283   if (rtems_configuration_get_maximum_processors() > 0) {
    284     mmu_config_undo();
    285   }
    286 
    287251  if (cpu_count > 1) {
    288252    rtems_status_code sc;
  • c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb

    re468ba5 r73de9393  
    77MEMORY {
    88        LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
    9         HIGH : ORIGIN = 0x1000000, LENGTH = 32M
     9        HIGH : ORIGIN = 0x1000000, LENGTH = 512M - 16M
    1010        EMPTY : ORIGIN = 0x0, LENGTH = 0
    1111}
Note: See TracChangeset for help on using the changeset viewer.