request.hh revision 2395
12391SN/A/* 28931Sandreas.hansson@arm.com * Copyright (c) 2002-2005 The Regents of The University of Michigan 38931Sandreas.hansson@arm.com * All rights reserved. 48931Sandreas.hansson@arm.com * 58931Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without 68931Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are 78931Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright 88931Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer; 98931Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright 108931Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the 118931Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution; 128931Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its 138931Sandreas.hansson@arm.com * contributors may be used to endorse or promote products derived from 142391SN/A * this software without specific prior written permission. 152391SN/A * 162391SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172391SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182391SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192391SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202391SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212391SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222391SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232391SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242391SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252391SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262391SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272391SN/A */ 282391SN/A 292391SN/A/** 302391SN/A * @file Decleration of a request, the overall memory request consisting of 312391SN/A the parts of the request that are persistent throughout the transaction. 322391SN/A */ 332391SN/A 342391SN/A#ifndef __MEM_REQUEST_HH__ 352391SN/A#define __MEM_REQUEST_HH__ 362391SN/A 372391SN/A#include "targetarch/isa_traits.hh" 382391SN/A 392665SN/Aclass Request; 402665SN/Aclass CpuRequest; 418931Sandreas.hansson@arm.com 422391SN/Atypedef Request* RequestPtr; 432391SN/Atypedef CpuRequest* CpuRequestPtr; 448931Sandreas.hansson@arm.com 458931Sandreas.hansson@arm.com/** The request is a Load locked/store conditional. */ 468931Sandreas.hansson@arm.comconst unsigned LOCKED = 0x001; 472391SN/A/** The virtual address is also the physical address. */ 482391SN/Aconst unsigned PHYSICAL = 0x002; 498931Sandreas.hansson@arm.com/** The request is an ALPHA VPTE pal access (hw_ld). */ 508931Sandreas.hansson@arm.comconst unsigned VPTE = 0x004; 512391SN/A/** Use the alternate mode bits in ALPHA. */ 528931Sandreas.hansson@arm.comconst unsigned ALTMODE = 0x008; 538931Sandreas.hansson@arm.com/** The request is to an uncacheable address. */ 548931Sandreas.hansson@arm.comconst unsigned UNCACHEABLE = 0x010; 554762SN/A/** The request should not cause a page fault. */ 568931Sandreas.hansson@arm.comconst unsigned NO_FAULT = 0x020; 579120Sandreas.hansson@arm.com 589228Sandreas.hansson@arm.comclass Request 599228Sandreas.hansson@arm.com{ 609228Sandreas.hansson@arm.com //@todo Make Accesor functions, make these private. 619264Sdjordje.kovacevic@arm.com public: 628931Sandreas.hansson@arm.com /** The physical address of the request. */ 638931Sandreas.hansson@arm.com Addr paddr; 648931Sandreas.hansson@arm.com 652462SN/A /** whether this req came from the CPU or not **DO we need this??***/ 668931Sandreas.hansson@arm.com bool nicReq; 676107SN/A 689228Sandreas.hansson@arm.com /** The size of the request. */ 692413SN/A int size; 709228Sandreas.hansson@arm.com 719228Sandreas.hansson@arm.com /** The time this request was started. Used to calculate latencies. */ 729228Sandreas.hansson@arm.com Tick time; 739228Sandreas.hansson@arm.com 749228Sandreas.hansson@arm.com /** Destination address if this is a block copy. */ 758931Sandreas.hansson@arm.com Addr copyDest; 762413SN/A 772413SN/A uint32_t flags; 782413SN/A}; 798931Sandreas.hansson@arm.com 802413SN/Aclass CpuRequest : public Request 812413SN/A{ 822413SN/A //@todo Make Accesor functions, make these private. 839228Sandreas.hansson@arm.com public: 842413SN/A /** The virtual address of the request. */ 859228Sandreas.hansson@arm.com Addr vaddr; 862413SN/A 879228Sandreas.hansson@arm.com /** The address space ID. */ 889228Sandreas.hansson@arm.com int asid; 899228Sandreas.hansson@arm.com 902413SN/A /** The return value of store conditional. */ 912413SN/A uint64_t scResult; 922413SN/A 939120Sandreas.hansson@arm.com /** The cpu number for statistics. */ 942416SN/A int cpuNum; 952565SN/A 965399SN/A /** The requesting thread id. */ 978719SN/A int threadNum; 989228Sandreas.hansson@arm.com 999228Sandreas.hansson@arm.com /** program counter of initiating access; for tracing/debugging */ 1009228Sandreas.hansson@arm.com Addr pc; 1019228Sandreas.hansson@arm.com}; 1029228Sandreas.hansson@arm.com 1039228Sandreas.hansson@arm.com#endif // __MEM_REQUEST_HH__ 1049228Sandreas.hansson@arm.com