Changeset df3c6f02 in mainline for kernel/generic/src/main/main.c


Ignore:
Timestamp:
2011-05-31T22:58:56Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d362410
Parents:
82582e4 (diff), 4ce90544 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/main.c

    r82582e4 rdf3c6f02  
    7171#include <mm/as.h>
    7272#include <mm/slab.h>
     73#include <mm/reserve.h>
    7374#include <synch/waitq.h>
    7475#include <synch/futex.h>
     
    117118#endif
    118119
    119 #define CONFIG_STACK_SIZE  ((1 << STACK_FRAMES) * STACK_SIZE)
    120 
    121120/** Main kernel routine for bootstrap CPU.
    122121 *
     
    138137        config.kernel_size = ALIGN_UP(hardcoded_ktext_size +
    139138            hardcoded_kdata_size, PAGE_SIZE);
    140         config.stack_size = CONFIG_STACK_SIZE;
     139        config.stack_size = STACK_SIZE;
    141140       
    142141        /* Initialy the stack is placed just after the kernel */
     
    164163       
    165164        context_save(&ctx);
    166         context_set(&ctx, FADDR(main_bsp_separated_stack), config.stack_base,
    167             THREAD_STACK_SIZE);
     165        context_set(&ctx, FADDR(main_bsp_separated_stack),
     166            config.stack_base, STACK_SIZE);
    168167        context_restore(&ctx);
    169168        /* not reached */
     
    217216        ddi_init();
    218217        arch_post_mm_init();
     218        reserve_init();
    219219        arch_pre_smp_init();
    220220        smp_init();
     
    223223        slab_enable_cpucache();
    224224       
    225         printf("Detected %u CPU(s), %" PRIu64 " MiB free memory\n",
    226             config.cpu_count, SIZE2MB(zones_total_size()));
     225        uint64_t size;
     226        const char *size_suffix;
     227        bin_order_suffix(zones_total_size(), &size, &size_suffix, false);
     228        printf("Detected %u CPU(s), %" PRIu64 " %s free memory\n",
     229            config.cpu_count, size, size_suffix);
    227230       
    228231        cpu_init();
     
    318321        context_save(&CPU->saved_context);
    319322        context_set(&CPU->saved_context, FADDR(main_ap_separated_stack),
    320             (uintptr_t) CPU->stack, CPU_STACK_SIZE);
     323            (uintptr_t) CPU->stack, STACK_SIZE);
    321324        context_restore(&CPU->saved_context);
    322325        /* not reached */
Note: See TracChangeset for help on using the changeset viewer.