Ignore:
Timestamp:
Jun 26, 2017, 4:22:00 PM (5 years ago)
Author:
alain
Message:

Compilation OK pout TSAR

File:
1 edited

Legend:

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

    r50 r53  
    2323 */
    2424
     25#include <kernel_config.h>
     26#include <hal_types.h>
     27#include <hal_ppm.h>
     28#include <hal_special.h>
     29#include <printk.h>
     30#include <spinlock.h>
     31#include <process.h>
     32#include <ppm.h>
     33#include <thread.h>
     34#include <cluster.h>
     35#include <page.h>
    2536
    2637//////////////////////////////////////////////////////////////////////////////////////////
     
    3344
    3445
    35 //////////////////////////////////////////////////
    36 struct page_s * hal_ppm_init( boot_info_t * info )
     46///////////////////////////////////////////
     47error_t hal_ppm_init( boot_info_t * info )
    3748{
     49    uint32_t i;
     50
    3851    // get relevant info from boot_info structure
    3952        uint32_t   pages_nr         = info->pages_nr;
     
    5467
    5568    // initialize all free_pages[] lists as empty
    56         ppm->total_free_pages = 0;
    5769        for( i = 0 ; i < CONFIG_PPM_MAX_ORDER ; i++ )
    5870        {
     
    7082        ppm->pages_nr      = pages_nr;
    7183    ppm->vaddr_base = NULL;
    72         ppm->pages_tbl  = (page_t*)( vaddr_base + (pages_offset << CONFIG_PPM_PAGE_SHIFT) );
     84        ppm->pages_tbl  = (page_t*)( ppm->vaddr_base +
     85                                 (pages_tbl_offset << CONFIG_PPM_PAGE_SHIFT) );
    7386
    7487    // compute size of pages_tbl[] array rounded to an integer number of pages
     
    7992
    8093    // compute total number of reserved pages (kernel code & pages_tbl[])
    81         uint32_t reserved_pages = pages_offset + tbl_nb_pages;
     94        uint32_t reserved_pages = pages_tbl_offset + pages_tbl_nr;
    8295
    8396    // initialises all page descriptors in pages_tbl[]
     
    106119
    107120    // check consistency
    108     ppm_assert_order( ppm );
     121    return ppm_assert_order( ppm );
    109122
    110     // success
    111     return ppm->pages_tbl;
     123}  // end hal_ppm_init()
    112124
    113 }
    114 
Note: See TracChangeset for help on using the changeset viewer.