mach_cpu_module.c revision 7bafd14382b5b097b3e3940091dfccb91247dfd5
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu/*
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * CDDL HEADER START
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu *
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * The contents of this file are subject to the terms of the
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * Common Development and Distribution License (the "License").
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * You may not use this file except in compliance with the License.
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu *
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * or http://www.opensolaris.org/os/licensing.
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * See the License for the specific language governing permissions
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * and limitations under the License.
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu *
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * When distributing Covered Code, include this CDDL HEADER in each
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * If applicable, add the following below this CDDL HEADER, with the
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * fields enclosed by brackets "[]" replaced with your own identifying
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * information: Portions Copyright [yyyy] [name of copyright owner]
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu *
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * CDDL HEADER END
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu */
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu/*
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu * Use is subject to license terms.
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu */
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu#pragma ident "%Z%%M% %I% %E% SMI"
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu#include <sys/cpu_module.h>
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu#include <vm/page.h>
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu#include <vm/seg_map.h>
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fuvoid
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fucpu_fiximp(struct cpu_node *cpunode)
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu{}
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fuvoid
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fucpu_flush_ecache(void)
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu{}
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu/*ARGSUSED*/
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fuvoid
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fucpu_faulted_enter(struct cpu *cp)
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu{}
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fu/*ARGSUSED*/
c0da627439dfb642fb41ab7d78406fc69d2c64b2Zhi-Jun Robin Fuvoid
cpu_faulted_exit(struct cpu *cp)
{}
/*
* Ecache scrub operations
*/
void
cpu_init_cache_scrub(void)
{}
/* ARGSUSED */
void
prefetch_page_w(void *pp)
{
#define ECACHE_SUBBLOCKS_PER_PAGE 2
#define ECACHE_SUBBLOCK_SIZE_BYTES 64
#define ECACHE_PAGE_BYTE_MAX \
(ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1)
/*
* The following line is intended to cause an error
* whenever the sun4u page_t grows beyond 128
* bytes.
*
* If you get an error here, you'll need to change
* the 'prefetch_page_w' assembly language code
* (see also prefetch_page_w prologue comment)
*/
/*LINTED*/
volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)];
}
/* ARGSUSED */
void
prefetch_page_r(void *pp)
{
#define ECACHE_SUBBLOCKS_PER_PAGE 2
#define ECACHE_SUBBLOCK_SIZE_BYTES 64
#define ECACHE_PAGE_BYTE_MAX \
(ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1)
/*
* The following line is intended to cause an error
* whenever the sun4u page_t grows beyond 128
* bytes.
*
* If you get an error here, you'll need to change
* the 'prefetch_page_r' assembly language code
* (see also prefetch_page_w prologue comment)
*/
/*LINTED*/
volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)];
}
#ifdef SEGKPM_SUPPORT
#define SMAP_SIZE 80
#else
#define SMAP_SIZE 56
#endif
/* ARGSUSED */
void
prefetch_smap_w(void *smp)
{
/*
* The following lines are intended to cause an error
* whenever the smap object size changes from the current
* size of 48 bytes. If you get an error here, you'll
* need to update the code in the 'prefetch_smap_w' assembly
* language code.
*/
/*LINTED*/
volatile int smap_size_changed [SMAP_SIZE - sizeof (struct smap) + 1];
volatile int smap_size_changed2 [sizeof (struct smap) - SMAP_SIZE + 1];
}
void
kdi_flush_caches(void)
{}
/*ARGSUSED*/
int
kzero(void *addr, size_t count)
{ return (0); }
/*ARGSUSED*/
void
uzero(void *addr, size_t count)
{}
/*ARGSUSED*/
void
bzero(void *addr, size_t count)
{}
/*ARGSUSED*/
void
cpu_inv_tsb(caddr_t tsb_base, uint_t tsb_bytes)
{}
void
fp_zero(void)
{}