Print this page
de-linting of .s files


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  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 /*
  23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 
  29 /*
  30  * sun4v processor initialization
  31  *
  32  * This is the kernel entry point for CPUs that enter Solaris
  33  * directly from the hypervisor. i.e. without going through OBP.
  34  */
  35 
  36 #if !defined(lint)
  37 #include "assym.h"
  38 #endif /* !lint */
  39 
  40 #include <sys/asm_linkage.h>
  41 #include <sys/hypervisor_api.h>
  42 #include <sys/machasi.h>
  43 #include <sys/machpcb.h>
  44 #include <sys/machlock.h>
  45 #include <sys/mmu.h>
  46 #include <sys/lpad.h>
  47 
  48 #if defined(lint)
  49 
  50 /* ARGSUSED */
  51 void
  52 mach_cpu_startup(uint64_t rabase, uint64_t memsz)
  53 {}
  54 
  55 #else   /* lint */
  56 
  57         /*
  58          * %o0 - hcall specified arg (cpuid)
  59          * %i0 - real memory base
  60          * %i1 - memory size
  61          */
  62         ENTRY_NP(mach_cpu_startup)
  63         /*
  64          * Calculate the data pointer. The landing pad
  65          * data immediately follows the landing pad text.
  66          */
  67         rd      %pc, %l0
  68         add     %l0, LPAD_TEXT_SIZE, %l1        ! %l1 has start of data
  69 
  70         /*
  71          * Setup the initial state of the CPU.
  72          */
  73         wrpr    %g0, 0, %tl
  74         wrpr    %g0, 0, %gl
  75         wrpr    %g0, MAXWIN - 2, %cansave
  76         wrpr    %g0, MAXWIN - 2, %cleanwin


 191          * On errors, just enter a spin loop until the
 192          * CPU that initiated the start recovers the CPU.
 193          */
 194 startup_error:
 195         ba      startup_error
 196           nop
 197 
 198         /*
 199          * Jump to the generic CPU initialization code.
 200          */
 201 startup_complete:
 202         mov     %l4, %o0
 203         jmpl    %l3, %g0
 204           stx   %g0, [%l5]                      ! clear the inuse mailbox
 205 
 206         SET_SIZE(mach_cpu_startup)
 207 
 208         .global mach_cpu_startup_end
 209 mach_cpu_startup_end:
 210 
 211 #endif  /* lint */


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  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 /*
  23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 


  27 /*
  28  * sun4v processor initialization
  29  *
  30  * This is the kernel entry point for CPUs that enter Solaris
  31  * directly from the hypervisor. i.e. without going through OBP.
  32  */
  33 

  34 #include "assym.h"

  35 
  36 #include <sys/asm_linkage.h>
  37 #include <sys/hypervisor_api.h>
  38 #include <sys/machasi.h>
  39 #include <sys/machpcb.h>
  40 #include <sys/machlock.h>
  41 #include <sys/mmu.h>
  42 #include <sys/lpad.h>
  43 









  44         /*
  45          * %o0 - hcall specified arg (cpuid)
  46          * %i0 - real memory base
  47          * %i1 - memory size
  48          */
  49         ENTRY_NP(mach_cpu_startup)
  50         /*
  51          * Calculate the data pointer. The landing pad
  52          * data immediately follows the landing pad text.
  53          */
  54         rd      %pc, %l0
  55         add     %l0, LPAD_TEXT_SIZE, %l1        ! %l1 has start of data
  56 
  57         /*
  58          * Setup the initial state of the CPU.
  59          */
  60         wrpr    %g0, 0, %tl
  61         wrpr    %g0, 0, %gl
  62         wrpr    %g0, MAXWIN - 2, %cansave
  63         wrpr    %g0, MAXWIN - 2, %cleanwin


 178          * On errors, just enter a spin loop until the
 179          * CPU that initiated the start recovers the CPU.
 180          */
 181 startup_error:
 182         ba      startup_error
 183           nop
 184 
 185         /*
 186          * Jump to the generic CPU initialization code.
 187          */
 188 startup_complete:
 189         mov     %l4, %o0
 190         jmpl    %l3, %g0
 191           stx   %g0, [%l5]                      ! clear the inuse mailbox
 192 
 193         SET_SIZE(mach_cpu_startup)
 194 
 195         .global mach_cpu_startup_end
 196 mach_cpu_startup_end:
 197