Ignore:
Timestamp:
Mar 6, 2019, 4:37:15 PM (5 years ago)
Author:
alain
Message:

Introduce three new types of vsegs (KCODE,KDATA,KDEV)
to map the kernel vsegs in the process VSL and GPT.
This now used by both the TSAR and the I86 architectures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_vmm.h

    r457 r623  
    11/*
    2  * hal_vmm.h - Generic Virtual Memory Manager initialisation
     2 * hal_vmm.h - Kernel Virtual Memory Manager initialisation
    33 *
    4  * Authors  Alain Greiner (2016,2017)
     4 * Authors  Alain Greiner (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    2222 */
    2323
    24 #ifndef _HAL_PPM_H_
    25 #define _HAL_PPM_H_
     24#ifndef _HAL_VMM_H_
     25#define _HAL_VMM_H_
    2626
    2727#include <hal_kernel_types.h>
     
    2929
    3030/////////////////////////////////////////////////////////////////////////////////////////
    31 //    Generic Virtual Memory Manager initialisation (implementation in hal_vmm.c)
     31//    Kernel Virtual Memory Manager initialisation (implementation in hal_vmm.c)
    3232//
    3333// Any arch-specific implementation must implement this API.
     
    3636/****  Forward declarations  ****/
    3737
    38 struct vmm_s;
     38struct process_s;
     39struct boot_info_s;
    3940
    4041/****************************************************************************************
    41  * This function makes all architecture specific initialisations
    42  * in the VSL (Virtual segments List) and in the GPT (Generic Page Table).
     42 * Depending on the hardware architecture, this function creates (i.e. allocates memory
     43 * and initializes) the VSL (Virtual segments List) and the GPT (Generic Page Table),
     44 * for all vsegs required by the kernel process.
    4345 ****************************************************************************************
    44  * @ vmm   : pointer on virtual memory manager.
     46 * @ info  : local pointer on boot_info (for kernel segments base & size).
    4547 * @ return 0 if success / return ENOMEM if failure.
    4648 ***************************************************************************************/
    47 error_t hal_vmm_init( struct vmm_s * vmm );
     49error_t hal_vmm_kernel_init( struct boot_info_s * info );
    4850
    49 #endif  /* HAL_PPM_H_ */
     51/****************************************************************************************
     52 * Depending on the hardware architecture, this function updates the VMM of an user
     53 * process identified by the <process> argument. It registers in VSL and GPT all
     54 * kernel vsegs required by this architecture.
     55 ****************************************************************************************
     56 * @ process   : local pointer on user process descriptor.
     57 * @ return 0 if success / return ENOMEM if failure.
     58 ***************************************************************************************/
     59error_t hal_vmm_kernel_update( struct process_s * process );
     60
     61#endif  /* HAL_VMM_H_ */
Note: See TracChangeset for help on using the changeset viewer.