mmapped_ipr.hh revision 4152
13804SN/A/* 212776Snikos.nikoleris@arm.com * Copyright (c) 2007 The Hewlett-Packard Development Company 39235Sandreas.hansson@arm.com * All rights reserved. 49235Sandreas.hansson@arm.com * 59235Sandreas.hansson@arm.com * Redistribution and use of this software in source and binary forms, 69235Sandreas.hansson@arm.com * with or without modification, are permitted provided that the 79235Sandreas.hansson@arm.com * following conditions are met: 89235Sandreas.hansson@arm.com * 99235Sandreas.hansson@arm.com * The software must be used only for Non-Commercial Use which means any 109235Sandreas.hansson@arm.com * use which is NOT directed to receiving any direct monetary 119235Sandreas.hansson@arm.com * compensation for, or commercial advantage from such use. Illustrative 129235Sandreas.hansson@arm.com * examples of non-commercial use are academic research, personal study, 139235Sandreas.hansson@arm.com * teaching, education and corporate research & development. 143804SN/A * Illustrative examples of commercial use are distributing products for 153804SN/A * commercial advantage and providing services using the software for 163804SN/A * commercial advantage. 173804SN/A * 183804SN/A * If you wish to use this software or functionality therein that may be 193804SN/A * covered by patents for commercial use, please contact: 203804SN/A * Director of Intellectual Property Licensing 213804SN/A * Office of Strategy and Technology 223804SN/A * Hewlett-Packard Company 233804SN/A * 1501 Page Mill Road 243804SN/A * Palo Alto, California 94304 253804SN/A * 263804SN/A * Redistributions of source code must retain the above copyright notice, 273804SN/A * this list of conditions and the following disclaimer. Redistributions 283804SN/A * in binary form must reproduce the above copyright notice, this list of 293804SN/A * conditions and the following disclaimer in the documentation and/or 303804SN/A * other materials provided with the distribution. Neither the name of 313804SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 323804SN/A * contributors may be used to endorse or promote products derived from 333804SN/A * this software without specific prior written permission. No right of 343804SN/A * sublicense is granted herewith. Derivatives of the software and 353804SN/A * output created using the software may be prepared, but only for 363804SN/A * Non-Commercial Uses. Derivatives of the software may be shared with 373804SN/A * others provided: (i) the others agree to abide by the list of 383804SN/A * conditions herein which includes the Non-Commercial Use restrictions; 393804SN/A * and (ii) such Derivatives of the software include the above copyright 403804SN/A * notice to acknowledge the contribution from this software where 419235Sandreas.hansson@arm.com * applicable, this list of conditions and the disclaimer below. 423804SN/A * 433804SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 449235Sandreas.hansson@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 459235Sandreas.hansson@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 463804SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 4712783Snikos.nikoleris@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4812783Snikos.nikoleris@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 4912783Snikos.nikoleris@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 508229SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 518902SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 528229SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 539235Sandreas.hansson@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5412783Snikos.nikoleris@arm.com * 553804SN/A * Authors: Gabe Black 568918SN/A */ 579235Sandreas.hansson@arm.com 589235Sandreas.hansson@arm.com#ifndef __ARCH_X86_MMAPEDIPR_HH__ 599235Sandreas.hansson@arm.com#define __ARCH_X86_MMAPEDIPR_HH__ 608918SN/A 6112777Sgabeblack@google.com/** 629235Sandreas.hansson@arm.com * @file 633804SN/A * 643804SN/A * ISA-specific helper functions for memory mapped IPR accesses. 659235Sandreas.hansson@arm.com */ 663804SN/A 673804SN/A#include "config/full_system.hh" 683804SN/A#include "cpu/thread_context.hh" 698918SN/A#include "mem/packet.hh" 703804SN/A 7112776Snikos.nikoleris@arm.comnamespace X86ISA 7212776Snikos.nikoleris@arm.com{ 7312776Snikos.nikoleris@arm.com inline Tick 7412776Snikos.nikoleris@arm.com handleIprRead(ThreadContext *xc, Packet *pkt) 7512776Snikos.nikoleris@arm.com { 7612776Snikos.nikoleris@arm.com#if !FULL_SYSTEM 7712776Snikos.nikoleris@arm.com panic("Shouldn't have a memory mapped register in SE\n"); 7812776Snikos.nikoleris@arm.com#endif 7912776Snikos.nikoleris@arm.com } 8012776Snikos.nikoleris@arm.com 818918SN/A inline Tick 8212776Snikos.nikoleris@arm.com handleIprWrite(ThreadContext *xc, Packet *pkt) 838918SN/A { 8412776Snikos.nikoleris@arm.com#if !FULL_SYSTEM 853804SN/A panic("Shouldn't have a memory mapped register in SE\n"); 863804SN/A#endif 8712776Snikos.nikoleris@arm.com } 8812776Snikos.nikoleris@arm.com}; 8912776Snikos.nikoleris@arm.com 9012776Snikos.nikoleris@arm.com#endif // __ARCH_X86_MMAPEDIPR_HH__ 9112776Snikos.nikoleris@arm.com