Ignore:
Timestamp:
Feb 12, 2019, 1:15:47 PM (5 years ago)
Author:
alain
Message:

1) Fix a bug in KSH : after the "load" command,

the [ksh] prompt is now printed after completion
of the loaded application.

2) Fix a bug in vmm_handle_cow() : the copy-on-write

use now a hal_remote_memcpy() to replicate the page content.


File:
1 edited

Legend:

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

    r570 r619  
    2525#include <hal_kernel_types.h>
    2626#include <hal_special.h>
     27#include <hal_exception.h>
    2728#include <core.h>
    2829#include <thread.h>
     
    145146}
    146147
    147 //////////////////////////////
    148 uint32_t hal_get_stack( void )
     148///////////////////////////
     149uint32_t hal_get_sp( void )
    149150{
    150151        register uint32_t sp;
     
    155156}
    156157
    157 ////////////////////////////////////////
    158 uint32_t hal_set_stack( void * new_val )
     158/////////////////////////////////////
     159uint32_t hal_set_sp( void * new_val )
    159160{
    160161        register uint32_t sp;
     
    168169}
    169170
     171///////////////////////////
     172uint32_t hal_get_ra( void )
     173{
     174        register uint32_t ra;
     175 
     176        asm volatile ("or    %0,   $0,   $31" : "=&r" (ra));
     177 
     178        return ra;
     179}
     180
    170181//////////////////////////////////
    171182uint32_t hal_get_bad_vaddr( void )
     
    216227void hal_core_sleep( void )
    217228{
     229    thread_t * this = CURRENT_THREAD;
     230
     231    printk("\n*** thread[%x,%x] on core[%x,%d]/n"
     232           "  sr = %X / sp = %X / ra = %X\n",
     233           this->process->pid, this->trdid, local_cxy, this->core->lid, 
     234           hal_get_sr(), hal_get_sp(), hal_get_ra() );
     235
    218236        while( 1 ) asm volatile ("nop");
    219237}
Note: See TracChangeset for help on using the changeset viewer.