Ignore:
Timestamp:
Jul 31, 2017, 1:59:52 PM (4 years ago)
Author:
alain
Message:

Several modifs in the generic scheduler and in the hal_context to
fix the context switch mechanism.

File:
1 edited

Legend:

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

    r279 r296  
    3535
    3636//////////////////////////////////////////////////////////////////////////////////////////
     37// This file contains the TSAR specific code for cores registers,
     38// and for physical memory allocators initialisation in a given cluster.
     39
    3740// For The TSAR architecture, the kernel pointers are identity mapped:
    3841// - the 32 bits PTR value is identical to the 32 bits LPA value,
    3942// - the 64 bits XPTR value is identical to the 64 bits PADDR value.
    40 // The pages_tbl[] is mapped in first free page after kernel code.
     43// This hal_ppm_init() function initializes the pages_tbl[] array used by the generic
     44// kmem memory allocator in the local cluster. This array starts in first free page
     45// after kernel code, as defined by the 'offset' field in boot_info.
     46//
     47// For the TSAR architecture the MIP32 EBASE register defining the kernel entry point
     48// fot Interrupts, Exceptions and Syscalls, has to be redefined.
    4149//////////////////////////////////////////////////////////////////////////////////////////
    4250
     
    4957        uint32_t pages_nr         = info->pages_nr;
    5058        uint32_t pages_tbl_offset = info->pages_offset;
    51         uint32_t rsvd_nr          = info->rsvd_nr;
    5259
    5360        // get pointer on local Physical Page Manager
     
    113120        // check consistency
    114121        return ppm_assert_order( ppm );
    115 }
    116122
     123}  // end hal_ppm_init()
     124
     125////////////////////////////////////////
     126void hal_core_init( boot_info_t * info )
     127{
     128        // get relevant info from boot_info structure
     129        reg_t kentry_base = info->kentry_base;
     130
     131    // set CP0_EBASE register
     132    hal_set_ebase( kentry_base );
     133
     134}  // end hal_core_init()
Note: See TracChangeset for help on using the changeset viewer.