Changeset 393f631 in mainline for src


Ignore:
Timestamp:
2005-08-31T21:51:04Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33ccb2c
Parents:
94f0ae4
Message:

many PPC stuff, platform dependent arch.h header files

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/main.c

    r94f0ae4 r393f631  
    5454#include <synch/waitq.h>
    5555
     56#include <arch/arch.h>
    5657#include <arch.h>
    5758#include <arch/faddr.h>
     
    107108        config.cpu_count = 1;
    108109        config.cpu_active = 1;
    109 
     110       
    110111        kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE;   
    111112        heap_delta = PAGE_SIZE - ((hardcoded_load_address + kernel_size) % PAGE_SIZE);
    112113        heap_delta = (heap_delta == PAGE_SIZE) ? 0 : heap_delta;
    113114        kernel_size += heap_delta;
    114 
     115       
    115116        config.base = hardcoded_load_address;
    116117        config.memory_size = get_memory_size();
    117118        config.kernel_size = kernel_size + CONFIG_STACK_SIZE;
    118 
     119       
    119120        context_save(&ctx);
     121        early_mapping(config.base + hardcoded_ktext_size + hardcoded_kdata_size + heap_delta, CONFIG_STACK_SIZE + CONFIG_HEAP_SIZE);
    120122        context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + kernel_size, CONFIG_STACK_SIZE);
    121         context_map_stack(config.base + kernel_size, CONFIG_STACK_SIZE);
    122123        context_restore(&ctx);
    123124        /* not reached */
     
    158159        cpu_init();
    159160        calibrate_delay_loop();
    160 
     161       
    161162        timeout_init();
    162163        scheduler_init();
     
    168169         */
    169170        m = vm_create(GET_PTL0_ADDRESS());
    170         if (!m) panic("can't create kernel vm address space\n");
     171        if (!m)
     172                panic("can't create kernel vm address space\n");
    171173
    172174        /*
     
    174176         */
    175177        k = task_create(m);
    176         if (!k) panic("can't create kernel task\n");
    177 
     178        if (!k)
     179                panic("can't create kernel task\n");
     180               
    178181        /*
    179182         * Create the first thread.
    180183         */
    181184        t = thread_create(kinit, NULL, k, 0);
    182         if (!t) panic("can't create kinit thread\n");
     185        if (!t)
     186                panic("can't create kinit thread\n");
    183187        thread_ready(t);
    184188
  • src/proc/thread.c

    r94f0ae4 r393f631  
    186186                spinlock_unlock(&tidlock);
    187187                cpu_priority_restore(pri);
    188 
     188               
    189189                memsetb(frame_ks, THREAD_STACK_SIZE, 0);
    190190                link_initialize(&t->rq_link);
     
    194194                t->kstack = (__u8 *) frame_ks;
    195195                t->ustack = (__u8 *) frame_us;
    196                
    197196               
    198197                context_save(&t->saved_context);
Note: See TracChangeset for help on using the changeset viewer.