Ignore:
Timestamp:
Apr 26, 2017, 2:20:47 PM (7 years ago)
Author:
alain
Message:

Various bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/hal_context.c

    r1 r8  
    2727#include <string.h>
    2828#include <process.h>
     29#include <printk.h>
    2930#include <vmm.h>
    3031#include <core.h>
     
    3839    kmem_req_t  req;
    3940
     41    context_dmsg("\n[INFO] %s : enters for thread %x in process %x\n",
     42                 __FUNCTION__ , thread->trdid , thread->process->pid );
     43
    4044    // allocate memory for cpu_context
    41     req.type   = KMEM_GENERIC;
     45    req.type   = KMEM_CPU_CTX;
    4246    req.size   = sizeof(hal_cpu_context_t);
    4347    req.flags  = AF_KERNEL | AF_ZERO;
     
    7882        context->c2_mode    = c2_mode;
    7983
     84    context_dmsg("\n[INFO] %s : exit for thread %x in process %x\n",
     85                 __FUNCTION__ , thread->trdid , thread->process->pid );
     86
    8087    return 0;
    8188}  // end hal_cpu_context_create()
     
    8895
    8996    // allocate memory for dst cpu_context
    90     req.type   = KMEM_GENERIC;
     97    req.type   = KMEM_CPU_CTX;
    9198    req.size   = sizeof(hal_cpu_context_t);
    9299    req.flags  = AF_KERNEL | AF_ZERO;
     
    112119    kmem_req_t  req;
    113120
    114     req.type = KMEM_GENERIC;
     121    req.type = KMEM_CPU_CTX;
    115122    req.ptr  = thread->cpu_context;
    116123    kmem_free( &req );
     
    124131
    125132    // allocate memory for uzone
    126     req.type   = KMEM_GENERIC;
     133    req.type   = KMEM_FPU_CTX;
    127134    req.size   = sizeof(hal_fpu_context_t);
    128135    req.flags  = AF_KERNEL | AF_ZERO;
     
    144151
    145152    // allocate memory for dst fpu_context
    146     req.type   = KMEM_GENERIC;
     153    req.type   = KMEM_FPU_CTX;
    147154    req.size   = sizeof(hal_fpu_context_t);
    148155    req.flags  = AF_KERNEL | AF_ZERO;
     
    168175    kmem_req_t  req;
    169176
    170     req.type = KMEM_GENERIC;
     177    req.type = KMEM_FPU_CTX;
    171178    req.ptr  = thread->fpu_context;
    172179    kmem_free( &req );
Note: See TracChangeset for help on using the changeset viewer.