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