Changeset 457 for trunk/kernel/mm


Ignore:
Timestamp:
Aug 2, 2018, 11:47:13 AM (6 years ago)
Author:
alain
Message:

This version modifies the exec syscall and fixes a large number of small bugs.
The version number has been updated (0.1)

Location:
trunk/kernel/mm
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/kcm.c

    r438 r457  
    2424
    2525#include <kernel_config.h>
    26 #include <hal_types.h>
     26#include <hal_kernel_types.h>
    2727#include <hal_special.h>
    2828#include <list.h>
  • trunk/kernel/mm/kcm.h

    r437 r457  
    2727
    2828#include <list.h>
    29 #include <hal_types.h>
     29#include <hal_kernel_types.h>
    3030#include <spinlock.h>
    3131#include <page.h>
  • trunk/kernel/mm/khm.c

    r315 r457  
    2424
    2525#include <kernel_config.h>
    26 #include <hal_types.h>
     26#include <hal_kernel_types.h>
    2727#include <hal_special.h>
    2828#include <spinlock.h>
  • trunk/kernel/mm/khm.h

    r18 r457  
    2828
    2929#include <kernel_config.h>
    30 #include <hal_types.h>
     30#include <hal_kernel_types.h>
    3131#include <spinlock.h>
    3232
  • trunk/kernel/mm/kmem.c

    r438 r457  
    2525
    2626#include <kernel_config.h>
    27 #include <hal_types.h>
     27#include <hal_kernel_types.h>
    2828#include <hal_special.h>
    2929#include <printk.h>
  • trunk/kernel/mm/kmem.h

    r188 r457  
    2727#define _KMEM_H_
    2828
    29 #include <hal_types.h>
     29#include <hal_kernel_types.h>
    3030#include <kcm.h>
    3131
  • trunk/kernel/mm/mapper.c

    r440 r457  
    2424
    2525#include <kernel_config.h>
    26 #include <hal_types.h>
     26#include <hal_kernel_types.h>
    2727#include <hal_special.h>
    2828#include <hal_uspace.h>
  • trunk/kernel/mm/mapper.h

    r440 r457  
    2626#define _MAPPER_H_
    2727
    28 #include <hal_types.h>
     28#include <hal_kernel_types.h>
    2929#include <hal_atomic.h>
    3030#include <xlist.h>
  • trunk/kernel/mm/page.c

    r436 r457  
    2323 */
    2424
    25 #include <hal_types.h>
     25#include <hal_kernel_types.h>
    2626#include <hal_special.h>
    2727#include <hal_atomic.h>
  • trunk/kernel/mm/page.h

    r433 r457  
    2727
    2828#include <kernel_config.h>
    29 #include <hal_types.h>
     29#include <hal_kernel_types.h>
    3030#include <spinlock.h>
    3131#include <list.h>
  • trunk/kernel/mm/ppm.c

    r438 r457  
    2424
    2525#include <kernel_config.h>
    26 #include <hal_types.h>
     26#include <hal_kernel_types.h>
    2727#include <hal_special.h>
    2828#include <printk.h>
  • trunk/kernel/mm/ppm.h

    r433 r457  
    2626#define _PPM_H_
    2727
    28 #include <hal_types.h>
     28#include <hal_kernel_types.h>
    2929#include <list.h>
    3030#include <spinlock.h>
  • trunk/kernel/mm/vmm.c

    r443 r457  
    2525
    2626#include <kernel_config.h>
    27 #include <hal_types.h>
     27#include <hal_kernel_types.h>
    2828#include <hal_special.h>
    2929#include <hal_gpt.h>
     
    170170    vmm->stack_mgr.bitmap   = 0;
    171171    vmm->stack_mgr.vpn_base = CONFIG_VMM_STACK_BASE;
     172    spinlock_init( &vmm->stack_mgr.lock );
    172173
    173174    // initialize MMAP allocator
     
    175176    vmm->mmap_mgr.vpn_size        = CONFIG_VMM_STACK_BASE - CONFIG_VMM_HEAP_BASE;
    176177    vmm->mmap_mgr.first_free_vpn  = CONFIG_VMM_HEAP_BASE;
     178    spinlock_init( &vmm->mmap_mgr.lock );
     179
    177180    uint32_t i;
    178181    for( i = 0 ; i < 32 ; i++ ) list_root_init( &vmm->mmap_mgr.zombi_list[i] );
     
    201204    gpt_t * gpt = &vmm->gpt;
    202205
    203     printk("\n***** VSL and GPT for process %x in cluster %x\n\n", process->pid , local_cxy );
     206    printk("\n***** VSL and GPT(%x) for process %x in cluster %x\n\n",
     207    process->vmm.gpt.ptr , process->pid , local_cxy );
    204208
    205209    // get lock protecting the vseg list
  • trunk/kernel/mm/vmm.h

    r440 r457  
    2727#define _VMM_H_
    2828
    29 #include <hal_types.h>
     29#include <hal_kernel_types.h>
    3030#include <bits.h>
    3131#include <list.h>
  • trunk/kernel/mm/vseg.c

    r453 r457  
    2424 */
    2525
    26 #include <hal_types.h>
     26#include <hal_kernel_types.h>
    2727#include <hal_special.h>
    2828#include <hal_remote.h>
     
    171171    switch (vseg->type)
    172172    {
    173         case VSEG_TYPE_DATA: {
     173        case VSEG_TYPE_DATA:
     174        {
    174175            vseg->cxy = 0xffff;
    175176            break;
    176177        }
    177178        case VSEG_TYPE_CODE:
    178         case VSEG_TYPE_STACK: {
     179        case VSEG_TYPE_STACK:
     180        {
    179181            vseg->cxy = local_cxy;
    180182            break;
     
    182184        case VSEG_TYPE_ANON:
    183185        case VSEG_TYPE_FILE:
    184         case VSEG_TYPE_REMOTE: {
     186        case VSEG_TYPE_REMOTE:
     187        {
    185188            vseg->cxy = (cxy_t) hal_remote_lw( XPTR(cxy, &ptr->cxy) );
    186189            break;
    187190        }
    188         default: {
     191        default:
     192        {
    189193            assert( false, __FUNCTION__, "Illegal vseg type" );
    190194            break;
  • trunk/kernel/mm/vseg.h

    r454 r457  
    2727#define _VSEG_H_
    2828
    29 #include <hal_types.h>
     29#include <hal_kernel_types.h>
    3030#include <spinlock.h>
    3131#include <vfs.h>
Note: See TracChangeset for help on using the changeset viewer.