Subversion Repositories HelenOS

Rev

Rev 2089 | Rev 2746 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 2725
Line 61... Line 61...
61
#include <main/version.h>
61
#include <main/version.h>
62
#include <console/kconsole.h>
62
#include <console/kconsole.h>
63
#include <cpu.h>
63
#include <cpu.h>
64
#include <align.h>
64
#include <align.h>
65
#include <interrupt.h>
65
#include <interrupt.h>
66
#include <arch/mm/memory_init.h>
-
 
67
#include <mm/frame.h>
66
#include <mm/frame.h>
68
#include <mm/page.h>
67
#include <mm/page.h>
69
#include <genarch/mm/page_pt.h>
68
#include <genarch/mm/page_pt.h>
70
#include <mm/tlb.h>
69
#include <mm/tlb.h>
71
#include <mm/as.h>
70
#include <mm/as.h>
Line 141... Line 140...
141
{
140
{
142
    config.cpu_count = 1;
141
    config.cpu_count = 1;
143
    config.cpu_active = 1;
142
    config.cpu_active = 1;
144
   
143
   
145
    config.base = hardcoded_load_address;
144
    config.base = hardcoded_load_address;
146
    config.memory_size = get_memory_size();
-
 
147
   
-
 
148
    config.kernel_size = ALIGN_UP(hardcoded_ktext_size +
145
    config.kernel_size = ALIGN_UP(hardcoded_ktext_size +
149
        hardcoded_kdata_size, PAGE_SIZE);
146
        hardcoded_kdata_size, PAGE_SIZE);
150
    config.stack_size = CONFIG_STACK_SIZE;
147
    config.stack_size = CONFIG_STACK_SIZE;
151
   
148
   
152
    /* Initialy the stack is placed just after the kernel */
149
    /* Initialy the stack is placed just after the kernel */
Line 217... Line 214...
217
    as_init();
214
    as_init();
218
    page_init();
215
    page_init();
219
    tlb_init();
216
    tlb_init();
220
    ddi_init();
217
    ddi_init();
221
    arch_post_mm_init();
218
    arch_post_mm_init();
222
 
219
   
223
    version_print();
220
    version_print();
224
    printf("kernel: %.*p hardcoded_ktext_size=%zdK, "
221
    printf("kernel: %.*p hardcoded_ktext_size=%zd KB, "
225
        "hardcoded_kdata_size=%zdK\n", sizeof(uintptr_t) * 2,
222
        "hardcoded_kdata_size=%zd KB\n", sizeof(uintptr_t) * 2,
226
        config.base, hardcoded_ktext_size >> 10,
223
        config.base, SIZE2KB(hardcoded_ktext_size),
227
        hardcoded_kdata_size >> 10);
224
        SIZE2KB(hardcoded_kdata_size));
228
    printf("stack:  %.*p size=%zdK\n", sizeof(uintptr_t) * 2,
225
    printf("stack:  %.*p size=%zd KB\n", sizeof(uintptr_t) * 2,
229
        config.stack_base, config.stack_size >> 10);
226
        config.stack_base, SIZE2KB(config.stack_size));
230
 
227
   
231
    arch_pre_smp_init();
228
    arch_pre_smp_init();
232
    smp_init();
229
    smp_init();
233
    /* Slab must be initialized after we know the number of processors. */
230
    /* Slab must be initialized after we know the number of processors. */
234
    slab_enable_cpucache();
231
    slab_enable_cpucache();
235
 
232
   
236
    printf("config.memory_size=%zdM\n", config.memory_size >> 20);
233
    printf("Detected %zu CPU(s), %llu MB free memory\n",
237
    printf("config.cpu_count=%zd\n", config.cpu_count);
234
        config.cpu_count, SIZE2MB(zone_total_size()));
238
    cpu_init();
235
    cpu_init();
239
   
236
   
240
    calibrate_delay_loop();
237
    calibrate_delay_loop();
241
    clock_counter_init();
238
    clock_counter_init();
242
    timeout_init();
239
    timeout_init();