Print this page
de-linting of .s files


  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * SFMMU primitives.  These primitives should only be used by sfmmu
  28  * routines.
  29  */
  30 
  31 #if defined(lint)
  32 #include <sys/types.h>
  33 #else   /* lint */
  34 #include "assym.h"
  35 #endif  /* lint */
  36 
  37 #include <sys/asm_linkage.h>
  38 #include <sys/machtrap.h>
  39 #include <sys/machasi.h>
  40 #include <sys/sun4asi.h>
  41 #include <sys/pte.h>
  42 #include <sys/mmu.h>
  43 #include <vm/hat_sfmmu.h>
  44 #include <vm/seg_spt.h>
  45 #include <sys/machparam.h>
  46 #include <sys/privregs.h>
  47 #include <sys/scb.h>
  48 #include <sys/intreg.h>
  49 #include <sys/machthread.h>
  50 #include <sys/clock.h>
  51 #include <sys/trapstat.h>
  52 
  53 /*
  54  * sfmmu related subroutines
  55  */
  56 
  57 #if defined (lint)
  58 
  59 /* ARGSUSED */
  60 void
  61 sfmmu_raise_tsb_exception(uint64_t sfmmup, uint64_t rctx)
  62 {}
  63 
  64 int
  65 sfmmu_getctx_pri()
  66 { return(0); }
  67 
  68 int
  69 sfmmu_getctx_sec()
  70 { return(0); }
  71 
  72 /* ARGSUSED */
  73 void
  74 sfmmu_setctx_sec(uint_t ctx)
  75 {}
  76 
  77 /* ARGSUSED */
  78 void
  79 sfmmu_load_mmustate(sfmmu_t *sfmmup)
  80 {
  81 }
  82 
  83 #else   /* lint */
  84 
  85 /*
  86  * Invalidate either the context of a specific victim or any process
  87  * currently running on this CPU. 
  88  *
  89  * %g1 = sfmmup whose ctx is being stolen (victim)
  90  *       when called from sfmmu_wrap_around, %g1 == INVALID_CONTEXT.
  91  * Note %g1 is the only input argument used by this xcall handler.
  92  */
  93 
  94         ENTRY(sfmmu_raise_tsb_exception)
  95         !
  96         ! if (victim == INVALID_CONTEXT) {
  97         !       if (sec-ctx > INVALID_CONTEXT)
  98         !               write INVALID_CONTEXT to sec-ctx
  99         !       if (pri-ctx > INVALID_CONTEXT) 
 100         !               write INVALID_CONTEXT to pri-ctx
 101         !
 102         ! } else if (current CPU tsbmiss->usfmmup != victim sfmmup) {
 103         !       return
 104         ! } else {


 413         nop
 414 8:                                              ! set tsbmiss scd_shmermap
 415         add     %o4, SCD_HMERMAP, %o1
 416         SET_REGION_MAP(%o1, %o2, %o3, %o4, load_scd_mmustate)
 417         retl
 418           nop
 419 9:
 420         sethi   %hi(panicstr), %g1              ! panic if no 3rd TSB  
 421         ldx     [%g1 + %lo(panicstr)], %g1                             
 422         tst     %g1
 423                                                            
 424         bnz,pn  %xcc, 7b                                            
 425           nop                                                            
 426                                                                         
 427         sethi   %hi(sfmmu_panic10), %o0                                 
 428         call    panic                                                 
 429           or      %o0, %lo(sfmmu_panic10), %o0                         
 430 
 431         SET_SIZE(sfmmu_load_mmustate)
 432         
 433 #endif /* lint */
 434 
 435 #if defined(lint)
 436 
 437 /* Prefetch "struct tsbe" while walking TSBs */
 438 /*ARGSUSED*/
 439 void
 440 prefetch_tsbe_read(struct tsbe *tsbep)
 441 {}
 442 
 443 /* Prefetch the tsbe that we are about to write */
 444 /*ARGSUSED*/
 445 void
 446 prefetch_tsbe_write(struct tsbe *tsbep)
 447 {}
 448 
 449 #else /* lint */
 450 
 451         ENTRY(prefetch_tsbe_read)
 452         retl
 453         nop
 454         SET_SIZE(prefetch_tsbe_read)
 455 
 456         ENTRY(prefetch_tsbe_write)
 457         retl
 458         nop
 459         SET_SIZE(prefetch_tsbe_write)
 460 #endif /* lint */


  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * SFMMU primitives.  These primitives should only be used by sfmmu
  28  * routines.
  29  */
  30 



  31 #include "assym.h"

  32 
  33 #include <sys/asm_linkage.h>
  34 #include <sys/machtrap.h>
  35 #include <sys/machasi.h>
  36 #include <sys/sun4asi.h>
  37 #include <sys/pte.h>
  38 #include <sys/mmu.h>
  39 #include <vm/hat_sfmmu.h>
  40 #include <vm/seg_spt.h>
  41 #include <sys/machparam.h>
  42 #include <sys/privregs.h>
  43 #include <sys/scb.h>
  44 #include <sys/intreg.h>
  45 #include <sys/machthread.h>
  46 #include <sys/clock.h>
  47 #include <sys/trapstat.h>
  48 
  49 /*
  50  * sfmmu related subroutines
  51  */
  52 




























  53 /*
  54  * Invalidate either the context of a specific victim or any process
  55  * currently running on this CPU. 
  56  *
  57  * %g1 = sfmmup whose ctx is being stolen (victim)
  58  *       when called from sfmmu_wrap_around, %g1 == INVALID_CONTEXT.
  59  * Note %g1 is the only input argument used by this xcall handler.
  60  */
  61 
  62         ENTRY(sfmmu_raise_tsb_exception)
  63         !
  64         ! if (victim == INVALID_CONTEXT) {
  65         !       if (sec-ctx > INVALID_CONTEXT)
  66         !               write INVALID_CONTEXT to sec-ctx
  67         !       if (pri-ctx > INVALID_CONTEXT) 
  68         !               write INVALID_CONTEXT to pri-ctx
  69         !
  70         ! } else if (current CPU tsbmiss->usfmmup != victim sfmmup) {
  71         !       return
  72         ! } else {


 381         nop
 382 8:                                              ! set tsbmiss scd_shmermap
 383         add     %o4, SCD_HMERMAP, %o1
 384         SET_REGION_MAP(%o1, %o2, %o3, %o4, load_scd_mmustate)
 385         retl
 386           nop
 387 9:
 388         sethi   %hi(panicstr), %g1              ! panic if no 3rd TSB  
 389         ldx     [%g1 + %lo(panicstr)], %g1                             
 390         tst     %g1
 391                                                            
 392         bnz,pn  %xcc, 7b                                            
 393           nop                                                            
 394                                                                         
 395         sethi   %hi(sfmmu_panic10), %o0                                 
 396         call    panic                                                 
 397           or      %o0, %lo(sfmmu_panic10), %o0                         
 398 
 399         SET_SIZE(sfmmu_load_mmustate)
 400         


















 401         ENTRY(prefetch_tsbe_read)
 402         retl
 403         nop
 404         SET_SIZE(prefetch_tsbe_read)
 405 
 406         ENTRY(prefetch_tsbe_write)
 407         retl
 408         nop
 409         SET_SIZE(prefetch_tsbe_write)