Ignore:
Timestamp:
Nov 14, 2019, 11:50:09 AM (4 years ago)
Author:
alain
Message:

1) Improve the VMM MMAP allocator: implement the "buddy" algorithm
to allocate only aligned blocks.
2) fix a bug in the pthread_join() / pthread_exit() mmechanism.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kernel_config.h

    r647 r651  
    5656#define DEBUG_DEV_NIC_RX                  0
    5757#define DEBUG_DEV_NIC_RX                  0
    58 #define DEBUG_DEV_FBF                        1
     58#define DEBUG_DEV_FBF                     0
    5959#define DEBUG_DEV_DMA                     0
    6060#define DEBUG_DEV_MMC                     0
     
    9090#define DEBUG_FATFS_UPDATE_IOC            0
    9191
    92 #define DEBUG_HAL_CONTEXT                 0
     92#define DEBUG_HAL_CONTEXT_FORK            0
     93#define DEBUG_HAL_CONTEXT_INIT            0
    9394#define DEBUG_HAL_EXCEPTIONS              0
    9495#define DEBUG_HAL_GPT_COPY                0
     
    104105#define DEBUG_HAL_TXT_RX                  0
    105106#define DEBUG_HAL_TXT_TX                  0
    106 #define DEBUG_HAL_FBF                        1
     107#define DEBUG_HAL_FBF                     0
    107108#define DEBUG_HAL_USPACE                  0
    108109#define DEBUG_HAL_VMM                     0
     
    134135#define DEBUG_PROCESS_GET_LOCAL_COPY      0
    135136#define DEBUG_PROCESS_INIT_CREATE         0
    136 #define DEBUG_PROCESS_MAKE_EXEC              1
    137 #define DEBUG_PROCESS_MAKE_FORK              1
     137#define DEBUG_PROCESS_MAKE_EXEC           0
     138#define DEBUG_PROCESS_MAKE_FORK           0
    138139#define DEBUG_PROCESS_REFERENCE_INIT      0
    139140#define DEBUG_PROCESS_SIGACTION           0
     
    177178#define DEBUG_SEM                         0
    178179
    179 #define DEBUG_SYSCALLS_ERROR                  2
     180#define DEBUG_SYSCALLS_ERROR                 2
    180181
    181182#define DEBUG_SYS_BARRIER                 0
     
    184185#define DEBUG_SYS_CONDVAR                 0
    185186#define DEBUG_SYS_DISPLAY                 0
    186 #define DEBUG_SYS_EXEC                       2
     187#define DEBUG_SYS_EXEC                    0
    187188#define DEBUG_SYS_EXIT                    0
    188189#define DEBUG_SYS_FBF                     0
    189190#define DEBUG_SYS_FG                      0
    190 #define DEBUG_SYS_FORK                       2
     191#define DEBUG_SYS_FORK                    0
    191192#define DEBUG_SYS_GET_CONFIG              0
    192193#define DEBUG_SYS_GETCWD                  0
     
    199200#define DEBUG_SYS_IS_FG                   0
    200201#define DEBUG_SYS_KILL                    0
     202#define DEBUG_SYS_LSEEK                   0
    201203#define DEBUG_SYS_MKDIR                   0
    202204#define DEBUG_SYS_MMAP                    0
     
    264266#define DEBUG_VMM_HANDLE_PAGE_FAULT       0
    265267#define DEBUG_VMM_HANDLE_COW              0
    266 #define DEBUG_VMM_MMAP_ALLOC              0
     268#define DEBUG_VMM_MMAP                    0
    267269#define DEBUG_VMM_PAGE_ALLOCATE           0
    268270#define DEBUG_VMM_REMOVE_VSEG             0
     
    326328////////////////////////////////////////////////////////////////////////////////////////////
    327329
    328 #define CONFIG_VERSION           "Version 2.2 / June 2019"
     330#define CONFIG_VERSION           "Version 2.3 / November 2019"
    329331
    330332////////////////////////////////////////////////////////////////////////////////////////////
     
    431433
    432434////////////////////////////////////////////////////////////////////////////////////////////
    433 //             32 bits  USER SPACE SEGMENTATION / all values are numbers of pages
     435//       32 bits  USER SPACE SEGMENTATION / all bases and sizes are numbers of pages
    434436////////////////////////////////////////////////////////////////////////////////////////////
    435437
     
    438440#define CONFIG_VMM_UTILS_BASE         0x000200     // UTILS zone base        : 2   Mbytes
    439441#define CONFIG_VMM_ELF_BASE           0x000400     // ELF zone base          : 4   Mbytes
    440 #define CONFIG_VMM_HEAP_BASE          0x002000     // HEAP zone base         : 32  Mbytes
     442#define CONFIG_VMM_HEAP_BASE          0x040000     // HEAP zone base         : 32  Mbytes
    441443#define CONFIG_VMM_STACK_BASE         0x0C0000     // STACK zone base        : 3   Gbytes
    442444
     
    445447#define CONFIG_VMM_STACK_SIZE         0x001000     // single stack vseg size : 16  Mbytes
    446448
     449#define CONFIG_VMM_HEAP_MAX_ORDER     18           // max size of MMAP vseg  :  1  Gbytes
    447450////////////////////////////////////////////////////////////////////////////////////////////
    448451//                      PHYSICAL MEMORY MANAGEMENT         
     
    463466
    464467#define CONFIG_INSTRUMENTATION_SYSCALLS    0
    465 #define CONFIG_INSTRUMENTATION_PGFAULTS    1
     468#define CONFIG_INSTRUMENTATION_PGFAULTS    0
    466469#define CONFIG_INSTRUMENTATION_FOOTPRINT   0
    467 #define CONFIG_INSTRUMENTATION_GPT         1
     470#define CONFIG_INSTRUMENTATION_GPT         0
    468471
    469472
Note: See TracChangeset for help on using the changeset viewer.