mmapped_ipr.hh revision 7741
16313Sgblack@eecs.umich.edu/*
26313Sgblack@eecs.umich.edu * Copyright (c) 2006 The Regents of The University of Michigan
36313Sgblack@eecs.umich.edu * All rights reserved.
46313Sgblack@eecs.umich.edu *
56313Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
66313Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
76313Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
86313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
96313Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
106313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
116313Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
126313Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
136313Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
146313Sgblack@eecs.umich.edu * this software without specific prior written permission.
156313Sgblack@eecs.umich.edu *
166313Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176313Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186313Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196313Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206313Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216313Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226313Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236313Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246313Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256313Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266313Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276313Sgblack@eecs.umich.edu *
286313Sgblack@eecs.umich.edu * Authors: Ali Saidi
296313Sgblack@eecs.umich.edu */
306313Sgblack@eecs.umich.edu
316313Sgblack@eecs.umich.edu#ifndef __ARCH_SPARC_MMAPED_IPR_HH__
326313Sgblack@eecs.umich.edu#define __ARCH_SPARC_MMAPED_IPR_HH__
336313Sgblack@eecs.umich.edu
348229Snate@binkert.org/**
358229Snate@binkert.org * @file
368229Snate@binkert.org *
377629Sgblack@eecs.umich.edu * ISA-specific helper functions for memory mapped IPR accesses.
387629Sgblack@eecs.umich.edu */
398229Snate@binkert.org
406336Sgblack@eecs.umich.edu#include "config/full_system.hh"
4112106SRekai.GonzalezAlberquilla@arm.com#include "cpu/thread_context.hh"
429384SAndreas.Sandberg@arm.com#include "mem/packet.hh"
436336Sgblack@eecs.umich.edu#include "arch/sparc/tlb.hh"
446313Sgblack@eecs.umich.edu
456313Sgblack@eecs.umich.edu
466336Sgblack@eecs.umich.edunamespace SparcISA
479384SAndreas.Sandberg@arm.com{
486313Sgblack@eecs.umich.edu
496313Sgblack@eecs.umich.eduinline Tick
506313Sgblack@eecs.umich.eduhandleIprRead(ThreadContext *xc, Packet *pkt)
519384SAndreas.Sandberg@arm.com{
526313Sgblack@eecs.umich.edu#if FULL_SYSTEM
536313Sgblack@eecs.umich.edu    return xc->getDTBPtr()->doMmuRegRead(xc, pkt);
546336Sgblack@eecs.umich.edu#else
556336Sgblack@eecs.umich.edu    panic("Shouldn't have a memory mapped register in SE\n");
569376Sgblack@eecs.umich.edu#endif
579376Sgblack@eecs.umich.edu}
586313Sgblack@eecs.umich.edu
596313Sgblack@eecs.umich.eduinline Tick
609384SAndreas.Sandberg@arm.comhandleIprWrite(ThreadContext *xc, Packet *pkt)
619384SAndreas.Sandberg@arm.com{
626313Sgblack@eecs.umich.edu#if FULL_SYSTEM
636313Sgblack@eecs.umich.edu    return xc->getDTBPtr()->doMmuRegWrite(xc, pkt);
649384SAndreas.Sandberg@arm.com#else
659384SAndreas.Sandberg@arm.com    panic("Shouldn't have a memory mapped register in SE\n");
666336Sgblack@eecs.umich.edu#endif
6710698Sandreas.hansson@arm.com}
686313Sgblack@eecs.umich.edu
696313Sgblack@eecs.umich.edu
706336Sgblack@eecs.umich.edu} // namespace SparcISA
716336Sgblack@eecs.umich.edu
726313Sgblack@eecs.umich.edu#endif
7312106SRekai.GonzalezAlberquilla@arm.com