1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 2007 by Sun Microsystems, Inc. 24 */ 25 26 /* 27 * General machine architecture & implementation specific 28 * assembly language routines. 29 */ 30 #include "assym.h" 31 32 #include <sys/asm_linkage.h> 33 #include <sys/eeprom.h> 34 #include <sys/param.h> 35 #include <sys/async.h> 36 #include <sys/intreg.h> 37 #include <sys/machthread.h> 38 #include <sys/iocache.h> 39 #include <sys/privregs.h> 40 #include <sys/archsystm.h> 41 42 ! 43 ! void memscrub_read(caddr_t src, u_int blks) 44 ! 45 46 .seg ".text" 47 .align 4 48 49 ENTRY(memscrub_read) 50 srl %o1, 0, %o1 ! clear upper word of blk count 51 rd %fprs, %o2 ! get the status of fp 52 wr %g0, FPRS_FEF, %fprs ! enable fp 53 54 1: 55 prefetch [%o0 + 8*64], 0 56 ldda [%o0]ASI_BLK_P, %d0 57 add %o0, 64, %o0 58 prefetch [%o0 + 8*64], 0 59 ldda [%o0]ASI_BLK_P, %d16 60 add %o0, 64, %o0 61 prefetch [%o0 + 8*64], 0 62 ldda [%o0]ASI_BLK_P, %d32 63 add %o0, 64, %o0 64 prefetch [%o0 + 8*64], 0 65 ldda [%o0]ASI_BLK_P, %d48 66 dec %o1 67 brnz,a %o1, 1b 68 add %o0, 64, %o0 69 70 retl 71 wr %o2, 0, %fprs ! restore fprs (disabled) 72 SET_SIZE(memscrub_read) 73