17c478bd9Sstevel@tonic-gate/* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate/* 23*94836d42Spt157919 * Copyright (c) 2007 by Sun Microsystems, Inc. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate/* 297c478bd9Sstevel@tonic-gate * General machine architecture & implementation specific 307c478bd9Sstevel@tonic-gate * assembly language routines. 317c478bd9Sstevel@tonic-gate */ 327c478bd9Sstevel@tonic-gate#if defined(lint) 337c478bd9Sstevel@tonic-gate#include <sys/types.h> 347c478bd9Sstevel@tonic-gate#include <sys/machsystm.h> 357c478bd9Sstevel@tonic-gate#include <sys/t_lock.h> 367c478bd9Sstevel@tonic-gate#else /* lint */ 377c478bd9Sstevel@tonic-gate#include "assym.h" 387c478bd9Sstevel@tonic-gate#endif /* lint */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h> 417c478bd9Sstevel@tonic-gate#include <sys/eeprom.h> 427c478bd9Sstevel@tonic-gate#include <sys/param.h> 437c478bd9Sstevel@tonic-gate#include <sys/async.h> 447c478bd9Sstevel@tonic-gate#include <sys/intreg.h> 457c478bd9Sstevel@tonic-gate#include <sys/machthread.h> 467c478bd9Sstevel@tonic-gate#include <sys/iocache.h> 477c478bd9Sstevel@tonic-gate#include <sys/privregs.h> 487c478bd9Sstevel@tonic-gate#include <sys/archsystm.h> 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate#if defined(lint) 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 537c478bd9Sstevel@tonic-gatevoid 547c478bd9Sstevel@tonic-gatememscrub_read(caddr_t vaddr, u_int blks) 557c478bd9Sstevel@tonic-gate{} 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate#else /* lint */ 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate ! 607c478bd9Sstevel@tonic-gate ! void memscrub_read(caddr_t src, u_int blks) 617c478bd9Sstevel@tonic-gate ! 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate .seg ".text" 647c478bd9Sstevel@tonic-gate .align 4 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate ENTRY(memscrub_read) 677c478bd9Sstevel@tonic-gate srl %o1, 0, %o1 ! clear upper word of blk count 687c478bd9Sstevel@tonic-gate rd %fprs, %o2 ! get the status of fp 697c478bd9Sstevel@tonic-gate wr %g0, FPRS_FEF, %fprs ! enable fp 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate1: 72*94836d42Spt157919 prefetch [%o0 + 8*64], 0 737c478bd9Sstevel@tonic-gate ldda [%o0]ASI_BLK_P, %d0 747c478bd9Sstevel@tonic-gate add %o0, 64, %o0 75*94836d42Spt157919 prefetch [%o0 + 8*64], 0 767c478bd9Sstevel@tonic-gate ldda [%o0]ASI_BLK_P, %d16 777c478bd9Sstevel@tonic-gate add %o0, 64, %o0 78*94836d42Spt157919 prefetch [%o0 + 8*64], 0 797c478bd9Sstevel@tonic-gate ldda [%o0]ASI_BLK_P, %d32 807c478bd9Sstevel@tonic-gate add %o0, 64, %o0 81*94836d42Spt157919 prefetch [%o0 + 8*64], 0 827c478bd9Sstevel@tonic-gate ldda [%o0]ASI_BLK_P, %d48 837c478bd9Sstevel@tonic-gate dec %o1 847c478bd9Sstevel@tonic-gate brnz,a %o1, 1b 857c478bd9Sstevel@tonic-gate add %o0, 64, %o0 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate retl 887c478bd9Sstevel@tonic-gate wr %o2, 0, %fprs ! restore fprs (disabled) 897c478bd9Sstevel@tonic-gate SET_SIZE(memscrub_read) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate#endif /* lint */ 92