mach_proc_init.s revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* sun4v processor initialization
*
* This is the kernel entry point for CPUs that enter Solaris
* directly from the hypervisor. i.e. without going through OBP.
*/
#if !defined(lint)
#include "assym.h"
#endif /* !lint */
#include <sys/asm_linkage.h>
#include <sys/hypervisor_api.h>
#include <sys/machlock.h>
#if defined(lint)
/* ARGSUSED */
void
{}
#else /* lint */
/*
* %o0 - hcall specified arg (cpuid)
* %i0 - real memory base
* %i1 - memory size
*/
/*
* Calculate the data pointer. The landing pad
* data immediately follows the landing pad text.
*/
/*
* Setup the initial state of the CPU.
*/
/*
* Loop through the array of TTE's, installing the
* VA to RA mapping for each one.
*/
/*
* Sanity check the number of mappings.
*/
0:
be 3f
/*
* Generate args for the HV call
*/
bne 1f
ba 2f
1:
2:
ba 0b
3:
/*
* Set the MMU fault status area
*/
/*
* Load remaining arguments before enabling the
* MMU so that the loads can be done using real
* addresses.
*/
/*
* Enable the MMU. On success, it returns to the
* global version of the landing pad text, rather
* than the text copied into the lpad buffer.
*/
/*
* On errors, just enter a spin loop until the
* CPU that initiated the start recovers the CPU.
*/
/*
* Jump to the generic CPU initialization code.
*/
#endif /* lint */