17c478bd9Sstevel@tonic-gate /* 2*d0b3732eSbholler * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate #ifndef _AMD64CACHE_H 77c478bd9Sstevel@tonic-gate #define _AMD64CACHE_H 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 107c478bd9Sstevel@tonic-gate 117c478bd9Sstevel@tonic-gate #ifdef __cplusplus 127c478bd9Sstevel@tonic-gate extern "C" { 137c478bd9Sstevel@tonic-gate #endif 147c478bd9Sstevel@tonic-gate 157c478bd9Sstevel@tonic-gate #ifdef _ASM /* The remainder of this file is only for assembly files */ 167c478bd9Sstevel@tonic-gate 177c478bd9Sstevel@tonic-gate /* 187c478bd9Sstevel@tonic-gate * Copyright (c) 2002 Advanced Micro Devices, Inc. 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * All rights reserved. 217c478bd9Sstevel@tonic-gate * 227c478bd9Sstevel@tonic-gate * Redistribution and use in source and binary forms, with or 237c478bd9Sstevel@tonic-gate * without modification, are permitted provided that the 247c478bd9Sstevel@tonic-gate * following conditions are met: 257c478bd9Sstevel@tonic-gate * 267c478bd9Sstevel@tonic-gate * + Redistributions of source code must retain the above 277c478bd9Sstevel@tonic-gate * copyright notice, this list of conditions and the 287c478bd9Sstevel@tonic-gate * following disclaimer. 297c478bd9Sstevel@tonic-gate * 307c478bd9Sstevel@tonic-gate * + Redistributions in binary form must reproduce the above 317c478bd9Sstevel@tonic-gate * copyright notice, this list of conditions and the 327c478bd9Sstevel@tonic-gate * following disclaimer in the documentation and/or other 337c478bd9Sstevel@tonic-gate * materials provided with the distribution. 347c478bd9Sstevel@tonic-gate * 357c478bd9Sstevel@tonic-gate * + Neither the name of Advanced Micro Devices, Inc. nor the 367c478bd9Sstevel@tonic-gate * names of its contributors may be used to endorse or 377c478bd9Sstevel@tonic-gate * promote products derived from this software without 387c478bd9Sstevel@tonic-gate * specific prior written permission. 397c478bd9Sstevel@tonic-gate * 407c478bd9Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 417c478bd9Sstevel@tonic-gate * CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, 427c478bd9Sstevel@tonic-gate * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 437c478bd9Sstevel@tonic-gate * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 447c478bd9Sstevel@tonic-gate * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, 457c478bd9Sstevel@tonic-gate * INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 467c478bd9Sstevel@tonic-gate * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 477c478bd9Sstevel@tonic-gate * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 487c478bd9Sstevel@tonic-gate * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 497c478bd9Sstevel@tonic-gate * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 507c478bd9Sstevel@tonic-gate * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 517c478bd9Sstevel@tonic-gate * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 527c478bd9Sstevel@tonic-gate * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 537c478bd9Sstevel@tonic-gate * POSSIBILITY OF SUCH DAMAGE. 547c478bd9Sstevel@tonic-gate * 557c478bd9Sstevel@tonic-gate * It is licensee's responsibility to comply with any export 567c478bd9Sstevel@tonic-gate * regulations applicable in licensee's jurisdiction. 577c478bd9Sstevel@tonic-gate * 587c478bd9Sstevel@tonic-gate * $Header: /K8_Projects/Glibc/amd64cache.h 3 7/28/04 18:13 Emenezes $ 597c478bd9Sstevel@tonic-gate */ 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gate .equiv CPUIDLARGESTFUNCTION, 0 /* value in EAX */ 627c478bd9Sstevel@tonic-gate .equiv CPUIDVENDORID, 0 /* string in EBX:EDX:ECX */ 637c478bd9Sstevel@tonic-gate .equiv CPUIDFEATURE, 1 /* value in EDX */ 647c478bd9Sstevel@tonic-gate .equiv CPUIDSIGNATURE, 1 /* value in EAX */ 657c478bd9Sstevel@tonic-gate .equiv CPUIDLARGESTFUNCTIONEX, 0x80000000 /* value in EAX */ 667c478bd9Sstevel@tonic-gate .equiv AMDIDSIGNATUREEX, 0x80000001 /* value in EAX */ 677c478bd9Sstevel@tonic-gate .equiv AMDIDFEATUREEX, 0x80000001 /* value in EDX */ 687c478bd9Sstevel@tonic-gate .equiv AMDIDNAME, 0x80000002 697c478bd9Sstevel@tonic-gate /* string in EAX:EBX:ECX:EDX, also in CPUIDNAME + 1 and CPUIDNAME + 2 */ 707c478bd9Sstevel@tonic-gate .equiv AMDIDL1INFO, 0x80000005 717c478bd9Sstevel@tonic-gate /* values in EAX, EBX, ECX and EDX */ 727c478bd9Sstevel@tonic-gate .equiv AMDIDL2INFO, 0x80000006 737c478bd9Sstevel@tonic-gate /* values in EAX, EBX, ECX and EDX */ 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gate .equiv AMDFAMILYK8, 0x0f 767c478bd9Sstevel@tonic-gate .equiv AMDSTEPK8C0, 0x08 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate .equiv AMD64PAGESIZE, 4096 797c478bd9Sstevel@tonic-gate .equiv AMD64PAGEMASK, 4095 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate .extern .amd64cache1, .amd64cache1half, .amd64cache2, .amd64cache2half 827c478bd9Sstevel@tonic-gate 83*d0b3732eSbholler .extern .largest_level_cache_size 84*d0b3732eSbholler 857c478bd9Sstevel@tonic-gate .extern __amd64id 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate #endif /* _ASM */ 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate #ifdef __cplusplus 907c478bd9Sstevel@tonic-gate } 917c478bd9Sstevel@tonic-gate #endif 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate #endif /* _AMD64CACHE_H */ 94