isa_traits.hh revision 9850:87d6b41749e9
12086SN/A/*
22086SN/A * Copyright (c) 2013 ARM Limited
35268Sksewell@umich.edu * All rights reserved
42086SN/A *
52086SN/A * The license below extends only to copyright in the software and shall
62086SN/A * not be construed as granting a license to any other intellectual
72086SN/A * property including but not limited to intellectual property relating
82086SN/A * to a hardware implementation of the functionality of the software
92086SN/A * licensed hereunder.  You may use the software subject to the license
102086SN/A * terms below provided that you ensure that this notice is replicated
112086SN/A * unmodified and in its entirety in all distributions of the software,
122086SN/A * modified or unmodified, in source code or in binary form.
132086SN/A *
142086SN/A * Redistribution and use in source and binary forms, with or without
152086SN/A * modification, are permitted provided that the following conditions are
162086SN/A * met: redistributions of source code must retain the above copyright
172086SN/A * notice, this list of conditions and the following disclaimer;
182086SN/A * redistributions in binary form must reproduce the above copyright
192086SN/A * notice, this list of conditions and the following disclaimer in the
202086SN/A * documentation and/or other materials provided with the distribution;
212086SN/A * neither the name of the copyright holders nor the names of its
222086SN/A * contributors may be used to endorse or promote products derived from
232086SN/A * this software without specific prior written permission.
242086SN/A *
252086SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
262086SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
272086SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
282665Ssaidi@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
292665Ssaidi@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
302665Ssaidi@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
312686Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
322086SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
334202Sbinkertn@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
342086SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
354202Sbinkertn@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
364202Sbinkertn@umich.edu *
376313Sgblack@eecs.umich.edu * Authors: Andreas Hansson
384997Sgblack@eecs.umich.edu */
395222Sksewell@umich.edu
404202Sbinkertn@umich.edu#ifndef __ARCH_NULL_ISA_TRAITS_HH__
415222Sksewell@umich.edu#define __ARCH_NULL_ISA_TRAITS_HH__
424997Sgblack@eecs.umich.edu
434997Sgblack@eecs.umich.edu#include "base/types.hh"
445192Ssaidi@eecs.umich.edu
455192Ssaidi@eecs.umich.edunamespace LittleEndianGuest {}
464202Sbinkertn@umich.edu
477799Sgblack@eecs.umich.edunamespace NullISA
487799Sgblack@eecs.umich.edu{
495222Sksewell@umich.edu    using namespace LittleEndianGuest;
505222Sksewell@umich.edu
515222Sksewell@umich.edu    const Addr PageShift = 12;
525222Sksewell@umich.edu    const Addr PageBytes = ULL(1) << PageShift;
535222Sksewell@umich.edu
545222Sksewell@umich.edu    const int LogVMPageSize = 12;       // 4K bytes
557799Sgblack@eecs.umich.edu    const int VMPageSize = (1 << LogVMPageSize);
565222Sksewell@umich.edu
574202Sbinkertn@umich.edu}
584202Sbinkertn@umich.edu
594202Sbinkertn@umich.edu#endif //__ARCH_NULL_ISA_TRAITS_HH__
604202Sbinkertn@umich.edu